Solar Powered Raspberry Pi Camera

Update: this project was featured in issue 92 of the official Raspberry Pi magazine (download as PDF, buy the issue or subscribe).

SSH-ing into a remote solar powered Raspberry Pi at the top of an apple tree has a special feeling — almost like commanding a spaceship where any mistake can cost you a lost link.

Raspberry Pi in a dummy security camera in a tree.
Raspberry Pi in a dummy security camera case placed in an apple tree with a 100Wp photovoltaic panel and a 12V battery for power.

I build this project to remotely monitor our countryside house.

Internet Connectivity

There are two options:

  1. A mobile USB modem attached directly to the Raspberry Pi using the point-to-point (PPP) protocol, or
  2. A standalone mobile modem/router creating a WiFi network.

I decided to go with a standalone modem that is plugged in at my neighbours house because of complexities involved in creating a reliable PPP connection.

Components

Total: $222 + $7 per month for a 10GB mobile data plan.

Notes

  • Avoid blocking the /dev/video0 device when not used to allow other things such as timelapse scripts to capture photos or record videos. This is hard with things like the Motion daemon which constantly blocks the video device source.
  • Use the official picamera Python library for accessing the camera and formatting the image and video to match the required output.
  • AutoSSH in combination with a custom systemd service is great for creating and maintaining a persistent SSH tunnel from Raspberry Pi to a remote server.
  • Rsync with hourly cron jobs is great for uploading and syncing photos and videos to a remote server for persistent storage. It also allows deleting older captures from Raspberry Pi while keeping them on the storage server.

Some of these scripts are available in this GitHub project repository.

Photos

Raspberry Pi 3 with a camera module inside a “dummy” security camera case.
Raspberry Pi with a camera module attached to a 12V battery charged by a 100Wp flexible solar panel.

Use Contact Form 7 to collect business leads and enquiries? I created Storage for Contact Form 7 plugin which stores them safely in WordPress database.

Get it Now →

8 Comments

  1. Alex says:

    Is there a solar controller b/w the battery and the solar panel? Also never seen the MikroTik before, will it reconnect if it happens to lose power? I want to do something similar with an RV.

    • Kaspars says:

      Yes, I call it a charge controller — this simple and cheap PMW solar controller (no MPPT).

      Also never seen the MikroTik before, will it reconnect if it happens to lose power?

      The mobile modem/router is actually connected to a permanent power supply at a nearby house so the Raspberry Pi connects to it over WiFi. I’ve seen Raspberry Pi change networks if one of them disconnects. However, it won’t do it if the WiFi network stays on and the modem connectivity drops, but that is usually handled by the modem as it will restart the connection.

  2. Richard says:

    What method are you powering the Pi off of the 12v battery?

  3. ga says:

    I love this kind of projects, thanks for sharing!

    I built a similar project, although it’s not in a tree ;)

    https://hackaday.io/project/28694-yet-another-raspberry-picam

  4. CJ says:

    Was looking for a solar solution… this might just to that!!! I want to make a weather station, but have it fully run on solar/battery.

    Want to build a weather station (my first raspberry project also) and have it be on full solar/battery and wifi to network. How long could it run on that battery?

    • Kaspars says:

      It really depends on the power consumption of the whole system. For example, a system using 2 watts on average (such as Raspberry Pi 3 with Wi-Fi connected) will need a 48Wh battery to last for 24 hours (24h x 2W = 48Wh) without any additional charging. A 48W solar panel would need just over an hour of full sun to recharge the battery completely. So I used a 80Wh battery and a 100W solar panel which has been sufficient to keep it running.

Leave a Reply