Picture of plugduino - Arduino based 120 Volt outlet controller

give your Arduino a 120 volt kick in the pants!

The Arduino is a great tool for anyone interested in learning microcontroller programming, but after blinking some LEDs, what's next? This project enables your Arduino to control real-world 120 Volt electrical appliances you have in your home.

what can you use a plugduino for?

Well, its great for Halloween prop controller to automate your lasers, fog machines, fans and such in an intelligent way. You can use beam breaks, contact pads, distance sensors, and so on to control up to 4 devices independently or in unison to make a unique experience.

But you can also use in the house to control appliances based on sensors such as temperature, humidity, motion, light, and so on to open curtains, turn on lights, fans based on environmental conditions. You can also use it for more whimsical things like sign marquees, animated Christmas light lights, super sized Simon game, and anything that takes input, runs program logic, and controls 120V devices.

plugduino is a smart relay controller

which means that you can write a program that determines how each of the four electrical outlets are turned on or off, and in addition supply up to 4 inputs into the logic to interface it to the outside world. As a simple example, you can make a sequencer for the lights with a speed control simply by connecting a potentiometer to one of the inputs and using its value to control the sequencing speed.

ChuckieP1 month ago

nice! instead of using that dial can you use a laser break beam sensor like for making a drag stage light? if so i am so making this project lol

flashular (author)  ChuckieP1 month ago
Sure. The dial is just a test of any type of sensor you would like to connect; you only need to change the code that reads the sensor to calibrate it to the sensor you are doing. You can find out more by just looking into the Arduino analog/digital input functions - lots of examples.
scottinnh3 months ago

@svenkatesh3, not as you ask, but you can monitor power usage by plugging the whole thing into a Kill-a-watt or power meter outlet. You can't measure power use using just relays anyways (though you can crudely approximate if you know the power draw of what you plug in, then simply measure "on" time...). There have been folks who modified the Adafruit Tweet-a-watt to use an arduino, so you could combine the two things into one larger enclosure.

can we able to transmit how much watts its consuming by the device through Xbee transmitter and receiver and which should display in LCD and how to connect with Arduino board could u help me ??

I want my Arduino to control 4 power outlets (on\off)..my home electricity is 230v

so i have to design 4 power outlets which should control hair dyer(400w),200w blub,Lcd tv,(50w)pumps
in my project if any fault happens like overvoltage,neutral line fault or overheating happens in any of the outlets that particular outlet should be isolate which should be indicate with LED for this which component should use whether SSR relay or 4 channel Relay shield ??

Please help me understand these things, and remember I'm very new , so if you think I need to but something else, it will be great if you could explain

Lots of Thanks !!!!


flashular (author)  svenkatesh31 year ago

Hi shyam. One advantage of mechanical relays like the one used in this project is that they have a fairly slow response time, which might help if you attempt to trigger a device (such as motor) too quickly. I would suggest that you could put a fuse on each of the outlets in addition to isolate any fault to just that device.

This is a project want to do and submit it i have to control 4 device and i have to show if fault happens means what relay will do whether all the four socket turn off or particular outlet will turned off and i have to measure the each outlet Power and have to transfer the data into LCD thro Xbee whether arduino uno is enough or i go for arduino mega ?

ll upload my schematic diagram soon :) :)

and guide me help me !!!

Thanks a lot for response :) :)

In this Control circuit schematic They explained about sensor inputs (the sensor inputs are connected to the analog inputs on the Arduino board ( A0, A1, A2, A3 ). The input voltages on these pins are converted into a 10 bit integer value

such that the range between 0V and 5V and translated into a value between 0 and 1023 respectively. The ideal connector thus contains 3 inputs per sensor ( 5V, GND, A
) resulting in 12 connection points.) I need clear explanation about this and what type of sensors they using and how they connected ??

Thanks For ur help :) :)

flashular (author)  svenkatesh31 year ago

Thanks :) :)

flashular (author)  svenkatesh31 year ago

This is essentially a direct input to the Arduino, so there are many examples of analog input - too many to describe here. To get you started, take a look at this article:


Although this is simply a potentiometer, you can use the same method for thermistors, photocells, and the like.

masonlin1 year ago
That is really nice work.
nerd74731 year ago
dude yes I could control a light or plasma ball or even tesla coil yay! (super exited)
flashular (author) 1 year ago
Thanks! Since the Arduino is just turning the pins on/off, the programming possibilities are pretty wide open. One simple example might be to string 4 sets of lights woven around a tree. How you animate them is where the coolness of the project would come in.
Cool project! You could use something like this to make programmable Christmas lights that go with music.
The clicking would drive me insane - why not use solid state relays, or even a discrete set of triac output optocouplers and triacs - then you could even do fading and other cool stuff if you have lights in the outlets.
I made a sequencer like that back in the early 90's, but it had 16 outputs, and was not microcontroller programmed - it was all hard wired logic - but it was pretty cool. Even had audio input.
I personally love the clicking. There is something satisfying about it to me.
maewert2 years ago
Nice project! I'm wondering why you chose to switch the neutrals with the relays leaving the hot inputs to the plugs powered as opposed to always providing ground and neutrals to the plugs and switching the hots? I probably would do it the other way around.
Best Wishes
flashular (author)  maewert2 years ago
Thank you, and excellent question. This is an oversight in my build that I will correct shortly in the instructions. As you probably know, switching neutral still keeps the circuit alive (but off) whereas switching hot disconnects the circuit. Thanks for the catch, and I'll have an update to correct this shortly.
flashular (author)  flashular2 years ago
The diagrams and instructions now indicate the modified wiring where the hot connection is used to switch the outlets. Thanks again for the reading through the project and making the catch.
Looking great!
This us a cool project! The URL is missing a colon after the http.
flashular (author)  jlwilliams032 years ago
Thanks! I think I have corrected the link; I assume you mean the URL on the last page...?