Controlling a motor with PWM
(I'm trying to control a 12V 6A motor with a 5V Pwm signal. Thanks!)
18
answers
|
Answer it!
|
For instance, once upon a time, when I was working at NASA GRC, I created a PWM hotwire igntior that ran directly off a 28VDC battery and used code to govern the operation.
The ignitor would burnout @ slightly over 2V.
If one were to input 2V, the hotwire would definitely get the job done, but since we only had 2.2 seconds of low-g time to work, hitting the ignitor with an initial burst of near full power, followed by a rapid reduction in the on-time percentage resulted in a much quicker response of the otherwise sluggish hotwire.
http://www.irf.com/product-info/hexfet/
I'd suggest using a conservative selection, ie, choose a component that exceeds your needs by at least a factor of two. Why? Because you will avoid accidentally burning it out when you push it right to the edge.
FETs are voltage controlled, rather than current driven like Bipolars, so drive current from your arduino or intermediary drive circuitry isn't going to be a big problem.
There are also logic-level FETS, (designed to be driven directly by logic level signals) although I can't remember the part numbers. The nice thing about logic-level devices is that no intermediary circuitry is required. Granted, in my experience, driving FETs and or HEXfets is not all that complicated with or without a logic level input...There are also drawback to using them, in that most of the more robust parts are not specified in a logic level input device.
Remember that as long as you choose a part that well-exceeds your quiescent load current when using a low RDS(on) device like a HexFet, most of the heating for PWM mode will occur during the actual switching time (from 0V-to-12V and from 12V-to-0V, so rise time is important, since it will generate problems if not considered. Of course, providing solid cooling for the HexFet (or other fet or transistor) is also essential and should not be taken lightly.
Best wishes.
Andy is actually wrong, you can switch on a Mosfet VERY quickly, but only if you know what you are doing, likewise you can turn them of fast too.
To short circuit the design process, up to a few amps you can cheat, and get the whole caboodle in a single chip, expecially for driving little motors.
Unless you really have to design your own, don't.
Specify your current and voltage requirements, and we can help better.
The main thing to worry about ime when driving an inductive load (like a motor) with a single FET, is the kickback from the motor when current is removed, but that can be solved in a relatively straight forward manner by using a simple reversed diode (or several paralleled) to add protection to the internal kickback diode built into HEXFETs like the IRF40Z or a similar protective scheme. The reversed diode(s) give a current path for the inductively generated kickback voltage (Inductors are like flywheels author, they don't like to have current removed instantaneously!) A couple of paralleled 1N4003s would do the trick rather nicely (200V, 30A surge if I recall correctly)
That's effectively synchronous rectification, and its highly efficient, since you are using the tiny rds on as your switches and not diode drops.
Steve
What would you do ? Relay and PWM over one transistor +flywheel diode ?
Steve
Although it might be a good idea to do so, No enable relay is "necessary". As long as there's no input to the Fet, (and it's input is designed to default to zero V) it will be an open circuit until it gets command from the arduino.. So, I'd just use the Arduinos' logic to avoid driving the FET and provide a path to ground to kibosh any tendency to git-up-n-go on it's own.
Single N-channel FET on the low side of the motor, or if one is worried about accidental short circuit turn-on, (a real possiblity in robotics) a high-side located P-Channel, although they tend to have a higher on-resistance in equivalent packages and require negative logic.
The additional diodes just provide a heftier kickback path.
All the rest can be handled through coding. The trick of course is making the code efficient so it remains fast. Does the arduino have any inbuilt PWM routines?
Yes, there are PWM routines.
Steve
![]() |

































