A Quickcam based Autoguider
Updated 6/01/01
Another new version with added functions
This page is intended to document a program that uses the Connectix black and white Quickcam as the detector for autoguiding an astronomical telescope. The program is based on a work by Dr. Don Davies. Stellar Spectroscopy Home Page - Dr. Donald W. Davies His program was written to control a tilt/tip mirror system to keep a light beam centered on a slit type spectrometer. The majority of the camera control is Don's work. My contribution is in adapting his code to do the work of autoguiding. Veikko Kanto graciously provided assistance with the guiding algorithms. This was done in an attempt to make available a low cost autoguider to members of the Chagrin Valley Astronomical Society, the local club to which I belong. It is freely made available to the amateur astronomy community on this page.
The black and white Quickcam is based on the Texas Instruments TC-255 CCD chip. This chip is used in the Meade 201XT autoguider and the SBIG ST-5 CCD camera. With 10 micron square pixels, it should be well suited to guiding with a short focal length guide scope. How does the Quickcam autoguider work out in practice? Well, the reviews are mixed. Being an uncooled camera limits the length of the exposure and so the magnitude of the usable guide stars. It is not an ST-4. Still, I have successfully guided on 10th magnitude stars using dark frame subtraction.
Seems I learn something new every time out with the guider. It has successfully been used with my Losmandy G-11 mount with both a 102mm and a 70mm guidescope. The following is a WCMY shot of M51 taken with my CB245 CCD camera and guided with the Quickcam.
Thumbnail Cookbook CCD image of M51 guided with the Quickcam autoguider. Click for a larger image then use your browsers BACK function to return
Al Kelly recently shot this Cookbook CCD image of M76 using a 32 inch motorized AltAz guided with the Quickcam autoguider. Al misses the ST-4 that he had on loan, but is learning how to use the QC. With the authors permission.
How the program works:
In simplest terms, the program reads the camera output from the parallel port, calculates the center of the brightest object on the display and will send bit patterns to the serial port to control the telescope motors. Something is needed to read the bit patterns generated and translate them into something the telescope will understand. What I use is based on the autoguider circuit described in the CameraCookbook CCD manual and on the autoguider section of the Cookbook web pages. This simple circuit uses a chip called a UART (Universal Asynchronous Receiver Transmitter), and a few other components to change the serial data stream into LX-200 style autoguider port signals. The LX-200 style autoguider port has become a defacto standard and is usually found in the format of a 6 pin telephone style connector. It works by connecting one of four leads to a common ground to activate the desired direction control. Here is a link to the Cookbook autoguider page and to the schematic for the control only circuit. The circuit shown uses the 6402 UART and that should work just fine. I used the older style AY-3-1015D UART shown in the book. It is an obsolete part, but very easy to use. It is still available here and there. Try these folks if your are looking for one: http://www.elexp.com/ics_4412.htm.
I have been programming 8 bit microcontrollers to act as the UART. These require no external components to provide a clock source and can simplify the construction of the interface circuit quite a bit. Contact me if you would like to use one of these. I can supply a schematic and a programmed micro at my cost. I have built interface circuits for some users who were unsure if they could complete the project.
*** NEW NEWS *** The program now supports the serial interface to an LX-200 or compatible scope controller. I use Mel Bartles wonderful scope control software to drive my equatorial mount. Mel's program understands most LX-200 commands and works successfully with the autoguider via this interface. All that is needed is a null modem cable between the PC and the scope controller.
Here is a thumbnail of a screen screen capture of the autoguider display. Click for the full size image.
The program displays the camera output at three different frame sizes, 320 X 240, 80X 80, and 36 X 36 pixels. The rate at which images are read from the camera is determined by the PC speed and the frame size. A star is selected in full frame mode and the camera is aligned to match the orientation shown for Dec and RA. The star can then either be driven to the cross hairs by the scope control or the cross hairs can be moved to the star using the F1-F4 keys or the mouse. The exposure and zero are adjusted to the point that the program can distinguish the target star from the background. When that point is reached, a circle is drawn by the program around the star. The size of the circle is proportional to the number of pixels the star occupies. Next, a calibration step is performed. This drives the star forward and back in all four directions to determine the speed of the drive correction rates. Tracking can be started after this is done.
In practice, this is easier than it sounds, and most of the program options are seldom used. Send me a note if you have questions or need assistance. I will try and respond promptly. This program is made available on an as is basis. I assume no responsibility to correct any errors or provide any support. I will try to help as time is available.
In early December, fellow amateur Bob May picked up the BASIC source from this page and proceeded to reorganize it and add a number of features to the code. His efforts produced a much more readable source and cleaned up a number of errors in the code. A number of the changes he made make for much easier use on slower computers.
Bob and I are currently working with Chuck Shaw of Houston , TX to tune this program to work with Chuck's 14.5 inch twin truss Dobsonian. Chuck's scope uses Mel Bartles scope control program to provide tracking and field derotation. After the testing is finished, Chuck's intent is to utilize a rotator mechanism to apply the needed motion to the guidescope when it is used on this type of mount. See his Web pages for a description of the successful tests of this method on a 32 inch Dob in Danciger, TX.
Chuck and I have been working on a method of averaging the position of the guide star over a number of images and issuing a correction based on that average. The jury is still out, but it seems to be usefull when the seeing is not great.
There is also now an aggressiveness function that varies the amount of the displacement that the program attempts to guide out in one correction, This is useful if the calibration is uneven and the corrections overshoot the goal.
Program updated 6/01/01
Update log 6/01/01: At some point the pervious version on this page became corrupted and the Y would not issue corrections. Thanks to Greg Granville for bring this to my attention.
The major addition is that three basic image processing filters have been added in an attempt to make it easier to work with fainter guide stars. The first is a version of the ST-4 Faint Mode that will set the resulting pixel to the sum of a 3x3 kernel. The second is a weighted 3x3 multiplier that was suggested by Al Kelly. The last is a 1x3 median filter that has the effect of killing lone hot pixels. This will replace or augment a dark frame in some cases. There run best in smaller frame sizes as they take some processor time.
There are now two new provram variables. The first is a floor variable the sets any pixel below its value to zero. This defaults to 4 and will remove the noise in the first 3 ADUs that the electronics introduces. The next is a floating point boost multiplier that will increase the value on the entire image by its value. These go a long way towards making fainter stars usable, but require some experimentation to get comfortable with.
There are now some notes that I wrote to Al Kelly to outline the process of a typical autoguiding session. These should be useful to get anyone started.
Some program functions that were seldom used have been removed to make room for the image processing buffers. This includes the Autozero routine and a few other minor pieces.
Update log 9/11/00: Corrected a condition that showed calibration still running when it actually ended due to an error.
Update log 9/07/00: Added support for the Mouse. Drag and drop will now move the smaller frames with the larger area. A left mouse button held through one refresh cycle will move the crosshairs to the mouse pointer location. The pointer may be overlaid by the next image. Moving the mouse it will cause it to reappear.
There is now the ability to directly enter values for some program variables such as the exposure controls. See the HELP screen for the keys to use.
A move limit variable was added that will kick off tracking if consecutive moves greater than the setting occur. This should prevent the program from trying to track a passing plane or other unusual light source. Configurable by direct numeric entry.
Aggressiveness function changed to a plus or minus function. Control works in 10% increments from -90% to +90%.
A bug in the averaging routine has been corrected. The autozero routine was also changed to bring the background closer to black. Help screen now shows the program compilation date and this web address.
Three files are available.
Guider.zip This is the compiled version of the program.
Notes.doc Notes to Al kelly describing the setup of a typical autoguiding session..
Guider.bas is the source code and has been compiled with MS-QuickBasic to produce the above executables. Some QuickBasic library functions are used so the source will not run with the interpreted Basic found on most Microsoft operating sytems.
Here are a few pictures of how I mounted my modified Quickcam. The camrea head is made from a 2 inch plastic pipe fitting and an old eyepiece adapter. A plastic pipe cap forms a cover. The parallel port circuit is housed in a plastic project box along with a 7805 positive 5 volt regulator. That arrangement lets me power the camera from the Aux. 12 volt connector on my scope controller. I use a long 25 wire data cable to connect from the control circuit to the PC. The last image is the latest setup with a T thread connection to an inexpensive flip mirror with a parfocal eyepiece. This makes it very easy to put a given star on the chip.
Marty Niemi 2/1/99

