Chapter Goal: To understand the critical role of the power supply and relays. You'll learn how to select the correct power supply and know when and how to use a relay to safely interface the low-power PLC with high-power real-world devices.
While your home is powered by high-voltage AC (Alternating Current), the control systems in industrial automation almost universally run on 24 Volt DC (Direct Current). This isn't an arbitrary choice; it's based on safety, reliability, and global standardization.
Why 24V DC?
Safety: 24V DC is classified as Safety Extra-Low Voltage (SELV). This voltage is low enough that it doesn't pose a significant risk of dangerous electric shock to technicians working on the system, which is a major advantage in a complex industrial environment. ⚡
Signal Integrity: The clean, stable voltage of DC is perfect for digital electronic devices like PLCs, sensors, and network switches. AC power, with its constantly changing wave pattern, can introduce electrical "noise" that might interfere with these sensitive components.
Global Standard: Using 24V DC as the control voltage standard ensures that components from virtually any manufacturer around the world can be integrated into a single system without compatibility issues.
The SMPS (Switched-Mode Power Supply) The device that converts high-voltage plant power (e.g., 230V AC) into the usable 24V DC is the Switched-Mode Power Supply (SMPS). Think of it as a highly efficient, industrial-grade power adapter for your entire control panel.
Selecting an SMPS involves more than just matching the voltage. The most important specification is its current rating, measured in Amperes (A). An undersized power supply is a common cause of mysterious system faults, random reboots, and component failure.
The Sizing Process:
List All DC Components: Create a comprehensive list of every device that will draw power from the 24V DC supply. This includes the PLC's CPU, all I/O modules, the HMI screen, every sensor, relay coils, solenoid valves, etc.
Sum the Current Draw: Check the technical datasheet for each component to find its "current consumption," typically listed in milliamps (mA) or amps (A). (Remember: 1000mA = 1A). Add these values together.
Add a Safety Margin: You should never run a power supply at 100% of its rated capacity. A healthy safety margin accounts for the initial "inrush" current when devices start up and allows for future system expansion. A professional standard is to add 25% to 30% to your calculated total.
Practical Sizing Example:
PLC CPU: 300 mA
Digital Input Module: 100 mA
Digital Output Module: 150 mA
HMI Panel: 500 mA
5 x Photoelectric Sensors (50 mA each): 250 mA
4 x Relay Coils (30 mA each): 120 mA
Total Calculated Load: 1420 mA or 1.42 A
Applying a 30% Safety Margin: $1.42 A * 1.30 = 1.85 A$
Conclusion: You must select the next standard-sized SMPS that is ABOVE your final calculated value. Common sizes are 2.5A, 5A, and 10A. In this case, a 2.5A SMPS would be the correct minimum choice.
A PLC's output card is a sensitive electronic device. It's designed to produce a low-power signal, not to directly run a large motor or a high-wattage heater. To control powerful devices, we use a relay or a larger version called a contactor.
A relay is an electrically operated switch. It uses a small amount of power to control a separate, high-power circuit.
How It Works:
Coil: An electromagnet that receives the low-power signal from the PLC. When the PLC output turns ON, it sends 24V DC to the coil, creating a magnetic field.
Contacts: A set of mechanical switches. The magnetic field from the energized coil physically pulls the contacts, causing them to open or close the separate, high-power circuit.
When You MUST Use a Relay (The 3 Key Scenarios):
Current Amplification: Your PLC output is rated for 0.5A, but the electric motor's contactor coil requires 2A to pull in. The PLC output energizes the relay's coil (which needs very little current), and the relay's heavy-duty contacts safely handle the 2A needed by the motor contactor.
Analogy: Your finger (the PLC) presses a small button on a remote (the relay), which activates a powerful crane (the motor).
Voltage Isolation (Most Important Safety Function!): Your PLC and control circuit run on 24V DC, but you need to turn on a 230V AC light. A relay is used to isolate these two voltages. The 24V DC PLC circuit is wired only to the relay's coil. The 230V AC power is wired only to the relay's contacts. There is no electrical connection between them, only a magnetic one. This protects the PLC and the operator from dangerous high voltages.
Contact Multiplication: You have one PLC output, but you need it to simultaneously turn on a motor, activate a red light, and send a "running" signal back to a monitoring system. You can use that single PLC output to energize one relay that has multiple sets of contacts, allowing you to control all three separate circuits at once.
This diagram shows how a PLC safely controls a high-voltage lamp.
Control Circuit (24V DC): The PLC's output terminal (Q0.0) is wired to the A1 terminal on the relay's coil. The A2 terminal of the coil is wired to the 0V (DC common) to complete the control circuit.
Power Circuit (230V AC): The high-voltage "Live" wire is connected to the relay's common contact (COM). The lamp is connected to the Normally Open (NO) contact. The other side of the lamp is connected to the "Neutral" wire.
Operation:
The PLC program turns on output Q0.0.
24V DC flows through the relay coil (A1 to A2).
The coil's magnetic field closes the internal switch between COM and NO.
This completes the 230V AC circuit, allowing power to flow to the lamp. The PLC and the high-voltage lamp are safely isolated from each other.