Professional Documents
Culture Documents
net
I have tested this with Mel Bartels’ dob driving Others have tested this software successfully
software (using more than one of his supported with TheSky and with Megastar. If you have
protocols), and also with David Lane’s Earth successfully used this interface with other
Centered Universe software (using the MGIII, software, please let me know so I can add it to
the list of compatible packages.
1
Copyright 2002, David Ek digicircles@earthlink.net
2
Copyright 2002, David Ek digicircles@earthlink.net
encoders, buy encoders so that your final tics per Figure 1 shows pin 2 to be labeled Index rather
revolution of the telescope axis is at least 4000. than GND. This encoder interface circuit does
not use the index signal. If your encoders have
Before You Start index pins, leave those pins unconnected.
Construction of this interface is quite
Similarly, the interface PC board has five holes
straightforward, but there are a few issues worth
for connecting each encoder, with the same
considering prior to starting. First, this interface
labels. On the PC board, the N/C hole for each
has a number of external connections—the serial
encoder is connected to the GND hole next to it.
cable, the encoder cables, and the power supply.
This allows you to use a four-pin male header
Some thought should be given to exactly how
and connector housing rather than a five-pin, if
you intend to make these connections so that
you desire (if you use a four-pin connector,
they are solid and reliable. I’ve designed the PC
mount it in the holes for Ch. B, +5V, Ch. A, and
board so that you can install 0.1” male headers at
N/C—the N/C hole will serve as your ground
the encoder and power connections, and use 0.1”
and should connect to the GND pin on your
connector housings with crimp pins on the ends
encoder).
of the cables. This sort of arrangement is much
stronger and more reliable than soldering the
wires directly to the board.
Parts Orientation
Construction of the interface is not difficult. The
parts may be placed on the board in nearly any
order. Make sure to note the polarity of the
diodes, the electrolytic capacitors, the IC’s, the
voltage regulator, and the oscillator.
3
Copyright 2002, David Ek digicircles@earthlink.net
3) Note the little notches on one end of the 8) Finally, install the IC’s in their sockets,
legends for U2 and U3. This corresponds to making certain they are installed in the
the end of the IC with pin 1. The IC will proper orientation.
have a similar notch, or will have a small dot
indentation in the corner over pin 1. Make Check all your solder joints. They should look
sure that the IC’s are installed with pin 1 smooth and shiny. If they don’t, give them a bit
where it’s supposed to be. of heat with the iron to remelt them. Also, check
4) The electrolytic capacitors also have a for solder bridges (solder connecting two points
polarization. You’ll notice that one lead is that should not be connected).
marked with a minus (and is the shorter of
the two leads). Similarly, one hole for each Testing
electrolytic capacitor is marked with a plus
The basic approach to testing the interface is to
sign on the PC board. Make sure that the
hook everything up and see if it works. You can
positive lead goes in the hole marked with
use the QBASIC program listed in Appendix D
the plus.
to test your interface. Be sure to change the
5) The clock oscillator has three rounded
program to use the correct serial port if you’re
corners and one that is not. The outline on
not using COM1.
the PC board is shaped the same. Make sure
you insert the oscillator so that its shape
If the interface doesn’t appear to be working
matches that on the board.
properly, first check all the connectors to make
sure that they are properly connected and that
Construction they are firmly seated. Next, make sure that
The order in which you install the parts isn’t you’re supplying the interface with power. A 9V
critical. Here’s what I’d recommend. The parts transistor battery is sufficient to power the
layout on the PC board is reproduced for you in interface, but it must be a fresh battery. You can
Appendix C for convenience. also use other voltage sources, but make sure that
the voltage is at least 9V (but preferably no more
1) First, install the sockets for the IC’s. You than about 15V) and capable of supplying 50 mA
don’t have to use a socket for the MAX232 of current on a continuous basis. Nearly all
(though I recommend it), but do use a socket battery configurations that result in 9V or more
for the PIC16F84 so you can remove it and can supply this moderate amount of current. If
reprogram it at a later time if there is an possible, measure the output of U1, the voltage
update to the program or you choose to regulator, to verify that it’s supplying 5V to the
modify it. Make sure you orient the sockets rest of the circuit (you can measure this at pin 14
according to the outlines on the board. Wait of U2).
until last, though, to install the IC’s in their
sockets. If you’re still having trouble, verify that all the
2) Next, install the resistors. They should lie parts have been installed with the proper
flat on the board. Resistors do not have a polarity. Pay special attention to the orientation
polarity—either lead can go in either hole. of U2 and U3—the circuit will not work if either
3) Next, install the 0.1 µF capacitors. They do of these is installed backwards. Also, if you have
not have a polarity so either lead can go in an oscilloscope or frequency counter, see if you
either hole. can detect the 4 MHz clock signal coming from
4) Now install the electrolytic capacitors. OSC1 (check at pin 16 of U2).
Carefully observe the polarity as explained
previously. Configuring Your Software
5) Install the diodes, the voltage regulator (U1),
This encoder interface will likely work with
and the oscillator. Again, make certain
many different software packages which support
you’ve installed them with the proper
the use of digital setting circles. It has only been
polarity, as explained previously.
tested with Earth Centered Universe from Nova
6) Now install your choice of connectors for
Astronomics and with Mel Bartels’ dob driving
the power, the encoders, and the serial
software. (Other builders have tested it
connection.
successfully with TheSky and with Megastar).
7) Install the reset switch if desired.
For Earth Centered Universe or other software
packages, follow the instructions in your
4
Copyright 2002, David Ek digicircles@earthlink.net
5
Copyright 2002, David Ek digicircles@earthlink.net
Feel free to substitute your own preferences for the connectors, but I highly recommend that you do not
wire the encoder or serial cables directly to the board (they’ll break off easily). Use pins and connectors for
a sturdier connection. The right-angle DB9F connector for the serial cable is especially good for ensuring a
good connection.
Table 2: Some recommended connectors for the interface PC board.
Description Jameco Part No.
0.1" non-polarized connector housing (5-pin) for connecting to the encoders 163686
0.1" non-polarized connector housing (4-pin) for attaching encoder cables to PC board 100802
D-Subminiature right-angle PC mount DB9F connector 104977
Female connector pins for housings 100765
0.1" right-angle headers (male pins board-mounted over which the housings fit) 103270
Pin crimping tool for crimping the female connector pins 99442
4-conductor cable (phone wire) for encoder cables 103430
6
Copyright 2000, David Ek digicircles@earthlink.net
7
Copyright 2000, David Ek digicircles@earthlink.net
8
Copyright 2000, David Ek digicircles@earthlink.net
REM Digital Setting Circles test program by David Ek for his interface
REM design. Uses his proprietary command set for testing.
REM Open the com port. Change if you're not using COM1.
CLS
OPEN "COM1:9600,N,8,1,BIN,CD0,CS0,DS0,OP0,RS,TB16,RB16" FOR RANDOM AS #1
REM Send the h command to see if the interface was initialized successfully.
PRINT #1, "h";
reply$ = INPUT$(4, 1)
decLim% = ASC(MID$(reply$, 1, 1)) + 256 * ASC(MID$(reply$, 2, 1))
raLim% = ASC(MID$(reply$, 3, 1)) + 256 * ASC(MID$(reply$, 4, 1))
PRINT "Az encoder resolution from interface: ", raLim%
PRINT "Alt encoder resolution from interface: ", decLim%
REM Loop, getting and displaying encoder positions until ESC is pressed.
PRINT
PRINT "Positions (move mount to see them change, ESC to quit): "
DO
PRINT #1, "y";
reply$ = INPUT$(4, 1)
decPos% = ASC(MID$(reply$, 1, 1)) + 256 * ASC(MID$(reply$, 2, 1))
raPos% = ASC(MID$(reply$, 3, 1)) + 256 * ASC(MID$(reply$, 4, 1))
LOCATE 8, 1
PRINT USING "Alt: ##### Az: ##### "; decPos%; raPos%
LOOP UNTIL INKEY$ = CHR$(27)
9
Copyright 2000, David Ek digicircles@earthlink.net
10