I fried my ESP32 WROOM32 board and I think it happened because I did not use diodes with the relay. I am going to get a new board but wanted to check if I am doing the right thing with diodes this time.
I have 2 coil, 5v latching relay - Panasonic DW1205HL. To trigger on/off i am using two GPIO pins (12 and 13). To amplify the trigger signal I am using a small transistor with 4k5 resistor on 'base' pin (two in total - one of each for each coil).
relay center (+) goes to 5v on ESP32
relay trigger (-) goes to transistor pin 1 (collector)
transistor pin 2 (base) goes to 4k5 resistor and then to GPIO 12 (the same is for the second coil but goes to GPIO 13)
transistor pin 3 (emitter) goes to ESP32 ground.
It worked for couple of days but then everything stopped. I disconnected everything and ESP32 does not boot anymore. It is hard to tell what specifically got burnt but DMM shows ground and 3.3v are shorted somewhere.
So now the question. Do i put the diodes between GPIO 12/13 and 5v? ..or any other thoughts?
Thank you
Val
Killed my WROOM32 with a relay
-
- Posts: 9770
- Joined: Thu Nov 26, 2015 4:08 am
Re: Killed my WROOM32 with a relay
It certainly is possible, although a bit weird; in that setup I'd expect the transistor to give the ghost rather than the ESP32 (which is somewhat isolated because of the base resistor) dying. Given that not having a flyback diode can result in weird EMC, there might have been some other way the ESP32 got affected though.
You would put the flyback diode in parallel with the relay coil, in such a way that current will not flow through it when the transistor is on. See e.g. (c) in this image.
You would put the flyback diode in parallel with the relay coil, in such a way that current will not flow through it when the transistor is on. See e.g. (c) in this image.
Re: Killed my WROOM32 with a relay
Got it. Thank you very much.
Who is online
Users browsing this forum: Bing [Bot] and 36 guests