Thursday, February 1, 2018

The ESP32 Pinball RGB Matrix Animation Clock (Espirgbani)

Displays the time and random DMD animations from various pinball machines. The whole show is run by a single ESP32. The inspiration came from http://run-dmd.com/.

The project on github



LEDs

I got my two 64x32 LED panels from Aliexpress. Not surprisingly (with that price tag) they were refurbished and showed some signs of soldering rework on the boards. They do work perfectly fine though.

Frame

Easy if you have access to a laser cutter. I used 1/4 inch plywood for the back and grey tinted acrylic (expensive!) for the front. Right on top of the LED modules is a milky diffuser foil, which I got from broken LCD monitors. Hexagonal spacers hold everything together. Laser cutting is great. Stuff actually fits together just the way it should :D

Here's the Fusion360 preview

Here's the actual .dxf files


Everything runs of a re-purposed 19 V laptop power supply. The higher voltage makes it possible to use thin stealthy power cables when hanging the clock on a wall. I used two cheap step-down modules mounted to the back of the panels to generate the 5 V at up to 5 A they need.

PCB

Extremely straightforward. There's the ESP32, a 3.3 V regulator, a programming port, a SD card slot (from a dead RaspiA) and that's about it. All the tricky stuff happens in firmware.


Firmware

Features

  • Uses sprite_tm's I2S DMA driver to refresh the display at > 100 Hz with zero CPU load
  • Right now there's 3 graphical layers: animated background, time string, pinball animations
  • All framebuffers are RGBA. Does full alpha compositing (with pre-multiplied RGB values) according to the classic paper.
  • Uses a variable width & anti aliased bitmap fonts for writing the time. Supports the AngelCode bitmap font format and reads .bmp and binary .fnt files from the SD card.
  • Credit for collecting a huge number of pinball animations goes to https://rundmdimage.wordpress.com/. This clock supports the same image-file format.
  • Uses some nice C (almost) one liners to produce attractive animated backgrounds on the fly. It's like a poor mans shader
  • Has a simplistic (needs more work!) web-interface based on the excellent libesphttpd







10 comments:

  1. Nothing special

    ReplyDelete
  2. Nice job !!!
    I've tried dmd2gif but was not able to have a result ...
    Gif extract is workking ?

    ReplyDelete
  3. Nice job.

    A stupid question, but is it also possible to connect several boards together and acting as a large one (long)?
    Is it also possible to place text vertical instead of horizontal ... both?

    Hope you find some time to answer.

    Thanks a lot of sharing.

    ReplyDelete
  4. I would like to follow your build on this project. I can use a ESP32 dev board or order the custom PCB?

    ReplyDelete
  5. Great post much appreciate the time you took to write this.

    ReplyDelete
  6. Hi

    Would it be possible to request a copy of the KiCAD files ?

    ReplyDelete