1
\$\begingroup\$

I made the following circuit to drive a 12 VDC motor with an IRFI540G MOSFET.

My first plan was to use a cheap Chinese DC/DC buck converter to power my Arduino from 12 V, but after a couple of minutes it burnt out. Somewhere it draws too much current beyond that module's capability. I replaced that module with another, but after a couple of minutes my MOSFET died.

enter image description here

I decided to use another 5 V source similar to following the circuit:

enter image description here

It works for a longer time, but after a couple of minutes that new MOSFET also died. My presumption was since the MOSFET gate looks like a capacitor, it only needs to be charged and doesn't need to bind the 12 V and 5 V grounds together.

Another strange thing, my Arduino pin (9) also goes crazy and doesn't make the correct PWM signal anymore, so I have to switch to another PWM pin, but after a couple of minutes my MOSFET died again for the third time.

Any tips for this crazy behavior and the current sinking hole would be appreciated.

this is picture of setup, notice the PWM pattern

this circuit works for a couple of hours

enter image description here

\$\endgroup\$
8
  • 2
    \$\begingroup\$ Please elaborate on using not a common ground: you need to have some reference potential, or use some means for isolated control. \$\endgroup\$
    – greybeard
    Mar 7, 2023 at 7:16
  • \$\begingroup\$ I check the voltage with the oscilloscope and it's above 10 V for the MOSFET gate, however, I didn't figure out, why it draws too much current when I use a dc buck converter to power the Arduino with 12 V power and why my PWM Arduino pin destroyed \$\endgroup\$
    – Hamid s k
    Mar 7, 2023 at 7:52
  • \$\begingroup\$ How are COM and GND connected? \$\endgroup\$
    – winny
    Mar 7, 2023 at 8:54
  • 1
    \$\begingroup\$ If you really have no connection between COM & GND, then this circuit cannot work. If it does work at all, then what you've built and what you've drawn do not match. If you get more than about 4.5V at the MOSFET gate then what you've built and what you've drawn do not match. Show us a nice big clear photo of what you've actual built. \$\endgroup\$
    – brhans
    Mar 7, 2023 at 10:30
  • 1
    \$\begingroup\$ @Hamidsk, COM & GND have to be at the same potential for your circuit to work. Can you please add the details of what Arduino you are using? If I am not mistaken, eventhough you supply 5V to the Arduino board, the IO pins of Arduino are 3.3V only. So, gate of Q1 should be only say 2.6V. If you are measuring 10V, there is something seriously wrong. It could also be because COM and GND are not properly star connected. How much current is the DC motor expected to take? \$\endgroup\$
    – sai
    Mar 7, 2023 at 13:39

3 Answers 3

1
\$\begingroup\$

The IRFI540 is not rated for logic level drive, and is only characterized for 4.5V and above. I think the PWM output of the Arduino is 3.3V, and your emitter follower Q2 lowers the gate drive to about 0.7V below that. Even for a 5V PWM the gate voltage is insufficient. You will need a logic level MOSFET, or use a gate driver circuit to use the 12V supply. You might be able to just move your LED and 1k resistor to the collector, which would go to the gate, and add a base resistor of 1k or so.

\$\endgroup\$
2
  • \$\begingroup\$ I check the voltage with the oscilloscope and it's above 10 V for the MOSFET gate, however, I didn't figure out, why it draws too much current when I use a dc buck converter to power the Arduino with 12 V power and why my PWM Arduino pin destroyed \$\endgroup\$
    – Hamid s k
    Mar 7, 2023 at 7:52
  • 3
    \$\begingroup\$ The MOSFET gate in the original circuit can't go beyond 4.4-4.5V when the Arduino device is 5V powered, as it's a voltage follower. Unless something is connected wrong, and the current is flowing in some unexpected path: that could explain also the short-term failure. I didn't see any current value mentioned, which in case of a not-so-sharp MOSFET turn-on/off time could lead to catastrophic failures, due to incorrectly handled power dissipation. Then there's the matter of voltage spikes at motor terminals, which can be very high with some DC motors - the 330u Al cap won't filter them \$\endgroup\$
    – LuC
    Mar 7, 2023 at 8:15
1
\$\begingroup\$

Yes you do need to connect the grounds together.

Q2 is setup as an emitter follower. In that configuration, the output (its emitter) will always be 0.7V below its base, and since the base is at +5V maximum, you cannot expect higher than +4.3V at its emitter.

That's not enough to fully switch on Q1, unless motor current is small. Since you already destroyed a MOSFET, it's clear that motor current is significant.

I suspect you are under the impression that Q2's output would be 12V or 0V, given that it's connected to a 12V supply. This would be true, if Q1 was connected common-emitter, that is, emitter connected to ground, and R4 at the collector:

schematic

simulate this circuit – Schematic created using CircuitLab

Note the presence of R5, which is necessary to limit current into the base in this common-emitter configuration.

Now the voltage at C will rise and fall between (nearly) 0V and +12V, easily sufficient to fully switch on and off the MOSFET.

While the emitter follower does not invert, this common-emitter setup of Q2 will invert the Arduino's output. That will likely also complicate the use of an indicator LED. One problem at a time, I suppose.

\$\endgroup\$
2
  • \$\begingroup\$ thanks @simon-fitch, but I used this circuit before the current circuit because, on MCU reset, it turns on the motor for fraction of time, so I thought when Q2 was inactive the C point voltage should be 12 V and turned the MOSFET on, new picture added, it was working fine for 2 different sources for a couple of hours because the MOSFET gate needs no current or return line to the common ground, but it finally destroys my PWM pin and MOSFET \$\endgroup\$
    – Hamid s k
    Mar 7, 2023 at 20:36
  • \$\begingroup\$ This is what I proposed in my answer, although perhaps I should have added a schematic. The Arduino should power up with all I/O pins either tri-state or analog input (which is the case for PICs, at least). So you need to add a pull-down resistor to keep the MOSFET off during power-up. Also, your initialization should first set the I/O pin to zero, and then enable it as output. This is also SOP for PICs. I don't have much experience with Arduino. \$\endgroup\$
    – PStechPaul
    Mar 7, 2023 at 21:55
0
\$\begingroup\$

You can make it work, Put R3 and R4 on the collector and the emitter to ground. The LED diode and resistor in the collector will give you enough voltage to drive the MOSFET properly. Here is an image to give you an idea. Be sure all grounds are connected. The logic will be inverted so it will be off when the port pin is high. enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ I used this circuit before and it's unreliable with MCU, it starts running in a fraction of the time when MUC reset \$\endgroup\$
    – Hamid s k
    Mar 7, 2023 at 7:45
  • 1
    \$\begingroup\$ You need to bias the port pin to the off state to prevent this, this is common practice. What is happening is when you reset the MCU its outputs are floating. In your case use a 10K pull up. This circuit is very stable if properly implemented. \$\endgroup\$
    – Gil
    Mar 8, 2023 at 1:09
  • \$\begingroup\$ regards your schematic if the port pin does not pull down the Q2 is stayed active and the motor is running \$\endgroup\$
    – Hamid s k
    Mar 12, 2023 at 20:10

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.