Ndrive driver module, PWM, FET open circuit

Our range of tiny modules are designed to make it easy for you to quickly add functionality to your projects. [Module List]
Post Reply
tomgreen
Posts:6
Joined:Fri Nov 04, 2011 11:32 pm
Ndrive driver module, PWM, FET open circuit

Post by tomgreen » Mon May 21, 2012 4:02 am

Hi,

I've got no background in electronics, so please feel free to tell me bluntly if I've been stupid.

I am trying to drive a large-ish 12VDC motor (no-load current ~2A at 12V) from my Eleven. I want to be able to control the speed (drive the motor slowly), so I thought that using analogWrite() from one of the PWM pins as the Gate on an Ndrive would be a good solution.

It worked nicely for a couple of minutes, then the FET went (nearly, ~4ohms) short and my motor started driving continuously at ~supply voltage. A second Ndrive soon went the same way.

I assume I am doing something badly wrong, and would greatly appreciate if someone could point out where.

My circuit is (approximately) as in the attached - for Q1, please read the relevant terminals on the Ndrive module.
The relevant lines of my sketch:

Code: Select all

...
void loop() {
...
analogWrite(elPin, elDuty); // elDuty is 25, out of range 0-255, so ~10% duty cycle at Arduino's ~490Hz
// wait 2.5s
digitalWrite(elPin, LOW);
// wait 2.5s, repeat
...
}
Thanks,
Tom


(EDIT): Back-EMF?
Attachments
Arduino_PWM_motor.png
Simplified schematic

mr-russ
Posts:16
Joined:Wed Jan 18, 2012 8:46 am

Re: Ndrive driver module, PWM, FET open circuit

Post by mr-russ » Mon May 21, 2012 9:02 am

Hi,

I'm not sure what is meant by high loads, but the reference sheet http://cdn.shopify.com/s/files/1/0045/8 ... pdf?100736 says that you may need a heat sink. How hot is the FET getting?

I'm no FET expert, but I'd be not using a common ground on those two circuits. The FET Gate is isolated, so you don't need to have them grounded together.

I'm not sure I understand the logic of the code. Basically it's run the motor at about 10% speed for 2.5 seconds, then run at full speed for 2.5 seconds, then repeat?

cef
Freetronics Staff
Freetronics Staff
Posts:106
Joined:Wed Nov 09, 2011 12:53 am

Re: Ndrive driver module, PWM, FET open circuit

Post by cef » Mon May 21, 2012 10:20 am

Since you're driving an inductive load, you might want to put a reversed bias diode across the FET to protect it from back EMF.

Something like a 1N4004 should be fine.

LukeW
Posts:91
Joined:Tue Nov 01, 2011 10:14 am

Re: Ndrive driver module, PWM, FET open circuit

Post by LukeW » Mon May 21, 2012 5:47 pm

There are a few things I would try here:

- Put a diode (eg. 1N4004) across the drain and source of the FET. The cathode connects to the drain side and the anode connects to the source side, so the diode is normally reverse biased.

- Put a small resistor (10 ohms give or take) in series between the gate pin and the Arduino.

- Put a large resistor (100 K ohms give or take) from the gate pin down to ground.

- Check the temperature of the MOSFET, maybe add a heatsink and/or fan.

- If all else fails you might have to replace the freetronics module with a more beefy MOSFET.
mr-russ wrote: I'm no FET expert, but I'd be not using a common ground on those two circuits. The FET Gate is isolated, so you don't need to have them grounded together.
Yes, it does need to be connected together.

hads
Posts:10
Joined:Tue May 01, 2012 3:58 am

Re: Ndrive driver module, PWM, FET open circuit

Post by hads » Mon May 21, 2012 10:52 pm

By the way, the Freetronics N-MOSFET module already has a 1k resistor in series with the gate and a 10k between gate and source.

tomgreen
Posts:6
Joined:Fri Nov 04, 2011 11:32 pm

Re: Ndrive driver module, PWM, FET open circuit

Post by tomgreen » Tue May 22, 2012 3:31 am

Many thanks all for your contributions.

mr-russ, sorry, I should have been clearer. The idea is to repetitivly drive a motor (at the same slow speed) that is mechanically returned to its original position between cycles, so as to produce a see-sawing motion. I probably didn't select the best code extract to post, just wanted to show that I was using analogWrite() followed by a digitalWrite() after a pause.



The FET wasn't hot, up until the time it failed (afterwards it got very warm), and I was only drawing an amp or two at 13.7V, far inside the published 20A rating of the Freetronics module.

It sounds like back-EMF was the killer, next time I'll try with the recommended diode as LukeW and cef suggest.

swordfishBob
Posts:31
Joined:Sun Nov 27, 2011 10:27 pm

Re: Ndrive driver module, PWM, FET open circuit

Post by swordfishBob » Thu Aug 09, 2012 8:20 am

"Only drawing an amp or two" - is that the peak, or the average current?
For a given voltage, motors draw more current while stalled or spinning slowly, than when spinning fast. If trying to run a motor more slowly off PWM, the "on" part of the cycle will see more current than the constant current of a motor at full speed. If you measure the current with a simple meter, it'll give the average which doesn't show the peaks.
As the PWM output goes from On to Off, the inductive nature of the motor will generate a large voltage, as inductors oppose a change in current. You also get this problem when controlling a relay coil, and usually resolve there with a diode as discussed above.

It's possible that with PWM and a diode running a motor you'd actually run the motor faster than with DC, as it's effectively the same as a switchmode regulator output circuit, but without the feedback to actually regulate.

In terms of heat, remember that power (W) = V x I. When "On", the voltage drop across the FET is low. When "Off", the current through the FET is low. It's the transitions that hurt. The faster the PWM, the more heat. Given our problem with slow motors pulling more current, and especially without a protection diode, switching from On to Off means dissipating a chunk of power.

I'm planning to control a small exhaust fan to regulate temperature in an enclosure. In that case, I can probably get away with a Ndrive module, protection diode, and a VERY SLOW PWM -- or more like a fixed width "on" cycle with varying width "off" cycle.
I might complete the switchmode output by adding a series inductor then parallel capacitor prior to the load. Still pondering...

csconsulting
Posts:71
Joined:Fri Sep 21, 2012 7:22 am

Re: Ndrive driver module, PWM, FET open circuit

Post by csconsulting » Tue Sep 25, 2012 7:31 am

you can easily use the ndrive modules in a speed control circuit, i am doing this right now for computer PC fan control.

PC Fans dont like direct PWM control, as they whine and can fail, so what i basically did was use the N drive module as a buck converter.

I have done something similar to this circuit :
http://www.ruggedcircuits.com/images/sch10.png

but also included a small inductor in series with the fan, and 2000uf capacitor across the fan.

This provides a bit of a "continuation" to the current flow, and smoothes the power to the fan.
This does however make the PWM waveform no longer coincide directly with the fan speed, as the inductor and diode will cause current to continue to flow after your PWM output has gone low, but you can compensate for that in software.
You have to use a high speed diode (shotcky), a normal small rectifier diode just isnt fast enough to work in a circuit like this. It will either flat out not work, or overheat.

You can tell when everything is working fine when you can hear a faint whine from the inductor instead of the fan, and NOTHING gets even warm to the touch.

As a bonus, the inductor will stop high current turn on currents from turning your mosfet into carbon.

Post Reply