Witty Pi is a new, reasonably priced ($16) add-on board for the Raspberry which provides a real time clock and power management features. This makes it ideal as a the base for a wide variety of projects. Its most promising feature is the ability to power up and power down the Pi using an integrated switch.
Shawn from UUGear very kindly sent me a Witty Pi board to try out. It’s a well made and good looking product with a HAT footprint. This allows it to securely sit on a Raspberry Pi Model A+ and B+ using the four mounting holes.
So lets take a look and see what it can do.
Features :
- Turn on/off the Pi with the on board switch
- Raspberry Pi and all its USB peripherals get fully powered down after shutdown
- Raspberry Pi keeps the correct time and date
- Schedule the startup/shutdown of your Raspberry Pi
The following video demonstrates most of these cool features :
Package Contents :
- Witty Pi board
- CR2032 battery x 1
- M2.5 x 11mm Copper Standoff x 4
- M2.5 screws x 8
Specification:
- Dimension: 65mm x 56mm x 19mm
- Weight: 23g
- LED Indicator: One, for halt and stand by breathing
- Connector: 40-pin dual row 2.54 mm pitch female & male header
- Battery: CR2032 or CR2025 (for time keeping)
- Power In: DC 5V (via micro USB port or white power jack)
- Output Current: Max 2A for Raspberry Pi and its peripherals
- Static Current: < 10mA
- Operating Temperature: 0℃~50℃
- Storage Temperature: -20℃~60℃
- Humidity: 0~80%RH, no condensing
Hardware Installation
Installing the hardware is easy. Pop in a CR2032 coin cell and plug it onto the GPIO header. The board comes with four brass standoffs which can be used to firmly attach the device to the Pi via the four mounting holes found on the A+, B+ and Pi 2.
The board uses GPIO17 and GPIO4 but these can be changed using the onboard jumpers if required. This is a nice feature and gives you some options if you need these particular GPIOs for other hardware.
With the board attached to the Pi the power on switch feature will work straight away. When you shutdown the Pi the board will cut the power. For the other features (such as the RTC and timed shutdowns) you need to install some additional software.
Software Installation
Setting up the software is really easy due to the well written installation script. This can be downloaded directly to the Pi using :
wget http://www.uugear.com/repo/WittyPi/installWittyPi.sh
Running the installation script is done with :
sudo sh installWittyPi.sh
This script will then :
- Enable I2C
- Install i2c-tools, if it is not installed yet
- Install wiringPi, if it is not installed yet
- Install Witty Pi programs, if they are not installed yet
The board is now fully functional with only two lines on the command line!
Witty Pi Utility
In the Witty Pi folder there is a script called wittyPi.sh which provides an easy way to configure the real time clock and scheduled startup and shutdown times. You can run it using :
sudo ./wittyPi.sh
and you will then be presented with a simple text interface :
The only thing to watch out for is that format you need to use to specify the startup time is slightly different to the format of the shutdown time.
I used this utility to set a couple of times and my Pi powered down and then correctly powered up an hour later. I changed the localisation settings using raspi-config and changed my system time from UTC to BST. The Witty Pi’s RTC was happy with this change and the scheduled timings still worked fine.
Future Development
The area I would really like to see more development in is the scheduled shutdown/startup. I would like to set a regular schedule so the Pi could wake up, perform an action (perhaps a take a photo?) and then shutdown. A great application for this would be un-attended timelapse photography. As the Pi would only require power while taking the photo it would keep power consumption to a minimum. This would drastically increase the total run time of a system running from batteries.
The Witty Pi user manual can be downloaded from the official site and covers all the installation steps with additional explanations and diagrams. At the time of writing this article the Witty Pi was available for only 13.83EUR / 10.15GBP / 15.58USD. That’s a small price to pay for being able to finally turn your Pi on and off without pulling out cables or messing around with your own scripts and switches.
4 Comments
Looks like a cracking addon. Would be nice to see if this is compatible with any cases. I currently have a Pimoroni Pibow. I dont mind drilling a hole for the power switch and getting an extra couple of layers to lift the top cover, but the card looks it overlaps the base of the Pi and a lot of cases are a very tight fit/
The board matches the standard HAT dimensions so follows the outline of the Pi. The switch and the power socket extend slightly beyond this boundary. Obviously the components on the board give it a certain height. I’ve not seen a case yet that would accommodate all the different HATs out there so I would expect a bit of modification would be required. What would be good if someone created a basic case that was double the height of the Pi as would fit in most of the addon boards and allow for extended GPIO headers etc. Trouble is too many cases are made to be pretty and are a pain when you want to do some real hardware hacking where you just need them to be functional.
Do you know if this works with media centre’s like OpenELEC or OSMC? That would be VERY handy.
is Witty Pi support openelec os ?