Up one level   Page:    1 

Original design for a HomeBrew GPS for the Celestron Nexstar Telescope AUX bus

This version is now obsolete.

This began as an outshoot from a thread at the Cloudy Nights astronomy site.
I suspect there are quite a Celestron telescope owners who would love to build their own GPS module.

Well, it is a lot easier than it may first appear. Here, I will assemble a homebrew GPS module, with simple step-by-step instructions.

To begin, click on the first photo below.

The first major component for this project is a 5V serial GPS module, such as the BN-180 pictured here, which includes a choice of cables with either pins or sockets. This project uses the sockets.The other major component is a genuine SparkFun branded Arduino Pro Mini 5V/16Mhz board. Other boards are NOT suitable, especially NOT the "nano" boards.In this article, I have used an older clone (non Sparkfun) Pro Mini board which happened to work. But nearly all modern clone boards WILL NOT WORK because they now use a cheaper voltage regulator that will go up in smoke when connected to +12V. So get a real SparkFun board instead, which has the better $2 chip onboard!The Pro Mini one pictured here came with pin headers not already attached. These will need to be soldered in place (next steps), unless you can find a board with them already in place. An alternative way to do this is to solder in only the 6-pin serial header, not the side pins, and then solder the GPS and 6p6c connections directly to the holes on the board. This would give a slimmer end product, but here we're going for the all-pins route!To continue, click on the right-pointing little blue arrow near the top left.
First, solder the 6-pin serial header. I am putting the headers onto the top (component) side of the board, which means it needs to be upside down for soldering. Using a bit of scrap wood underneath ensures that the work surface won't melt or get burned while soldering.Even though we use thin flux-core soldering wire intended for electronics, it is still almost necessary to add additional flux to the bare pins and pads before applying hot solder. This makes the process much easier, though one can get by without the extra flux.To continue, click on the right-pointing little blue arrow near the top left.
Okay, serial pins are attached. Time for the two rows of side header pins. The idea here is to try and get them as straight as possible, which can be easier said than done!
There, all of the pins are soldered in place. Note that this Arduino Pro Mini board has five extra contact holes that don't have header pins. No issue there.If you are wondering how my solder joints all ended up looking so clean, it's because I lightly scrubbed them afterward with a Q-Tip soaked in Isopropanol (aka. "rubbing alcohol").
Here's the board flipped upright again, with the pins sticking up, ready for wiring. Notice that each pin is labelled in white.
The GPS module just plugs onto four of the pins. RED goes to the pin labelled "Vcc". BLACK goes to either one of the two "GND" pins. WHITE goes to the "2" pin (or "D2"), and GREEN goes to the "3" pin (or "D3"). Done. That was easy!
Now for the tricky bit. Take your time to get this correct, to avoid frying the telescope mount later! A 6p6c cable is needed, about 24 inches long, with an RJ12 connector on one end only. If it has one on each end, then cut one end off and discard it. With the connector oriented as shown, gold contacts up, the pins are numbered 1,2,3,4,5,6 from left to right.Write down which colour corresponds to which pin number. There is a standard colour scheme, but you cannot rely upon it!! This cable (pictured) seems to use a random colour ordering, quite different from the "standard" scheme. It doesn't matter. Just write down which colour corresponds to which number, 1 through 6, from left to right.
Here is the numbering from the cable used here. Remember, the colours will vary from cable to cable, so always look at the connector as shown, and write down the colours from left to right, numbering 1 to 6.Here, I have added the Arduino pin names that correspond to each of the six numbers. Number 1 is not used, so just cut that wire off shorter than the rest to keep it out of the way. Number 6 connects to the Arduino pin labelled "4" (D4), and so forth.
Cut back about 1.5 inches of the grey jacket, exposing the six coloured wires. Practice first on the off-cut from the original cable, and only then do it on the 24" piece reserved for this project!Strip about 1/4" (6mm) of insulation from the end of each of the wires, being careful not to cut away the copper conductors themselves.Wire number 1 (white in this case) won't be used, so I later cut it off short to get it out of the way.
Now connect each of the wires, from 2 through 6 (remember, 1 is not used here) to their corresponding Arduino pins, as shown on the yellow sticky note earlier on. This can be done by delicately wrapping the bare wire ends around their corresponding pins, and soldering them in place.Add a small wrap of tape or heat-shrink tubing to each to prevent them from accidentally contacting the adjacent pins. Holt-melt glue could be used instead, and will also strengthen the wires at the solder joints.Don't be shy about bending individual pins outward to make soldering easier, or even soldering to the underside of the board instead of the top side if that helps you.A safety feature should be added here: insert a 470ohm resistor in series with the wire for the Arduino "TXO" pin. One end of the resistor is soldered directly to the Arduino pin, and then the corresponding 6p6c wire is soldered to the other end.UPDATE: it has since been determined that a 1N4148 (or similar) general purpose signal diode is an even better choice here than the resistor. The cathode (BLACK stripe) end of the diode should go to the "TXO" pin, and the corresponding 6p6c wire goes to the other side of the diode. This is electrically safer for the telescope mount, and is highly recommended now.
And another, showing number 3 (yellow in this case) connecting to the "RAW" pin, providing 12V input power from the telescope mount.
Now, time to install the Nexstar GPS program code into the Arduino. This requires a 5V TTL serial-to-USB cable or adapter.The Vcc, GND, RXI, TXO, and RTS/RESET pins need to be connected for this to work. There will be one pin left over, usually an extra GND pin.If the serial adapter also has a CTS wire, just leave it unconnected.Plug the USB end of the adapter into your PC. The Arduino's RED power LED should light up. If not, quickly unplug it and find/fix the wiring error before trying again.Now you can fire up the Arduino IDE, load the nexstar_gps.ino program ("sketch"), and select "Arduino Pro Mini" from the "Boards" sub-menu. Compile and send the code to the Arduino. The LEDs on the serial adapter should be blinking for many seconds during the transfer.When done, leave the serial cable still connected at both ends, and press the "Reset" button on the Arduino board. The onboard LED should blink three times at half-second intervals, confirming that it is indeed now running the nexstar_gps code.
Ready to plug it into the telescope? NO!!! NOT YET!!!First, remove the serial adapter, completely unplugging it from the Arduino.Get out your multimeter, and select the "Ohms" measurement. One by one, double check that each pin on the Arduino is connected correctly to each of the numbered contacts on the RJ12 connector.Do this by measuring resistance from the Arduino pin to the RJ12 contact. Each connection should show a very low resistance value, either 0 ohms or as much as 2 ohms.You'll have to press the probe tip quite hard and straight onto the RJ12 to make a connection with each contact there.When done, check the contact 3 connection AGAIN: it should connect to the "RAW" pin on the Arduino. Great. Put it all aside, have lunch, and come back and check every connection AGAIN!! Tedious perhaps, but better than destroying the electronics in the telescope mount!If you still have the slightest bit of doubt, then email me a photo of your 6p6c (RJ12) connector (gold pins up), along with a photo or list of which colour wires you have connected to which pins, and I will endeavour to verify the wiring for you!
NEVER, ever, plug or unplug anything on the telescope unless the telescope mount is powered OFF.So, power off the telescope, and only then plug the 6p6c cable into the AUX port of the telescope.Turn the telescope on, and off again within a second. Watch the Arduino board while doing so -- the RED power LED should light up.If you saw it illuminate, then turn the telescope on again, and watch the display on the hand controller. If you see anything amiss from normal, then immediately power off the telescope and cry.Otherwise, go into the Utilities menu on the hand controller, select "GPS on/off", and hit ENTER. If you see "No GPS detected", then something is wrong. Power off the telescope and unplug the 6p6c cable from it. Do NOT reconnect it until you figure out and fix whatever was wrong.Otherwise, the next step will be to enclose it in a small box or something..
Optional feature for use with Evolution mounts: Install a single pole switch between Arduino pin "5" and "GND".When the switch is "on" (contact is closed), the Arduino will send a command to turn off the Evolution mount's built-in WiFi. This can be used to reduce battery consumption and "WiFi pollution". When the switch is "off", it turns the WiFi back on again.If you like, the meaning of "on" and "off" on the switch can be reversed by editing one line of the Arduino program.
A basic plastic box to hold the project. I had a bunch of these just laying around, so..
Cut a hole for the switch, a notch for the cord, and hot-glue the GPS into place, antenna side up! Twist the cabling around and hot-glue the Arduino and the cable, holding them in place while the glue hardens.Note that I attached everything but the switch to the underside of the box lid, so that it is all accessible for future re-programming if need be.
I use black-coloured hot-melt glue. It looks better, but is harder to see in the photos.
Screwed the two parts of the box together.
Velcro'd the completed unit to the side of my telescope mount. The on/off switch enables/disables the built-in WiFi of the Evolution mount.
Click on any thumbnail to view larger images