Sunday, February 12, 2017


Issue #530: Get Connected

Keyspan USB-Serial Converter Cable
It’s been—wow—the better part of two decades since laptop computers began to appear on our observing fields and observers began to use them to send computerized telescopes to sky objects. Unfortunately, a stroll through the Cloudy Nights mount forums reveals a lot of you still have trouble getting mounts talking to computers. That is not something to be ashamed of. There are several gotchas involved, gotchas that can drive those of us who don’t do much with computers in our personal or professional lives absolutely MAD.

Luckily, it’s fairly easy to get even the most computer-phobic person going with connected astronomy. Well, most of the time. On the PC side of the house, there are so many computer hardware configurations and variations that anything is possible. There can be inexplicable difficulties that defy reason and stymie the most PC savvy person. Luckily, that is not usually the case, and it often takes no more than 15-minutes to get a rig working. That’s because if there is a problem it usually has nothing to do with telescope or computer; it’s the connection between computer and telescope mount that stops people before they get started. That is what we will address first.

Well, we’ll address that after you have the two items needed to make a computer-telescope connection work (in addition to your fave astronomy program). First you'll need a serial cable. This must be a cable wired specifically for your mount. Why the scope makers didn’t just adapt the standard RS-232C cable, I have no idea, but they didn’t and there is no use worrying about that at this late stage of the game.

A Meade cable won’t work on a Celestron, and a Celestron cable won’t even work on a SynScan (SkyWatcher) mount despite the fact that both are made by the same company, Synta. Get the specific cable for your mount/telescope from an astronomy dealer, or, if you are handy with RJ crimpers (most telescope cables use an RJ plug for the scope end), make one according to the pin-out for your particular mount. Most telescope/mount manuals will give the design specs for a serial cable.

Next, you’ll need a “USB to serial converter.” What? To this point, most telescopes only “speak” RS-232C serial. While that is a somewhat outmoded data communications standard, it has its pluses for astronomy. You can run very long runs of serial cable without a problem. If you want to control a telescope thats' in an observatory or set up in the yard from inside your house, RS-232 serial makes sense.

Com 3 is assigned...
Unfortunately, modern PCs (and Macs) don’t have serial outputs. That's long since gone the way of the buggy whip. Luckily, the above-mentioned converter cable is an easy solution. The converter takes a USB signal coming from a computer and changes it to the serial data understood by a telescope/mount. And all is well, right?

Not necessarily. Most of the time, any USB to serial converter you can find (they are now scarce in local computer stores) will work OK  with a scope mount. But some do work better than others. That can be important if you want to do more complicated things than just sending a mount on gotos with a PC. If, for example, you want your laptop to take the place of a hand control (NexRemote and EQMOD). If you do, I recommend the Keyspan USB-serial converters (available from B&H Photo). In my experience they are the most reliable and problem-free.

First Steps

With serial cable and converter in hand, it’s time to get connected. The first step is getting the PC squared away with that serial converter. You don’t need to fool with the telescope or cable yet. Just plug the USB – serial widget into the laptop. If the PC (or Mac) is anywhere near recent, it will automatically install a driver for the USB-serial device (if you have a very old computer, say a Windows XP machine, you may have to download and install a driver for it manually).

What’s a driver anyhow? That’s a term that will come up again and again in the world of computer – scope interfacing. In short, it’s a little program, a little app, that tells the computer about a particular device. What it is and how to talk to it. When you plug in an external device, be it a USB – Serial converter or a printer, the driver is accessed and tells Mr. Computer what to do. This works the same whether you have a PC, or a Macintosh.

Once the driver is installed and the computer declares the device (the USB-serial cable) ready for use, there’s one more thing to do. On a PC, you need to open "control panel"/"hardware and sound"/"device manager" and see which com port number (serial port number) the computer has assigned to the converter cable. This is very important. Not do doing this or doing it incorrectly is what gives most people problems.

Selecting one of TheSky's internal drivers...
To check the serial port assignment in recent flavors of Windows, right click the Start button and choose “control panel.” Click “hardware and sound,” and then “device manager.” A “tree” will appear, with “com and LPT ports” on it. Expand that entry, and you should see a com port number. The PC has a serial port now and has assigned it a number. If you’re a Mac user, you’ll need to do the same, and I hope you know how to do that, since I sure don’t. At any rate, remember the com port number; you will need it. If you always plug the converter into the same USB port, the same number will normally be assigned to it. If you plug into a different USB port, a different com port number may be assigned, and you may have to check it again.

Getting Telescope and PC Talking

The next thing to suss is the telescope driver type question. Does your astroware use external or internal? Telescope drivers work the same way as the drivers the PC uses to communicate with the USB-serial cable, or printer, or anything else. The difference is that they are accessed by the astronomy program instead of the computer itself. The PC doesn’t know anything about telescope mounts. As far as it is concerned, the scope is a generic serial device, end of story.

The fine points of goto commands and such vary from mount brand to mount brand and even sometimes from model to model, and the astronomy program in use has to have an appropriate telescope driver—Celestron, Meade, Losmandy, etc.—in order to know how to command the telescope and how to interpret the data coming back from it over the serial interface.

There are two general types of drivers in use by astronomy software, internal (“built-in”) drivers and external drivers. Internal drivers come with the astronomy program, and are written by the people who wrote that software. Many programs have moved away from internal drivers. Most software authors or even development teams don’t want to be saddled with writing drivers to support every new telescope/mount that comes out, as you can imagine.

Despite the above, there are still some well-known PC programs that come with internal drivers including TheSky X and Stellarium. Macintosh software invariably uses internal drivers, since a system of external ones has never been developed for the Mac. If your astronomy program uses built-in internal drivers, you simply choose scope  brand and model from a list in the software’s “telescope” menu, fill in a few items, and are good to go.

ASCOM Chooser in Cartes du Ciel...
External drivers are the norm for the PC world these days. The beauty of them is that the authors of astronomy programs don’t have to worry about drivers at all. All they have to do is provide a link to a 3rd party driver system. In the PC world, that is ASCOM, “Astronomy Common Object Model.” While ASCOM provides drivers for more than just mounts (focusers, cameras, etc.), its most common role is as a telescope mount driver system.

The way it works is this: download and install a program called the “ASCOM Platform.” It handles communications between an ASCOM compatible astronomy program and a driver for a particular telescope, which is also downloaded from the ASCOM website.

While there has been talk about porting ASCOM to Macintosh over the years, that has never happened. A few people have tried to come up with ASCOM-like external driver systems for Apple, but none has caught on. ASCOM has never come to Linux either; in part because Linux users have their own system called “Indi.” Indi is, like Linux itself, not quite as user friendly to install and use as ASCOM, but the main reason you probably haven’t heard of it is that there aren’t that many non-professional astronomers using Linux/Unix for telescope control.

Configuring the Telescope Interface

One thing many beginners miss? Unless you are using specialized software like NexRemote or EQMOD, the first thing you do when interfacing computer and telescope is not start playing with the laptop. The first thing you do is align the telescope/mount with the hand control the old-fashioned way, just like always. Trying to interface the scope and computer before the telescope is aligned will cause nothing but problems.

If your astro-software uses built-in (internal) drivers, interfacing to the telescope will differ somewhat depending on the software in question, but all programs require similar things to be filled-in in the telescope set up window. The example I’m using is TheSky 6, which normally only works with built-in drivers (but can be “tricked” into using ASCOM).

ASCOM Chooser in Stellarium...
The first thing to do is select the telescope or mount brand/model. While this can vary a bit, most programs that use internal drivers will list individual telescope models. In the picture above, I’ve chosen the good, old CG5 German equatorial mount. After that, enter basic communications settings. With TheSky 6, press the “settings” button. With other programs, the com setup and other options may all be on the same screen. Anyhow, enter the com port number found in Control Panel (or in the appropriate place on a Macintosh). If the software wants baud rate, enter/choose “9600.” A few older programs (like the still-popular Megastar) will ask for data bits, parity, and stop bit. You don’t have to understand these serial communications arcana; just enter “eight, one, and none” (8-1-n).

Most programs will offer some additional options, as TheSky 6 does. Do you want telescope crosshairs on the screen? Should the software automatically switch to night vision mode when a telescope is connected? When everything is selected or entered, click a connect button or, as with TheSky, go back to the telescope menu and choose “link/establish” (or with other software "connect," “enable interface,” or similar). The documentation that came with the astronomy software will make clear how to proceed.

That’s it for built-in drivers. Using ASCOM is a little more complicated, but not much. You don’t (can’t/shouldn’t) start the ASCOM program; the astronomy software you are using will start it for you. The beauty of ASCOM is that the telescope/mount setup windows are the same no matter which astronomy program you use. Everything will look the same and you will enter data the same way whether in Cartes du Ciel, SkyTools, Deep Sky Planner, or any other ASCOM compatible program. The difference is in how you get to the ASCOM Telescope Chooser.

In Cartes, start ASCOM by clicking the little Telescope Control Panel icon. Other programs may require you to choose “scope setup” or something similar from a menu. At any rate, once the Chooser is onscreen as in the picture above, select the desired telescope brand or model . Which that is, brand or model, depends on the telescope driver. Currently, Celestron has a “unified” driver. Pick “Celestron,” and the driver will automatically figure out which particular Celestron scope/mount it's connecting to. Other drivers may require choosing a specific model from the Chooser’s pull-down’s list. “LX200,” for example. Naturally, as mentioned earlier, drivers must be downloaded from the ASCOM website and installed for them to appear in the list. The ASCOM platform only comes with a couple of drivers, "POTH," "Telescope Simulator," and a couple of others.

Once the telescope is selected in the Chooser, click “properties” to enter the specifics of the setup. Here, you’ll give ASCOM the com port number, indicate whether or not the telescope mount is operating in equatorial mode (is a German equatorial mount or a fork mount scope on a wedge), and enter the observing site’s latitude and longitude. You may be asked for different data depending on the particular scope driver, but all will want that all-important com port and also the site’s lat/lon.

Connected and ready for a night of laptop-enabled fun!
When you’ve OKed the settings window and the Chooser window, you’ll connect to the scope much as with built-in drivers. How you do that depends on the program itself, not ASCOM. Cartes has a “connect” button on the scope control panel; other software may have a “connect” or similar choice on a “telescope” menu. When you are successfully connected, a set of crosshairs should appear at the telescope’s current position on the program’s star chart (with some astronomy software, like TheSky, you’ll first have to select “show scope crosshairs” in the setup), and there should be some indication computer and mount are connected and talking, like the green “light” on Cartes’ scope control panel.

Where do you go from here with ASCOM? ASCOM provides useful additional functions, some of which are enabled in the ASCOM set up window and some of which you select in the astronomy program. One feature I like is ASCOM’s “hand control.” If you choose to show that in the driver set up, a little set of HC direction buttons will appear onscreen once the scope is connected. I find that useful when I am imaging. I can sit at the PC and fine-tune my centering with the ASCOM HC instead of having to mess with the real hand control.

Another oft-used ASCOM option, which is accessed from the astronomy program in use, is “sync.” When you go to an object, you may find the cursor is centered on it, but the object is not centered in the eyepiece. Center it in the eyepiece, and it will be then be off onscreen. That can happen for a variety of reasons, but you can cure it with a sync. This is completely different from the sync function in the hand control, and just allows you to center the astro program’s crosshairs on the target when it is centered in the eyepiece.

And you know what? That is all there is to it. Let me say again: the place beginners foul up is usually not with something complicated like entering baud rates or serial data specs. It is almost always in getting that darned USB-serial converter com port correctly entered into the software.

Late Breaking News

Celestron’s most recent hand controls eliminate the need for a USB-serial converter. Well, they don’t really eliminate it, they just make it so that you don’t have to go out and buy one. The newest NexStar HCs have a mini USB receptacle on their bases rather than an RJ-style serial port. You connect a computer to HC with a standard USB-mini USB cable.

Is that a good thing? I’m not sure. You don’t have to worry about finding a USB-serial converter that works properly. BUT…  You are now limited in the length of cable you can run to the scope without using USB boosters. Four or five meters is the max.  The new HCs don’t free you from the need to mess around in control panel to find the com port number, either. This is not really a USB connection. The new hand controls have an internal USB to serial converter, and the PC will see the HC as a serial device. You will still need to enter the proper com port in the software. Me? I think I prefer to just continue using my good, old Keyspan, thank you.

Up next? There’s a big Moon in the sky, and the weather isn’t the best right now, so it may be that we return to the Novice Files for installment 3.

Hey Rod,

Fantastic article. Computer control of my mount is my next big project. One tidbit that may be useful to some readers is that many "toughbook" style laptops still come fully equipped with serial ports.
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

stats counter Website Hit Counters