I've been working with a device that one of the other R2 Builders mentioned on the Astromech.Net forum. Its call a Softpot Rotary Potentiometer and it works by a stylus making contact with the circular sensor. Each spot on the circle, when pressed, sends a different voltage signal. The ServoCenter USB to Servo card has digital A/D inputs which this device connects to.
The ServoCenter card can read the voltage values in 8 or 10 bit values. The values, as displayed in the graphic, are counter-clockwise and go from 0 to 1024. I can convert those values into clockwise in Visual Basic 2010. Once I have that done, I should be able to point R2's dome base on those values and pre-program some random head movements and more in the future.
The solder tabs on the Softpot are really, really tiny. It took a fair amount of trial and error, plus some great help from Joe over to Yost Engineering, to figure out how to properly wire this up to be read by the card. I did my initial testing with the card taped to a CD disc and some tiny crimp connectors.
Once I had the wiring confirmed and working, I had my good friend and co-worker Darrell solder it up. He has much more experience with wiring and soldering than I and did a good job.
The next part of setting this up will be where to place it.
My first thought is to place it under the dome plate. Fabricate a mounting for it so that the stylus, attached to the dome plate, makes contact with Softpot. Sounds easy, right?
Well, we have to recall that both of my droids have different frames and dome plates.
The next issue is the slip ring I will be using to route power and data from the body into the dome. The diameter of the slip ring is large enough that it would make contact with the Softpot.
So for now, I'm going to investigate some alternate mountings that allow both devices to co-exist!