Relay controlled outlet plug

Having an Arduino doing fancy stuff is fine – however, just blinking some LEDs does not sound that interesting. Have you ever thought about controlling a simple light? Do you want to turn on or off your RaspPi? An RC-plug that is being controlled by your Arduino is a very simple thing. However, the remote plugs may be expensive. Therefore, this post will show you how to transform a simple plug into a relay controlled one.

Devices/Parts

2 LEDs

1 NPN transistor, b=100 [the transistor is rather random, it is just being used as an electronic switch]

3 200 Ohm resistors [may also be different, just had them here]

1 relay 5V, current 16A, switching voltage >400VAC, switching capacity (more is better) should be >4000VA [I have used this relay]

1 diode (some usual one; flyback diode)

1 socket with switch [I have used one alike this plug]

some strip grid boards

 

I guess this sums up to about 3-4€ in total.

Theory

Generally, just using the relay is quite simple. Put one pin to ground and the other one may directly be connected to a digital output pin of your microcontroller. However, the current is limited and therefore, one rather should use some kind of driver. Furthermore, nice LEDs indicating whether there is power and whether the plug is turned on, is very useful. This requires some simple circuit basically with a transistor.

Here is a schematic of my design:

Relay driver

Assembling everything

Sounds quite simple – it is, but requires some handicrafts. Here is a photo series:

switch

switch

switch - interior

interior

plastic stuff to be removed

plastic stuff to be removed

 

switch - ready for mounting the relay

ready for mounting the relay

the relay fits perfectly

the relay fits perfectly

read-to-use outlet plug

read-to-use outlet plug

Leave a Reply