My project involves hooking up relays to individual plug points so I can control them with a microcontroller. Unfortunately, I am not sure how to approach splitting my mains 240V into 4 different inputs. All I can think now is to use a metal plate, solder the mains to the metal plate, and solder to the live connection of the 4 inputs to that plate. Then do the same for neutral and ground.

Is there a better approach?


PS I have two possible methods. Can I know which is safer. (Drawn here at this link)

enter image description here

One way option 1 is to solder the main mains wire to a metal strip. Then solder the live wires of my extensions onto the strip. The relay will divide this wire to the extension (I am using an arduino all in one relay module http://dx.com/p/arduino-5v-relay-module-blue-black-121354).

Option 2 is just to use those mains wire caps to join up all the wires. I feel this is safer as I do not have to expose a metal strip inside my project box.


  • 2
    \$\begingroup\$ It is a bit unclear. Do you want to be able to turn on/off 4 power sockets individually? \$\endgroup\$
    – Gunnish
    Jan 26 '13 at 17:08

Metal strips are used in swtichboards in my country because they can handle more power and have less risk of catching fire (cheaper maintenance, less human error risk). They are also cheaper to manufacture, since the strips are connected and held in place by screws and not soldering. Soldering a wire to a metal strip is not especially easy, though, and there's a risk of not doing a great job with one wire and it coming off and touching something else.

The ideal way, in my opinion, would be to use some sort of thimbles which you can hold together with nut and bolt. If you're planning on making a PCB, you could use the PCB itself to distribute power with ultra wide traces (not a good idea if you want to control heavy duty electronics like ACs or room heaters). The PCB would give you the freedom to leave large pins for the thicker mains wire to be soldered properly.

The optimal solution without a PCB or buying new components like thimbles, in my opinion, would be your option two where you use the caps as thimbles. I would advise caution, though - the outer surface of the the caps are also conducting and therefore these would have to be well secured and insulated. Remember to not skimp on the wire thickness to accomodate more wires per cap - that could lead to burning plastic, broken wires, and worst case, electrical fires. A fuse may be a good idea to include in your box, to be safe.


First off, be extremely careful when working with mains power. You can really hurt yourself (possibly even die,) and your device may start a fire, etc. You should also make sure your relay(s) can handle the power (current and voltage,) that the end devices may require.

As already pointed out, your question is somewhat unclear.

However, lets say you have a mains powered light, to turn it on and off with a relay, all you need to due is interrupt power to one of the two wires. To explain this better, you would leave one wire going to the light, and the other wire is going through the relay. So when the relay closes the circuit, your light turns on. When it relay opens the circuit, the light turns off. This is the same as how a light switch works.

Mains light switch wiring

You can easily extend this to 4 devices by having all the devices share the same AC line, and a relay to open/close the second line for each device.

You didn't explain how the relay is turned on or off, but just for the visual, here is a schematic of a DC relay. Note that the diode is across the coil so that the relay turning on or off doesn't induce voltage that may damage the logic.

Relay schematic

  • \$\begingroup\$ Thank you for this extensive response. I have made an edit to my post to show two approaches to take. Could you comment on which is better? \$\endgroup\$
    – Raaj
    Jan 27 '13 at 3:22
  • \$\begingroup\$ @user1436508 It depends on how much power the devices that are being controlled will require, but personally I would stay away from the metal strip, so option #2 is what I would use. \$\endgroup\$ Jan 27 '13 at 6:33

By far the easiest and safest way to do this is to use a solid-state relay. You can drive them directly from a microcontroller with 3-5V and perhaps 5-10mA.

I would use a powerstrip that already has 4 sockets. If the sockets aren't too close together, you will generally find enough space between them add in the solid-state relay. Then you merely need to run a cable into the powerstrip with 5 conductors (4 signals plus ground), and you're done.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.