GPIO16 issue of ESP WROOM32

jadhavashitoshj48
Posts: 6
Joined: Mon Feb 25, 2019 9:37 am

Re: GPIO16 issue of ESP WROOM32

Postby jadhavashitoshj48 » Tue Feb 26, 2019 6:25 pm

Should I make 12 V and 3.3 V ground isolated from each other?

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: GPIO16 issue of ESP WROOM32

Postby mikemoy » Tue Feb 26, 2019 9:11 pm

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 ?

AshIsPurestWhite
Posts: 7
Joined: Tue Dec 11, 2018 3:09 am

Re: GPIO16 issue of ESP WROOM32

Postby AshIsPurestWhite » Wed Feb 27, 2019 3:27 am

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

malaugh
Posts: 4
Joined: Mon Aug 20, 2018 8:17 pm

Re: GPIO16 issue of ESP WROOM32

Postby malaugh » Wed Feb 27, 2019 5:30 pm

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.

Who is online

Users browsing this forum: No registered users and 86 guests