[Cyborg] Compass Vibro-Anklet Hack Notes (with pictures even, wow) 2009.03.04

Lamont Lucas lamont at cluepon.com
Wed Mar 25 20:37:32 UTC 2009

Rachel McConnell wrote:
> Lamont lent me his breadboard with arduino & shift buffer, and walked me
> through it to the point where I actually think I understand it. I
> believe he explained that this technique requires 5 pins to drive any
> number of motors (only 8 motors per shift buffer chip IIRC).  would that
> be useful to you or is 5 pins still too many to use the screen?  Also,
> possibly depending on which arduino you're using, there's apparently
> serial out that writes output back to the Processing IDE if you click
> the Serial Monitor button... here, I'll splat his code on the wiki (I
> assume this is OK Lamont!) in case it is helpful.
> https://www.noisebridge.net/wiki/Lamont%27s_PWM_code

I'd love to claim that that messy code is no way indicative of my 
typical output, but I'd be lying.  I wrote the code in parallel with 
wiring up the breadboard, so there's mixed test statements and whatnot 
in there, and I didn't get a chance to draw a schematic.

But yeah, I'm  using the TPIC6B595 high power serial 8 bit shift 
register which can sink 150 mA of current per each of the 8 outputs 
(although generally speaking, not all on at once).  I use 4 pins from 
the RBBB microcontroller board to shift the data in, with a 0 for every 
off motor/led and a 1 for every on motor/led, then the 5th pin with an 
inverse PWM signal that toggles every active output on the chip. 

I ran out of time, but the next step in this hardware prototype is to 
add two pots to the board, one to vary the system wide PWM signal sent 
to the shift register, and another to act as a crude position detector 
and select which of the 8 (or 16) motors to turn on. 

Don't forget that the Serial.* library can read as well as write from/to 
the serial monitor, so you could manually type in the PWM duty cycle on 
your laptop and use that on the motor inline with the ammeter function 
of the multimeter to measure the RMS current required to spin the motors 
enough to feel.

I'm guessing the final version of this will involve speeding up the PWM 
frequency from the pathetic 490 Hz it's currently at (hey, my belt is 
singing B-flat!) to a more reasonable 20 or 40 kHz, then putting a small 
capacitor across the terminals of each motor.  But the breadboard at 
least lets us experiment with the basic PWM.

Oh, and the TPIC6B595 is about $2.60 per chip (one needed per 8 motors), 
and way simpler to wire than a one-transistor per motor control scheme.

I'll be answering email while I'm in NYC, but won't be back till next 
weekend, in april.

More information about the Cyborg mailing list