Page 2 of 2

Re: GPIO16 issue of ESP WROOM32

Posted: Tue Feb 26, 2019 6:25 pm
by jadhavashitoshj48
Should I make 12 V and 3.3 V ground isolated from each other?

Re: GPIO16 issue of ESP WROOM32

Posted: Tue Feb 26, 2019 9:11 pm
by mikemoy
Should I make 12 V and 3.3 V ground isolated from each other?
yon dont need to and if you did, then you would need to add opto isolators from ESP32 to the ULN2803's.

I am more curious about your power power supplies. Have you looked at the 3.3v power rail right at the ESP32 power pin to make sure there is no spiking when a relay activates?

Also, is this design on a PCB or a prototype board with wires in the air ?
I ask because layout is important, you could be picking up inductive noise from the relays onto other wires on your design.
are you willing to snap a photo of your setup ?

Re: GPIO16 issue of ESP WROOM32

Posted: Wed Feb 27, 2019 3:27 am
by AshIsPurestWhite
Hi jadhavashitoshj48,
For the relay drive circuit,
1. try to add a flywheel diode across the coil
2. try to add a RC Snubber between NO and COM

see more infomation here: https://www.electronics-tutorials.ws/bl ... rcuit.html

Re: GPIO16 issue of ESP WROOM32

Posted: Wed Feb 27, 2019 5:30 pm
by malaugh
You may want to change your code to debounce the switch. Rather than just using the interrupt when the switch closes to trigger the action, use the interrupt to start a timer, sample the switch say every 10mS, and only trigger the action if the switch sample is low for say 3 samples in a row. This prevents the action triggering on small glitches on the GPIO.