All posts

A Tardis clock with an RGB LED

A Tardis with doors that open, so you can keep something inside. It’s also a clock, and on top sits an RGB LED you control from outside, for example when a new email or chat message comes in.

A blue printed Tardis with a small screen above the doors and a green LED glowing on top.
The Tardis clock, with the LED set to green.

What you need

  • A small OLED screen
  • An ESP8266 board (Wemos D1 mini)
  • An RGB LED

Software

The Tardis is driven by a small microcontroller with Wi-Fi. Another board works too, such as an ESP32 or an Arduino with an Ethernet shield. I wrote the firmware in PlatformIO, but any other development environment will do.

To connect the Tardis to your Wi-Fi and to the API for the LED, change these lines in main.cpp:

const char* ssid     = "SSID_HERE";
const char* password = "PASSWORD_HERE";

String tardisAPI = "API_URL_HERE";

Once the firmware is on the board, the microcontroller calls the API every second. The API replies with JSON containing the key led and a value from 1 to 5:

  1. green, blinking
  2. green, steady
  3. blue, blinking
  4. blue, steady
  5. LED off

A reply looks like this, for example:

{
  "led": 3
}

If the LED blinks red, the Tardis has no Wi-Fi. If it’s steady red, the API’s reply isn’t valid JSON.

Enclosure

Exploded 3D design of the Tardis: roof with lamp, body, a separate door and the base.
The 3D design: separate parts that print without supports.

I printed the enclosure in blue PLA, but other materials work too. The STL files are in the download at the end of this post.

You glue the parts together. That was a deliberate choice: this way nothing needs to be printed on supports. Fix the electronics in place with hot glue, for example. For the “glass”, I stuck a piece of plastic from old packaging to the inside of the walls.

The Tardis with its front door open, showing the empty space inside.
With the door open, there’s room to keep something inside.

Electronics

Connect everything to the microcontroller like this:

  • D5 → red of the RGB LED
  • D6 → green of the RGB LED
  • D7 → blue of the RGB LED
  • D1 (SCL) → SCL of the OLED screen
  • D2 (SDA) → SDA of the OLED screen
Wiring diagram: the RGB LED on the left and the OLED screen on the right, wired to the Wemos board in the middle.
The wiring diagram.
Back of the Tardis: the board’s Wi-Fi module sits in a cut-out.
At the back, the board sits in a cut-out.

Download

Download the code and STL files (RAR, 30 kB)

Got an idea of your own?

Tell me what you’d like to make. A sketch or a few sentences is enough to get started.