In industrial automation, control systems, and even early computer design, logical signal processing is at the core. Although modern systems have widely adopted programmable logic controllers (PLCs) and microprocessors, relay-based logic control (Relay Logic) remains indispensable in many critical applications due to its robustness, reliability, intuitiveness, and strong interference resistance. This article will delve into how to utilize this classic electromechanical component to build both basic and complex logic functions, thereby fundamentally altering the behavior and logic of signals.
It is vital to have a solid understanding of the basic component that is responsible for this duty, which is the relay, before beginning the process of logic creation.
A relay is essentially an electromechanical switch controlled by an electromagnet.
Basic principle: When the coil is activated, it generates a magnetic field that pulls or pushes the armature. This movement causes the contacts to open or close, which regulates another circuit—usually one carrying more power.
Normally Open (NO) Contact: A contact that remains open when the coil is not energized.
Normally Closed (NC) Contact: This contact stays closed (current flows) when the coil is not powered. It activates when the coil is energised..
Changeover (CO) Contact: This is a mix of both NO and NC contacts, sharing one common terminal. It’s also called a “break-before-make” contact because it disconnects one side before connecting the other.
Relay logic separates two things:
Control logic → whether the coil is energized or not.
Load logic → whether the contacts are open or closed.
By wiring contacts in series or parallel, you can mimic logical operations (like AND, OR) without needing electronics—just by using relays.
The “on” and “off” states of the coil are the input signals, while the ‘on’ and “off” states of the load circuit controlled by the contacts are the output signals.
The foundation of all digital logic is basic logic gates. Relays can very intuitively implement these functions.
Implementation method: Connect the normally open contacts of two or more relays in series in the load circuit (such as indicator lights, contactor coils).
Logical explanation: The normally open contacts will only close and create a full circuit, resulting in an output of "true" (energised), when all relay coils (input A and input B) are energised. If any input is absent, the circuit will disengage at a certain contact point, resulting in a “false” output.
Application scenario: Safety interlock system. For example, a machine's guard must be closed (triggered by sensor A), and the operator must simultaneously press the start button with both hands (triggered by button B) for the machine to start.
Implementation Method: Connect the normally open contacts of two or more relays in parallel in the load circuit.
Logic Explanation: While the coil of either relay is (input A or input B) energised, the associated normally open contact will shut, establishing a conductive pathway for the load, hence yielding an output of “true.” Not all inputs need to be active.
Essential factors: In the construction of an OR gate, particularly within timing circuits that may interface with additional logic thereafter, a diode (flyback diode) should be installed in reverse parallel across each relay coil. The de-energization of the coil results in the vanishing of the magnetic field, which produces a substantial reverse induced electromotive force (voltage spike). This voltage surge can damage the coil insulation and also feedback through the parallel contacts to adjacent de-energised relay coils, causing unintentional temporary energisation and leading in logic faults. The diode offers a discharge pathway for the induced current, so safeguarding the circuit and maintaining logic integrity.
Application scenario: Multi-location control. For example, a large piece of equipment can be started from the local control room or from multiple locations at the equipment site via buttons, with any trigger causing the equipment to operate.
Implementation method: Use the normally closed contacts of the relay. Connect the load circuit in series with the normally closed contacts.
Logic explanation: The typically closed contact stays closed and the output is "true" when the relay coil is not energised (input is "false"). The contact opens and the output turns "false" when the coil is energised (the input is "true"). The signal is inverted as a result.
Application Scenario: Fault-safe indication. For instance, when a relay coil that measures the motor temperature is activated during regular operation, its typically closed connections open, turning off the green "Normal" indication light. The coil de-energises, the normally closed contacts reset and close, and the red "Overheat" alarm light glows when the temperature rises too high (fault).
By combining basic gate circuits and utilizing relays with multiple sets of contacts (e.g., 2NO/2NC), powerful complex logic circuits can be constructed to achieve deep modifications of signal behavior.
Description: This is a critical technology to prevent conflicting or dangerous operations. It locks the possibility of another relay's action based on the state of one relay.
Implementation: For instance, the "forward" and "reverse" contactors of a motor must not be energised concurrently, as this would result in a short circuit. We link one typically closed contact of the forward contactor in series with the coil circuit of the reverse contactor, and vice versa. Consequently, when the forward contactor is activated, its typically closed contact opens, entirely severing the coil circuit of the reverse contactor, thus establishing electrical interlocking.
Description: This is also called a “self-holding” circuit. It functions akin to a memory: upon receiving a brief signal, it retains that condition even after the signal ceases. The circuit will stay in that condition until another signal resets it.
Implementation: This is a classic circuit for motor start/stop control. Pressing the momentary (momentary) start button (normally open) energizes the contactor coil. After the contactor is energized, one of its normally open auxiliary contacts closes in parallel with the start button. Even if the start button is released, current can still flow through this auxiliary contact to maintain the coil energized, completing the “self-locking” circuit. To turn off the motor, press the stop button (usually closed), which is connected in series in the circuit. Once pressed, it breaks the entire self-holding circuit.
Logical Meaning: It converts a brief pulse signal (start command) into a stable, continuous output state (running) until a reset command (stop) is received.
Description: Relays can be used to construct automated processes that execute in a strict sequential order.
Implementation: For example, a simple three-step process:
① In the first step, the relay activates, opening the feed valve;
② Upon completion of the first step, a limit switch is triggered, energizing the second-step relay coil to start stirring;
③ When the stirring time elapses (controlled by a timer relay), the second-step relay de-energizes, its normally closed contacts reset, and the third-step relay is energized to open the discharge valve. This process enforces the sequential occurrence of steps through the mutual constraints of relay contacts and sensor signals.
Description: Timer relays can be used to artificially introduce delays in the activation or release of signals, thereby altering the timing logic of the signals.
Types:
On-delay: After the coil is energized, the contacts delay for a certain period before actuating.
Off-Delay:
Upon deactivation of the relay coil, the connections do not immediately revert. Instead, they pause for a predetermined duration prior to resetting.
Applications:
Motor start-up (star-delta): Used when starting large motors with reduced voltage. The circuit switches from star to delta after a short delay.
Ventilation systems: Cooling fans remove heat when the main motor stops.
Lighting control: Corridor or stairway lights stay on for a short time after being switched off, giving people time to exit safely.
Designing a reliable and efficient relay logic system requires careful planning.
Contact Type Selection: Select relays carefully based on logic requirements. How many sets of contacts do you need? Are they normally open, normally closed, or changeover? Ensure that the current capacity of the contacts is sufficient to drive the load.
Ladder diagrams for complex circuits are essential diagnostic and design tools. They are a graphical language where two vertical “power rails” are connected by horizontal “ladder rungs,” each representing a logical path. The symbols for contacts (input conditions) and coils (output results) correspond directly to actual relay components, making them extremely intuitive.
When switching very small currents (e.g., below 2A) or voltages (e.g., 5V, 24V DC) for electronic control signals, dedicated signal relays should be selected. They are compact, responsive, and highly reliable, making them ideal for logic switching and isolation of long-distance, low-power signals in PLC output modules, communication equipment, and network devices, providing an efficient solution.
Coil Protection: A freewheeling diode (for DC coils) or an RC snubber circuit (for AC coils) must be connected in parallel across the coil terminals to suppress induced voltage spikes during power disconnection, thereby protecting the transistors or PLC output points driving the coil.
Contact Protection: When switching inductive loads (such as motors or solenoid valves), arcing can severely erode the contacts, shortening their lifespan. An RC buffer circuit or varistor must be connected in parallel across the load terminals to absorb the energy.
Physical Layout and Wiring: High-voltage circuits (load circuits) and low-voltage circuits (control circuits) should be wired separately to avoid interference. Use clear wire numbers and diagram numbers for easy installation and maintenance.
Relays are a tried-and-true method of shaping and controlling signal logic that is simple, long-lasting, and electrically sound. From simple AND/OR decisions to complex timing processes and memory functions, engineers can achieve a wide range of logic control functions for various mechanical, industrial processes, and infrastructure by carefully selecting, combining, and wiring relays. Software-defined solutions offer unmatched flexibility, but relay logic's physical determinism and electromagnetic interference resistance keep it relevant in safety-critical and high-reliability applications. This technology is essential to understanding automation's history and electrical engineering principles.