Chat freely about anything...

User avatar
By Barnabybear
#33944
OnlineDishwasher wrote:Thanks, that seems to cover the software although I'd rather have the device self-contained without requiring an Arduino.

Hi, the ESP8266 will run Arduino code.

OnlineDishwasher wrote:From reading further, it would appear the safer thing to do would be to use an off the shelf 5V 2A wall wart and have a plug inside the project that feeds the 5V PSU. I avoid making my own PSU (and a fire hazard) while still requiring only one connection to the mains.

Nothing wrong with that - if size is improtant these work well.

OnlineDishwasher wrote: I then solder the 5V output onto a perf board, feed it into a 3.3V step down so I have a 5V for the relays and a 3.3V for the ESP.
I was also thinking about ordering one of these relay boards to I just have to screw the 110V into it. Is there anything else I need to do to make this safe?

You might want to consider an SSR (solid state relay), they tend to be easier to switch (no coils with loads & reverse voltage protection). This one is only 2A switching but you can get much higher and will switch with the 3.3V output from the ESP, so no dual voltage needed.

This uses an ESP8266-01 and the parts above, measures 1 1/2" x 1 1/2" x 1 1/4" even with the terminals.
Image

Looking at "wififofum's" post you may aswell cheat.
Last edited by Barnabybear on Thu Nov 26, 2015 12:33 pm, edited 1 time in total.
User avatar
By krzychb
#33946 Hi OnlineDishwasher,

I just build OnlineHumidifier :D that fits quite well your requirements and $15 budget. It is somewhat bigger option than presented by Barnabybear but may be easier to implement if you are not well versed with electronics.

All you need is as follows:
ESP8266 Mains Remote Control.png
ESP8266 Mains Remote Control


1. NodeMCU 1.0 ESP8266 board (about $10) – no need for an external programmer and power supply – just connect it to your USB port in PC and follow instructions under https://github.com/esp8266/Arduino. You will get user friendly and very well supported IDE for ESP8266. Once programmed you can power up this this module from you smartphone charger.
2. Wireless Socket / RF 433MHz controlled (about $5 per socket) – they are available under several “brands” ;) for ages in shops with household electronics. I recommend one with a LED that shows if it is on or off. This is ready solution to switch mains power on and off. What important it is safe and simple solution for people less experienced with electronics.
3. RF 433MHz Transmitter – you can buy one on internet and it costs about $1 or $2.
4. An Arduino library to send RF 433 control commands to switch the socket on and off. I am using RemoteSwitch library by Randy Simons http://randysimons.nl/ ($0)
5. Optional Remote Control to make the testing easier – it is normally sold together with socket.

For my OnlineHumidifier I am also using a DHT22 humidity and temperature sensor (also connected to ESP8266 board) to measure ambient humidity so ESP knows when to turn the humidifier on and off.

As the web UI I am using openHAB - http://www.openhab.org/ together with MQTT. You can also run your own webserver on ESP if you like – just search on this form or ask for help. This is everyday topic here.

Hope it helps and share your future project!

Developing solutions with ESP8266 is real fun :D

Krzysztof
User avatar
By Joe Job
#52184
Barnabybear wrote:
OnlineDishwasher wrote:Thanks, that seems to cover the software although I'd rather have the device self-contained without requiring an Arduino.

Hi, the ESP8266 will run Arduino code.

OnlineDishwasher wrote:From reading further, it would appear the safer thing to do would be to use an off the shelf 5V 2A wall wart and have a plug inside the project that feeds the 5V PSU. I avoid making my own PSU (and a fire hazard) while still requiring only one connection to the mains.

Nothing wrong with that - if size is improtant these work well.

OnlineDishwasher wrote: I then solder the 5V output onto a perf board, feed it into a 3.3V step down so I have a 5V for the relays and a 3.3V for the ESP.
I was also thinking about ordering one of these relay boards to I just have to screw the 110V into it. Is there anything else I need to do to make this safe?

You might want to consider an SSR (solid state relay), they tend to be easier to switch (no coils with loads & reverse voltage protection). This one is only 2A switching but you can get much higher and will switch with the 3.3V output from the ESP, so no dual voltage needed.

This uses an ESP8266-01 and the parts above, measures 1 1/2" x 1 1/2" x 1 1/4" even with the terminals.
Image

Looking at "wififofum's" post you may aswell cheat.


Hi mate I have these parts now with exception of the terminals do you have a guide on how to solder these aprts together first time working with this hardware would appreciate some guidance ;) If possible could I see the flip side of the board please/