Close
0%
0%

Solar powered 24hr timelapse photography

A project using a solar powered Raspberry pi to wake up at midday and take a photo, each day for a year

Similar projects worth following
Raspberry Pi 5 has a ‘low power’ feature plus a Real Time Clock, which has a ‘wake up’ capability.

Seconds to wake up time can be inserted into a file which is read on going low power (Linux ‘shutdown’ but retaining power to the board). After the given seconds, the board powers up again.

This suggests a time lapse project:

I would like to take a mid-day photo of some apple trees throughout a year, to stitch in a film showing snow on bare trees, spring blossom, leafing up, growing apples, falling leaves.

Due to difficulty of getting power to the garden, I’m thinking of:

Solar panel plus battery with raspberry pi with camera, all boxed up and mounted.

Pi in low-power mode apart from brief mid-day on-time for the photo, plus an evening on-time to give myself a chance to connect and pull down photo’s or do any changes.

Bought: RaspberryPi 5, 2GB version running Raspberry OS Lite, with a passive heatsink to give the lightest load. Set with parameter "POWER_OFF_ON_HALT=1" to reduce load during off phase.

From RPi docs, for RPI5, to enable low power mode and wakeup with the Real Time Clock:

    $ sudo -E rpi-eeprom-config --edit

    and edit the following line

    POWER_OFF_ON_HALT=1

    test with

    $ echo +600 | sudo tee /sys/class/rtc/rtc0/wakealarm
    $ sudo halt

This sets on time to ten minutes, then powers the Pi off, after 10mins it should auto power on again.

Current status

Python program written to set the next required on time into the /sys/class/rtc/rtc0/wakealarm location and then power off. Currently during the testing phase the program, during the mid-day on time, simply saves a file containing a timestamp string rather than taking a photo. This tested, and powers up automatically at the right times, then powers down. The timestamp files are saved regularly. The Pi on-switch can be used to turn the Pi on at any time, which gives five minutes before the Pi auto shuts down again. So the user has five minutes to connect, and if required abort the shutdown.

The Python files are on this site, as power.py and also a systemd service file, power.service which is used to ensure power.py is run on boot up.

Obtained: two 2W, 6V solar panels, batteries, power management unit, pi plus camera module3.

Next step, change python file to take photos, wire all together and test it works. Then build box and stand for the whole lot. 


power.service

Systemd service file to start power.py on boot up

x-dbus-service - 380.00 bytes - 05/18/2025 at 11:48

Download

power.py

Python file to wake up at midday, take photo and shut down, then wake up at 18:00 for ten minutes for any required remote access.

x-python - 4.86 kB - 05/18/2025 at 11:47

Download

  • 1 × RaspberryPi 5 2GB version Pi5 has low power option, 2GB is lowest power version of the Pi5's
  • 1 × passive heatsink for Raspberry Pi 5 I used 'Low-profile Heatsink for Raspberry Pi 5' from PiHut, SKU: 105875
  • 2 × 6V 2W Solar Panel - ETFE (Voltaic P126) Small solar panel, purchased from PiHut
  • 3 × 18650 Lithium-ion Rechargeable Cell - 2500mAh 3.7V Batteries for solar power manager
  • 1 × Panel Mount Kit for Raspberry Pi Camera Module 3 Used to mount camera in box.

View all 7 components

  • Power Management unit

    bernie05/29/2025 at 10:14 0 comments

    Bought the power management unit and three batteries:

  • Solar Panels bought

    bernie05/22/2025 at 10:13 0 comments

    Bought two 2W solar panels, hoping this will give enough output.

    And another shot:

  • Test script as SystemD service

    bernie05/20/2025 at 14:35 0 comments

    Initial test script power.py loaded as a systemd service. This simply saves a datetime line to a file to show the Pi is waking up at midday each day.

    Create a file :

    /lib/systemd/system/power.service

    containing the following (with paths adjusted for your own script location):

        [Unit]
        Description=Runs Timelapse power cycles
        After=multi-user.target

        [Service]
        Type=idle
        ExecStart=/usr/bin/python3 /home/bernard/git/timelapse/power.py

        WorkingDirectory=/home/bernard/git/timelapse
        Restart=on-failure

        # Connects standard output to /dev/null
        StandardOutput=null

        # Connects standard error to journal
        StandardError=journal

        [Install]
        WantedBy=multi-user.target

    Then set permissions of the file

    sudo chown root:root /lib/systemd/system/power.service

    sudo chmod 644 /lib/systemd/system/power.service

    Enable the service

    sudo systemctl daemon-reload

    sudo systemctl enable power.service

    This starts /home/bernard/git/timelapse/power.py on boot up.

    Useful functions to test the service:

    sudo systemctl start power

    sudo systemctl stop power

    sudo systemctl restart power

    sudo systemctl status power

    sudo systemctl disable power

    Display last lines of the journal

    sudo journalctl -n

    Display and continuously print the latest journal entries

    sudo journalctl -f


  • Estimated power budget

    bernie05/18/2025 at 12:42 0 comments

    Power budget:

    Note: the 2GB version of the Pi5 has a tested current of less than 1A when running with lite OS, though possibly with a peak current higher than this on startup.

    Assume on-time of 20 mins, energy used by Pi:

    5V * 1A * 0.33h  = 1.7 watt hours (Wh)

    Assuming 0.05 Watt for standby during rest of day
    0.05W * 24h = 1.2 Wh.  (ignoring 20 mins less)

    Total energy required for 24hr = 3.0 Wh

    Waveshare power management unit, has 3x18650 Li-ion, and can give 3A output - so the possible higher startup current of the Pi is covered.

    Batteries are rated 3.7V, 2500mAh

    Max battery energy capacity 3 x 3.7V x 2.5Ah = 27.75 Wh

    So fully charged batteries have plenty of capacity.

    Assuming 6V 2.0W Solar panel available from PiHut.

    Assume UK weather only gets 1W, then after four hours of daylight:

      1.0(W) x 4(h) = 4.0 Wh

    So should get the 3Wh energy required per 24hr.

    However after further consideration: UK winter sun may produce less than 1W. This solar panel is advertised as 6V. If panel output drops below 6V, then the management unit may fail to work as it is advertised for an input of 6V and above. So decided to get two 6V solar panels and wire them in series to get a nominal 12V, together with the increased wattage output.

  • Low power usage

    bernie05/18/2025 at 12:07 0 comments

    In the off state (but retaining power to the board) power can be minimised with:

     $ sudo -E rpi-eeprom-config --edit

        and edit the following line

        POWER_OFF_ON_HALT=1

    The meter shows no current on power down (which can't be right since there's a red LED lit like the eye of Sauron), I'll guess 0.01 of an Amp, so power is 5v x 0.01a = 0.05w

  • Power demand

    bernie05/18/2025 at 12:02 0 comments

    Estimating power requirements. Raspberry Pi 5, 2G version, with passive heatsink. Testing the usb-c line gives around 0.5 Amp on powered up.

View all 6 project logs

Enjoy this project?

Share

Discussions

bernie wrote 05/29/2025 at 10:39 point

Power budget:

Note: the 2GB version of the Pi5 has a tested current of less than 1A when running with lite OS, though possibly with a peak current higher than this on startup.

Assume on-time of 20 mins, energy used by Pi:

5V * 1A * 0.33h  = 1.7 watt hours (Wh)

Assuming 0.05 Watt for standby during rest of day 0.05W * 24h = 1.2 Wh.  (ignoring 20 mins less)

Total energy required for 24hr = 3.0 Wh

Waveshare power management unit, has 3x18650 Li-ion, and can give 3A output - so the possible higher startup current of the Pi is covered.

Batteries are rated 3.7V, 2500mAh

Max battery energy capacity 3 x 3.7V x 2.5Ah = 27.75 Wh

So fully charged batteries have plenty of capacity.

Assuming 6V 2.0W Solar panel available from PiHut.

Assume UK weather only gets 1W, then after four hours of daylight:

  1.0(W) x 4(h) = 4.0 Wh

So should get the 3Wh energy required per 24hr.

However after further consideration: UK winter sun may produce less than 1W. This solar panel is advertised as 6V. If panel output drops below 6V, then the management unit may fail to work as it is advertised for an input of 6V and above. So decided to get two 6V solar panels and wire them in series to get a nominal 12V, together with the increased wattage output.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates