RTC Hats for RPI


The first issue one encounters when trying to deploy BirdNET-Pi in the field is that of power management. This is followed closely by “How do I get the Pi to turn itself off? As it turns out, it’s pretty easy to get the Pi to turn itself off, simply adding a line to rc.local will do the trick.

How do I get the Pi to turn itself back on?

This is where things get a bit more complicated. As shipped, a Pi can’t turn itself on because it doesn’t know what the date/time is - it loses that info when it shuts off and it has no way of getting that information without being hooked up to the interwebs.

Your computer or phone has a component called a Real Time Clock (RTC). They left that component off of the RPI to reduce cost and complexity, Most RPIs get to connect to the interwebs and can update their time from there. When you take an RPI to the pasture or woods, that doesn’t happen.

There are a ton of devices called “Hats” that can be added to an RPI to expand the capability - cellular modems, gps, etc.

The first RTC Hat I used was a PiJuice. It came with a battery that allowed it to act as a UPS but that wasn’t all that useful for my purposes.

After much effort, I got it working and it has been pretty reliable. My issues were mostly figuring out how to configure it. The documentation is all over the place - there doesn’t appear to be one source of information for all aspects of configuration.

On my second unit, I used a WittyPi4. The price was similar to that of the PiJuice once the shipping (to U.S.) gets added even though the purchase price was much less.

The WittyPi4 has an interface for the RTC (and the GPIO pins as well) which is pretty handy for scheduling. There is also a web app that allows you to create a scheduling script, test it out, and copy and paste that script elsewhere. There is a CLI for with WittyPi4 that will allow you to edit or paste a schedule from your phone if you need to change it in the field.

WittyPi4 Schedule Script generator