Capturing the Moon with a Raspberry Pi : A Passion Project
I've always had a fascination with photographing the moon—it's been on my mind for as long as I can remember. It probably comes from my love of technology, especially the curiosity I have for command-line interfaces, along with my passion for both science fiction and real-life scientific breakthroughs. The idea of blending all these interests to capture beautiful images of the moon just felt irresistible to me.
To bring this vision to life, I used the Raspberry Pi along with a Celestron telescope. Here are the details into the process and tools I used.
The following command allows you to control various aspects of image capture directly from the Raspberry Pi's command line interface.
RaspiStill
Used to capture an image using a Raspberry Pi camera:
> raspistill -t 2000 -o image.jpg -w 640 -h 480 -hf -vf
This command captures an image after a 2-second delay with a resolution of 640x480 pixels and saves it as image.jpg, while flipping the image both horizontally and vertically.
The process involves carefully aligning and merging the overlapping areas of each image, adjusting for exposure differences, and potentially applying perspective corrections to achieve a cohesive final product. This technique allows for the creation of high-resolution panoramic or composite images by blending several individual photos into a seamless whole.
The Final Result after combining multiple images taken with the Raspberry Pi camera module in Adobe Photoshop to stitch them together:
Recording a video using RaspiVid
Used to capture a video using a Raspberry Pi camera:
> raspivid -t 5000 -o video.h264
This command records a 5-second video from the Raspberry Pi camera and saves it as video.h264.
Here’s the edited video showcasing some footage of the moon captured using a Raspberry Pi camera and the raspivid command.
Here is a breakdown of the equipment used, including pricing and additional hardware.
- Raspberry Pi 4 8GB ($75)
- Raspberry Pi HQ Camera CS ($50)
- Astromania C Mount to 1.25" Video Camera Barrel Adapter Telescope Astrophotography ($12)
- A1 FFCs - Long Flex Cable for Raspberry Pi Camera - Black 2m / 6.56ft ($10)
- Celestron StarSense Explorer DX 5" SCT ($600)
- Blackberry BBQ20 USB keyboard ($30)
- Non-Touch - HyperPixel 4.0 - Hi-Res Display for Raspberry Pi ($60)
- Anker PowerCore 5,000mAh Portable Charger ($25)