Saturday, April 4, 2015

Satellite tracking with telescope

So after years of trying to get a video of the International Space Station, we finally did it! Here's the result:

This video is centered by using a weighted-average of the following video:

So how do you get a video like that? Well here's what the setup looked like a few minutes before ISS passed overhead! A telescope, some computers, in a parking lot 10 meters from our front door.

Here's a schematic diagram of the setup:

How does it work? Well, you need a telescope and a camera. A classic orange Celestron C8 (30+ years old) and a Celestron NexImage webcam get the job done. It helps to have a Telrad to center the telescope on moving targets. This is all you really need! Oh, maybe a broomstick to manually slew the telescope to ISS.

If you want automated tracking, then things get a bit more tricky. From this point on, everything is custom. For the guidescope, a Logitech webcam that has the lenses removed is attached via some Thorlabs optics to a 150mm lens. So the light coming from infinite distance (ISS is pretty far away) is focused onto the detector at a distance of 150mm. The webcam is held onto the optics with packing tape.

A custom guidescope: a Logitech webcam with lenses and case removed attached via Thorlabs optics to a 150mm lens

The guidescope sends low resolution images over a relatively large field of view, and because it's a small 25.4mm diameter lens, the amount of light collected is pretty low so it can only track bright objects such as planets, bright stars, or ISS. The guidescope is connected to a Gateway laptop that is running Labview software. The Labview software finds the coordinates of the brightest object in the image using a simple algorithm: weighted mean of all pixels above a user-defined threshold. The user also inputs desired coordinates. So there's a deltaX and a deltaY of coordinates which are used to control the Right Ascension (RA) and Declination (D) velocities. The user-defined X and Y are set to line up such that the satellite is in frame on the imaging webcam. Here's a video of the setup tracking Jupiter (before alignment of 3 axes):

At the end of the video you can see the Telrad pretty close to aligned with Jupiter!

Here it is after alignment of all 3 axes, and you can see Jupiter in the main imaging webcam.

To control the telescope, Labview sends commands via ASCOM Telescope MoveAxis rate commands. So we are updating the desired RA and D rates. These commands are sent via a USB to serial port to the Celestron Advanced GT mount hand controller. Here's a screen shot of the custom tracking software GUI:
Labview GUI screenshot

This is where it's refreshing that blogs are not peer reviewed. The following works, but I don't know why! I don't know exactly how to solve the control system for this telescope. If someone has ideas for this, please let me know. Attached is my best guess for what I'm doing, but I haven't solved it using Laplace transforms or anything like that due to the mysterious motor controller black box. Perhaps someone has a good model for how the motor controller and physical response of telescope?  The factor of 1/cos(D) is because as the declination approaches the polar axis (D=90 degrees), the RA becomes less and less sensitive. In fact, at D=90 degrees, moving RA only rotates the image, it does not actually move laterally!

It would be nice if Celestron or ASCOM allowed us to control the current (in Amps) directly to the motor. Any insight here would be appreciated! But the bottom line is that despite the uncertainty in why exactly it works, it does in fact work!

Warmup schedule

2 weeks before ISS pass:

2 days before ISS pass:

2 hours before:

  • start up laptop, check software (Labview has a tendency to crash randomly!)
  • bring telescope outside, set up telescope mount such that highest point of transit is perpendicular to polar axis of equatorial mount. So the perpendicular-to-equatorial plane should intersect the highest point of the transit. We want the highest point of the trajectory at declination = 0 degrees to get highest sensitivity on our motors.
  • Align 3 axes: Telrad, guidescope, main telescope
  • Focus main tube on bright object (moon, jupiter, bright star). 
  • check that telescope can slew over entire predicted trajectory (or as much as possible)

2 min before

  • switch to manual mode, use XBox controller to move around, get familiar with up/down, control, etc
  • start scanning the sky for ISS 

During ISS pass

  • use Xbox controller and Telrad to point telescope at moving target
  • once ISS is in the center of the Telrad and velocity is approximately correct, press "A" button to enable automatic tracking
    • if program "locks on" then great!
    • if program loses lock, then press "B" to enable manual mode and try again
  • Use Sharpcap running on second laptop to save video file from Celestron Neximage webcam, adjust exposure using Philips webcam control driver

1 minute after

90% of the time: Curse and cry due to fog on lens, algorithm error, incorrect alignment of axes, clouds, car driving by, etc etc.

10% of the time: PARTY!

1 hour after

Postprocessing of AVI file in Matlab (cropped to weighted centroid). No color adjustements, etc, performed.

Any comments or questions definitely welcome!


Oom Hank Verwest and late Aunt Barbara Verwest for kindly giving me the Celestron C8 telescope tube.

Tim Long and Rick Burke of ASCOM for posting useful information online

Thierry Legault's websiteRalf van de BerghSylvain Weiller and Atroguyz for inspiration

Thanks to my girlfriend Fernanda for spotting ISS, but mostly for keeping me company through all the failed attempts at capturing ISS :)