ArcDice

An open-source digital dice built from an ATtiny13A — 1 KB of flash, 7 LEDs, one button, infinite rolls.

ArcDice assembled prototype with all 7 LEDs lit showing a 6

What is it?

ArcDice is a complete DIY electronics project: a pocket-sized digital dice you build yourself. Press the button, watch the 7-LED display animate, and a random number from 1 to 6 appears.

It’s built around an ATtiny13A — one of the smallest AVR microcontrollers Atmel makes, with just 1 KB of flash and 64 bytes of RAM. Driving 7 LEDs from only 4 I/O pins uses a clever charlieplexing scheme; the firmware fits in 598 bytes (58.4% of available flash).

The hardware is open (KiCad schematics + PCB layout, MIT licensed), the firmware is open (C++, 39 source files, host-native unit tests), and the BOM has 10 component lines / 26 parts — most of which you probably already have in your parts bin.

Hardware

PCB

Specifications

Hardware revisionv2.1 (KiCad)
PCB size~30 × 30 mm
Layers2 (top + bottom)
BOM10 component lines, 26 parts total
Power consumption (idle)< 10 µA (sleep mode)
Power consumption (roll)~15 mA peak (all 7 LEDs)
Build time~30 minutes (THT parts only)
LicenseMIT

Demo

ArcDice demo: button press animates LEDs to a 3

Press the button — the 7 LEDs animate for ~1.5 seconds, then settle on a random number from 1 to 6.

The dice face logic is unit-tested against the canonical patterns in include/dice.h, with a host-native test runner that runs on any laptop in under a second (pio test -e native).

Build it yourself

The project ships with everything you need:

Total cost of parts: roughly $8–12 if you’re sourcing everything new, less if you have a parts bin.

# Flash the firmware
avrdude -c usbasp -p attiny13 -U flash:w:ArcDice_v1.1.0_firmware.hex:i

The full build takes about 30 minutes if you’ve soldered through-hole before.

Download

Latest release: v1.1.0 — Hardware v2.1 (2026-09-11)

Asset Size Description
ArcDice_v1.1.0_firmware.hex 1.7 KB Pre-compiled ATtiny13A firmware
ArcDice_v2.1_gerber.zip 208 KB PCBWay-ready Gerber package
ArcDice_v2.1_bom.csv 2.7 KB Bill of Materials (10 lines, 26 parts)
ArcDice_v2.1_assembly_guide.md 4.8 KB 6-step build instructions

SHA256 (firmware):

3bb64ebeb0fcdb910fa978c3b29c1daba74df96bf88c5c467d6e60e317c714ee

Always verify before flashing.

License

MIT — see LICENSE. Schematics, PCB layout, and firmware are all released under the same terms. Feel free to fork, modify, and build your own version.