delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2011/12/21/13:17:03

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
Date: Wed, 21 Dec 2011 13:16:54 -0500
Message-Id: <201112211816.pBLIGsaf016475@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: geda-user AT delorie DOT com
In-reply-to:
<CALSZ9godJsJDhBd_PaCiWPx9M8GyKz8PW1wVUs6NxVgtrOS-Fw AT mail DOT gmail DOT com>
(message from Rob Butts on Wed, 21 Dec 2011 12:11:24 -0500)
Subject: Re: [geda-user] Design suggestions...
References: <CALSZ9godJsJDhBd_PaCiWPx9M8GyKz8PW1wVUs6NxVgtrOS-Fw AT mail DOT gmail DOT com>
Reply-To: geda-user AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019