Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects

Witty Pi Mini: RTC + Power Management for Raspberry Pi

(2 customer reviews)


(  12.94GBP  /  16.02USD  /  21.88CAD  )

Witty Pi Mini adds RTC (DS3231SN) and power management to your Raspberry Pi, and can define complex ON/OFF sequence with simple script.

Out of stock


This product is retired, and its newer version is Witty Pi 3 Mini

Witty Pi Mini is the new member of Witty Pi family. It has the same functionality of Witty Pi 2, and it has pHAT shape (same dimension with Raspberry Pi Zero), which is perfect for Raspberry Pi Zero (and other models). Witty Pi Mini adds RTC and power management to your Raspberry Pi, and can define complex ON/OFF sequence with simple script.

Witty Pi Mini supports all Raspberry Pi models with 40-pin header, including A+, B+, 2B, Zero, Zero W, 3B, 3B+, 3A+ and 4B.

Witty Pi Mini is compatible with the newly released Raspberry Pi 4. However you will need to manually upgrade your wiringPi to version 2.52, by running these two commands:


sudo dpkg -i wiringpi-latest.deb

The version of wiringPi included in the OS (buster) is currently 2.50 and you have to upgrade it manually for now. Hopefully the new version will be included in official release in the future.

After installing the software on your Raspberry Pi, you can enjoy these amazing new features:

  • Single tap on the button to gracefully turn on/off Raspberry Pi.
  • After shutdown, the power for Raspberry Pi and all its USB peripherals are fully cut.
  • Raspberry Pi knows the correct time, even without accessing the Internet.
  • You can schedule the startup/shutdown of your Raspberry Pi.
  • You can even write a script to define complex ON/OFF sequence.

Same as Witty Pi 2, Witty Pi Mini uses a very accurate RTC chip (DS3231SN), which only has <160 seconds error per year. Also this RTC chip has temperature sensor built-in, so you can read the temperature around your Raspberry Pi via the software.

Witty Pi Mini uses a super capacitor (0.08F, or 80,000uF) for RTC off-power time keeping, and it can remember the time for ~17 hours without any external power supply.

The “dummy load” feature is still available and you can turn it on/off via a small switch on board. It is very useful when you use power bank as power supply, as it will draw peak current with certain interval, and keep your power bank alive.

Here is the user manual:

Package Content:

Each Witty Pi Mini package contains:

  • Witty Pi Mini board x 1
  • M2.5 x 10mm plastic screw x 4
  • 4mm spacer x 4
  • M2.5 plastic nut x 4


Dimension: 65mm x 30mm x 4mm
Weight: 9g (net weight)
Power In: DC 5V (via micro USB or via the unpopulated alternative connector)
Output Current: Maximum 2A for Raspberry Pi and its peripherals
Static Current:
~ 5mA in average with dummy load off (default)
~ 7mA in average with dummy load on
Operating Temperature: -30℃~80℃ (-22°F~176°F)
Storage Temperature: -40℃~85℃ (-40°F~185°F)
Humidity: 0~80%RH, no condensing


Witty Pi Mini uses the same software with Witty Pi 2. The software is written with Bash (Unix shell), and there is also a GUI application available (requires QT 5).


The source code is public on Github:

To install the software, just run these two commands:

pi@raspberrypi ~ $ wget

pi@raspberrypi ~ $ sudo sh

After the installation is done, turn off your Raspberry Pi, then physically mount Witty Pi Mini on it. Connect 5V DC power supply to the micro USB port on Witty Pi Mini, and tap the button to start.

After login to the system, just run these commands to launch the Witty Pi utility:

pi@raspberrypi ~ $ cd wittyPi

pi@raspberrypi ~/wittyPi $ sudo ./

More details about software installation and usage could be found on the user manual.

Confliction with 1-Wire Interface

If you have 1-Wire interface enabled and didn’t specify the GPIO pin for 1-Wire, it will use GPIO-4 and that conflict with Witty Pi. Witty Pi uses GPIO-4 to receive shutdown command, if GPIO-4 is also assigned to 1-Wire, Witty Pi’s software will receive shutdown command unexpectedly. If your Raspberry Pi always automatically shutdown itself after installing Witty Pi’s software, that most probably due to the confliction with 1-Wire interface.

When this happens, you most probably can not login your Raspberry Pi because it always shuts itself down before you get the chance to login. To solve this problem, you will need to take out the micro-SD card on your Raspberry Pi, and access its file system via a card reader. You need to edit the config.txt file in the “boot” volume to change the GPIO pin used by 1-Wire interface, or you can disable 1-Wire interface if you don’t need it for now. You need to find something like “dtoverlay=w1-gpio” in the file.

If you want 1-Wire to use GPIO-18, just change “dtoverlay=w1-gpio” to:


If you want to disable 1-Wire interface, just comment it out:


Save the file and eject your micro SD card, and put it back to your Raspberry Pi. Now your Raspberry Pi should be able to boot normally.

Python Wrapper

Lucas Langholf has developed a Python wrapper for Witty Pi, and packed it into a package. PyPi:

The source code is also available in GitHub:

Appreciate Lucas’ good work!

Schedule Script Generator

You can now use our web app to create and debug the schedule script for Witty Pi.

Witty Pi Schedule Script Generator Witty Pi Schedule Script Generator

Additional information

Weight 0.015 kg
Dimensions 6.5 × 5.6 × 1.9 cm

2 reviews for Witty Pi Mini: RTC + Power Management for Raspberry Pi

  1. Richard

    Handy little RTC module I bought 2 and have plans to buy more the scheduling functionality these add to the pi zero make for great data logging and battery powered systems.

  2. AnneFryszman

    Amazing product, not mentioning the super helpfull costumer support provided by brillant dear Tanya.

Add a review

Your email address will not be published. Required fields are marked *

Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.