Driving a DC motor using PWM with AVR ATmega

pwm_dc_motor_driver_atmega

Davide Gironi writes:

The PWM frequency have to be selected in the way that the switch frequency is much higher than the dynamics of the motor.
To avoid noise from the motor, the choosen PWM frequency is 20Khz. Which is a know to know frequency.
So, with this one, you can drive up to 4 motors independently controlling:
*speed
*direction
*slow start / stop
Setup parameters are contained in dcmotorpwm.h

This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 8MHz.

Check out the video after the break.

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.