Solar Powered Raspberry Pi Camera

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.


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


  • 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.


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.

Never lose a single business lead or enquiry again! Get my latest plugin Storage for Contact Form 7 now!

Learn More →


  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 ;)

Leave a Reply to Kaspars Cancel reply