LEGO Batman Clock Hack

Holy Batman

Inspired by Dan Aldred‘s LEGO Clock hacks (http://www.tecoed.co.uk/darth-beats.html and http://www.tecoed.co.uk/yoda-tweets.html) I picked up a broken Batman clock from eBay for some hacking shenanigans.  I had several aims, based on the great work of Dan before me

  • Add a Pimoroni Scroll pHAT HD, which would allow both text and graphics to be displayed
  • Attempt to retain the existing button board
  • See if the on board piezo was usable
  • Light the white eyes behind the cowl

Holy Impregnability

The first problem was dismantling it.  While the join of the front and the back halves of the shell are easy to get into, breaking the glued fixings on the inside requires a fair amount of brute force and ignorance.  Thankfully I have an abundance of both 🙂

Once I had gained access to the internals I checked the piezo buzzer.  A quick test with a Micro:bit confirmed it was passive and could be driven with PWM signals to provide different musical notes.  I use the term “musical” loosely.

Holy Transistors

Now on to the build.  Using pinout.xyz to identify which pins the Scroll pHAT HD used this was wired to the pi zero with a section of ribbon cable.  The buttons and the piezo are all wired to the pi zero as well (piezo on GPIO18 as that’s a PWM channel).  I also added a micro USB breakout board from Adafruit.  The existing battery connectors have been removed from the shell and the breakout fits perfectly at one end.  The battery cover will have a notch cut out to allow a micro USB connection.  The breakout is soldered directly to a 5v pin on the pi zero.

Holy Rainbow

The last challenge was the lights in the head.  Unfortunately the eyes are painted on and the plastic is pink.  This does funky things to the lights so the colours are basically red, white or shades of pink between;  not what I needed.  Back to the work bench for some careful drilling.  The lights used are 5mm PL9823 which are a form of smart pixels (i.e. WS2812/neopixles).  Lesson learnt here: You cannot chain them for power (i.e. wire in series).  They must both be wired to 3v and Gnd directly.  Oh yeah, and while they’re meant to work at 5v they’re happy at 3v.

Holy Birthday Cake

My son was having his 8th birthday party around the time I finished the build.  His birthday cake was LEGO Batman themed (made by my very talented wife), so we added the hacked clock alongside it.  It was coded with two party pieces.

  1. Press a button on the back and it plays the start to the (original TV series) theme tune
  2. Press the head down and it “sings” happy birthday to him

Here’s the video of it in action

….and the cake

Holy Clockwork

I now have Batman running on my desk as a clock.  I know this is basically the same thing as its original design but this is waaaaaay cooler.  Hands up, I borrowed the clock code from the Pimoroni example.  In addition I added some code to connect to the Cheerlights API so the eyes change colour at the whim of the internet.  But the internet is fickle, so I added code to randomly pick a colour when the head is pressed.

Holy Incantation

The source for all this magic?  On my Github of course https://github.com/ForToffee/LEGO-Clock

Holy Showcase

Parts list

Holy Superlatives

Yes, all the titles are taken from the “Holy….” phrases that Robin used in the TV series, c/o Wikipedia

3 thoughts on “LEGO Batman Clock Hack

  1. Pingback: LEGO Batman Clock Hack « Adafruit Industries – Makers, hackers, artists, designers and engineers!

  2. Pingback: LEGO Batman Clock Hack - HudsonWerks

  3. Pingback: Holy Hacked LEGO Clock, Batman! | iotosphere - Internet of Things

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.