I'm wanting to build a hexapod off my arduino, and having spent a bit of time playing around with code and hardware I think I know what I want to do, but don't quite know how to go about it.
If I'm going to run 18 servos off an arduino, they're definitely not all going to be able to be connected to IO ports. But instead of adding extra hardware between the arduino and the servos (like I'm almost resigning myself to at the moment), I had an idea that maybe I could set up the interrupts the way shane colton did in his blog (sorry first post so I can't link to his site, but google for "Shane Colton Arduino Interrupt Driven Servo Routine")
Instead of driving pins as signal however, I would drive both a set of pins for timing, and a set of pins to control the bank of servos currently being sent timing information.
so, simplest setup is four servos, pin 0+1 are servo bank select pins, pin 2+3 are the timing pulse pins. In my mind, the setup consists of transistors on the bank lines that let the timing pins access the actual servos. So, pin 0 collects T1 and T2, pin 1 collects T3 and T4, pin 2 is base on T1 and T3, pin 3 is base on T2 and T4.
That's my theory, however, my practice won't even bear out one servo's control being turned on and off by a transistor, it just seems to either always send signal, or not at all, which means I must be just not getting the right understanding of transistors or something.
Simply said: I can't get a transistor to act as a gate to my servo signal. What could I be doing wrong, what transistor types are best for controlling flow like this?
In the end I want to have four banks of five servos (two spare for other magic), where maybe pins 0-3 are bank control, and pins 4-8 are the signal lines that all matrix together.
The software would iteratre over the banks. For each bank it would pin-high all the timing pins, then pin-high the bank pin, then pin-low the timing pins. One bank should take 2ms, so it takes ~8ms for all four banks, leaving me 12ms to do any calculations ready for the next frame (that's if I do this the dumb way without interrupts).