I recently posted about a camera project, and I have another idea! Hear me out…
I am considering building a community CCTV system for a car-park in my neighbourhood. I have done some research on the legals and funding, and I think we’re alright on that front. So it just leaves the practical issues.
The main issue is that the locations are probably going to be without power. I have considered lashing up a combined power/network line from the nearest house to the first camera location, but with each location I am considering, the viability of this is cumbersome to start with, and gets progressively harder with each one.
I think the first location will be in Wi-Fi range, and we can put an external repeater on a nearby building to improve connectivity.
My hardware choices currently look like this:
- A Raspberry Pi 3B (replaced by a Pi Zero 2 when available)
- A 12M camera module
- A solar panel
- A lithium or lead-acid battery
- Small drive (e.g. mSATA) for reliable storage (optional)
The mode of operation looks like this:
- Wi-Fi device on the Pi is put into hotspot mode (so it does not join a network, it is joined by something else)
- Camera writes footage to the SD card in ~10 sec bursts
- File system is shared over the network using Samba etc.
- Remote system connects to the hotspot and “consumes” each finished file (i.e. saves it elsewhere and then deletes it from the camera Pi)
- If there are several cameras then the remote/central consumer would either connect to each one in turn, or would operate several Wi-Fi devices, so it can consume from several cameras simultaneously
The idea with using a hotspot on the camera Pi is that dropped connections can be resolved externally, rather than needing to shimmy up a lamppost for a reboot!
Now the main issue is how to power the device. I am mulling a lead acid battery for its capacity - it has to work 24 hours a day, even when there is no solar energy during the night. However, lithium may work - this device looks good but I suspect the panel and battery is not large enough.
The purpose of the footage consumer is to archive footage in a safe place, so that even if the device is vandalised or stolen, the footage will survive.
Ideas to reduce current consumption:
- Reduce resolution at night
- Reduce frame-rate at night
- Turn off Bluetooth
- Reduce CPU speed
- Reduce Wi-Fi power (depending on location)
- Do fewer Wi-Fi consumptions (e.g. less Wi-Fi activity during the day when the equipment is less likely to be interfered with)
I plan to do some current measurements based on real-world camera and Wi-Fi usage (using a multimeter). This will give some clues as to what capacity battery is required for a 24-hour cycle, and what panel will comfortably power this. There are some Adafruit/RPi hobby solutions on the web, but I fear they won’t cut the mustard. We will probably have lamp-post mounting options, including the recommended slanted angle of a sizeable panel. Does anyone have any recommendations on the solar/battery front?
I found this research on Pi power consumption under load. Given that I will start with a full-size Pi, and I expect my Wi-Fi load not to be trivial, I think aiming for the 1A bracket might be sensible (unfortunately current consumption data for the 12M camera module appears to be elusive).
The key takeaway from that article is this:
If the Raspberry PI were powered by a 1000mAh battery, it would last just under 1 hour.
So the battery I found would power it for just two hours in the dark! At a guess maybe I could make optimisations, but I doubt I’d be getting to double that figure, and even that would still fall short. I wonder if something like 10Ah would be better, for example this 6V lead-acid battery.