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

Witty Pi 2: Realtime Clock and Power Management for Raspberry Pi

(5 customer reviews)


(  16.35GBP  /  20.24USD  /  27.64CAD  )

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

Out of stock


Reminder: Witty Pi 2 has been discontinued, and the newer version is Witty Pi 4.

Witty Pi 2 is the second generation of Witty Pi, which adds RTC and power management to your Raspberry Pi, and can define complex ON/OFF sequence with simple script. Witty Pi 2 supports all Raspberry Pi models with 40-pin header, including A+, B+, 2B, Zero, Zero W, 3B, 3B+, 3A+ and 4B.

Witty Pi 2 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.

Comparing to the old Witty Pi, Witty Pi 2 uses much better 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. The new “dummy load” feature is very useful when you use power bank as power supply, it will draw peak current with certain interval, and keep your power bank alive.

Here is the user manual:

Package Content:

Each Witty Pi 2 package contains:

  • Witty Pi 2 board x 1
  • CR2032 battery x 1
  • M2.5 x 11mm Copper Standoff x 4
  • M2.5 screws x 8


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)
~15mA 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


The Software for Witty Pi 2 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, reboot your Raspberry Pi and you are set.

To launch the Witty Pi utility, just run these commands:

pi@raspberrypi ~ $ cd wittyPi

pi@raspberrypi ~/wittyPi $ sudo ./

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

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

Related Tutorial

Use Witty Pi 2 to Build Solar Powered Time Lapse Camera

Use Witty Pi 2 to Build Solar Powered Time Lapse Camera

 Featured Projects that Use Witty Pi 2

Bat Pi 2: realtime batdetector with WLAN

Bat Pi 2: realtime batdetector with WLAN

Additional information

Weight 0.050 kg
Dimensions 6.5 × 5.6 × 1.9 cm

5 reviews for Witty Pi 2: Realtime Clock and Power Management for Raspberry Pi

  1. Mike

    An excellent add on for the Pi when in remote areas with no internet, and/or running from a battery supply and you need to manage power usage.
    Just set your scripts to run on boot, and have WittyPi do the shutdown and continue running your start and shutdown routines.
    A well built accessory, simple to operate.


    Le kit qu’il vous faut et que vous allez adoré. Je viens de le recevoir et il correspond complètement à mes attentes. Mon raspberry est en sécurité : l’alimentation est le point que je voulais sécuriser

    [Translation] It is the kit you need and you will love it. I just received it and it completely meets my expectations. My Raspberry Pi is safe: food is the point that I wanted to secure

  3. Nicolas

    Really nice H/W device, with degrees of customization in order to match your needs (for ie, power led and on/off button can be moved on the case if you want to package your PI like a small PC)

    Good h/w-s/w partitionning in order to go beyond single shutdown/wake-up registers in DS3231SN.

    It now supports 3 amp, which make easy to use a PI3 booting on an HDD (I am currently using PIDrive, and I need to check if the cable coming with PIDrive can be used when powering WittyPi instead of PI3).

    For NOOBS 2.4 users, there is now a workaround for autoboot.txt in NOOBS recovery partition: see procount’s post / may the 5th on (you have to “sudo mount /dev/mmcblk0p1 ” with NOOBS SDcard inserted in your PI, in order to replace bootcode.bin and create autoboot.txt)

  4. Anton

    great product and awesome support!

  5. seBASTARD

    I have been using this on my Raspberry PI 2 B for a while now. It works like a charm.

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.