johnbradley / picameratraps

Raspberry Pi Camera Trap management software
MIT License
0 stars 0 forks source link

Test solar with small battery #5

Open johnbradley opened 1 year ago

johnbradley commented 1 year ago

Test to see if the PiJuice Solar Panel - 6 Watt and the PiJuice Zero 1200mAh(small) Battery can run for multiple days.

NOTE: This is testing with a really small battery to see if the 6 Watt solar panel is enough refill the battery each day. If this works we could build a smaller camera trap since the 12000 mAh battery is the largest component of the camera trap.

johnbradley commented 1 year ago

Test 1 - picture every minute

An initial test attempting to record 1 picture every 60 seconds for the time range 7am-9am,11am-1pm,4pm-7pm. I set the PiJuice to only stay powered for the the ranges. I set out the PiJuice around 4pm and it took pictures until 7pm. In the morning the Raspberry Pi didn't start up and the battery was empty when plugged in. 😔

To record images I used:

libcamera-still --timeout 10800000 --timelapse 60000 --datetime --nopreview 

This command saves images with a name like 0928183203.jpg and runs the entire time.

Next Steps

Test Multiple calls to libcamera-still

I think the libcamera-still keeps the camera active so if we could startup and shutdown quick enough we might be better off running multiple commands. The nice part of libcamera-still timelapse is the logic to accurately time the pictures is already there.

Use PiJuice minute_period feature

Instead of keeping the Raspberry Pi active the entire 3 hour period between 4pm and 7pm we could set a repeating alarm. Then we change the pi to wakeup, take a picture, and shutdown.

johnbradley commented 1 year ago

Cropped photo from 4pm:

Screenshot 2023-09-29 at 11 29 07 AM

Photo from 7pm: 0928190104

johnbradley commented 1 year ago

Test 2 - PiJuice with minute_period

This method turns the Raspberry Pi off between photos hopefully reducing battery usage. Taking pictures every minute is too often since the Raspberry pi seems to take around a minute to startup. So I will reduce the capture time to every 5 minutes and take 5 photos.

johnbradley commented 1 year ago

Test 2 -Continued

After testing the time it takes to capture JPEG images with libcamera-still(5 seconds) and reviewing some images I decided to try to record 30 seconds of video instead. Visually finding bugs in each image in isolation (especially if there is some wind) is really hard. The only way I could find them was flipping back and forth through multiple images. The libcamera-vid command records frames much faster.

ASIDE: There is a raw option with libcamera-still that looks able to capture images quickly. It requires some post processing of the raw images to convert into something usable, that I haven't figured out. So that may still be an option in the future.


I put the small camera outside connected to the solar panel at night on 10/1. Here is a photo taken the next day showing the camera and the quickly rigged up solar panel:

Screenshot 2023-10-03 at 7 48 41 PM

The first video it recorded was at: Mon 2 Oct 07:00:56 EDT 2023 The last video recorded was at: Tue 3 Oct 08:45:53 EDT 2023

So this is 25 hours which is certainly an improvement over the 3 hours we saw in the non-sleeping version. The down side is the solar panel wasn't able to completely refill the battery each day though.


I setup the 12000 mAh battery without a solar panel at night of 10/1 and it is still running. This is what the larger battery camera trap looks like:

Screenshot 2023-10-03 at 7 56 52 PM