Electronic – Relay to control electrical plug and non-electrical wire

raspberry pirelay

I'm not sure what I'm looking for, but what I need is a relay switch that will control two things, or maybe two different relays are needed, I'm not sure.

Basically, from my Raspberry PI I want to control two things;

  1. An electrical outlet and it's power, with NC side wired, so that my plug is on unless I turn it off from the PI.

Part 1 can I do on my 2 channel relay:


I'm having trouble with part 2.

  1. Have another wire interrupted also at the same time the plug is turned off. This wire is it's own power source and will not be powered by the wall electrical line like the plug, I simply want to interrupt the line when off.

Not sure if I need a second relay or something else for this purpose, as I don't want the power from the wall routed to this secondary line.

Best Answer


simulate this circuit – Schematic created using CircuitLab

Figure 1. Two options.

Figure 1 shows the wiring of the relay options suggested in the other answers. Since you already have two single-pole relays (b) is the simple option for you. You just need to switch the coils of both relays at the same time.

  • RLY2 is wired as an NC, normally closed, circuit. It will disconnect when the relay is energised.
  • RLY3 is wired as a NO, normally opened, circuit. It will connect when the relay is energised.

(b) also has the advantage that there is better isolation and no risk of mains on the DC circuit in the event of catastrophic failure of the relay.