New RTC & Power Management Option

10 posts / 0 new
Last post
New RTC & Power Management Option

There is a Pi real time clock and power management module that's become available from
It's now in it's second generation and includes a GUI based Pi power-up scheduler. This will allow the Pi to be woken up every X minutes to upload data, a very handy off the shelf alternative to large solar panels and batteries.

This circuitry could perhaps be incorporated into future Hivetool interface boards.
The code appears to be open source.
It's very well engineered by the looks of it.
Dimension: 65mm x 56mm x 19mm
Weight: 24g (net weight without battery)
LED Indicator: A white LED
Connector: 40-pin stackable header
Battery: CR2032 or CR2025 (for time keeping)
Power In: DC 5V (via micro USB or XH2.54 connector)
Output Current: Maximum 3A for Raspberry Pi and its peripherals
Static Current: ~ 1mA in average with dummy load off (default)

Emil's picture

There was my first order for this board sent...
This seems to be one of the things I have been looking for.

I bought one of these some

I bought one of these some time ago, but yours is surely more advanced.

Emil's picture
HAT pinout

Steven, it's not the RTC I'm looking for, but the on/off function that I think it's interesting

But with the Witty board there is a issue with the HAT LED display that use physical pin 7, which is the same as Witty use
I don't have the HAT board layout up and running at the moment, and wondering if someone can help me find out another pin I can use which is a IN pin and has high voltage as default, It seems that it could be
PIN 24 Reserved SPI
PIN 26 Reserved SPI
PIN 29 Unused
PIN 31 Unused
PIN 40 Reserved I2S

Is any of this pin available in one of the free H2, H6, H7, H8 or H9 Connectors? (the best would be 29 or 31)

Emil's picture
Witty Pi 2 and hive HAT

Now I have the norway1 hive up and running in test with Witty Pi 2. I use a Pi 2 and HAT board v 0.3
I also use hivetool v0.7.4 which works out of the box with the correct GPIO setup which I have commented in the 0.7.4 sw thread
There are some issues with pins used by HAT, but I use the GPIO pin 38 and 40 which is connected to pin 5 and 6 in the H6 connector for I2C

My setup
- Solder on the H6 connector on the HAT
- Install Witty SW
- Change the file

- Change Witty green pin to custom and connect it to H6 pin 6
- Change Witty yellow pin to custom and connect it to H6 pin 5

I have now for test used a new script which runs each 5 minutes from crontab insted of
sleep 180
gpio mode 21 out
(halt the Pi, shutdown and init 0 corrupts the Witty clock)

I have made a witty script that start Pi every hour, and waits for Pi to stop.
When it start it waits for crontab to start twice and then halt
In this way I have a chance to log in to the Pi each hour (I can also start it manually with the Witty button)

The next step will be to start the Pi, run once and then stop, I will also do this with 3G modem. In this way we can save a lot of power and still get a lot of readings.

A note to the pictures:
I used a 6 pin connector for H6 and have not added pin 1
A soldered two cables a grenn and blue for halt pin, and a yellow and orange for LED pin

H6 connector
Witty LED and Halt pin
Witty LED and Halt pin
Emil's picture
Power update, Witty Pi 2 don't work.

I have tried for a long time to get Witty Pi 2 to work, but there is so many issues that I haven't got it to work properly, and there is problems with date settings when the power is off. I have discussed this with Uugear support but with no good solution.
So now I have changed to use a relay instead which does the following:
Every hour from 05.58 to 19.58 it start up and runs for 9 minutes and then cut the power again. I have changed the cron settings so it runs at 1,5,10,15... so now it normally run 2 times.
The problem I have now is that my USB modem takes a long time to get ready for connect (I have tried 2 different types) now I have a Huawei modem which is the fastest.
I'm waiting for a TP-link 3G router to see if this is faster so the run time can be shortened more that the 9 minutes for 2 runs.
I'm worry for a corruption when just powering off the Pi, but so far it has gone OK.
The Timer is a cheap 12V relay bought from ebay.
I the moment I haven't run it on battery yet, but will soon try it to see how low I can get with power consumption and cheap solar panels.

Paul's picture
Any progress with Witty?

The Witty board looks very interesting, at least for prototyping and testing software. Have you given up on it? Did you say the RTC was not keeping time? Do you think I would be wasting my time tryin it? How does it switch power to the Pi? What processor does the Witty use? Is there a schematic online? Sorry for all the questions. Thanks!

Emil's picture
Yes I gave it up

The witty pi 2 was a mess working with, It seems very promising in the start, but after a while the power steering didn't work properly. Sometimes the board stopped the Pi but the power was still on. and most of the times it didn't start when it was supposed to. There was also problems with the start point which had to be in the future. You can't set it to be like 6am, you have to set 6am and a date. So there was several problems with this card and I used a lot of time trying to figure out how to use it. I think the RTC was OK (but the shipped battery was from IKEA...). This is why I now have started using the 12V timer which is really easy to set up and works as it should. My next job here is to have a small 12V battery (or better this one to keep the relay, and a 5V USB battery package (maybe with internal solar panel) to run through the relay so this runs the Pi with the normal micro USB port. In this way I can run several hives and also a 4G router with the same small power source.

Paul's picture
Halt the system before killing power


To prevent file system corruption, maybe the last command in /home/hivetool/ should be halt. This will shut down the system (do a controlled shutdown of services,close files, flush buffers, etc.) and power down the Pi. What are you using as a RTC now? The DS3231 board works and with a simple mod plugs into the Hive Interface Board. Or do you just pull from ntp servers once you have a connection?

How would you like the power control system to work? We are working on a board using the nRF52 (BMD301) that could turn the Pi on and off.

Emil's picture
No halt

Here i'm running a bit on the edge. I just cut the power. This is because I try to get 2 runs before it stops to check that the readings are mostly correct and not just wrong the first time it start. I could have put in a halt/shutdown/init command in crontab, but I'm afraid that the time drifting on a system without RTC board could come in a deadlock situation where it just start up and the next command in crontab is shutdown.
I could have a counter in /tmp and then shutdown in after the second run. This would also probably save power.

My next project is the "A6 GPRS Pro Serial GPRS GSM Module" which can be used to connect to internet insted of just dial as a modem(SMS sending. This connects via serial post so hopefully this is much faster online than the USB modem which uses about 3 minutes to get ready.

Log in to post comments