Recently I completed a 14 inch Dobsonian project and I was pondering how to add a set of digital setting circles (DSC). There are several nice commercial offerings, but since I'd just build the Dobsonian from scratch I thought perhaps I could also build a DSC. Then I found a wonderful website by Dave Ek called Build Your Own Digital Setting Circles. Dave describes in great detail how he build a DSC using a PIC-based controller. After reading through his website I realized I could get started with a controller I already owned which is known as an Arduino. These boards are available for around $30 and connect to a computer using a USB port. You can develop your code on a Windows, Linux, or Mac computer, and programming the Arduino board is simple as you just download the program to the board via the USB connection.
First I ordered some 8000 count encoders from US Digital and interfaced them to my Dobsonian. I won't go into much detail about this step as its been covered many times, but the basic idea is to attach an encoder to the altitude and azimuth axes of your Dobsonian. I made my adapters from scratch, but there are some very nice solutions (for example, here or here), if you'd like to buy something premade.
The main trick would be to get my Arduiono DSC to use the proper protocol to talk to Dave Ek's ASCOM driver, as well as a nice utlity for Palm OS handhelds called PalmDSC. Dave Ek gives a nice summary of the protocol he uses on his website, so I now have a program for the Arduino which works with the ASCOM driver as well as PalmDSC. I have tested the ASCOM driver with Cartes du Ciel and it seems to work very well. Likewise the Arduino DSC worked well with PalmDSC.
For my setup I connected the encoders to the Arduino in the following way:
You also pull +5V and Ground from the Arduino board for your encoders.
Now load the source code into the Arduino IDE, and under the "Sketch" menu entry select "Verify/ Compile". Next make sure the Arduino is selected under the "Serial Port" subentry under the "Tools" main menu. Then you click on the "Upload" icon the the tool bar (second icon from right) and the program will be downloaded to the Arduino.
You can test the DSC by connecting a terminal program like Hyperterm (or the program I prefer, RealTerm, to the Arduino serial port at 9600 baud, 1 stop bit, and no parity. If you enter a 'Q' then you should see a response showing the 2 encoder positions. If you move the encoders and type 'Q' again then these values should change.
At the moment the Arduino code implement 2x Encoding, meaning I get 4000 counts per revolution with my S6 encoders which are rated at 2000 counts per revolution per channel. Its possible to use 4x encoding as well to get more resolution, and this will be a future enhancement. If you'd like to give it a shot there are some ideas here that might help.
Here is the sources for the digital setting circle: