Page 1 of 1

Relay Master Enable

Posted: Wed Mar 18, 2020 7:57 am
by Tiziano
Hi all!
I am "refining" some kind of LoRa connected Esp32-based Remote Controlled Relay Board with a mixed relay configuration: two Fotek SSR relay for high loads and two classical Tongling coil relay for led/neon lamps on a prebuilt breakout.
At the moment (see attached relay section schema) all four relay have VCC in common and Ground connected to an Esp32 Pin (output configured), driven by software in reverse logic (high pin->relay released, low pin->relay thrown).
It seems to work rather well, but I was thinking to use another Esp32 pin as "relay master enable": keep it low and all relays are released (e.g. to be used as a startup condition to avoid glitches).
But MaxCurrent of an Esp32pin is too low to feed all four relays.
I'm a programmer, not an electronic expert, I figured the way to solve the problem could be to use a P-Channel Logical Level Mosfet (FQP27P06 ?) connected in High Drive configuration.
Am I right?
Thank you very much in advance ...
Tiziano

Re: Relay Master Enable

Posted: Wed Mar 18, 2020 2:19 pm
by ESP_Sprite
Yes, that would work. For good measure, add a pull-up (10K or so) from the gate of the mosfet to 3.3V, so it can't get go into 'half-open' mode when the ESP32 pin that controls it is tristated.

Re: Relay Master Enable

Posted: Wed Mar 18, 2020 4:40 pm
by Tiziano
Thank you a lot!
if I understand correctly, this solution is well suited for loads (like mine) working well at the same voltage (3,3v) as my MCU.
For higher voltage loads this seems to be a suitable solution?
Thank you a lot!
Tiziano

Re: Relay Master Enable

Posted: Thu Mar 19, 2020 8:06 am
by ESP_Sprite
Yes, that solution would work. Note that if you use a (switched or not) 12V power supply to power your relays, you cannot use direct GPIOs to control the ground lines anymore: as the GPIOs switch between 3.3V and 0V, your relay would get either (12-3.3=)8.7 or 12V, which most likely mean it's engaged regardless of the GPIO value.