Hauke’s Projects

Quick Thing: TARDIS Housing for Raspberry Pi modded for Raspberry Pi 4

This is just a quick note that I updated my Tardis housing for my media center to now hold a Raspberry Pi 4. The new version features:

  • An improved “POLICE public call BOX” sign
  • A hole for a 5 mm LED in the top for a shining light
  • The necessary holes for USB-C, 2x Micro-HDMI and Audio out
  • A removable top

The new TARDIS

Here is what it looks like:

The Tardis for the Raspberry Pi 4
The TARDIS for the Raspberry Pi 4

Printed on Fabtotum Personal Fabricator with E3D Lite hotend and Renkforce blue PLA (can’t really recommend this brand…).

The Flashlight

With this incarnation of the TARDIS, I wanted to have a flashlight in the top which once in a while would issue a nice pulsing light. So the model now includes a hole for a 5 mm LED to go into the top light cage:

The LED to go into the Tardis light
The LED to go into the TARDIS light

My media center runs on LibreELEC, so the software part below is targeted for that.


I used a white LED with UF = 3.2 V and IF = 20 mA. Since the Raspberry can only drive 16 mA directly from its GPIO pins, a transistor is needed as driver for safe operation. With the voltage drop across this transistor, a current-limiting resistor R2 for the LED was not required in my case – if you use a different LED, include one matching your LED’s IF/UF. I used GPIO18, since it is capable of hardware PWM – however, since LibreELEC (which I use as media center software) does not offer pigpio daemon, in the end I had to revert to software PWM – works nice enough after all 🙂 Here’s the circuit diagram:

Electronics for the flashlight


  • Any general purpose NPN transistor should be fine
  • Value of R1 is not too important, 1 kΩ upwards should be fine, do not exceed perhaps 10 kΩ or so.
  • 3.3V are readily available at e.g. pin 1 of the GPIO header
  • GPIO18 is pin 12 on the header. Since in the end it’s software PWM, any free GPIO pin should be OK. Just make sure to update code accordingly.
  • Nearest GND would be pin 6 or pin 9


First, you need to install the Raspberry Pi Tools addon for LibreELEC, which contains the RPi.GPIO library.

Next, put the following Python script into a directory of your choice (I use /storage/tardislight/tardislight.py):

Modify Speed and random range to your liking. The script as it is will produce one light pulse slowly increasing and then decreasing again, on average every 7.5 minutes, i.e. 8 times per hour.

Finally, create /storage/.config/autostart.sh (or modify the existing one). Include these lines:

Reboot LibreELEC, and enjoy 🙂


Here’s a video showing how it looks like:

Make Your Own

Files can be found on Thingiverse or be downloaded here. The top will need support, but make sure not to put support into the LED hole – I guess it will be very difficult to remove.

When I printed mine, I took wrong measurements – the HDMI slots were off by ~1 mm. The files are corrected, but I did not print it again. If you do, would be glad if you’d leave a comment if the holes are now correct.

Merry Christmas everyone!

Leave a Reply

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

Scroll to top