Comments on: Turn Any Appliance into a Smart Device with an Arduino Controlled Power Outlet Raspberry Pi, Arduino, and DIY Electronics Projects and Tutorials Tue, 23 Jan 2018 14:42:23 +0000 hourly 1 By: Santhamoorthy Mon, 22 Jan 2018 02:48:22 +0000 Nice

By: ashburn Sat, 30 Dec 2017 12:43:01 +0000 Thank you for the guide but 1 major issue above is about powering the Arduino itself. A compact solution would be to use a battery but unless u make it rechargeable, eventually u will need to change it. Another way would be to use an ac-dc adapter connected to 1 of the twin ac sockets above but that has got to be always on instead of being controlled. That can be achieved by using 2 individual sockets and daisy-chaining the Live and Neutral wires accordingly. So you will end up with twin sockets but 1 will always have power (for the Arduino) and the other can be used as a controlled socket for other appliances.

By: Lyle Sun, 26 Nov 2017 13:29:24 +0000 can you do this? but with a Raspberry PI instead of an Arduino UNO?

By: Mirul Thu, 19 Oct 2017 06:30:19 +0000 Can I put LCD too??

By: anonjnr Tue, 17 Oct 2017 14:01:20 +0000 Yo your link led me to a scam site. It probably was one of the ads?

By: Neo Wed, 11 Oct 2017 16:09:26 +0000 Hey, did you find any info about this?

By: NEo Wed, 11 Oct 2017 16:08:34 +0000 Hey man, could you find any info?

By: Eman Adel Elbehiry Sun, 10 Sep 2017 19:30:30 +0000 How to connect 3 dht11 to arduino in the same time?

By: Priyo Fri, 28 Apr 2017 14:34:08 +0000 Hello,
Am doing a project ; Fingerprint Authenticated Device switcher.
Am trying to use the fingerprint scanner to switch on and off the outputs of my arduino. Meaning;
– Only when i insert my fingerprint, the arduino will be switched on giving access to my bluetooth module in my arduino so that i can access the devices connected to the outputs of the arduino.
– And when i re-insert my fingerprint, the arduino will close or switch off all connections linked to it.

My problem is; i can’t figure out how to write the program to do these tasks.

You’ve got any advice or helpfor me?

By: aDRIAN Wed, 19 Apr 2017 18:47:01 +0000 this is not working.. i changed dht to DHT to match the library name


dht DHT;

#define DHT11_PIN 7
int pinOut = 8;

void setup(){
pinMode(8, OUTPUT);

void loop()
int chk = DHT.read11(DHT11_PIN);
Serial.print(“Temperature = “);
Serial.print(“Humidity = “);
if (DHT.humidity <= 40){
digitalWrite(pinOut, HIGH);
else {
digitalWrite(pinOut, LOW);

By: William Tue, 14 Mar 2017 03:08:30 +0000 How do I connect the power outlet into an 8 channel 5V DC Relay Board? Is it the same process?

By: Morsy Mon, 06 Mar 2017 01:09:25 +0000 I am trying to build something similar but instead of turning the appliance on or off I want to vary the current going to it over time. I wanted to use a digital potentiometer connected to a programmed Arduino. What specifications should I look for in the potentiometer? Also is there a better way of varying the current going to an appliance? Do I still need a relay if I’m using a potentiometer? Thanks

By: Gunjan Thu, 09 Feb 2017 08:35:37 +0000 Can you please write the program for the following temp. and humidity conditions:

The light should be on (i.e. pinOut, HIGH) for
1) RH>=70 AND Temp>=25
2) RH>=70 AND Temp<=25
3) RH=25
While, the light should remain off (i.e. pinOut, LOW) for
1) RH<=70 AND Temp<=25

By: Bikash Nath Tue, 13 Dec 2016 15:38:39 +0000 That’s a really illustrative go through for novices such as me into arduino and pi stuff for automation. I was hoping I could bother you with a few questions. I have been wanting to build a cheap water filter for heavy metal remediation and it asks for a time interval based control of a 240 V aquarium air pump to allow periodic pumping of a volume of water through the filtration media. What would be the best possible source to obtain the lay out or instructions for such a similar build illustrating the time based control of a 240 V appliance using arduino/pi?

By: Ben Sun, 27 Nov 2016 04:36:45 +0000

Anything like this works. No matter the voltage. It is controlled by 5v but can run high volts through it.

By: Morgan Sun, 27 Nov 2016 03:54:18 +0000 Thanks for the info! I’m looking to do basically what you have shown except the device I need to power is a little more heavy duty. I would need a relay that has a 5vdc coiled well because I’m using an arduino, but need to power a 240v ac 20amp device. Anyone have a suggestion on a good relay for this ? Thank you.

By: tontuino Wed, 23 Nov 2016 13:21:24 +0000 Dear friend
Thank you for your soooo well explained example.. I just followed it step by step and.. it worked!
I did a couple of pictures and uploaded a post to my own blog
Next step: Now i would like to make it work from an smartphone.. ๐Ÿ™‚
Thank you

By: Rodrigo Mon, 21 Nov 2016 03:08:49 +0000 Hi !

First of all I really loved your article, it was very useful and explicative. Is it possible to adapt this project to control the light switches, I mean I want my lights (those ones that the switches are on the wall) to be smart, and replace those switches with a relay and an Arduino in order to turn on the lights at night. I know the answer is yes but I don’t know pretty much about electrical connections. Thank you in advance.

By: Ben Thu, 20 Oct 2016 14:51:25 +0000 My solution was to just change it to a non GFCI outlet. I never had any problems. I had it plugged into a surg protected outlet anyway.
I assume it was because of spikes of current or something, but not my expertise. But never had problems after switching.

By: Ronan Tue, 18 Oct 2016 20:27:16 +0000 Same for me, the reset engages every time the signal is sent. Did you get a solution for this?

By: Ben Thu, 15 Sep 2016 11:41:04 +0000 Yes, I actually did this at home. It was super fun. One control for top, one control for bottom, one for both together.
I just ran a hot wire and split it two two using a wire nut and ran one wire into each relay (two relay module). Then one wire going to top, one wire to bottom.
You do have to break the copper bridge in between the top and bottom on the side of the outlet. I am not sure how much you know about electrical, but I learned at this. So this might not be the best way but it works.

5V Two 2 Channel Relay Module With optocoupler Compatible With Arduino PIC AVR DSP ARM by Atomic Market

Just an example of where you can buy a 2 channel relay.

By: Josh H Thu, 15 Sep 2016 04:29:07 +0000 Does this just connect one if the outlets to the Arduino? Is it possible to split the hot wire and run it through a two channel switch to control each outlet separately? Thank you for the tutorial it looks great!

By: Ikhmal Khalid Fri, 02 Sep 2016 15:55:50 +0000

By: Pieter Botha Thu, 01 Sep 2016 13:10:37 +0000 Hi.Tanx for all your help. My problem is with the sketch. Where can i find dht.h library?

By: Ikhmal Khalid Sun, 28 Aug 2016 11:49:06 +0000 thanks for responding again Ben.
i wanna make the lights off if i blow the sensor.
can put this on line 20 in the coding.
“if (DHT.humidity = 57){ // RELAY TURNS OFF ”

is it right? because it doesnt work after i upload it on board.

By: Ben Thu, 25 Aug 2016 11:51:26 +0000 There is no button to reply to you so I’ll reply here.
Basically if you need that file, it’s just an import file, then you can remove the line. If u need it then you have to keep it.

By: IkhmalK Thu, 25 Aug 2016 05:33:54 +0000 thankyou for responding. Do you have any idea on how to solve this? your help is really appreciated.

By: Ben Wed, 24 Aug 2016 21:00:00 +0000 That means that the file “dht.h” on line 17 you are calling doesn’t exist or you don’t have it in the folder.

By: IkhmalK Wed, 24 Aug 2016 15:14:37 +0000 HI im hving problem with the coding. when i want to verify, it says erorr compiling.

“Arduino: 1.6.5 (Windows 7), Board: “Arduino/Genuino Uno”

sketch_aug24b.ino:1:17: fatal error: dht.h: No such file or directory
compilation terminated.
Error compiling.

This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.”

how do i solve this?

By: hasantha_c Thu, 11 Aug 2016 06:02:47 +0000 Good job. everything (even these chats) was helpful. great. THANK YOU VERY MUCH..

By: Circuit Basics Mon, 01 Aug 2016 15:04:36 +0000 Yeah it would… You can use any sensor to trigger the relay, I just used a DHT11 as an example

By: Circuit Basics Mon, 01 Aug 2016 15:02:53 +0000 Thanks a lot! I try to make sure to include everything necessary to set up a project, but let me know if I miss anything or if something doesn’t work!

By: David Tue, 12 Jul 2016 15:22:28 +0000 Or websearch this (which today led me to

5V 2 Channel Relay Module Shield For Arduino ARM PIC AVR DSP MCU Electronic F5

Then follow the instructions above, using one channel for each leg.

By: David Tue, 12 Jul 2016 14:49:24 +0000 Beware: 240V in most American homes is available as the voltage between (2) 120V “hot” phases (wires); interrupting only one of them means that the other remains “hot”, and potentially lethal, at the load–even when it’s “off.”

Instead, use a DPDT breaker, something like this:
to interrupt bofth the hot legs.

By: mohamed hagras Wed, 22 Jun 2016 15:05:51 +0000 thanks for this

By: Johnny Tue, 31 May 2016 03:22:49 +0000 Turn off arduino, unplug outlet. Plug in pins, then plugin arduino and outlet. Does that work?

I prefer to use a solid state relay. Easier and beefier.

By: Ben Tue, 31 May 2016 03:14:30 +0000 I love the article but just had a question. Seems to be a weird senerio…
So I believe everything is hooked up correctly, but I have a GFCI outlet and the reset engages every time the signal gets sent. So if I start with the 5v pin out, as soon as it starts to go in, I blow the outlet. Same with the 8 pin.
Any help would be great!

By: JayFiveAlive Tue, 10 May 2016 23:03:00 +0000 Would an outlet like this work triggering an aquarium water pump running at like 4 or possibly 15 W ?

By: Costa Mon, 21 Mar 2016 17:53:15 +0000 hello leveraging your project may indicate how to install other rele temperature

Reley 1 35.5ยบc temperature (on 34-35 of 35.5)
Reley 2 humidity 40% (on 35-39 of 40)

By: Collin Smith Sun, 14 Feb 2016 21:40:39 +0000 Hey, I just wanted to let you know that I really enjoy and benefit from your projects! I think you have done a great job laying things out in a step by step manner that doesn’t miss anything, which makes it much easier to learn and follow along. Great job NOT leaving out any necessary bits of info!!! Keep up the good work, and I hope to see more your stuff in the future. Thanks!

By: ็Ž‹ Sat, 23 Jan 2016 16:29:13 +0000 Just a simple 5V or 12V relay is enough to achieve this TECH…