> astronomy > autoguider

Modification of a telescope motor controller for autoguiding

  - Introduction
  - Circuit diagram and principle of operation
  - Pictures with instructions
  - Setting up with K3CCDTools
  - Performance test


This page describes how I have modified my SkyWatcher dual axis EQ5/EQ4 motor controller to allow autoguiding through the parallel port from a PC. The modification allows the RA+, RA-, Dec+ and Dec- buttons to be activated from the PC via the parallel port and a cheap IC. I have tested the modification together with K3CCDTools v3.0.1 with good results (see bottom of this page).

There is a good chance that the modification will also work with other controllers. In particular, the SkyWatcher EQ3-2 and the Orion "TrueTrack" controllers seem to be almost identical to the one I modified. A procedure for verifying if the modification shown here is likely to work with a different controller is described here. I would be glad to hear from you if you have success with modifying a different type of controller, (e-mail address at the bottom of this page), and I would be glad to include the information (and credits) here.

The circuit is inspired by more complex solutions published on other web pages. In particular I would like to credit Dan Brown and Peter Katreniak.

Warning: You may use the following information on your own risk. There is always a risk that your equipment can be damaged when you follow procedures like the ones described below. The author is not responsibility for any damage to your computer, motor controller or other equipment.

Circuit diagram and principle of operation

The navigation buttons on the EQ5/EQ4 controller keyboard are implemented as switches which are closed (become connected) when they are pressed down. Each switch is connected to ground on one side and to the microcontroller on the other side (on the main circuit board). The inputs to the microcontroller are also connected to +5V via pull-up resistors. When the switch is pressed down the microcontroller senses that the corresponding input signal changes from +5 V to ground, and the signals to the stepper motors are changed accordingly.

The modification uses four out of seven available driver circuits inside an IC called ULN2003 (datasheet). When one of the signals from the parallel port (usually a DSUB-25 connector) goes high, the corresponding ULN2003 output pin is shorted to ground (pin 8) via an internal transistor. The ULN2003 output pin is connected to the microcontroller side of one of the navigation buttons, and the corresponding input signal to the microcontroller is therefore also pulled to ground. The PC program that controls the parallel port can therefore navigate with the motors in the same way as a person manually operating the buttons.

If the parallel port cable is disconnected the ULN2003 will operate as if the input pins were grounded, and there should be no effect of the modification. It is also possible to use the pushbuttons while the computer is connected. If the computer tries to guide the telescope in one direction while you press the button for another direction the effect will be the same as if you pressed two buttons at the same time.

Pictures with instructions

Pictures of the controller are shown below. The label on the back says "DUAL EQ4", but the controller is sold for use either with EQ4 or EQ5. The white cables seen on the left are connected to the RA and Dec motors. The gray cable transmits the guiding signals from the PC parallel port. You can also see the socket for connecting the 6V battery pack.

Click for 
    larger image! Click for 
    larger image!

Click for 
    larger image!

Above you see the inside of the controller. A circuit board with four pushbuttons is mounted on the top, serving as the keyboard. The main circuit board is mounted below with the microcontroller and driver circuitry for the motors. To open the controller you pull out the white buttons with the tip of a screwdriver and remove the screws, including the upper screw holding the 6V power connector. (The blue and yellow wires coming out of the box together with the PC cable belongs to another project. Also the pushbutton and switch at the right hand side belong to the other project. Please ignore.)

The keyboard can be unscrewed and turned around, as in the picture below. The modification circuit is seen at the bottom left. A surface mount version of the ULN2003 was soldered onto a "MiniMount" patterned circuit board with self-adhesive glue at the back (sold as "SolderMount" in the USA). This board has product code "SO-16" . A larger dual-in-line version of the ULM2003 can also be used. To get enough space one may bend the pins outwards and glue the IC to the keyboard upside down.

Click for 
    larger image! Click for 
    larger image!

The ground wire from the parallel port is connected to ground on the keyboard and to pins 5 through 8 on ULN2003. The connection of pin 9 on ULN2003 to the positive supply (+5 V) would protect the circuit from voltage spikes that may occur if the outputs are connected to inductive loads like relays. In the present application this protection is probably not needed, but I have chosen to connect pin 8 to a +5V regulated supply voltage available on the motherboard at the soldering point is indicated by the leftmost yellow arrow in the left picture above. The solder point is at the top of one of the black diodes connected between +5V and the motor output signals.

Setting up with K3CCDTools

Data bits D5 through D7 on the parallel port (pins 6 through 9 on a DSUB-25 connector) is used for the guiding interface. Below you see how K3CCDTools is set up for guiding through this interface. By activating "Intelligent output", data bits D1 through D4 (pins 3 through 6 on a DSUB-25) will be available for other purposes, such as controlling an SC modified webcam.

Performance test

I have briefly tested the modification with my EQ-5 mount, a 200mm Newton reflector with 1000 mm focal length, a toucam web camera in primary focus and K3CCDTools v3.0.1. The following guiding parameters were used in K3CCDTools:
RA: Dead zone = 1, K = 36, Q = 20. DEC: Dead zone = 1.4, K = 25, Q = 10. Interval = 700 ms.

It is important to set up the telescope and CCD camera settings correctly in K3CCDtools (Options menu) when doing these measurements. Unfortunately, I am unsure if the pixel size was set to 5.6 (correct) or 7.6 micron during the logging session. The errors in the graphs below have been multiplied by the ratio 7.6/5.6 to account for this possible error, and the errors may thus be slightly exaggerated.

The left graph below shows the guiding errors in the RA and DEC axis logged by K3CCDtools when the autoguider was first turned on for 12.5 minutes and then turned off while continuing logging for 22 more minutes. The telescope was aimed at a strong star about 15 degrees above the celestial equator on the western sky. The error in the first period when guiding is active is magnified in the right graph. The standard deviation is only 2.3 arc seconds in the RA axis and 2.1 arc seconds in the DEC axis!

When guiding is turned off the DEC drift is 8.3 arc seconds per minute, which can be explained by about 0.5 degrees error in polar alignment. The linear trend in the RA error is about 11 arc seconds per minute, which can (as far as I understand) only be explained by about 1.3 % error in the RA motor speed. Since stepper motors are used it should be easy to get this error trend much lower. In addition to the general trend there is a periodic error of about 50 arc seconds peak-to-peak.

Click for 
    larger image! Click for 
    larger image!

The guiding errors generally depend on several factors, including the guiding parameters, camera resolution seeing conditions, wind and other mechanical disturbances. Rapid changes in the unguided tracking error (more than 1 arc second in a second) will also contribute. Backlash in the DEC motor transmission can also cause problems. In the example above the polar misalignment was probably just so large that the DEC motor always is moved in the same direction. In another test I have, however, seen that changes in the DEC guiding direction can cause errors in the order of +/- 7 arc seconds.



Erlend Rønnekleiv,
erlend.web& [replace & with @]