Twixie : a Cute 3-D Printed LED Hourglass That Feels Real⏳✨
by clumsypanda in Circuits > Clocks
69 Views, 5 Favorites, 0 Comments
Twixie : a Cute 3-D Printed LED Hourglass That Feels Real⏳✨
Have you ever found yourself mesmerized by the simple, ancient elegance of an hourglass?
That slow, perfect cascade of sand is a physical expression of time passing—something even the most accurate digital clocks can never truly recreate.
For my first Instructables project, I wanted to bring that magic into the modern world: to build a clock that blends the timeless beauty of an hourglass with the precision of contemporary electronics.
Welcome to Twixie.
This project is a deep dive into interactive design, combining custom 3D printing with smart sensing technology. Instead of simply placing two 8×8 LED matrices on a timer, I created a real-time physics simulation. With the help of an ADXL335 accelerometer, Twixie constantly senses gravity—you can pick it up, flip it over, and watch the digital sand instantly detect the new orientation and begin “falling” in the correct direction, just like a real hourglass.
If you're looking for a rewarding build that results in a unique, beautiful, and highly interactive piece of desk art, you're in the right place.
Let’s turn some components and filament into this adorable Twixie Hourglass 💖!
Supplies
Components
- Arduino Nano – 1
- MAX7219 8×8 LED Dot Matrix Displays – 2
- ADXL335 Accelerometer – 1
- Push Button – 1
- 5V Charging + Booster Module – 1
- 3.7V 600mAh Li-ion Battery – 1
- Connecting Wires (I used jumper wires)
- USB Cable for Arduino Nano – 1
- Perfboard (optional)
Tools Used
- Hot Glue Gun
- Soldering Iron
- Soldering Wire + Flux
- Helping Hand Magnifier
Sculpting the Vessel (3D Design)
The design is half the project! We need an enclosure that not only looks sleek but also securely houses all the components. I modeled a smooth, tapered case in Fusion 360 that mimics the iconic hourglass shape.
I printed the enclosure using a Bambu Lab P1S 3D printer. You may notice in the video that the top plate “disappears”—that’s because I removed it after the print was completed.
To make things easier for you, here are the STL files for the entire case.
The Electronic Heart (Wiring)
Start by tinning all your wires for cleaner and stronger solder joints. Use solder flux properly while tinning—it makes a huge difference in connection quality.
When cutting wires, measure their length precisely according to where each component will sit inside the 3D-printed case. Neat wire management makes the entire build look more professional.
Now, follow the circuit diagram and solder the components together:
Wiring the First MAX7219 (LED Matrix 1)
MAX7219 -> Arduino Nano
- VCC -> 5V
- GND -> GND
- DIN -> D5
- CS -> D6
- CLK -> D4
Wiring the Second MAX7219 (LED Matrix 2)
Connect the OUT pins of the first matrix to the second matrix:
OUT (Matrix 1) -> IN (Matrix 2)
- VCC -> VCC
- GND -> GND
- DOUT -> DIN
- CS -> CS
- CLK -> CLK
This way, both matrices form a daisy-chain and respond to the Arduino as a single extended display.
Wiring the ADXL335 Accelerometer
ADXL335 -> Arduino Nano
- VCC -> 5V
- GND -> GND
- X OUT -> A1
- Y OUT -> A2
The X and Y values are used to detect the orientation of the hourglass.
Charging + Booster Module
- Connect the input side to the 3.7V battery
- Connect the 5V output side to the 5V and GND pins of the Nano
This module charges the battery and boosts it to a stable 5V supply for the circuit.
Wiring the Push Button
- One side → “K” pin of the charging module
- Other side → Negative terminal of the 5V output side
This acts as your power control button.
NOTE : After soldering everything, apply hot glue to reinforce the joints and protect the wires from breaking—especially important in a handheld project like this.
How the Parts Work Together (Conceptual)
- The ADXL335 detects which side of the hourglass is currently facing upward.
- The Arduino Nano reads this data, determines which matrix is “top” and which is “bottom,” and triggers the corresponding sand animation.
- The two MAX7219 LED matrices display falling pixels that simulate digital sand.
- When you flip the hourglass, the accelerometer detects the orientation change, and the Arduino instantly reverses the animation—making the sand appear to fall in the opposite direction.
And just like that, your electronic heart is complete and ready for assembly!
Coding the Physics of Sand
I’ve uploaded the full source code for Twixie on my GitHub. You can download it directly from here.
Once downloaded, save the files inside a folder named hourglass.
Open the hourglass.ino file—this is the main program. The remaining files are supporting modules used by the code. I avoided using certain pre-made libraries because they often create upload issues on the Arduino Nano, so everything here is clean and ready to compile.
To upload the code:
- Open hourglass.ino in the Arduino IDE.
- Connect your Arduino Nano to your computer using the USB cable.
- In the IDE, select the correct board:
- Tools → Board → Arduino Nano
- Choose the appropriate COM port (as shown in the image).
- Click Upload.
After the upload completes, your code is ready—and so is the digital sand simulation at the heart of Twixie.
Bringing the Sand to Life
Now it’s time to assemble everything and bring Twixie to life!
Begin by placing all the soldered components onto the base plate of the 3D-printed model. Use a hot glue gun to secure each part firmly in place. Make sure the charging module and push button are aligned correctly with their designated slots in the case.
NOTE : Mount the accelerometer in the same orientation shown in the video. If its direction is changed, the LED “sand” will not flow correctly.
Attach all components to the base—except the LED matrices. These will be mounted on the top plate of the enclosure.
Once everything is positioned properly, close the hourglass by placing the top plate on the model and sealing it using super glue.
The Final Look
Twixie uses 60 glowing LEDs, with each falling LED representing 1 second. As a result, a full cycle of the LED drop marks almost 1 minute — taking about 1 minute and 2 seconds to complete👉🏻👈🏻.