MENU
NexStar Home
Slippery Slope
NexStar Links
Observing Log
NexStar Tech
NexStar FAQ
Astrophotos
 
 |
You can
connect an N5 to a PC serial port using the RS-232 jack at the base of the N5 hand
control. This jack is sized as a telephone handset jack meaning that a telephone
handset cord is the only thing that will fit. Specifically, a telephone line cord
(from the phone to the wall), RJ11 standard, will not fit - it's too big. Scopetronix has a 12' computer connection cable for
the N5 for $20. However, if you are so inclined, you can easily make one. What I used was:
- An old 25' coiled handset cord I had lying around (you
can buy these in 12' or 25' lengths from Radio Shack for $5 or $6). I used its full
length.
- Radio Shack part number 276-1538 9 position female
D-Subminiture Connector ($1.29)
- Radio Shack part number 276-1539 D-Subminiture
Connector Hood ($0.99)
The tricky part is interpreting the diagram on page
50 of the N5 manual:

That says "jac" but it looks more like a
plug! I can't figure out which way the telephone handset plug would go into
it. What I found worked was if you hold the end of the handset cord like this:

so that the cord itself is down, the long surface of
the gold pins are facing you, the short surface of the gold pins are up, and the latch is
away from you, the pins in the plug are numbered as above. These pins then map to
the DB9 like this:
| Handset Plug Pin |
DB-9 Pin |
| 1 |
2 |
| 2 |
5 |
| 4 |
3 |
Note that pin 2 or 3 of the handset
plug can be wired to DB-9 pin 5. I had a cable wired with 3 to 5 and it worked fine.
I made this mistake because I originally thought that the Celestron drawing was
oriented so that the handset plug was inserted from the bottom of the "jac" with
the gold contacts facing away from you - hence I also had transmit and receive reversed
and the thing didn't work. Then I reversed DB-9 2 and 3 and it worked - I never
bothered to swap handset plug 3 with handset plug 2 on DB-9 pin 5. I have since
rewired my cable though.
If your DB9 isn't numbered, or not numbered like
mine, this is how mine was numbered (viewed from the front, where the back is where the
wires connect):

To test it, you can use Windows Hyperterminal
(HYPERTRM.EXE) with the following settings (Mac users should get the same results using a
similar "dumb" terminal program):
- Connect Using: Direct to ComX (where
"X" is 1 or 2 or whatever)
- Bits Per Second: 9600
- Data Bits: 8
- Parity: None
- Stop Bits: 1
- Flow Control: None (this is what tripped me
up for several hours - I had it set to "Hardware")
To talk to the N5, all you have to do is a fake auto
align:
- Turn it on
- Choose auto-align
- Enter Date, Time, Location, etc.
- When it slews to its first star, just press enter then
align
- Press enter to go to the second star and press enter
and then align
- The N5 will congratulate you on a successful alignment
- When you get control back, select MENU
- Scroll to RS-232 (press DOWN 6 times)
- Press ENTER
Now you are ready:
- Go to Hyperterminal and type the character
"?". You should almost immediately see the character "#" appear.
- Now type "A" followed by four other keys
(any will do, I used four spaces) the N5 will take off headed for that Alt/Az address.
The N5 handset will say "SLEWING".
- When it gets there, "SLEWING" will be
replaced with the RS-232 mode message and an "@" should pop up on your terminal
program. Press "?" again and see if you get "#". If you
do, the N5 is ready for another command.
- Type "A" followed by four other keys
different from step 2 (I used "aaaa") and the N5 will go to that address.
- When it is ready again you should get the
"@". If you retype the sequence "?A " (that's
four spaces) it will go back to where it was. By alternating this with
"?Aaaaa" you can zip it back and forth between the two positions.
For those of you who are wondering how to translate
the characters you type to celestial coordinates, you have to convert the character
sequence to its binary 16 bit representation, and then correct that for the encoder
accuracy. To convert to binary, here are some instructions I posted to the NexStar5
eGroup:
Take Alt and Az - the N5 wants Alt and Az each
expressed as a 16 bit number communicated by two bytes (8 bit characters). Since a 16 bit
number represents a maximum of 65535 in decimal, it is like dividing the 360 degrees of
Alt or Az into 65535 "steps" to which you can direct the N5. 0 would be Alt or
Az 0, 65535 would be Alt or Az 360.
The 16 bit number for 0 is in binary: 0000000000000000,
and as two bytes it would be 00000000 00000000. The ASCII character corresponding to
00000000 is NUL so this 16 bit number is represented to the N5 as two NULs. So if you send
the N5 the character "A" followed by 4 NULs, it will take off slewing to Alt =
0, Az = 0 (assuming it is not already there). Consider now what would happen if you sent
the N5 the "A" command followed by "AAaa". The ASCII character
"A" is 65 in decimal or 01000001 in binary, so "AA" is
0100000101000001 in binary. To convert this to decimal, multiply the decimal value of the
"high" byte or left most byte by 256 and add it to the decimal value of the
right most byte: 65*256 + 65 = 16705 (see below on how to convert 8 bit binary to
decimal). To convert 16705 to Az in degrees: (16705*360)/65535 = 91.76 degrees or 91:45:36
This is just the ratio of the parameter over the maximum 16 bit number (65536) times 360
degrees. The Alt value of "aa" is 24929 or 136.94 degrees. So, the N5 would slew
to Az 91.76 and Alt 136.94.
However, what I missed in this explanation was that
the N5 only has a 20 arc-second accuracy which means it can only point to 64800 unique
positions in a circle (20 arc second accuracy means 1/3 of a minute accuracy or 3 steps
per minute, so, 360 degrees * 60 minutes per degree * 3 N5 steps per minute = 64800), not
65535, so the desired Alt or Az has to be rounded to the nearest 1/3 of a minute step
before conversion to 16 bit binary.
John Carlyle has written a program NEXSTAR.EXE (for
Windows/DOS computers only) which allows you to control the N5 from a DOS command prompt.
The program and its instructions are available in the eGroup at message 3440:
http://www.egroups.com/group/nexstar/3440.html?
Below are the complete details on the command
interface, lifted (and improved) from the N5 manual (if you want to know the mapping of
the ASCII code, go to http://members.tripod.com/~plangford/index.html):
NexStar5 communicates at 9600 bits/sec, No parity and 1 stop bit..
All angles are communicated with 16 bit numbers.
Before all commands, the following INITIALIZATION is necessary:
- PC sends one byte (63=ASCII ?) to check that NexStar is
ready.
- NexStar responds with one byte (35=ASCII "#") when NexStar
is ready to respond. After NexStar sends a 35, the buttons to the hand control do not
respond until the command from the PC has been received, then the direction, rate, and
undo buttons are active.
Goto RA-Dec positions
- INITIALIZATION
- PC sends (82=ASCII R)
- PC sends the RA high byte, RA low byte, Dec high byte, Dec low byte.
- When the scope is finished slewing, it will send back a
@.
Goto Alt-Az positions
- INITIALIZATION
- PC sends (65=ASCII A)
- PC sends the Azm high byte, Azm low byte, Alt high byte, Alt low
byte.
- When the scope is finished slewing, it will send back a
@.
Get RA-Dec positions:
- INITIALIZATION
- PC sends (69=ASCII E)
- NexStar sends the RA high byte, RA low byte, Dec high byte, Dec low
byte.
Get Alt-Az positions:
- INITIALIZATION
- PC sends (90=ASCII Z)
- NexStar sends the Azm high byte, Azm low byte, Alt high byte, Alt low
byte.
|