Wireless All Sky Camera

122,122

710

561

About: Most of the things I build usually relate to either astronomy, physics or woodworking in general.

An all sky camera is a device designed to take pictures of the entire sky over a certain amount of time, usually to monitor meteor showers or other astronomical phenomena.

I built mine to monitor the northern lights. I live in the Yukon and we sometimes get beautiful aurora displays during the night. However, I also have a day time job and I need my 8 hours of sleep. I created this camera to record a movie of the entire night. That way, I can replay the movie in the morning and never miss any aurora night.

Step 1: Requirements and Materials

My requirements for this camera are the following:

  • needs to photograph most of the sky
  • needs high sensitivity to low light
  • should be weather proof
  • no wires should run to the house
  • needs to be autonomous
  • needs to create a movie from pictures and upload it to the internet
  • needs to start at dusk and stop at dawn

After thinking about it for a while, I decided that the device should include its own computer and send the pictures using wifi. As for the camera, I decided to use an astronomy camera that would be small enough and was powered over USB.

Here's the list of materials:

  • ASI224MC camera from ZWO (ASI120MC or MM works too and is cheaper)
  • wide angle lens Arecont 1.55 (It gives a wider field of view than the lens that comes with the camera)
  • Raspberry Pi 2 (or 3)
  • 64 GB micro SD card
  • Wifi module (no need if Raspberry Pi 3)
  • Short right angle USB cable
  • 4" ABS pipe with end caps
  • Acrylic dome

I thought about adding a dew heater but after a few month of testing, I never got any frost on the acrylic dome. This is possibly due to the heat produced by the raspberry pi itself.

Step 2: Wiring

In this instructable, I will assume that you already have raspbian installed on the SD card.

The wiring is relatively easy. Plug the USB cable to the camera on one side and the raspberry pi on the other. Plug the wireless dongle into one of the 3 remaining USB ports of the pi. Insert the micro SD card in its slot and plug the raspberry pi to its 5V adapter.

In order to keep things tidy, you can fix your camera and computer onto a plywood board like I did on the picture.

Step 3: Build the Enclosure

The enclosure is made of a 4" ABS pipe, a flat end cap and a threaded end cap with its lid.

The flat cap goes on top and is drilled to the diameter of the camera. The threaded cap goes at the bottom and a hole (for the extension cord) is drilled in the centre of the lid.

The acrylic dome can be fixed onto the top end using weather proof silicone. I used an acrylic ring but it makes things more complex than they need to be.

You can now fix the enclosure onto your deck, your roof or any other location with a good view of the sky.

Step 4: Software

Update: If you need to change the way the capture works, you might have to make changes to the C++ source and compile it on your Raspberry PI. To do this, follow PeterD192's detailed instructions in the comments.

Update 2 (Nov 11th 2016): I have set up a GitHub page with an install script to make things easier for everyone: https://github.com/thomasjacquin/allsky If you use it, you shouldn't have to use any of the following instructions.

Original Instructions:

In order to capture images with the camera, we need to run a program in the terminal. ZWO provides an SDK in order for developers to communicate with the camera. Using this SDK, I modified one of their C++ example and compiled it for the raspberry pi. Here's a list of dependencies that need to be installed in order to get the program running.

  • OpenCV to capture the image of the sky (You can get a compiled version here)
  • Sunwait to calculate the civil twilight of your location. There is a compiled version in the archive. Make sure you copy it to your path:
    sudo cp ~/allsky/sunwait /usr/local/bin
  • Required dependencies:
    sudo apt-get update && sudo apt-get install libusb-dev libav-tools gawk lftp entr imagemagik

To make things easy, I have attached an archive. Extract it at /home/pi/allsky.

From the lib folder, you will need to run this in order to use the camera without being root:
sudo install asi.rules /lib/udev/rules.d

You will also need to add libASICamera2.so to your library:
sudo cp ~/allsky/lib/armv7/libASICamera2* /usr/local/lib

Another thing you will need to do in order to automate everything is to run the main program on startup of the pi. You can open ~/.config/lxsession/LXDE-pi/autostart and add this line:
@xterm -hold -e ~/allsky/allsky.sh

Remember to set your wifi connection in order for the pi to upload videos.

allsky.sh contains all the parameters you might want to play with: GPS coordinate, white balance, exposure and gain.

Step 5: Collect Images

Now that the raspberry pi is ready, you can plug your all sky camera. The startup script should call allsky.sh which in turn calls the binary file named "capture". It will determine if it's day time or night time. In case it's night time, the capture will start and take a picture every 5 seconds (or whatever value you set in allsky.sh). At the end of the night, the capture will stop and avconv will stitch them together and upload a video to your website using FTP.

Step 6: Watch Your Time Lapse Videos

The video produced by avconv should weigh between 30 and 50 mb depending on the length of the night (here in the Yukon, we can get from 18 hours to 0 hours of night time) and should be viewable on any web browser.

In the event that you find something interesting in the video, you can access the individual images on the raspberry pi. They will be in a folder named after yesterday's date.

Here's a page showing my own videos with almost all night archived starting January 18th 2016. Some have beautiful northern light, others have clouds, snow or rain.

Space Contest 2016

First Prize in the
Space Contest 2016

16 People Made This Project!

Recommendations

  • Make it Glow Contest 2018

    Make it Glow Contest 2018
  • Plastics Contest

    Plastics Contest
  • Optics Contest

    Optics Contest

561 Discussions

0
None
AndrewM641

Question 4 weeks ago

Hi My liveview image is severely cropped and off-centre. I've purchased exactly the same equipment as you (ASI224MC and Arecont 1.55mm) but yours are only cropped slightly on the botton/top - what am I missing? Andy

Update: Based on the size of the projected image, I calculate I need to decrease the back-focus by 3mm to get the entire image onto the sensor. Any advice on doing that?

liveview-image.jpg
0
None
ThomasJ1PaulS686

Answer 5 weeks ago

I personally don't but some users who live in high humidity areas do. You can solder a few resistors together to get a little bit of heat inside the dome and stay above dew point.

0
None
PaulS686ThomasJ1

Reply 5 weeks ago

I was thinking if I needed to do something, more along the line of using the heat from the camera and Raspberry Pi to heat the dome.

0
None
ThomasJ1PaulS686

Reply 5 weeks ago

The Pi 3 generates enough heat to keep the dew off the dome in my case but my climate is fairly dry. It depends where you live I think and how weathertight your case is.

0
None
PaulS686ThomasJ1

Reply 4 weeks ago

I'm 30 miles from South Bend, Indiana. About 90 miles from Chicago. So DEW forms very readily on my SCT and MCT scopes and I need DEW heaters and/or DEW shields. Not so much on mt Refractor, RC and Newtonian.

0
None
EdwardN10PaulS686

Reply 4 weeks ago

Hi Paul, where are you located, I am about the same distance from both as well in SW Michigan. I am getting ready to add a heat rope to mine for the same reason.

0
None
PaulS686EdwardN10

Reply 4 weeks ago

I'm on Fish Lake, between LaPorte, Walkerton and North Liberty.

0
None
EdwardN10

Question 4 weeks ago

My Allsky does not always automatically generate a timelapse. The pictures are there, however no time lapse. it will generate a startrails. Is there a way to force it to create a timelapse? I have a 64GB SSD card installed and I usually have no more than 10 nights on there at the most before I delete. I was thinking it was disk space but I do not believe it was the issue.

0
None
QuestorThews1

Question 2 months ago

Anyone tried to power this with something like a anker powercore outputs 5v 3amps per port? Might be good for taking to remote sites and leaving?

As far as I can tell, the pi will consume around 250ma (1.2amp) 5V and a ZWO ASI224MC will consume 160ma (.8amp). Should leave about and amp spare.

I would think this would work all night with a 26800ma power supply no problem.

Any thoughts?

1 more answer
0
None
ThomasJ1QuestorThews1

Reply 2 months ago

One user reported using it successfully with 40W solar panels and a 16Ah battery. He said the Pi3 + camera was using 2W of power (5V at 0.4 amp). In theory a 26.8 Ah battery could last 67 hours (almost 3 days) but you have to take in account tasks that take more CPU power (image processing, timelapse, upload) and outside temperature. The cold could cut the battery capacity in half easily. (That's still enough to last the whole night).

Please update us if you set up a battery operated system with success!

0
None
ThomasJ1AndrewM641

Answer 2 months ago

Yes I do. In my prototype, I just tied the copper wires through the holes of the adapter prongs and applied heat shrink on it. It's been working fine.

In more recent iterations of the project, once the main power cable is passed through the threaded ABS cap, I add a female plug. That way, I can connect and disconnect the adapter easily if needs be.

0
None
JuanV49

Question 2 months ago

Hello Thomas! Did you get to implement the meteor detection option?

1 more answer
0
None
ThomasJ1JuanV49

Answer 2 months ago

Hi Juan, not yet, I did focus on daytime and auto-exposure in v0.6.
Meteor detection will require some more intense computing power from the Pi so I will need to think a bit more about how to optimize the analysis prior to implementation.

0
None
RonaldS119

2 months ago

I am getting night exposures with too short of a delay in between. I have autoexposure set to 0, exposure and maxexposure set to 12000 (12 sec), delay set to 8000 (8 sec). Yet I get 5 frames per minute? In capture.cpp line 311 you have exposure default set at 5000000 as time in us, should be in ms (this is just the default so I don't see how it effects above). There are no printf statements to show how long the delay is when asiAutoExposure = 0 at line 622. I tried autoexp at night, but I was not happy with the results, but just starting to work with the new version. thanks, Ron

4 replies
0
None
ThomasJ1RonaldS119

Reply 2 months ago

For some reason, ZWO's library uses microseconds for exposure and milliseconds for maxexposure so 5000000 is actually correct (5sec). I just decided to make abstraction of the difference and present the user with only one unit: ms.

Regarding the delay, I will take a look, I have been running with autoexposure enabled lately so I may have missed a bug with the time between exposures. I will try your settings for next night.

Based on your feedback it sounds like the delay is not applied. I will add some logging there. Thanks

0
None
RonaldS119ThomasJ1

Reply 2 months ago

Thomas, in CPP usleep is in microseconds not milliseconds, I think

Ron

0
None
RonaldS119RonaldS119

Reply 2 months ago

now it is taking too long, something still wrong?
Ron

0
None
RonaldS119RonaldS119

Reply 2 months ago

thomas,

it is getting to line 622 in capture to sleep delay*1000 microseconds, I tried printing the time before the delay and after the delay and I get a segmentation fault every time. If I print the time after the delay it is only the exposure time difference from the image time, no delay. NOTE: Ctrl-C does not stop the program, I have to do it twice? Is there something about video mode capture that interupts the delay? I think you need to use video mode to get autoexposure, But I don't think I want video mode if I am using manual exposure. still playing around. Ron