PWM with l293/l298
June 17, 2009
I hit a wall when I was trying to use PWM on the enable pins of both l293 and l298. Whatever PWM frequency I choose it seems that I loose a lot of torque on the l293/l298 outputs with the PWM at maximum (255).
Browsing around searching for implementations I have seen that most of the time PWM is used on the enable pins, but on some (very few) designs I have also seen PWM on the input pins.
The question is: which is best/recommended? PWM on the enable pins or on the input pins?
Second question: I did use an Attiny clocked at 16 mHz when testing with all prescalers available, but the best results seem to be at no prescaler at all so pretty high frequency. What frequency should be used?
Third one: In the Atmel datasheets they recommend using phase and frequency correct PWM for motor application, but it seems to work better with fast PWM. What is your experience with that?
Last one: In my experiments with stepper motors I tried switching on the l293/l298 before the step and off after the step was done with a delay of 10 ms. With that delay the stepper would work with usable torque but still lesser than compared with the torque you get when leaving the driver on. How long does it actually take for the driver after enabling it to get to full power? I could not find any clear indication any where so that is why the first question comes to mind ...