Running a Telescope with a Microcomputer

David Skillman
Sky and Telescope
January 1981, Page 71
(used with permission, see note below)

Observing variable stars with a photoelectric detector is one way that an amateur can make a contribution to astronomy. Accuracies of a few hundredths of a stellar magnitude are typical.

An evening’s work, to be sure, seemingly provides only a list of numbers. But then these brightness measures are plotted up, and imagination and analysis are brought to bear. The insights gained often make you feel that you have been carried to the star, and are an intimate spectator of its behavior.

My particular interest is eclipsing binaries. After several years as a member of the American Association of Variable Star Observers (AAVSO), using a variety of photoelectric photometers, I became convinced that it would be a powerful advantage to have a computerized telescope. With this thought in mind, I began building a fully computer-controlled 12½-inch reflector in my yard. A fork mount was chosen so that the telescope would be able to follow a star across the meridian without interruption. I took apart the German mounting of my earlier 6-inch homemade reflector and used its polar and declination bearings on either end of a new, longer polar shaft. The fork was welded together out of 1/8-inch steel, and a 14-inch box of ¼-inch welded aluminum formed the telescope tube.

A commercial 12½-inch Cassegrain mirror set was ordered with a short back focus, along with a Newtonian diagonal. This diagonal is mounted on a second spider directly in front of the primary mirror, to form a bent Cassegrain configuration whose final focus lies about an inch beyond the side of the tube. Black flock paper and baffles inside the tube reduce stray light.

The bent light path minimizes the fork-tine length, and also brings the heavy photometer as close as possible to the intersection of the polar and declination axes. This leads to a very stable arrangement, and the telescope is hardly disturbed at all when the photometer is being operated manually. Moreover, the eyepieces of the photometer and 4-inch finderscope are in close proximity, and always conveniently placed.

Driving the Axes

How could the telescope’s right-ascension and declination shafts be aimed automatically? Since I wanted remote positioning capability at the arc-second level, this became a serious problem. Stepper motors were the logical choice on each axis, so that the computer could issue drive pulses and use the total count of pulses to keep track of the telescope position.

Small telescopes typically have natural vibration frequencies of a few cycles per second, so I knew it would be important that the stepping rate not coincide with, and thus excite, any structural vibration. After several tests, I finally chose a tracking rate of 10 steps per second.

Since the earth rotates 15 arc seconds per second of time, the 10-step rate required a geared-down step size of 1½ arc seconds. My hour-angle stepper is connected to a worm through a compliant coupling that helps dampen mechanical vibration. This secondary worm drives a 100-tooth worm gear that directly turns the primary worm.

Mechanical “slop” between the primary worm and the primary worm gear is minimized by preloading the telescope or unbalancing it slightly. Play between the stepper’s worm and its worm gear can easily be held to a tenth of a motor rotation, or about five steps, corresponding to 8 arc seconds on the sky. Once the motor has made enough steps to take up this slack, each subsequent step can be depended on for an additional 1½ arc seconds of motion.

The electronics were completed in stages, with gradually increasing sophistication. I designed special controller circuits, which drive the multiphase steppers using direction and step pulses alone. These circuit boards are mounted near each motor and are fully interchangeable.

Starting from scratch, it took me about a year to assemble the telescope and bring it to a point where it could be driven in both axes with a pair of simple oscillators. Then at last, the fun could begin.


My plans called for two computers, each handling part of the work load. One is an enhanced KIM-1, the popular single-board computer developed by MOS Technology, a division of Commodore. I have installed it in the observatory, where it serves as the “telescope controller.” The other computer is a standard Apple II located in my house; I call it the “operations controller” because it issues simple commands (normally from a program written in Basic) to the KIM, which in turn handles the details of carrying them out. The KIM will also accept commands from a push-button hand paddle when I am standing beside the telescope.

The hand paddle is a reworked calculator key pad that is routinely scanned by the machine-language program in the KIM. I can use the paddle for slow-motion control of the telescope as well as for on-site display (using LED digits) of the photometer signal.

Within a few months I had gotten the KIM to perform these additional functions: track stars in hour angle, monitor a real -time clock, and integrate the signal coming from the photometer. This made variable star work much more convenient because integrated brightness measurements could be copied off the LED display and written down along with the Universal time. The KIM receives its brightness values through a 12-bit analog-to-digital converter. Thus, stars that differ by as much as four stellar magnitudes (40 times) can be measured to ± 1 percent directly, and there is no need of ½-magnitude sensitivity steps on the amplifier, as would be the case if I were putting out the data on a strip-chart recorder.

A 26-conductor cable was buried underground during construction of the observatory. It runs more than 100 feet, providing a data link to the control area inside my house. Optical isolators were put on each end of the cable to avoid grounding problems, and to prevent failures or electrical shorts in one area from damaging equipment in the other. Each wire in the cable can transfer data at a 10-kilobaud rate (that is, 10,000 off-on pulses per second).

My “operations control room” contains the Apple computer, a TV-set monitor, a floppy-disk drive, and a printer. This popular type of home computer was chosen because of its excellent documentation, and because it offers high – resolution graphical displays on the video screen. Also, it uses the same 6502 microprocessor chip that is in the KIM, simplifying matters when I am writing assembly-language software.

As things now stand, the Apple sends out strings of commands via the underground cable to the KIM, which must execute them and return answers. For example, the Apple might ask for the time, the coordinates to which the telescope is currently aimed, or the signal level produced by the photomultiplier tube. Or it might tell the KIM to shift the telescope to another star.

Thus, in a very literal sense, the telescope has become a “peripheral device” of the Apple computer 100 feet away! Automatic operation commenced in May, 1980, a little more than two years from the start of the project. Its first variable star was 44 Bootis, on which the system performed very well for some six hours.

A Typical Evening’s Activity

As darkness falls, I turn on the Apple and run a prediction program to find out which variables will be in the sky and undergoing an eclipse that night. If I am not familiar with the star, I then prepare a finder chart and select a comparison star. The observatory will already have been opened around sunset to acclimatize the equipment to the night air.

Next I turn on the electronics in the observatory and press the reset button on the KIM. Returning indoors, I power up the Apple again, load in the machine-language telescope-controller program, and transmit it through the cable to the KIM.

Moving back out to the telescope, I manually find the comparison star and place it in the aperture of the photometer, which is only 30 arc seconds across. When the sliding mirror is withdrawn, the light of this star alone falls on the sensitive cathode of the 1P21 photomultiplier tube. I adjust the tube voltage and amplifier gain to provide reasonable signal levels for the comparison and variable, and then leave these settings alone for the rest of the night.

With the comparison star well centered, I press a hand-paddle button labeled “origin,” which clears the position counters in the KIM’s memory. (Rather than keeping track of the right ascension and declination, the program works more conveniently in step coordinates, with the origin at the comparison star.) I then use the slow-motion controls to select a starless patch of sky that will be used for monitoring the sky background and press another button. Finally, I locate the variable star, center it well, and press a third button. Each time, the KIM stores the relative coordinates. There is no limitation on either the number of objects to be measured or the order in which they will be observed.

Another button starts the sequencing through the list of objects. Every time the telescope successfully returns to the comparison star, the computer clears its position counters, to avoid cumulative errors.

Now the two computers take over complete control of the telescope. I can watch the progress on the video screen in the house, which displays the time, relative coordinates, photometer output, number of data points collected, and a narrative of the operations.

Homing in on a Star

Periodic error in the primary worm on the polar axis is one area that needed special attention. Such a gear error can easily cause the telescope to miss a star because of the small acceptance angle of the 30-arc-second diaphragm. To handle this problem, and to fend off a myriad other real-world perturbations (such as wind on the tube), an automatic telescope like this must be able to search a small sky area near the star’s coordinates.

In my system, if the telescope slews to a star and finds it absent, the KIM will cause it to sweep in an ever-widening rectangular spiral, looking for the star. If the search fails for some reason, say the brief passage of a cloud, it moves on to the next object. On the other hand, if the star is found during a search (as indicated by a sudden rise in the photometer signal), the telescope will usually overshoot, and the computer must make it backtrack until the star is detected again.

Merely putting the star in the photometer aperture is not sufficient in photoelectric work; the telescope must center the star as well. My software uses a centering algorithm that is independent of gear errors in the drives.

First the telescope moves 40 arc seconds to the north, then scans slowly southward until the photometer signal has risen and fallen again as the star moves through the aperture. Having counted the number of steps needed for the star’s chordal passage, the computer moves the telescope northward again, to the point of redetection and then further by the half-width of the chord. A similar sequence is performed in the east-west direction, thus centering the star very accurately. For consistency, exactly the same centering technique is used on all stars being observed.

The computer then samples the output of the A/D converter about 100 times per second for 25 seconds; the sum of all these readings is sent back to the Apple for retention as a single data point.

After watching a few cycles through the list of stars, sometimes I interrupt the program and enter better relative coordinates to trim up the operation. Out at the telescope, the movements are quiet, and only the flickering of the needle on the amplifier and the racing digits on the LED display show that the system is functioning. It is fascinating to watch through the finder and see the stars moving back and forth silently.

In general, if the telescope cycles correctly through the sequence once, it will continue to do so indefinitely. But if the telescope is poorly balanced or the wind gusty, I sometimes must go outdoors and relocate the comparison star.

Data reduction is done later, by another computer program on the Apple, during the day or on a cloudy night. This Basic program can take raw readings, plot a light curve on the video screen, and then perform the standard operations of subtracting the sky brightness and converting the readings to magnitude differences between the comparison and variable.

When Howard Landis, the head of the AAVSO photoelectric group, stopped by for a visit last July, we decided to observe µ Herculis even though the eclipse wasn’t very well placed during the hours of darkness. That night the telescope performed perfectly, although we interrupted it several times for data dumps. After four hours the system was still faithfully gathering data. Then I could see that the variable would be disappearing behind a hedge shortly, so I closed up shop.

There are endless enhancements possible on a computerized system like this, and I plan to try a software correction of the periodic worm error. Also, a graphical display of the status would be nice, rather than the present numerical display.

The cost of a system like this is not trivial, of course. But adding it all together — optics, mounting, electronics, observatory building, two computers, printer, disk drive, and photometer — comes to only about half the cost of a station wagon. I have probably put in a thousand hours of my time in design, construction, and software development. With the bulk of the debugging behind me, I am looking forward to future observing sessions, which should be some of my most productive ones.

Copyright © 1981 Sky Publishing Corporation; used with permission. This material may not be reproduced in any form, either printed or electronic, without first obtaining permission from Sky Publishing Corp., P.O. Box 9111, Belmont, MA 02178-9111, USA.