Witty Pi – real-time clock and power management for the Raspberry Pi – Review

I was sent one of these by Shawn at UUGear for review so here goes…

Information

Witty Pi is a real-time clock and power management HAT for the Raspberry Pi B+, A+ and Pi 2. It has the following features:

  • Real time clock powered by a CR2032 coin cell battery.
  • On/off button.
  • Scheduler for automated power-on and power-off.
  • LED to indicate activity (also acts as a ‘breathing’ indicator when it’s waiting to do something).
  • Extended GPIO pins.

You can configure whether or not the Pi will automatically switch on when you plug power into the Witty Pi by changing the red jumper. You can configure a GPIO pin to control the LED by moving the yellow jumper and connecting up a GPIO pin to the spare jumper pin. You can configure which GPIO pin reads the button press by moving the green jumper and connecting up a GPIO pin to the spare jumper pin.

Review

The Witty Pi fits snugly as a HAT on top of the Pi’s GPIO pins. The board provides extended GPIO pins so you don’t lose any GPIO functionality by using the board, which is good. The instruction manual, which you can download, includes instructions on how to download an installation script. The script initiates the downloading of the entire Github repository. This repository includes a script which syncs the time of the Pi to the real-time clock on the Witty Pi and also provides functions to set-up the scheduler to automatically shutdown the Pi and to re-activate it. This is extremely useful, for example, for when you only need the Pi up-and-running between specific times. It will take some digging into the scripts to find out how this is done to suit your own purposes.

I tested all the functions out. First of all, I booted up (by pressing the on/off switch) with an ethernet cable plugged into the Pi and wrote the time of the Pi to the real-time clock chip on the Witty Pi. Then, I disconnected the ethernet cable and rebooted. On reboot, the Witty Pi’s daemon script automatically ran and read the time from the Witty Pi and set the date/time on the Pi correctly. I then tried the utility to set scheduled shutdown and restart times. This worked a treat.

The on/off button sends a signal on GPIO 4 which the daemon script picks up on and sends a shutdown command to the Pi. This is especially handy if you’re running headless as it provides a much safer shutdown for the Pi rather than just pulling the power cable out. Needless to say, I tested this out a few times.

You can see all the in-built functions run in the demo below. It’s a bit long-winded, but if you want to see it all in action, this is your best bet.

Conclusion

This is one of those products that ‘just works’. It gives you a physical on/off button, keeps the time correctly, provides simple scheduling functions and also, vitally, gives you access to the GPIO pins that aren’t in use, which means that it can form the basis for almost any project you can imagine would benefit from real-time clock functionality. The instructions for using the product are also good.

I find it hard to fault, really. I suppose, if I was really picky I’d like to see some kind of web interface for the scheduler, which is a bit ‘raw’ in it’s present form, but you can, of course, write your own relatively easily. Shawn has told me that the included software will improve over time, which is great, so that’ll be something to watch out for.

With this in mind, I’m going to give the Witty Pi a solid, well-deserved rating of 9/10 with a firm recommendation.

The Witty Pi is currently on sale for just over £10 plus shipping from UUGear.

PIN entry system using a Raspberry Pi and Pimoroni Explorer HAT

Sandy Macdonald has taken a Pimoroni Explorer HAT and used it to create a PIN entry system. At the moment, the entry system lights up some LEDs and makes a buzzer sound, but obviously it could be extended to unlock a door, a box, or whatever you choose. He’s written it up as part of the Pimoroni learning portal but has done a brief write-up of it on his blog and linked from there to the Github repository containing the full write-up. Read the brief summary here or visit the full write-up here.

Prototype Swingometer powered by a Raspberry Pi

Pete Taylor, over at Kimondo.com, has written up his project to create an old-fashioned Swingometer. The Swingometer at the moment does not track the General Election results (on account of us not having had the election yet!) but instead “scrapes” a URL to obtain a number for the swing reading. It’s great stuff and Pete shows us how to wire up the servo that controls the swing arm and also the code he uses to drive the servo to make the arm move. Read about it here.

Clusters and parallel programming with MPI and Raspberry Pi

 has written an excellent tutorial on creating a cluster of Raspberry Pis (just two to start with) and using them to do some parallel programming. He uses the MPI library in Python to set-up communication between the two Pis. It’s a really interesting article which explains a lot about parallel programming and messaging protocols. Read it here.