Mail Archives: geda-user/2011/12/21/13:17:03
Search for "motor controller" on digikey - I keep tripping over
i2c/spi motor controllers that do what you want, each time I search
for bldc drivers.
If that doesn't work out, it's possible to drive the output pins via
software (bit bang) in what I call a "pulse dithering modulation"
mode. I use it for LED brightness control, it might be good enough
for your purposes. In summary: in your timer interrupt, add your
"speed" value to a counter. If the counter overflows, turn on the
motor, else turn off the motor (i.e. the pin is the carry bit). You
need an interrupt frequency only a few times your effective PWM cycle
time to get something that "works" (although faster is better :)
For more info, see "Bresenham's line algorithm" in Wikipedia :-)
- Raw text -