maandag 29 juni 2015

Raspberry Pi astrophotography

note: this article is a work in progress, stay tuned for updates

I recently bought a very basic telescope (Celestron Travel Scope 70), not exactly a high end telescope, but I'm still able to get some nice views on planets like Saturn, Jupiter and its moons, Venus and off course the moon.

Being enthusiastic about what I could see with this telescope I have tried taking photographs by manually putting my cell phone camera against the eye piece and minimize my trembling while pushing the button to take picture.

Not surprising that image quality is far from good.  For pics of the moon, it sometimes works out ok.

cropped image of the moon taken with my cell phone camera held against my telescopes eye piece

But while the features of Saturn are just distinguishable with the naked eye, it's almost impossible to take a nice picture with the methods described above.

image of Saturn taken with my cell phone camera held against my telescopes eye piece

Also Jupiter and its moons are hard to catch.

image of Jupiter and moons taken with my cell phone camera held against my telescopes eye piece

Taking it up a notch

Due to this less than ideal situation I decided to take things up a notch and use a raspberry pi camera. I printed an adapter for the Pi Camera to slide over my eye piece using my 3D printer.  After some filing and a paint job I have the adapter ready and I secure the Pi Camera into the adapter with some duct tape.

The idea is to eliminate tremor from holding the cell phone against the eye piece and being able to control the camera remotely.  Eventually I would like to be able to take a clear picture of both Saturn and Jupiter (and its moons).

Raspberry Pi setup

  • I started from a regular raspbian install
  • I enabled the camera, allowed ssh, expanded the file system, 
  • disabled the led on the pi camera [Ref]
  • and configure my wireless setup.

Powering the raspberry pi

I use an USB battery to power the Raspberry Pi setup.

Mount Raspberry pi on telescope.

Currently the Raspberry Pi is basically mounted on the telescope with some zip ties.

To be more comfortable I might need to add a longer ribbon cable between the camera and the Raspberry Pi.

Aiming the telescope

While the Raspberry Pi camera is on the telescope it would be hard to aim it very precisely.  Therefore, I setup streaming so I could check the aiming of the telescope with a laptop or cell phone (as long as I am within reach of my WiFi network) by following this guide.

Taking pictures with Raspberry Pi

Once I  somewhat correctly aimed my telescope I could use the regular Raspberry Pi Camera commands to take pictures of the celestial bodies.

Impressions so far

The pictures I took were not so good as the ones taken with the cell phone, but that is probably due to the low resolution used to take the pictures with the Raspberry Pi Camer.

The way the current adapter is made, it is very fidgety to get it well aligned with the projection from the eye piece.  I have the impression I will have to redesign the eye piece adapter even further to make fitting the adapter on the eye piece easier and to put the raspberry pi camera lens even closer to the eye piece.

Luckily both the Raspberry Pi and the laptop used for aiming were both within reach of my WiFi.

The USB battery could provide sufficient power for the 1 hour I have been testing my setup.

Some test results from 29/06/2015:

Moon in 640x480 resolution

Saturn in 640x480 resolution
Test results 30/06/2015:

moon in 2592 x 1944 resolution

saturn in 2592 x 1944 resolution

arcturus in 2592 x 1944 resolution
Although shot in higher resolution, the improvement is not that great.  The Saturn pic at least shows some interesting shadows.  Not sure whether this is due to my setup, or taking pictures in 'automatic' mode (without defining ISO, brightness, contrast, ...), atmosphere (very warm when pictures were taken) or the limits of my telescope (although naked eye observatory is quit good).

Future ideas / improvements

  • I need to improve the resolution (max resolution is 2592 x 1944, would much better than 640 x 480)
  • Definitely need to start experimenting with my camera settings to get better images
  • automated following / finding, although my Raspberry Pi setup is streaming so I can aim the telescope somewhat while looking at my laptop screen, it would be cool to punch in a celestial body to find and/or follow
  • touchscreen control on Raspberry Pi
  • Have the raspberry pi act as its own APD (or the laptop that is controlling the Raspberry Pi camera) for when I'm not within my home's WiFi range.