Servo Controller: A thought experiment

First up, this is at best a work in progress, at worst only ramblings.

I have seen members asking about driving more than a handful of servos and getting the response that they can either use an arduino and its assorted libraries to drive 12+ servos, correction, up to 20 servos or get a dedicated controller board that seems to cost in the area of 50USD. I spent an hour or so knocking up an idea. I want to lay out my thoughts and see where it could or should go.

 

I have read a good deal about a free language available for a large number of the lower end PIC microcontrollers. One of the library modules offers servo control for 8 servos per available timer and it is coded for a maximum of 24 servos and/or 3 timers. An 18f4550 has 40 total pins, i2c, usb, and an internal oscillator and costs < 6USD in single unit quantities. Once again this was only a step up from doodles on a napkin.

The Plan

 

 I was thinking i2c control over up to 24 servos and from my calculations having a spare 4 pins that could return data to the i2c master might be something useful. The address would be set via an analog pin.

I2C Data

Having up to 3 sets of 8 servos requires 5 bits. 2 bits to select which of the 3 sets of 8. 3 bits to select which of the 8 servos to control. And, 3 or 4 bits to set a delay so one could have a servo move more slowly. The final 7 or 8 bits would set the direction/speed.

Bank   Servo   Delay   Degree/Speed
 bb       bbb      bbb(b)   (b)bbbbbbb    *The (b)'s are a one or the other, not both or neither.

If there are only 7 bits for the Speed/Degree, you would miss a degree choice here and there. Because 127 < 180, each bit increase is about 1.4 degrees of increment.

One of the reasons I wanted to post this is to test the waters and get input. If I or someone else was to actually produce one of these chips, is there anyone that could/would test it. If so, what kind of documentation, beyond knowing what pins are for what and the above I2C command, would be required?

I really don't want to put a great deal of time and effort into this if there is good reason why the controller boards are so expensive.

I welcome any critiquing/criticism.

Update:

The library and language I was contemplating:
http://www.justanotherlanguage.org/content/jallib/tutorials/tutorial_servo_rc_master

I will add some more info later

I wanted to get this written up so people could put eyes on it and tell me if I should pursue it.