Switching a 24V pump with 3.3v GPIO

Thread Starter

fnjnsns

Joined Jan 24, 2018
4
Hello,

For a project i'm trying to switch a 24V pump. The pump needs to be switched by an ESP32 micrcontroller which can output 3.3v on its digital pins. The ground of the ESP32 and de 24 volt source are shared. Somebody suggested me this circuit:
1587643764214.png
"VCCsolar" is the 24v source. "Relay" is the digital pin of the microcontroller. The pump gets connected to J4. Q1 is an NPN transistor. Q2 is a MOSFET.
Would this ciruit work? Are there any better ways of doing this?

Thanks!
 

jpanhalt

Joined Jan 18, 2008
11,087
Why not get a more recent logic-level mosfet and drive it directly with "relay?" Your IRLZ34 has a max gate of 20 V. Hooking that to 24 V will exceed that limit.

Most distributors have parametric search engines. You need to define the current needed (your link includes many choices). Put a largish resistor from gate to ground ("turn off") and a small resistor in series to limit current to the gate, which might not be needed. Your 10K resistors will certainly cause a relatively slow turn on.
 

dl324

Joined Mar 30, 2015
16,846
Would this ciruit work?
Is your intent to have the MOSFET normal state to be on and have it turned off by the microcontroller?

What does the connection labeled relay do?

As mentioned, you should use a logic level MOSFET so you can drive it directly from the microcontroller's 3.3V output.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
There is already a logic level mosfet spec'd in, so you can eliminate some devices as already outlined above.
If alternatively operating from either the micro or the relay, It may be a better solution to input the relay to the micro input and let the micro take care of both alternative operations.
Max.
 

jpanhalt

Joined Jan 18, 2008
11,087
The point I wanted to make was the IRLZ34 is an old device. Works great at 5V, but better devices with lower Vgs(on) for 3V3 are available,
 
Top