I was asked if I could make a light-up hourglass with programmable timings for five different death scenes in Les Mis. Of course I said yes.

The structure is all wood, with a shaped acrylic face. Bending the acrylic was frustrating part. I used an 8-inch sona tube as a mold with quick clamps and a lot of tape. I overheated it in a few spots, and one corner never fully cooperated, so it got a dot of hot glue to hold it in place.

I routed changes to hold the acrylic and a pot for the battery pack to sit. I also created metal supports for the matrixes magnetic feet to grab on to.

For the finish, we went with stain instead of paint. It came out darker than I would have preferred.

The heart of the prop is an Adafruit Matrix Portal S3 running CircuitPython, driving a 32×64 LED matrix. The board has a built-in accelerometer, so it knows when it’s flipped, and a NeoPixel RGB LED I used to color-code each animation scene. I also wired in a button on the back so the actor can cycle through the animations and confirm the right one is loaded before a scene. The board requires a bit of fiddling to switch between “load files” mode and “run code” mode. It took some playing before I got a rhythm down.

It runs off a small emergency phone battery pack. Portable, self-contained, no cables on stage.

I made the animations in Adobe Animate using shape tweens and masks to keep the sand inside the glass. The sand is split into three elements: a top pile, a drip (timed to fall over 1 second), and a bottom pile. Getting the shape tweens to behave took some messing around, but once they did, the motion read well on the matrix.

The animation logic works like this: start black, wait for the hourglass to be flipped, play the sand falling, hold when the sand runs out, then fade back to black. In low light with compression and limited colors, some of the fade transitions got a little psychedelic.

I used ezgif to compress the files, since the board doesn’t have much storage. Ezgif has a great tools, including compression.

I started with Adafruit’s sample GIF animation code, which loads GIFs from a directory and plays them on the matrix. From there I built out the logic for the prop: each file gets a name, an assigned NeoPixel color, and a manually adjusted runtime. On startup it loads the first file, sets the NeoPixel to its color, and waits. Either for a button press to cycle to the next animation, or for the accelerometer to register a 180-degree flip.

Once the flip is detected, it plays the GIF at a modified frame rate, finishes, then loads the next file and sets the NeoPixel to the corresponding color, ready for the next scene. The color coding meant the actor could glance at the back of the prop and immediately know which animation was queued up.

Leave a Reply