4 ms·
Don't even need to make it yourself, Itead sells the Sonoff for $4.85 + S&H. It's an ESP8266 connected to a relay, with integrated AC-DC power supply and a prop
by gh02t 10y ago
Don't even need to make it yourself, Itead sells the Sonoff for $4.85 + S&H. It's an ESP8266 connected to a relay, with integrated AC-DC power supply and a properly designed, physically isolated PCB.
Two caveats are that it doesn't directly have a USB plug. The serial header is exposed and you can reprogram the device with your own firmware to make it report whatever you like, but you do need a USB-Serial cable and maybe to solder on some header pins. Also, it is meant to be spliced into a power cable - it has input and output wire terminals and not an outlet-type connector.
I have a couple of these, they're quite useful. One controlling a fan and another I spliced into a light switch to control some overhead lights.
https://www.itead.cc/sonoff-wifi-wireless-switch.html https://www.itead.cc/sonoff-wifi-wireless-switch.html
http://tech.scargill.net/itead-slampher-and-sonoff/ http://tech.scargill.net/itead-slampher-and-sonoff/
- hueving 10y agoThis is exactly what I've been looking for. Where can I pick up some cheap adapters to get an outlet on one end and male plug on the other?
- extrapickles 10y agoGet a power strip and a electrical enclosure from the hardware store or you can get a replacement appliance cord+wall outlet+electrical box. Also get a outlet wiring tester to make sure you wired it correctly (eg: didn't get hot/neutral/ground mixed up) Make sure to put a 10A fuse in series, use wire rated for 10A and pass the ground wire through.
- gh02t 10y agoTo add to this, the whole board pops out of the protective plastic enclosure with minimal effort and is pretty compact, so if you wanna build your own enclosure it's pretty easy.
- gh02t 10y agoYou can use something like a two-prong lamp extension cable, I have one similar to these: http://www.aliexpress.com/item/USA-Canada-2-Prong-Male-to-Female-Power-Extension-Cord-Nema-1-15P-1-15R-Power/32362907226.html http://www.aliexpress.com/item/USA-Canada-2-Prong-Male-to-Fe... Or just cut and splice the regular power cord, that's what I did with a room fan. The Sonoff has thick plastic covers for the terminals with little teeth to hold the wires in place as it's meant to be put directly in line with a power cable. Note that the relay inside is claimed rated for 10A, so I wouldn't power appliances with it. It also only switches the hot and neutral lines, so if you need a 3-pin connection you have to splice it to the line and neutral while keeping the ground line connected. It goes without saying however that you should be extremely careful and only splice wires like this if you know what you're doing. Don't damage cable insulation while stripping, wire things up to the right connectors, don't leave exposed wires, use the correct wire gauges for your load, etc. Mains electricity is dangerous, yo.