I'm trying to drive a 12-24 V DC motor with MCU PWM output. My design is based on a totem pole gate driver

First I use a voltage divider to provide the full-on gate voltage (10 V) for my power MOSFET.


enter image description here

I use R3 and Q4 to turn off both totem pole transistors. The DC motor is simulated with DC power. Switch S1 is used for MCU startup situations to not run the motor at startup.

I ran the simulation in Multisim and it shows the MOSFET never turns off and the current in PWM mode is lower than I am expected.

What part of this design is missing? Can a simpler design be made that is robust for different DC motor voltages?

The circuit was made in online Multisim and is available through this link.

new circuit using an optocoupler to isolate the powers

enter image description here

updated circuit

enter image description here

  • 1
    \$\begingroup\$ The schematic symbol for the IRF450 looks like P-channel device, but it is NMOS. A PMOS device would conduct through its D-S diode. \$\endgroup\$
    – PStechPaul
    Apr 16, 2023 at 23:34
  • \$\begingroup\$ yes, the symbol is wrong , however I only need to use n mosfet \$\endgroup\$
    – Hamid s k
    Apr 17, 2023 at 0:10
  • \$\begingroup\$ (That symbol is N-MOS enhancement mode - no bulk, whatever this means outside an integrated circuit.) \$\endgroup\$
    – greybeard
    Apr 22, 2023 at 8:27
  • \$\begingroup\$ FYI, at least the way Texas Instruments uses the terms, your driver is a push-pull, not a totem pole. A totem pole driver has two transistors of the same type (e.g. both NPN) and both oriented in the same way. Push-pull drivers have complementary transistors configured as complementary emitter (source) followers. \$\endgroup\$ Apr 22, 2023 at 13:15
  • 1
    \$\begingroup\$ 24 V exceeds Q13's \$V_{GS}max\$ of 20 V. C1 is misplaced. \$\endgroup\$
    – greybeard
    Apr 22, 2023 at 22:53

1 Answer 1


Your schematic is a copy of another schematic and you have added some unnecessary parts while missing at least one.

  1. Your node 4 was and should have stayed connected directly to 12V (node 9), without the R5/R6 voltage divider. 12V is fine for driving a MOSFET, especially since it drops by about 0.6V through the Q2 transistor.
  2. R2 resistance is too large; it should be no more than 100Ω.
  3. If the switch S1 condition is OFF in the simulation, that will keep the MOSFET on.
  4. R1 should be 47Ω-100Ω.
  5. DC motor should added between the 24V battery and MOSFET, or at least a resistor simulating the impedance of the motor.
  6. The motor will need an RC snubber or a diode across it to protect the MOSFET from its inductive kickback.
  7. The Multisim MOSFET model could be wrong.
  8. You need a capacitor across the 24V power supply rails.

EDIT: Based on your question below, I realize I have forgotten your main issue, that is the MOSFET staying on without a signal being applied (switch S1 open). Below is the schematic section relevant to your problem:


simulate this circuit – Schematic created using CircuitLab

  • I have kept transistor and resistor numbering the same as in your schematic to make it easier for you to follow the changes.
  • R5 keeps the Q4 on when the switch S1 is off. This keeps the totem pole output low and the MOSFET off.
  • Q4 itself prevents the voltage on its base going over 1V, protecting the square wave generator.
  • R1 limits the current into the transistor to below 20mA. If the 1 kHz generator can supply higher currents, you can reduce R1 value to 100Ω.
  • The totem pole output keeps the MOSFET off when switch is off, but I have added (left in place) the R4 just to make sure it stays off if 12V is off.
  • RC snubber (R6 and C1) reduces EMI.
  • Diode D1 prevents inductive kickback from destroying the MOSFET.
  • L1 represents the DC motor coil(s).
  • 1
    \$\begingroup\$ @Hamidsk I have made a schematic which is simpler and is fully functional. The problem of the MOSFET staying on is solved with a resistor keeping the Q4 on. Check my answer and the schematic. If it is acceptable, you should accept it as your answer. \$\endgroup\$ Apr 18, 2023 at 23:05
  • 1
    \$\begingroup\$ @Hamidsk Sorry, I forgot to mention L1 is the motor coil(s). It's corrected now. I don't understand what do you mean by "same power for the motor and driver". \$\endgroup\$ Apr 21, 2023 at 0:54
  • 1
    \$\begingroup\$ @Hamidsk As far as I know, you don't need R3. Also, R4 as a pull-up is unnecessary, but you should put it in series between Arduino and optocoupler input AND reduce it to about 330Ω to 1kΩ.. If you want your PWM phase to be the same at the input and the output, you should connect optocoupler LED anode to +5V and its cathode to Arduino output. The schematic should work. \$\endgroup\$ Apr 22, 2023 at 18:39
  • 1
    \$\begingroup\$ No. If the opto-isolator is not driven low, R2 will bias the totem pole gate driver high, and the motor will be ON. You could move the opto-isolator to where R2 is, and move it to pull the base drive low in the absence of drive signal. \$\endgroup\$
    – PStechPaul
    Apr 22, 2023 at 22:33
  • 2
    \$\begingroup\$ @Hamidsk See my reply above to PStechPaul. Adding an optocoupler complicates things and doesn't work as well as with a plain transistor. Do you really need an optocoupler? Also, please stop updating circuits and questions, you are asking for engineering hours to be spent, and there is a reason those hours are expensive. You had a problem and a question, and they were addressed and solved. Continuing with more requests through a single question is unrewarding and against the rules. Any more questions or problems, post them as new questions, please! I could be answering other questions instead. \$\endgroup\$ Apr 23, 2023 at 0:05

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.