ESP8266 - 01 disconnects when Relay opens
Posted: Thu Feb 18, 2021 4:14 pm
Hello, i am new here and in electronics!
I have wrote code that switch on a relay based on some sensors which controls a solenoid (350mA) using arduino Uno. It works fine!
Then i put the esp8266-01 so i can see the sensors reading. I connected an android phone to the wifi using remoteXY app and all the measurements are shown perfect. After a while the arduino gives command to the relay to close which i can see it to my screen. But the time that relay opens the esp crashes however the solenoid and the relay continuous to work.
I have a 12V 3A external power supply from which takes power the solenoid and the arduino, with a buck down converter to 5V take power all the sensors and another converter makes 5V to 3.3V to power the ESP. I have used diode for the relay and the RX TX etc of the ESP are connected right. The code beside the remoteXY library is very simple (just an If function with output HIGH/LOW).
If the relay doesnt work the wifi connection is good for hours and i can see all the sensors live. So something has to do with the power from the sudden open of the relaybut i can not figure out!!
Also i have used 1000uF electrolytic capacitor close to the ESP.
I have wrote code that switch on a relay based on some sensors which controls a solenoid (350mA) using arduino Uno. It works fine!
Then i put the esp8266-01 so i can see the sensors reading. I connected an android phone to the wifi using remoteXY app and all the measurements are shown perfect. After a while the arduino gives command to the relay to close which i can see it to my screen. But the time that relay opens the esp crashes however the solenoid and the relay continuous to work.
I have a 12V 3A external power supply from which takes power the solenoid and the arduino, with a buck down converter to 5V take power all the sensors and another converter makes 5V to 3.3V to power the ESP. I have used diode for the relay and the RX TX etc of the ESP are connected right. The code beside the remoteXY library is very simple (just an If function with output HIGH/LOW).
If the relay doesnt work the wifi connection is good for hours and i can see all the sensors live. So something has to do with the power from the sudden open of the relaybut i can not figure out!!
Also i have used 1000uF electrolytic capacitor close to the ESP.