Relay Master Enable

Tiziano
Posts: 2
Joined: Tue Aug 27, 2019 8:50 pm

Relay Master Enable

Postby Tiziano » Wed Mar 18, 2020 7:57 am

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
Attachments
RelayBoard.png
RelayBoard.png (47.11 KiB) Viewed 4082 times

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Relay Master Enable

Postby ESP_Sprite » Wed Mar 18, 2020 2:19 pm

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.

Tiziano
Posts: 2
Joined: Tue Aug 27, 2019 8:50 pm

Re: Relay Master Enable

Postby Tiziano » Wed Mar 18, 2020 4:40 pm

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
Attachments
DoubleVoltage.png
DoubleVoltage.png (42.55 KiB) Viewed 4014 times

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Relay Master Enable

Postby ESP_Sprite » Thu Mar 19, 2020 8:06 am

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.

Who is online

Users browsing this forum: No registered users and 125 guests