Sunday, November 24, 2013

Driving a DC motor using software PWM with AVR ATmega

Update to version 05

This library is an update of the software PWM driver you can find here:
http://davidegironi.blogspot.it/2013/03/controlling-dc-motor-speed-and_6.html
For DC motor information please look at the above link.



This update implements also progressive start / stop features.

So, with this one, you can drive up to 4 motors independently controlling:
  • speed
  • direction
  • slow start / stop


Changelog

  • 05: renamed timer macros, fixed max speed
  • 04: small fix to rampup
  • 03: small fix to velocity calculation, math.h lib can now be omitted, add a function that returns the current motor speed
  • 02: first version


Setup parameters are contained in dcmotorpwmsoft.h

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


Code


Notes
  • read risk disclaimer
  • excuse my bad english

No comments:

Post a Comment