Rolling in Miniature

Rolling in Miniature: A Compact Electronic Die

Introducing a tiny, minimalist electronic die project that packs a punch! With just 7 LEDs, an ATtiny25V, a CR1616 coin cell battery, and some passive components, this device is incredibly compact, measuring only 18mm x 18mm in size, 4.9mm in thickness, and weighing a mere 2.1 grams.

https://youtube.com/watch?v=E05Uq4TWpRk

This tiny electronic die features a single button, the roll button, which triggers the die to cycle through numbers 1 to 6 when held down. When the button is released, the scrolling slows down until the final change, at which point it switches to a randomly generated number using the XORShift random number generator algorithm. The XORShift algorithm is lightning-fast, compact in code, and maintains excellent randomness, making it a perfect fit for this project. The final value flashes several times before the die powers off after a few seconds.

Battery Life

The dice is powered by a CR1616 coin cell with a capacity of around 50-60mAh.

Current draw:

StateCurrent @ 3V
Off<0.1uA
Active2.4mA (average)

Some battery life calculations:

Number of rolls24,000 @ 3 seconds per roll (a quick press of the roll button)
Total duration20 hours

Rolling the dice 20 times…