Introduction: Wireless All Sky Camera

Picture of Wireless All Sky Camera

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

Picture of 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

Picture of 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

Picture of 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 silicon. 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

Picture of 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

Picture of 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

Picture of 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.

Comments

RobertoM185 (author)2017-11-18

Many thanks for providing the inspiration to build an all-sky camera similar to yours! I'm using the ASI 120MC sensor. I live in Northern Virginia so my light pollution level is high. My ASI120MC shows a high number of hot pixels (I'm using a gain of 50, 5 sec exposures). I took a dark frame to try to do dark frame subtraction using the RawTherapee software. Didn't see much difference, but I'm continuing to experiment. Question: can your capture utility store images in RAW format? Will dark frame subtraction work better in RAW format than in JPEG? Cheers!

-Bob.

sm4ive (author)2017-11-06

Hey Thomas

Noticed when got up this morning that i had lots of frost on dome, think i have to make some holes ,so heat from Raspberry can go up, and maybe keep the frost away.

But main problem it stops capture after some hours , so i have to restart Allsky

any iddea why this happens.

sm4ive (author)2017-11-04

i am getting errors when the frames should be uploaded

I dont know how to copy/paste from the sh file

so i made some photos

Thanks Lars

ThomasJ1 (author)sm4ive2017-11-05

Hey Lars,

looks like you've got some bad frames between 290.jpg and 300.jpg. Look for those , delete them and run ./timelapse again. You may have to rename the directory to "current" if it's already been archived.

rankinstudio (author)2017-10-17

I'm still messing with getting familiar with this project, but I just wanted to say THANK YOU. I have looked everywhere for an affordable all sky cam and this is a great solution.

ThomasJ1 (author)rankinstudio2017-10-17

You're very welcome !

rankinstudio (author)ThomasJ12017-10-17

So, im also getting strange artefacts with shorter exposures. Do you know what may be causing that? Would love to be able to use it during the day too.

Cheers!

Strangely, it does only seem to be related to the exposure time. I can have a delay of 1 or 5 seconds, and they go away in each case if I increase the exposure to at least 100,000us.

ThomasJ1 (author)rankinstudio2017-10-17

Yes, I have seen this behaviour for short exposures. I haven't spent too much time investigating the issue because I use it at night exclusively but you could try playing with the -delay option. I believe there is a race condition between the capture and the "save" process. I think it's trying to save the current image to disk but the camera is already starting to record the next frame. That would cause the artefacts on the image. The "delay" option may help by adding delay between individual frames.

rankinstudio (author)ThomasJ12017-10-21

Looks to be a limitation of the asi120mm usb2
https://zwoug.org/viewtopic.php?f=17&t=6668&start=10

sm4ive (author)2017-10-19

Hi Thomas

great project

Where did you find the dome?

regards Lars

ThomasJ1 (author)sm4ive2017-10-19

Hi Lars,

I bought it on Amazon but the product is no longer available. You can get a similar one though: https://www.amazon.com/Acrylic-Dome-Plastic-Hemisphere-Pre-Drilled/dp/B01N29BQN6/

sm4ive (author)ThomasJ12017-10-19

Hi Thomas

Thanks for the info regarding Dome.

have you estamated your Allsky cost totaly?

Does the lens cover horizon to horizon?

Are the camera in class with

Starlight Xpress Starlight Xpress Oculus All Sky Camera? near or the same?

I am in Sweden 59. deg North

Thanks Lars

ThomasJ1 (author)sm4ive2017-10-20

Hi Lars, I have attached the prices in Canadian $. The prices may vary for you because you're in Europe (shipping, online stores, etc).
The Arecont lens covers 180 degrees but the sensor of the ASI224 crops a little bit of the field of view (look at the last image of the instructable). This is the same lens as the oculus fisheye lens.

The oculus has a a different sensor (1/2" interline CCS) than zwo cameras (1/3 CMOS for asi 224) but you can use a different ASI camera to cover the whole field of view.

I think the Oculus camera may be a little bit more sensitive and is monochrome I believe but it's also twice the price and probably less customizable.
I'm at 60.7N and images don't have hot pixels in my 10s exposure images.

Thomas

PaulS627 (author)2017-10-15

Hi

I am putting this together and am hitting a few frustrating problems, which is highlighting my complete lack of knowledge on Pi and software too.

On my 1st attempt I had two instances of the software open at start up, but all seemed to be working fine.

To overcome this, I re-flashed Raspbian and then after updating, upgrading and installing software to run a web server (Apache, PHP and mysql), I downloaded the install zip from the github (tried to clone in as per instructions but kept getting asked for a username and password) ran the install.sh and on reboot of the Pi am getting the following error

' /home/pi/allsky.sh: line 30: 1567 Segmentation fault ./capture -gain 50 -delay 1000 -exposure 5000000 -filename "$FILENAME" -latitude "52.4N" -longitude "004.5W" -wbr 50 -wbb 90 textx 20 -fontcolor 255 255 255 -time 1 -help 0 -nodisplay 0 -timelapse 1 -type 1'

Any ideas as to what is causing this issue and how I get around it?

Apologies if this is a very easy fix and I am being a nugget, but have zero idea about software...as is obvious

ThomasJ1 (author)PaulS6272017-10-15

Hi Paul,

If you have 2 instances, you may want to double check the content of this file:
/home/pi/.config/lxsession/LXDE-pi/autostart
if allsky.sh is mentioned twice, you'll want to remove one of them.

As for the segmentation fault, try recompiling the "capture" binary: delete "capture" and run "make capture" in the terminal.

Also, if it doesn't solve the issue, try using a shorter delay: -delay 10 for example.

Aside from that, it all looks good. What version of the Pi do you have and what OS are you running?

Also, before running ./allsky.sh, make sure it's not already running in the background (it should start automatically when the Pi boots up). in the terminal, type "ps -aux" and it will list the processes running. If you see capture already, then it means it's already running in the background.

Thomas

PaulS627 (author)ThomasJ12017-10-15

Thomas

Will have a look later when I get home from work and will try the delete re-compile too.

I am running a Pi 3 with Raspbian on it.

The double instance only occurred on the last build and is not present on this one that I am currently fighting with. Only have the segmentation fault at present

Once I get this sorted will then have to get my head around what to do with the images and movies, but that is another thing for later :-)

PaulS627 (author)PaulS6272017-10-16

Tried it and did not work....but have a very weird situation now.

I re-ran the install.sh and rebooted and it worked ok, but with two instances running. If i go in and remove one of the startup lines from the file as you said, it then starts up asone instance, but with the Segmentation problem

ThomasJ1 (author)PaulS6272017-10-17

I would try to use the "kill" command to terminate all processes that relate to this project and start ./allsky.sh manually. That would be a good test to start.

RomanW9 (author)2017-10-08

I put a camera together using the RPi NOIR camera but would like to use this project to automate the video creation and upload. I use raspistill to capture the images. I'm not much of a programmer, so was wondering if anyone else has put together the code to make this happen?

ThomasJ1 (author)RomanW92017-10-10

Hey Rowan,

You can use avconv. It's a 1 line command that creates a video from a list of images.

I use it in this file (line 8): https://github.com/thomasjacquin/allsky/blob/maste...

The next line is where I upload the video to my website.

I'm sure you can get your project to work based on these 2 lines.

RandyH79 (author)2017-10-05

I am getting this same error:

pi@raspberrypi:~/allsky $ ./capture -width 640 -height 480 -exposure 5000000 -gamma 50 -type 1 -bin 1 -filename "observatory-site.PNG"

******************************************

*** Allsky Camera Software v0.1 | 2016 ***

******************************************

Capture images of the sky with a Raspberry Pi and an ASI Camera

Add -h or -help for available options

Author: Thomas Jacquin - <jacquin.thomas@gmail.com>

Contributors:

-Knut Olav Klo

-Daniel Johnsen

-Yang and Sam from ZWO

Listing Attached Cameras:

- 0 ZWO ASI120MC

ZWO ASI120MC Information:

- Resolution:1280x960

- Color Camera: bayer pattern:GR

- Initialise Camera OK

- Sensor temperature:26.700000

Capture Settings:

Image Type: ASI_IMG_RGB24

Resolution: 640x480

Quality: 3

Gain: 150

Exposure: 5000000µs

Brightness: 50

Gamma: 50

WB Red: 65

WB Blue: 85

Binning: 1

Delay: 10ms

USB Speed: 40

Text Overlay:

Text Position: 15px left, 25px top

Font Name: 0

Font Color: 255 , 0, 0

Font Line Type: 16

Font Size: 0.6

Font Line: 1

Flip Image: 0

Filename: observatory-site.PNG

Latitude: 60.7N

Longitude: 135.05W

No Display: 0

Timelapse: 0

Time: 1

Saving 5s exposure images every 10 ms

Press Ctrl+C to stop

./capture: symbol lookup error: ./capture: undefined symbol: _ZN2cv7putTextERNS_3MatERKSsNS_6Point_IiEEidNS_7Scalar_IdEEiib

when I run capture.

Info

pi@raspberrypi:~/allsky $ make capture

make: 'capture' is up to date.

pi@raspberrypi

cat /etc/os-release

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"

NAME="Raspbian GNU/Linux"

VERSION_ID="9"

VERSION="9 (stretch)"

ID=raspbian

ID_LIKE=debian

HOME_URL="http://www.raspbian.org/"

SUPPORT_URL="http://www.raspbian.org/RaspbianForums"

BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Thanks Randy.

ThomasJ1 (author)RandyH792017-10-05

Hi Randy,

Can you try deleting the "capture" binary and run "make capture" again? I have a feeling that some libraries got updated since I've built "capture".

Thomas

RandyH79 (author)ThomasJ12017-10-05

Perfect! Worked like a charm. Very new to the Pi technology. Originally built one of these with a Fit PC running windows and powered over Ethernet but windows kept crashing. Looking forward to it. Excellent adaptation! Thank you! Randy

GabrielS276 (author)2017-09-27

Thomas,

first of all, thank you for the absolutely amazing work you did here. It was a life saver for me. I'll be using the all sky camera (Pi3+ASI120MC) at my dark sky, mostly to capture meteors!

I do have a question, though: is there a way to modify the code to make a dark frame subtraction (perhaps using the SDK?) to reduce noise and hot pixels I get on my exposures?

I am not very experienced in programming in general, and have 0 experience in the Pi - this was my 1st project using it. I have more experience with programming Arduinos and basic Python.

Once again, thank you very much for sharing this project!

Clear skies,

Gabriel (Astrobin grsotnas)

ThomasJ1 (author)GabrielS2762017-09-27

Hi Gabriel,

Yes, there is a way to do it. The SDK has a function for it. I haven't implemented it but I'm planning to. After 2 years in the cold Yukon winter and the 20+ hours of sunlight in summer, the camera is showing a few hot pixels. I'll take a look at the SDK, it shouldn't be too complicated.

By the way, I love your gallery on Astrobin. Your milky way shots are surreal.

Thomas

apo77 (author)2017-09-03

Hi Thomas,

Could you help to share how to create the html scripts for creating time stamps and linking to daily .mp4 recordings? Thank you.

apo77

ThomasJ1 (author)apo772017-09-04

Sure, take a look there: https://github.com/thomasjacquin/allsky-website

I upload the videos with the time stamp already (timelapse.sh). They get uploaded to the "videos" folder on my website. I build the html using the mp4 filename. Have a look at index.php in the videos folder. Let me know how it goes.

Deepsky1 (author)2017-08-20

Hi Thomas,

I have an error showing up after allsky.sh loads. the error reads - ./capture:undefined symbol _ZN2cv7puttextERNS_3MatERKSsNS_Point_IiEEidNS_7Scalar_IdEEiib

This occurred after having my SD card fail and needing to re-install Raspian and re-install the all sky camera on a new card. Any ideas what may need to be changed?

Gerald

ThomasJ1 (author)Deepsky12017-08-20

Hey Gerald,

Did you see any errors when you ran the install.sh script? Which version of Raspbian are you using?
I would try compiling "capture" to make sure everything is installed properly. You just need to type: make capture

Let me know if that works.

Thomas

Deepsky1 (author)ThomasJ12017-08-21

Hi Thomas,

Thanks for your help again! The Raspian version is version 9. I do not recall any errors while running the install script. The good news is after compiling the capture program everything appears to work as it did before. I guess I am living up to my goal of learning something new each day!

Gerald

bill110366 (author)2017-08-20

Hi Thomas

I'm impressed by your project :) Really great stuff.

Probably a stupid question, but sorry I'm not a programmer, so I rather ask, instead of pass by!

I have a dusty Orion Starshoot autoguider and wonder if I could use that one with your program ? To be honest, I already tried it, cam not detected as You could imagine. But there's maybe some alternative way to get it alive?

Probably just a dream ! :)

Greatings from France

Eric

ThomasJ1 (author)bill1103662017-08-20

Hey Eric,

You won't be able to run the program with your Orion camera because it is using ZWO's libraries to talk to ASI cameras. I'm sure there's a way to use your camera on a Raspberry Pi, but you will need a program that talks to the Orion camera. The one I wrote only talks to ASI cameras.

Thomas

bill110366 (author)ThomasJ12017-08-21

Thanks for this quick answer. I expected it, but my level of knowledge in programming made me still hope a bit!!

There are drivers working on Raspberry, the project INDI is a possibility, but nothing like an automated Allsky like You made.

I think I rather gonna try to sell this Cam, and buy a ASI 120.

All the best

Eric

bill110366 (author)2017-08-20

Hi Thomas,

I discovered your great job here, and was just wondering about a (probably stupid ) question:

I have a sleeping and dusting Orion Startshoot cam, not used since a while now.

I tried your code with it, and, as every computer programmer (Which I'm not!) will expect, it didn't work of course. But is it like "no hope, not even in your dream!", or would it be feasible to get an SAAG alive on a Raspberry with your program?

I managed to get a SQM with a RP3 running 24h a day (well, at night actually), and i'd love to have an Allsky available beside that.

Regards, and Hello from France

Eric

Deepsky1 (author)2017-08-15

Hi Thomas,

I reset the delay to the default (1000) and so far has been saving images appropriately for the last 40 minutes. I was afraid it was something simple I was missing. Again thanks for sharing this awesome project!

Gerald

ThomasJ1 (author)Deepsky12017-08-15

Glad it's working fine for you now. I will take a look at the delay option. I've also had strange behaviour when playing with this value so thanks for reporting the issue.

Deepsky1 (author)2017-08-15

Hi Thomas,

This is a great project! I am struggling to get images to save consistently. There will be 10-14 images in the capture file after a night trial run. 1-2 of those will be a "unrecognizable jpg format. The timelapse script will produce an mp4 format video of the few frames that were saved. Any suggestions on where to look?

ThomasJ1 (author)Deepsky12017-08-15

Hi,

What are your settings in allsky.sh? I have seen that behavior when I tried to use short exposures (under a second). Also, what delay are you using?

Deepsky1 (author)ThomasJ12017-08-15

Hi Thomas,

Thanks for the prompt response!

I have a 20 second delay between pictures, and I did not change the exposure from what was in the original script. Do I need to change anything in the capture file? Attached below is the allsky.sh file.

Thanks for your reply,

Gerald

#!/bin/bash

echo "Starting allsky camera..."
cd /home/pi/allsky

FILENAME="Barksdale.jpg"

# Set upload to false if you don't want to upload the latest image to your website
UPLOAD=true

# Set -help to 1 for full list of arguments
# Set -nodisplay to 1 on Raspbian Lite and other OS without Desktop environments

ls "$FILENAME" | entr ./saveImage.sh "$FILENAME" "$UPLOAD" & \
./capture \
-gain 50 \
-delay 20000 \
-exposure 5000000 \
-filename "$FILENAME" \
-latitude "46.59N" \
-longitude "91.08W" \
-wbr 50 \
-wbb 90 \
-textx 20 \
-fontcolor 255 255 255 \
-time 1 \
-help 0 \
-nodisplay 0 \
-timelapse 1 \
-type 1

ThomasJ1 (author)Deepsky12017-08-15

Hi Gerald,

I will try at home with your settings to see if I can reproduce the issue. In the mean time, try setting the delay to its default value (1000) and see if it happens again. That would be a good test to help me locate the problem.

apo77 (author)2017-05-24

Hi Thomas,

My Allsky cam is working fine and can save images, creating mp4, uploading image to my webpage. But... it can not properly work for a whole day, sometime 2 hrs, sometime 4-6 hrs, then stop working. The Raspbian system still working for web browsing, or can manually restart the allsky.sh.

Tried to swap cameras, use Lan or wifi for image uploading, replaced MicroSD cards, replaced USB power supplies, disable the screen off and power saving process, also tried to stop the image resize process but all no success to make the allsky process run for longer than 12 hours.

I discovered the process is running smoother at daytime period (no image saving and uploading). As the uploading to FTP file size is quite large (~600kb when lens is coved, ASI120 MM/MC) for my ADSL internet service, i tried to reduce the image quality to cut the file size to improve the uploading speed. However, even i modified the quality values from 95% to 50% but the uploading file size stills no change (~600kb when lens is coved). May be this is normal for a totally dark image.

Any suggestion to me for my trouble shooting? Thanks in advanced.

Raymond.

ThomasJ1 (author)apo772017-05-24

Hi Raymond,

Regarding the file size, I have an ASI224MC and it's rare for me to upload files larger than 250kb. That's when I have lots of features on the image (clouds or aurora). For a black image that should be much less. What are your settings? Can you paste the content of allsky.sh?

Try decreasing the size of the image before upload instead of decreasing the quality. Also make sure to use JPG instead of PNG to cut the size even more.

This is what I use for example in saveImage.sh: convert "$1" -resize 962x720 -gravity East -chop 2x0 "$1-resize.jpg";

Regarding the instability, I had the same kind of problem when my SD card started to fail. Like any computer, when there is a power cut or an improper shutdown, some blocks of memory can get corrupted during a write operation and lead to an unstable operating system. You said you swapped the micro SD so we can probably rule that out.

When you say it stops working, does it crash? Is there any message in the console?

Thomas

apo77 (author)ThomasJ12017-05-25

Hi Thomas,

Thanks for the reply. I use the default allsky.sh setting and using same script as yours for image resizing. Also tried to use size reduced images for FTP upload. Just changed the FTP address to my site. I will show the contents of my allsky.sh when back to home tonight.

There is no error message in the command console and no crash. Desktop and console are normal except the allsky process is stopped but it stills showing 7-8% cpu usage for capture process in the task monitor.

I started with "capture" only last night (without saving image and uploading process) after dinner and found it can run until the timelapse conversion is done at morning.

Raymond

Below is the script of the all sky.sh

----------------------------------------------

#!/bin/bash

echo "Starting allsky camera..."

cd /home/pi/allsky

FILENAME="image.jpg"

# Set upload to false if you don't want to upload the latest image to your website

UPLOAD=true

# Set -help to 1 for full list of arguments

# Set -nodisplay to 1 on Raspbian Lite and other OS without Desktop environments

ls "$FILENAME" | entr ./saveImage.sh "$FILENAME" "$UPLOAD" & \

./capture \

-gain 150 \

-exposure 5000000 \

-filename "$FILENAME" \

-latitude "22.27N" \

-longitude "114.08E" \

-wbr 53 \

-wbb 80 \

-textx20 \

-fontcolor255 255 255 \

-time 1 \

-help 0 \

-nodisplay 0 \

-timelapse 1

ThomasJ1 (author)apo772017-05-25

Hi Raymond, the fact that capture is still running is a good sign. That means the issue comes from one of the scripts.

Just to make sure though, is your time set correctly on your Pi? I see from your GPS info that you are in Hong Kong. There's a binary called sunwait that return the civil twilight for your given GPS coordinates. Let's say that the civil twilight at sunrise happens at 5:30am, then the capture will stop capturing images at 5:30am but it will continue running in the background until it's dark again. So it's important that your Pi clock is set correctly.

Can you also run a session where you are just saving images but not uploading? If it runs fine, we'll know it probably breaks during upload.

Also, you could try adding -width 640 and -height 480 to reduce your image size by 4 and see if it works better.

apo77 (author)ThomasJ12017-05-25

Hi Thomas,

Yes, have double checked the system time is correctly setup. Tried to set for local image saving only, can't pass for 10 hrs. Tried reduce the image size to 70% before current saving and FTP upload, can't pass for 10 hrs. The most longest working mode is to allow capture image only (this process is continue running even at day time but no current image saving and FTP upload), it can pass 12 hrs until the timelapse.sh is triggered. I will disable the timelapse to see if it can run longer.

I will find heatsinks or cooling fan for the pi3 board to see if it can get some improvement. Will also find a faster MicroSD card for it (now using Sandisk 60/90Ms Ultra). BTW, what kind of MicroSD card you are using? Thanks again!

Raymond

ThomasJ1 (author)apo772017-05-26

Hi Raymond,

I have a 64GB Samsung evo. It works great. The heat sink is a good idea. Here in the Yukon the nights are cold so I never worried about overheating but it may be a problem in your location. Especially if it is enclosed in a small container. You should check the temperature when it's running: https://www.cyberciti.biz/faq/linux-find-out-raspb...

Also, since your image file is fairly large, I would increase the delay between images to give some time for the Pi to write the camera sensor data on file. You can use the option -delay 1000 to have a 1 second delay between shots (the default is 10ms).

apo77 (author)ThomasJ12017-05-30

Hi Thomas, i can't find any other solution to fix my case. Bought faster Samsung 128G EVO+ 90/100MB/s card, can't fix. Added 3 heat sinks and cooling fans, can't fix. Bought another Pi3 board, can't fix. Replaced with bigger DC supply, can't fix.. may be Pi3 hardware is not designed for me. Will stop the work and to watch any other users report similar issue and able to fix it. Thank you.

Raymond.

ThomasJ1 (author)apo772017-05-31

Hey Raymond, That's a really strange issue. I just received some Pi 3 and I compiled the code successfully. I runs without issues. Have you tried to add the -delay 1000 option? It is an option that will wait between shots (in ms). I use it for really short exposure. You should also try the -nodisplay 1 option. It saves the images but doesn't show a preview. It would be less CPU intensive. I'll let you know if I get similar behavior reported by users.

apo77 (author)ThomasJ12017-06-02

Hi Thomas, already tried to increase wait time to 1000ms before and no big difference. Will follow your advise to try the nodisplay option.

I just checked the system log (/var/log) and found there are so many unknown connection and cron jobs were executed at the background. I just switched off the ssh and vnc sevice to see if it can kill some unknown tasks and let the cam process to run more smoothly.

About This Instructable

102,981views

689favorites

License:

Bio: Most of the things I build usually relate to either astronomy, physics or woodworking in general.
More by ThomasJ1:Planets Photography GuideNewspaper StandSee Through Star Map
Add instructable to: