ArcDice
An open-source digital dice built from an ATtiny13A — 1 KB of flash, 7 LEDs, one button, infinite rolls.
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
- MCU: ATtiny13A in DIP-8 (8-bit AVR, 1 KB flash, 64 B RAM, internal 9.6 MHz oscillator)
- Display: 7 red LEDs arranged in the classic dice-6 pattern, charlieplexed on PB0–PB3
- Input: Single tactile button (wake from sleep on press)
- Power: TP4056 Li-ion/LiPo charger module (USB-C or micro-USB variant) with built-in DW01 + FS8205 protection IC
- Cell: 1S Li-ion/LiPo (protected, user-supplied, ~600 mAh gives weeks of standby)
PCB
PCB front side (bare)
PCB back side (bare)
Specifications
| Hardware revision | v2.1 (KiCad) |
|---|---|
| PCB size | ~30 × 30 mm |
| Layers | 2 (top + bottom) |
| BOM | 10 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) |
| License | MIT |
Demo
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).
Gallery
All 7 LEDs lit — a 6
Side view — battery + TP4056 visible
Top-down view
Build it yourself
The project ships with everything you need:
- Pre-compiled firmware (
ArcDice_v1.1.0_firmware.hex) — flash with a $5 USBasp andavrdudein 30 seconds - Gerber package (
ArcDice_v2.1_gerber.zip) — upload the innerArchive.zipto PCBWay or JLCPCB; ~$5 for 5 boards - BOM CSV (
ArcDice_v2.1_bom.csv) — 10 lines with KiCad footprints and suggested supplier parts (Digi-Key / LCSC / Mouser) - Assembly guide — step-by-step build instructions with a troubleshooting table
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.