Search WWW Search seattlerobotics.org

# Choosing the right PWM frequency.

## Benny Peter Jørgensen

benny@mip.sdu.dk

Some months ago, there was a discussion on motor controllers and particularly on how to pick the right modulation frequency. I read all the contributions and realized that I maybe could help some people on this subject.

The principle of a motor controller can be illustrated like this. We want some electronic that have one input and if the voltage on this input is lower than 0.5 V the motor turns one way and if the voltage is over 2 voltage the motor turns the other way around. On our motor controller we have some logic with drivers and two Mosfet buffers.

If the input is low just as long time as it's high, the motor will not move. On the other hand if the input is high longer that it is low, the motor starts turning.

When a mosfet transistor is turned on it happens with a little delay and then it is turned off it happens with a longer delay. Driving a mosfet input is not easy, because it contains a large capacitor inside and therefore it takes longer time to switch on and off. If the motor controller is advanced it is build with this in mind. Then the motor controller turns the one set of mosfet's off before is turns the other set on.

If the motor controller is simple (and then easy to build) we lose some power every time there is a switch, because both mosfet's in a half bridge is leading current for a short period of time.

If the PWM frequency is to low the motor is actually moving and then we have a loss of power here. Chousing the right PWM frequency is therefore essential to the efficiency of the motor controller.

The optimum PWM frequency will vary from system to system. In the low end of the PWM frequency scale we see the motor using power. In the high end we see the motor controller eating power. I have made this measurement with a function generator put on 50% / 50% duty cycle and TTL output. This way it's possible to measure the current through the controller while sweeping through the frequencies.

Some people may want to maximize the "kick ass factor" and I have found that when the PWM frequency is so high (here over 10 KHz) that the motors happy, the output power of the motor is about constant.

My implementation of this is very simple. I have used the Si9936 dual mosfet's containing one N-type and one P-type and the mosfet's are driven by the TLC3702 which is a comparator with puss-pull output stage.

If the motor uses under 2 A and the PWM frequency is held between 9 KHz and 25 KHz it is ok. All components is available in SMD to minimize the layout size.

A better solution might involve the mosfet drivers like the MC34151 and some more logic to prevent both mosfets in the same half bridge from be open at the same time. This way it is possible to active higher PWM frequencies or lower idle current. If the problem is the current to the motor when the Si4920 can be used. It have the same pin configuration, but lower on resistance and therefore it can deliver up to 6 A.

benny@mip.sdu.dk