Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Building a cheap all-sky camera with Raspberry Pi


kecsap

Recommended Posts

So I started my journey to create a cheap system on my urban balcony. The final target to have an all-sky camera and remotely controlled easy to setup system to try astrophotometry. I created this topic to document the process for the all-sky camera if somebody else wants to create similar thing in the future.

At first, I bought a camera for Raspberry Pi without infrared filter (NoIR camera) for ~23 euro to check if it works enough well for all-sky camera. Without proper weather proof box yet, I put out the Pi to take 40 seconds long shots for a half night and here is the result:

I was lucky, there were everything that night: clear sky, clouds and Moon. The youtube compression ruins the details, but I think it is obvious that it seems good enough for the purpose.

Here it is a quick trial to detect the clear sky with basic image processing. A mask image was created to eliminate the trees from the frames and the following steps were applied for each frame:
1. Gamma correction: 0.3
2. Threshold the pixels at 140.
3. Declare the sky not clear when more than 5% of the pixels are white.

The image label says NO!, if non-clear sky is detected.

Now I wait until the next components are delivered to continue the experiment.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

It took some time this update because my Raspberry Pi was lost during transportation and I had to order a new one. And also laziness. :D

But finally I had a not-so-cold night with clear sky thus I put some hours to assembly the all-sky camera hardware along with a DHT22 weather sensor.

I know that the result is not very nice looking. I put some O-rings on the camera and melted the plastic around with my soldering iron to be "waterproof". The clear camera dome also has not arrived yet.

I installed WeeWX on the Raspberry Pi and wrote a small extension to read the DHT22 values. I put the code on github:

https://github.com/kecsap/allskycamera/tree/master/weather_sensor_dht22

...and my "weather station" is registered at Wunderground, temperature and humidity data are pushed "live" to that service:

https://www.wunderground.com/personal-weather-station/dashboard?ID=ITAMPERE125

I consider to get a pressure sensor to add barometer values.

I did test shots with the camera on two more-or-less clear nights, but I need to implement the first version of the all-sky camera software. The weather part was the easiest to do first.

1.jpg

2.jpg

3.jpg

4.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Ok, right now I am quite unsure what happens.

I use a NoIR version of the "Camera Module v1" for Raspberry Pi. Specs:

https://www.raspberrypi.org/documentation/hardware/camera/README.md

According to the documentation I use only 4.5 sec shutter time with the command (and it can do max. 6 sec):

raspistill -ISO 800 -n -w 640 -h 384 -ss 4500000 -o test.png

...but this command returns only after 34 seconds. If it uses only 4.5 seconds shutter time, I wonder why it would take 30 seconds to return a simple png file, the Raspberry is in idle. But most likely it is the reality, I mixed the command execution time with the real shutter time.

Unfortunately the raspistill is closed-source, I cannot check what it does internally. I also don't have any conventional camera where I could check what I should expect for a 4 seconds-long shutter time and a 30 seconds-long. I am a beginner. I bought an Canon EOS 1000D, but it has not arrived yet. :)

Link to comment
Share on other sites

It is usual to get a lag before taking the image (5 sec from memory) unless you supply a -t argument to the raspistill command - so that will account for some of the delay.

Also, do you get a quicker response saving as a jpg? Have a feeling they are accelerated, but not sure if pngs are. Either way, the exif data in the image should give the actual exposure time of the image (unless you are combining images). 

Link to comment
Share on other sites

On 2017. 02. 02. at 15:40, coatesg said:

It is usual to get a lag before taking the image (5 sec from memory) unless you supply a -t argument to the raspistill command - so that will account for some of the delay.

Also, do you get a quicker response saving as a jpg? Have a feeling they are accelerated, but not sure if pngs are. Either way, the exif data in the image should give the actual exposure time of the image (unless you are combining images). 

I tried quite many things today and played with the options. It seems that I can do nothing about this long processing time. Nothing changes the delay, I turned off the white balance settings etc. When I choose a different mode with -md parameter, raspistill returns quicker, the image has far-far less content, unusable. But anyway, it is not a huge problem.

Link to comment
Share on other sites

On 2017. 01. 21. at 12:07, kecsap said:

I installed WeeWX on the Raspberry Pi and wrote a small extension to read the DHT22 values. I put the code on github:

https://github.com/kecsap/allskycamera/tree/master/weather_sensor_dht22

I renamed the github repository to:

https://github.com/kecsap/robot_telescope/tree/master/weather_sensor_dht22

Link to comment
Share on other sites

  • 3 months later...

The sensors are only there because they were very cheap and easy way to create a small weather station over the allsky webcam function. In a longer run, I will see how I can use them for automating some things with my imaging sessions. Set up alerts based on sudden raining/snowing or similar. And it was fun to make it work!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.