Wireless All Sky Camera

207,612

829

903

Introduction: Wireless All Sky Camera

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

Makerspace Contest

Participated in the
Makerspace Contest

52 People Made This Project!

Recommendations

  • Woodworking Contest

    Woodworking Contest
  • Science Fair Challenge

    Science Fair Challenge
  • Home and Garden Contest

    Home and Garden Contest

903 Comments

0
fmfedeli
fmfedeli

Question 3 days ago

Hi Thomas,
I am an amateur astronomer and I installed the allsky camera in Italy, near Rome, using a RPi 4 with 4GB RAM and 128 GB microsd, the RPi HQ module and a Arducam 180° Fisheye lens. No problems installing your system and all is correctly running. Only one issue: on the top of the case containg RPi is mounted an acrylic dome to protect the lens; during the night, it gets filled with little water drops of condensation (see figure attached). Could you send me any suggestion to fix this issue? Thanks. Best regards. F.M.Fedeli

image (2).jpg
0
GiulianoP5
GiulianoP5

4 weeks ago

Hi Thomas,
I am an amateur astronomer and I installed the allsky camera following your instructions and everything works fine, the only problem that the raspberry PI3B + with the ASI120MM-S camera connected, the operating system does not start; I have to start raspberry without connecting the USB and then, once the operating system is started, connect the camera. Can you help me understand how to solve the problem. Thanks Giuliano

0
ThomasJ1
ThomasJ1

Reply 4 weeks ago

Hi Giuliano, it could be related to your power supply. Are you using the recommended 2.5A power supply?

0
GiulianoP5
GiulianoP5

Reply 4 weeks ago

Hi Thomas,
i updated allsky to the latest version and the problem is solved.
Thanks anyway for the prompt reply.
Greetings
Giuliano

0
ryanpcorner
ryanpcorner

7 weeks ago

I installed allsky onto my Rpi4 running Pi-hole and I can only access the Pi-hole web ui or the Allsky interface, but not both. Depending one which one I re-install. I know it has something to do with ports and the Lighttpd.conf file, but I spent about 18 hours trying to figure it out already. I am not good with anything related to rpi. So I installed docker and portainer thinking I can install Allsky into a container and avoid conflicts. Both services currently can run, but I can't access the web UI for both. Right now the the port in the lighttpd.conf is changed 8080 so I can access the webui for pihole, but I can't get to the webui for allsky. Is there a way to make this work and can I install allsky using portainer?

0
StorminNorm
StorminNorm

5 months ago

got my allsky working RPi 3 B with RPi HQ, but I am having trouble finding the Arecont
- MPL1.55
CS-Mount 1.55mm Fixed Fisheye Lens, from what I am finding it is discontinued. Anyone have a good replacement / alternative?

0
omega.centauri
omega.centauri

Reply 4 months ago

Same problem here, can't find on the market 1.55mm or 1.4mm with CS-mount...any help is appreciated

0
JoeF187
JoeF187

Question 2 years ago

Has anyone from the UK made this project? Do you have a good component list in the UK, I'm not sure where to get the pipe? I've also seen this made with an electrical box instead, looks like a good alternative? Does anyone have any mounting ideas for house roof? I've got the Pi 3 wireless, with case, so perhaps don't need to worry as much about plyboard mounting, but more instructions around that would be good, as I'm not very experienced with making this sort of thing

0
hexf1
hexf1

Answer 4 months ago

I used a piece of plastic soil pipe and weld glue. I started trying to use push and seal fittings because i thought that would be the best way to waterproof then realised if I used an electric paint stripper to heat the pipe it would turn plastic enough to enlarge a flange and push onto the weld fitting.

0
sbkirby
sbkirby

Tip 1 year ago

I've created the STL files for a 4" Threaded Mount for a RPi HQ Camera Module. The files also include a domed cover to fit on top of the mount. All these files are available at https://www.thingiverse.com/thing:4659815

allsky_camera.jpg4x4 Plug top.pngPXL_20201121_174519481.jpg4x4 Plug bottom.png
0
chrisP1
chrisP1

Reply 6 months ago

Awesome love the 3D printed parts make a really neat finish. Think i'll have a go at this myself. Regarding the threaded cap does this need a special pipe to fit to or do you screw this into a plain 110mm / 4in drain pipe ?

0
basta
basta

Question 6 months ago

Do you get any burn in from the direct sun hitting the sensor everyday?

0
ThomasJ1
ThomasJ1

Answer 6 months ago

Nope, the sensor is still fine after almost 6 years in the sun.

0
gerforastro
gerforastro

8 months ago

Hello all.

This is my first post starting the project, Raspberry, Starlight Xpress Oculus.
Have some questions and hope you can drive me to get this done

1) how does my project differ from the procedure, not having a CMOS ASI but a CCD? I would like to focus on this.

2) the AllSkyCam is 20 meters away from a Netgear POE switch, which injects 24 volts through the network cable, the Raspberry, remotely installed with the AllSkyCam, is capable of managing a voltage conversion, one of 5v for itself and one of 12v for the anti dew ?

Thanks in advance for any help to get this project in port.

Geremia

0
robmorinmtl
robmorinmtl

Question 8 months ago

Hello all...

My first post, so be gentle. :)

I am looking at building this very cool night sky camera to use at my cottage 3 hours north of Montreal, Canada. The sky is very clear there, no city lights!

My question is, are there any updates/upgrades to this project before i start it?
Can I use a raspberry 4, if so what is Min RAM?
I see @Mazufa did it, but no details
Is latest Raspian ok to use as OS?
Can I use this camera with this lens
https://www.canakit.com/raspberry-pi-hq-camera.htm...
https://www.canakit.com/raspberry-pi-hq-camera-6mm...

I have no internet at the cottage, so can bring the camera in and connect a console and transfer the images to an external drive?Or can Images be saved to USB directly on raspberry instead, to make transferring images easier?

I'm looking forward to starting once get a few answers.

Thanks everyone!

0
ThomasJ1
ThomasJ1

Answer 8 months ago

Hi Rob,
Take a look here, there's more information about the hardware aspect of the project and there will be people to help if you have an issue.
https://github.com/thomasjacquin/allsky

Thomas

0
robmorinmtl
robmorinmtl

Reply 8 months ago

Hey Thomas, I looked around in the "issues" and did not find anything regarding a type lens to use with the pi HQ camera. Also why is this ZWO camera suppose to be so good if the MP is only 1.2 and the pi HQ is 12MP? I cannot seem to find a proper lens anywhere that is between 140 ~ 180 degree angle with proper MP of anything close to 12MP to fit the pi HQ camera, not sure why?

Thanks have a great day!