0
\$\begingroup\$

I'm working on my personal project for school. In this, I want to run 12 V 1 A motor using a IRFZ44N MOSFET using an ESP32 but as we know, the IRFZ44N needs 4 V to completely turn on and ESP32 pins provide only 3.3 V at 20 mA, sonot enough to turn on MOSFET.

I searched the internet for the proper transistor and I found a common transistor (BC548) which is in my box now. I have drawn a circuit to drive the IRFZ44N. Will it work?

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ "as we know, the IRFZ44N needs 4 V to completely turn on". Absolutely not! 4V is the threshold voltage where an IRFZ44 is guaranteed to conduct only 0.00025A. The Vgs must be 10V for all of them to fully turn on. An IRLZ44 needs 5V to fully turn on. Why is the BC548 transistor added? \$\endgroup\$
    – Audioguru
    Commented Apr 23, 2023 at 16:29

3 Answers 3

1
\$\begingroup\$

Here is a simulation of the circuit, showing a 3.3V GPIO signal driving a 1 amp motor (simulated by a 100 mH inductor with 12 ohms series resistance)

schematic

simulate this circuit – Schematic created using CircuitLab

Voltages

Motor Current

\$\endgroup\$
2
  • \$\begingroup\$ Thanks! it's physically working now! I wonder how can I control its direction both ways in future! I don't need it running both ways for now but I'm just curious to know! Thanks!! \$\endgroup\$ Commented Apr 23, 2023 at 10:52
  • 1
    \$\begingroup\$ @AkashPatil THAT needs to be addressed in another question, but you can find that information all over the Internet and StackExchange. In short, you need an H-bridge circuit to be able to change direction of the motor. \$\endgroup\$ Commented Apr 23, 2023 at 12:08
4
\$\begingroup\$

The transistor needs to be connected with its emitter tied to ground, called "common emitter".

As you have it, in a configuration called "emitter follower" or "common collector", the emitter of the transistor is always 0.7V below the base, and since the base never rises above +3.3V, the emitter can only reach +2.6V. That's not even close to what you require at M1's gate.

In the following circuit, M1's gate is +5V when the ESP32 output is low (0v), and 0V when that output is +3.3V:

schematic

simulate this circuit – Schematic created using CircuitLab

To switch the motor on, you require a low output from the ESP32.

R2 prevents the motor from running before the ESP32 has configured its ports, by gently holding that output high.


Update:

I just noticed that you can further improve this by connecting the top of R3 to the +12V supply, instead of +5V. That way, M1's gate can rise to 12V, easily enough to get the best (lowest) possible drain-source resistance \$R_{DS(ON)}\$.

\$\endgroup\$
1
\$\begingroup\$

Seems like your MOSFET will never turn on. If your GPIO high is 3.3V, the BC548 emitter will be about 2.6V to 2.7V because of the base-emitter PN junction voltage drop. To solve this, you should use the BC548 as common-emitter configuration to drive the MOSFET.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Thanks for reply! Sorry, I have never heard anything about common-emitter configuration. If possible, can you draw a simple schema with a pen and upload? \$\endgroup\$ Commented Apr 23, 2023 at 5:50
  • \$\begingroup\$ Move R2 to the collector side and emitter to GND. Then connect gate of Q2 to collector. \$\endgroup\$
    – PStechPaul
    Commented Apr 23, 2023 at 6:56
  • \$\begingroup\$ @PStechPaul Is this a right way? ibb.co/C70PZty \$\endgroup\$ Commented Apr 23, 2023 at 7:14
  • \$\begingroup\$ Yes, that will work. But you need a logic high from the ESP32 GPIO to turn it off. Also make sure you have a capacitor across your 12V supply, and a flyback diode on the motor. \$\endgroup\$
    – PStechPaul
    Commented Apr 23, 2023 at 7:22
  • 1
    \$\begingroup\$ @PStechPaul Can I add another BC548 Transistor for proper switching as ESP32 3.3v logic high to turn on Mosfet and 3.3v logic low to turn of mosfet. My update schema: ibb.co/Tbz6Bqr \$\endgroup\$ Commented Apr 23, 2023 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.