Need help with Arduino PWM Motor Control

Hi Everyone,

This is my first visit here. Hopefully this is the right crowd for some help.

I’m using the following circuit to control a DC motor with an ATMega (Arduino).

There are many articles out there that refer to a simple circuit like this but I know from doing some reading that they don’t really follow best engineering practice. It’s kind of just enough info to be dangerous!

What should I change in this circuit to provide good component life and more importantly, noise suppression.

MOSFET Datasheet: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Components/General/FQP30N06L.pdf

The motor is a truck window lift motor running on 12V, draws about 2-4 amps in our application, 6-9 amps if it heavily loaded. The wires running to the motor are about 10ft long.

The PWM rate is 32kHz.

Thanks,

Tim

motor_drive.jpg

Include a 150 ohm resistor in series with the gate of the MOS fet.

  1. I would choose a mosfet with lower Rds(on). The FQP30N06L can do the job, but it will need a heatsink in order to to handle 9A. I suggest you look for a mosfet with Rds(on) or no more than 10 millohms.

  2. At a PWM frequency of 32kHz, if you drive the mosfet direct from the Arduino (with or without a series resistor), you will get quite high switching losses in the mosfet because it will switch quite slowly (I estimate it will take about 1us to switch on, and a similar time to switch off). You can try it (I would use a series resistor of 100 ohms rather than the 150 ohms that Larry suggested), and it may be OK if you use a good heatsink on the mosfet. Preferably, use a mosfet driver chip such as MCP1407, with a series resistor of about 27 ohms between the output and the mosfet gate. The 10K resistor then goes between the MC1407 input and ground.

Using the mosfet driver IC, you have the option of powering it from 12V, allowing you to use a mosfet that needs 10V gate drive. However, as the environment is automotive, you would need to pass the 12V supply through a filter, to protect the driver from transients. You could use the same filtered supply to power the Arduino.

Any reason to PWM that fast? DC42 is correct on all counts. You're going to waste a lot of energy (which translates to heat) switching that fast. If you backed it down to 20Khz it would help and most people still wouldn't hear it. Also I think DC42 suggested a "driver" chip. The parameters that limits a FET's switching speed are the gate-source capacitance and in an H-Bridge, the charge contained in the parasitic drain-source junction's diode. Everyone keeps insisting an Arduino will provide 40mA but that is "absolute maximum". The series resistor to the gate controls the current the Arduino can supply. Short answer, if you have a driver between the Arduino and the FET, you can drop that resistor perhaps 10x lower and reduce your switching times. Remember those can be a significant source of your overall heat. --Rob