Relay Logic
RELAY_LOGIC
What Is Relay Logic?
Relay logic consists of relays wired together in a particular configuration to perform the desired switching operations. Relay Logic is all about wiring up Relays for Logical Switching applications. Get a printout of this page
Relay Logic
Relay Wiring Samples
This page demonstrates several simple ways to wire a relay or multiple relays for various applications. We use the example of switching a light but the light can be swapped for a gate control, security system, dry contact output and other devices. These examples show different ways to wire to a relay or multiple relays to produce a desired effect.Get a printout of this page
SPDT Wiring
SPDT Single Pole Double Throw Relays have three connections - Common, Normally Open, and Normally Closed. When the relay is off, the common is connected to the normally closed connection of the relay. When the relay coil is energized, the Common swings to the Normally Open Connection of the Relay. You can wire the device you are switching to either the Normally Open or the Normally Closed position and we have examples below.
SPST Wiring
SPST Single Pole Single Throw Relays have two connections - Common and Normally Open. The Common (COM) is the moving part of the relay that comes in contact with the Normally Open (NO) when the coil to the relay is energized. The only SPST relay we sell on this site is the 30-Amp relays, The wiring examples below can be used with the 30-Amp relays as long as the example doesn't use the Normally Closed position.DPDT Wiring
A single DPDT Double Pole Double Throw relay is made up of 2 SPDT switches. Each relay acts as two switches that are activated at the same time. This allows two independent devices to be switched at one time. In effect, there are two independent switches on a single DPDT relay - they will always switch together. There are two connectors with Normally Open, Normally Closed and Common for each relay allowing two separate connections. Wiring using these examples can be the same as any SPDT relay. Relay Logic Examples
Example 1 - Simple Off/On
This example demonstrates how a relay can be used to activate a light bulb. When the relay turns on, the light comes on. Only one power wire is switched with this example using the COM (common) and NO (normally open) connections of a relay. This is the simplest of the examples, switching a light in this example or any device on when the relay is energized.
Example 2 - Simple On/Off
This example demonstrates how a relay can be used to turn a light bulb OFF. When the relay is energized the light turns off, when the relay is off the light will be ON. Only one power wire is switched in this sample using the COM (common) and NC (normally closed) connections of a relay. Not commonly used but great for applications where the device is on most of the time so the relay doesn't have to be energized to to keep the device on. Power cycling a device can be a typical use for this wiring, when the relay turns on the device is powered off.Example 3 - 2 Relays to Activate
This example demonstrates how two energized relays are required to activate a light bulb. This is the same as a Logic and function because Relay 1 AND Relay 2 must be on to activate the light. Only one power wire is switched in this example using two relays to turn on the light. This example would be used if you want two parameters to be active before the light will switch on. If you have sensors or need two parameters to be in the correct state before the light turns on. A quick example would be a light sensor will need to show it's dark and a motion sensor showing someone in the room before the light will turn on. MirC/MirX Users: Two contact closure inputs in the sender board required to control a device. Use this wiring when you require two outputs to close before you switch the relay.
Example 4 - 3 Relays to Activate
This example demonstrates how three energized relays are required to activate a light bulb. Just like example 3, Logic and function play a roll because Relay 1 AND Relay 2 AND Relay 3 MUST be energized to activate the light. Only one power wire is switched in this example using three relays to turn on the light. Simple wiring from the NO of Relay 1 to the COM of Relay 2 to the NO of Relay 2 to the COM of Relay 3 will require that all three relays would need to be energized to turn on the light. This can be expanded to include as many relays as needed as long as you wire NO of the first relay to COM of the next relay.
Example 5 - Override Function
This example demonstrates the and/or function. The light bulb will be activated if Relay 1 and Relay 2 are energized OR if Relay 3 is energized. This example is great for applications that may require a logical condition of 2 relays plus an override feature. For instance, if Relay 1 is a night/day sensor, Relay 2 is a moisture sensor. If its dark and the soil is dry, Relays 1 and 2 can activate a pump. If you want to override these conditions with local physical switch using Relay Activator function (see the AD8 Command Set Tab) Relay 3 would override Relays 1 & 2.
MirC/MirX Users: Add a manual button or switch to control the third relay to manually control the light if you have sensors that control the other relays.
Reactor Users: Add a manual button or switch to control the third relay to manually control the light if you have sensors that control the other relays.
Example 6 - Either Relay Activates
This example demonstrates how either relay can be used to activate a light. Only one power wire is switched in this example using either of two relays to turn on the light. In this sample, only one activated relay is required to activate the light. If both relays are activated, the light will be on. Great for if you have a timer for one of the relays but want to turn the light on when the timer is scheduled off or have two sensors connected and want either of them to control a device. MirC/MirX Users: Two contact closure inputs in the sender board and either of the inputs can control one light or device.
Example 7 - 3-Way Switch
This example demonstrates how to create a 3-way light switch to activate a light. A 3-way light switch is where two light switches can be used to activate a single light. This sample is exactly the same as a 3-way light switch, the only difference being each physical switch is replaced by a relay. Operationally, it works the same way. Only one power wire is switched in this example using both relays to turn on the light. Each relay activation will cause the light to toggle. Switching two relays at one time is like flipping 2 switches at once....with the same result. This sample is particularly useful since you can replace one relay (as shown in the diagram) with a physical light switch. This will allow a computer to control a light as well as manual operation of a light. Properly used, this can be one of the most valuable diagrams we offer on this page.
Example 8 - Motor Control
This example demonstrates how to control the direction of a DC motor using 2 relays. Braking is accomplished by connecting both motor terminals to a common power connection (Faraday's Law). The capacitors shown may not be required for small motors, but if you experience problems with relays shutting themselves off, the induction suppression capacitor will be required. The .1uF capacitor helps suppress electronic noise if the battery were to be used by sensitive devices (such as radios/amplifiers).
- Relay 1 Off Relay 2 Off = Motor Brake to +
- Relay 1 On Relay 2 Off = Motor Forward
- Relay 1 Off Relay 2 On = Motor Backward
- Relay 1 On Relay 2 On = Motor Brake to -
- Induction Capacitor Should Be located by relay
- Filter Capacitor Should be Located Near Motor
- Additional Capacitors May be Desirable for Some Motors
