Sei sulla pagina 1di 5

Versatile DC Motor PWM Speed Controller

Rod Elliott (ESP)

Share | DC Motors At one stage (a while ago, admittedly) DC motors had fallen from favour, with most applications using AC motors. In recent years though, this has changed dramatically. Most electronics suppliers have geared DC motors intended for robotics and the like, but there is another source of powerful and cheap motors that is worth looking into. Many hardware suppliers now have battery drills for insanely low prices - so low that you can't even buy a set of Ni-Cd batteries for the same money. While the extremely cheap ones (less than AU$20.00 at one major hardware chain in Australia) may have a pretty marginal battery pack, they do have an excellent motor with a planetary gearbox, torque limiter and keyless chuck. You can't buy a motor of the same power for anything like the money. Even if you have to pay a little more (typically around AU$30.00), if you get one that is the same as one you already own, you get a set of Ni-Cd batteries (and the charger) free, and the motor/ gearbox assembly can then be used for whatever you need to do. As an example, I fitted one of these motors to motorise the major axis of my milling machine, and will shortly be forced to build a coil winder using another. These cordless drills do have a speed controller built in, but it is not readily adaptable to fixed use, with a speed knob rather than the trigger. Alternatively, you may have some other motor that you need to control, and do not have a suitable speed controller. This was exactly the quandary I found myself in, and trying to adapt the existing trigger speed control (all surface mount on a ceramic substrate) was such a pain that I abandoned the idea very quickly. Speed Control DC motor speed controls (as used in cordless drills and the like) are most commonly a relatively low frequency PWM, and while higher frequencies can be used, there is really not much point. While the switching speed is almost invariably within the audible range, the motor noise is louder than the switching noise at all but the lowest speed setting. There is no reason that the frequency needs to be fixed (the inbuilt ones aren't), and that makes the controller marginally simpler to build. As shown below, the controller featured uses one readily available (and cheap) CMOS hex Schmitt trigger IC and a few passive components. The MOSFET can be salvaged from the drill if you choose to cannibalise one for the motor, and you may be able to rescue the diode as well - if you can find it! The unit described is designed for 12V motors, but higher (or lower) voltages can be used. If the voltage is less than around 9V, you may need an auxiliary supply for the oscillator or it may not have enough voltage swing to drive the MOSFET gate properly. The oscillator voltage must not exceed 15V, or the CMOS IC will be destroyed. I suggest that the supply for the oscillator/ gate driver section should be between 10V and 14V. I have tried the controller with

a couple of different sized motors - one from the drill, and another (much smaller) robotics motor. It worked perfectly with both, giving a smooth speed change and starting the motor at even the lowest speed setting.

Figure 1 - DC Motor Speed Controller

It might look complex, but it isn't. There are a number of inputs and outputs that are paralleled, and as shown, U1A is the entire oscillator. The output of this could be used to drive the MOSFET directly (ignoring the other circuits), but this output already has a fairly heavy load because of the feedback components. You could also reverse the polarity (just reverse D1 and D2), and all remaining circuits can be used to drive the output. Why did I do it this way? Because I wired it up without really thinking about the polarity, and since there were 5 Schmitt inverters left in the package I knew that I could invert it if needed with no need to de-solder what I had done already. With the values shown, the on time is fixed by R1 at 146us, and the frequency for minimum speed is just over 560Hz. At maximum speed, the frequency is about 6.5kHz, with an off period of only 2.6us - limited by the fact the U1A will insist on oscillating, and the small residual resistance of VR1. You can increase the minimum on time by increasing R1 (some motors may need this to run), and the maximum speed can be limited by installing a resistor in series with VR1. As noted above, the MOSFET can probably be salvaged from the drill along with its heatsink - my unit used a P45NF MOSFET, which appears to be a manufacturer's special part number. Otherwise, use an IRF540 or anything else that will do the job. One IRF540 will be sufficient for motors drawing up to around 20A - the MOSFET is rated at 33A, but some safety margin is always advisable. The diode may cause a problem, as it needs to be rated at around the same current as the motor at full load. You may get away with less, but you also may not. During tests, I was able to get the diode quite hot, depending on motor speed. I used a MUR1560 (15A/600V ultrafast) because I had them handy, although it might be overkill. D1 and D2 need only be 1N4148 or similar. Do not use 1N400x diodes, as they are not fast enough and will cause problems with the oscillator. The 15V (1W)

zener is used to protect the CMOS IC from excessive spike voltages. If you intend using the circuit shown from a supply voltage above 15V, then you will have to increase the value of R3. As shown, it's purpose is only to limit peak zener current from spikes, but increasing it will allow the circuit to operate from higher voltages. There is no real reason that the circuit couldn't be scaled up to handle very powerful motors, but for such applications, a feedback system would probably be expected to maintain the set speed regardless of load. Needless to say that is not available in the above circuit, and for many tasks (such as coil winder or motorised axis on a milling machine) it is not always a good idea - it's nice to be able to stop the motor by hand in an emergency without it trying to tear your arm off . The diode is critical for motor speed control. It allows the back EMF from the motor (which occurs when the MOSFET switches off) to be put to good use - in this case it is re-applied to the motor, so is not wasted generating a high voltage pulse that may damage the motor's insulation. Without the diode, speed control is poor, low speed torque is minimal, and the motor will probably refuse to even start at less than 50% duty cycle. Other Uses Although the circuit was designed as a motor speed controller, it will also work just as well as a lamp dimmer. Any (DC) filament lamp operating from 12 - 24V (or more with appropriate MOSFET selection) can be controlled, with a single IRF540 being more than adequate for lamps rated at up to around 20A (over 250W at 12V, more at higher voltages). The reversing switch is not much use in this application, and D4 is not needed either. The circuit can also be used as a heater control for DC heaters - for example, it could be used to reduce the power to a rear window demister, allowing it to be set for just enough power to keep the rear window of your car clear. While everything is cold, full power is needed, but after the window is free of condensation, a lot less power is needed to keep it that way. While you might think that there isn't much point, remember that every Watt of power that is used in a car is paid for by increased fuel consumption. The 12V car supply is not free, although most people tend to think of it that way. Construction There is nothing critical about the circuit, but as always a compact layout will minimise noise pickup from the motor. Brush type motors are electrically very noisy, and any of that noise that gets into the oscillator will cause false triggering and possibly unstable speed control. The MOSFET and power diode (D4) will need a heatsink, but given the circuit flexibility (and the almost endless uses for it), the dimensions are left to the constructor. Keep wiring short - especially to the MOSFET. Although it probably won't cause any problems if the MOSFET oscillates at some high (even RF) frequency, it's better to keep operation in the design range. You can add a gate resistor (10 - 100 Ohms) if it makes you feel better.

While it is possible to make the controller maintain approximately the same frequency with a small re-organisation of the oscillator circuit, there appears to be no benefit, since it works perfectly as shown. The reversing switch is optional - some applications won't need it, in which case it can be omitted. If you got the motor from a cordless drill, you can always adapt the reversing switch that is usually a part of the existing controller. Other possible applications might be to control remote controlled battery driven model motors (cars, boats or even planes), in which case the pot would be attached to a servo (or use a servo controlled pot). The benefit is that battery drain is greatly reduced at low speeds compared to a simple switched series resistance controller. Part 2 shows an alternative method of doing exactly the same thing, except it only uses 3 of the 6 Schmitt triggers, so you can have two speed controllers using only one CMOS IC. It also uses a constant oscillator speed, which may be preferred in some cases. Parte 2 Versatile DC Motor PWM Speed Controller (Part 2)
Rod Elliott (ESP)

Share | Alternative Circuit As mentioned in part 1, it is possible to rearrange the circuit to provide a constant frequency as the pulse width is varied. The additional effort involves having to run three wires from the pot rather than just two, so it's not really arduous. As shown below, R1 and R2 can be used to set the maximum and minimum speeds, and can be made variable if specific max/min speeds are needed. The original circuit can also be easily rearranged to only use 3 of the 6 Schmitt triggers, and this connection method is shown below. Feel free to mix and match between the two versions - for example the oscillator from Figure 1 can be used in the Figure 2 version or vice versa.

Figure 2 - Alternative Motor Speed Controller

To set a maximum speed, vary R1, and vary R2 to set the minimum. Trimpots can be used if your requirement is critical, but with no feedback, there will always be some variation anyway. With the values shown, the on and off times will change, but the period (for a complete on/off cycle) remains fairly constant regardless of pot setting. There will be some variation if R1 and R2 are not equal, but the frequency change will not have any effect on operation. The oscillator frequency is again approximately 560Hz, and this can be changed by making C1 larger (lower frequency) or smaller (higher frequency). MOSFET and diode requirements are unchanged from the Figure 1 version, and can be selected according to your requirements or what you have available - provided that the devices are rated sufficiently for the load. Like the previous version, this controller can also be used as a DC lamp dimmer, heater controller, or any other application that lends itself to PWM operation. Part 1

Potrebbero piacerti anche