$8 Lamp (Outlet) "Smart Plug" Module
-
Hi All,
I created a second "Smart Plug" and thought I'd make a how to video this time. I have found them very useful for controlling various devices around the house. It's long but hopefully will be good for everyone including those not too familiar with MySensors. I know when I was first starting out I had little to no experience with any of this stuff and it was hard to piece it all together.
Here is the parts list (most of this stuff can be obtained from the my sensors store so don't forget to support them!)
- 1 Gang Outlet Box
- Outlet
- Computer power cord or extension cord
- Old cell phone charger or some other 5v power supply
- Items from MySensors Store http://www.mysensors.org/store/
- 22-24 gauge wire or similar (network cord)
- Female Pin Header Connector Strip
- Prototype Universal Printed Circuit Board
- NRF24L01 Radio
- Arduino Pro Mini
- Capacitors (10uf and .1uf)
- 3.3v voltage regulator
- Female Dupont cables
Here is a wiring diagram for the 3.3v regulator:


Here is the code I used. I made a few customizations but the example "Relay Actuator" code can be used as well.
https://codebender.cc/sketch:72358*edited to add wiring diagram
@petewill greetings sir.. Im getting error in your source code.. Maybe imported a wrong library.. Sir can i ask where did u get your MySensors.h library.. I get mine in codebender..
My error is..
MySensor gw;
MySensor does not a nametype
-
@petewill greetings sir.. Im getting error in your source code.. Maybe imported a wrong library.. Sir can i ask where did u get your MySensors.h library.. I get mine in codebender..
My error is..
MySensor gw;
MySensor does not a nametype
@Christian-Tollas This code has not yet been updated for MySensors version 2.0. I am still on version 1.5. When I finally upgrade my setup to 2.0 I will post the updated code but I'm not sure when that will be. If you want to go back to 1.5 for the time being that should work for you.
-
Hello,
I'm newbie at this and I'm trying to make this, but I think my hardware needs to be different sinces my home voltage is arround 220V, does this hardware can handle this voltage or do I need to buy other capacitators ?
Thanks
-
Hello,
I'm newbie at this and I'm trying to make this, but I think my hardware needs to be different sinces my home voltage is arround 220V, does this hardware can handle this voltage or do I need to buy other capacitators ?
Thanks
@dseveriano as always you need to be very careful when using these voltages. That being said, this should work without any other hardware except for a phone charger rated for 220 (which I believe most are). The relay I used was rated for 10A 250VAC. I wouldn't go as high as 10A though.
-
@dseveriano as always you need to be very careful when using these voltages. That being said, this should work without any other hardware except for a phone charger rated for 220 (which I believe most are). The relay I used was rated for 10A 250VAC. I wouldn't go as high as 10A though.
@petewill Thank you, just one more question!
What board is that, the red one where the relay is ? Is that necessary or can I put the relay in the same board ? -
@petewill Thank you, just one more question!
What board is that, the red one where the relay is ? Is that necessary or can I put the relay in the same board ? -
@dseveriano Sorry, I'm not sure what you're asking. What board are you referring to?
@petewill Sorry the board I was refering was the relay board!!
Regarding the current detection module wich one do you recommend ? -
@petewill Sorry the board I was refering was the relay board!!
Regarding the current detection module wich one do you recommend ?@dseveriano Yes, the red board is the relay board which will control your 220V power.
I haven't done much with current detecting but the module I was playing with was the ACS712. I found that even when no power was running through it there was still a few watts reported. Maybe that's a simple fix but I never really looked into it. -
Did you integrate power meter function to your systeme?
-
Did you integrate power meter function to your systeme?
@jeremushka I haven't done it on the smart outlet but I did do it on my "Whole House Fan" project. You can check out the code from that if you're interested. Here is a link to the video if you wanted to check that out: https://youtu.be/KVsUe7sOCPo
Also, just make sure you check out the specs on the acs712 and don't pass through more current than is safe. I don't remember the specs off the top of my head but I knew my whole house fan was safe because of what it would be drawing