-->
Page 14 of 19

Re: ESP8266-01 gpio2 5v out to trigger relay

PostPosted: Wed Jun 29, 2016 1:41 pm
by Joe Job
Any ideas on the above? I have moved back to the ATMEGA versions of both this and the PIR sensor but would like to get to bottom of the issues if poss.

Re: ESP8266-01 gpio2 5v out to trigger relay

PostPosted: Wed Jun 29, 2016 4:22 pm
by Barnabybear
AdamMiltonBarker wrote:Well not able to admit defeat I spent some time over my lunch break and found out that in the case of the barebones version it was the pullup resistor, if I removed the resistor and connected the middle leg to 3.3v directly it worked.

Following this I reset up the ESP into the circuit and I now have strange issues, I cannot upload without GPIO2 connected directly to 3.3 without resistor and then the relay will not turn on without the 3.3 being removed, then after that I cannot reset without it connected.

It also keeps crashing serial monitor when the light is connected to the relay and I have to restart the computer.


Hi, you need an opto-coupler if you going to switch mains or you'll just run into a whole world of pain. It will also cure most of the boot and reset issues as well, the only down side is random switching at boot and that can be fixed.

Re: ESP8266-01 gpio2 5v out to trigger relay

PostPosted: Wed Jun 29, 2016 6:49 pm
by Joe Job
Thanks will do, what type would be a good place to start, I have completed this project using ATMEGA now enough to have first prototype ready, just need to do optimizing and work on the power side but would be happy to be able to move forward with v2.

Re: ESP8266-01 gpio2 5v out to trigger relay

PostPosted: Thu Jun 30, 2016 2:17 am
by Joe Job
Here is a video of V1 if anyone would like to check it out...

[youtube]https://www.youtube.com/embed/APoJoaRtRZw[/youtube]