

Binary clock
a DIY binary clock using the atmega48 microcontroller
- Size
- 100 × 80 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 20
- Nets
- 26
- Pads
- 75
- Tracks, vias
- 224, 25
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 17 Dec 2025
- Updated
- 22 Mar 2026
Overview
Binary clock is an open-source printed circuit board by DavidDubinin, from the DavidDubinin/binary-clock repository on GitHub. It is a 2-layer board of 100 × 80 mm with 20 parts on 26 nets, routed with 224 tracks and 25 vias.
It is built around the ATMEGA48-20PI. Its parts include 11 diodes, 3 switches, 2 connectors, 1 IC and 1 crystal. It belongs with the lEDs and displays boards and the AVR (ATmega, ATtiny) boards of this library.
Main components
1README
README.mdBINARY CLOCK SIGMA EDITION AVR CODE - ATMEGA48



Prüufung (Folie 1/2)
▶ Präsentation + Fachfragen (20min) Ihrer Lösung der Komplexaufgabe
Komplexaufgabe
▶ Binäre Ausgabe auf 11 LED’s mit hardware PWM Helligkeitssteuerung (OC1x-Pin)
▶ Steuerung über Taster (INT0,x, y)
▶ Sleepmode mit Beweis der reduzierten Leistungsaufnahme, Batterielaufzeit
▶ Zeitbasis über Timer und Uhrenquarz, mit Genauigkeitsmessung
▶ RS232 Debug-Interface (mindestens setzen und lesen der Zeit)
Fachfragen
▶ Im Rahmen der Prüfung werden wir Ihnen eine Schaltung (ähnlich der Ihrer Uhr)
vorgeben an der Sie live eine Aufgabe lösen werden.
▶ Als Hilfsmittel haben Sie hierfür Ihren Sourcecode sowie das Datenblatt des
ATmega.
//selbst gemessen
I_active= 937.00 μA
I_powersave= 168.91 μA
I_powersavesec = 6.96 μA
U=3.5V
Leistungsaufnahme
P_active = 937.00 μA * 3.5V = 3.2795mW
P_powersave = 168.91 μA * 3.5V = 591.185μW
P_powersavesec = 6.96 μA * 3.5V = 24.36μW
Bei Varta CR2032 mit Kapazität von 230 mAh:
Lebensdauer in Stunden = (Kapazität in Ah/Strom in A)
Lebensdauer = (0,230Ah/0,000937A) = 245,46 Stunden
Lebensdauer = (0,230Ah/0,00016891A) = 1.361,67 Stunden
d.h. 10,23 Tage (Ohne Sleepmode) und 56,74 Tage (Mit Sleepmode)
Und mit !!1s!!-Zeitbasis in Sleepmode:
Lebensdauer = (0,230Ah/0,00000696A) = 38.045,98 Stunden = 1.585,25 Tage = 4,34 Jahre
Das Delta zwischen den Leistungsaufnahmen im sleepmode mit ms oder sek Zeitbasis lässt sich dadurch erklären, dass bei der Millisekunden variante der Mikrocontroller wegen der hohen frequenz an Timer2 compare-match interrupts viel öfter aufwacht, um diese abzuarbeiten.
T=1.9998721s (an aus zyklus)
T/2 = 0.99993605
=> ((1s-0.99993605s)*1000*1000)/1s \≈ 64μs/1s = +64ppm
Die Uhr geht also etwas zu schnell. Hochgerechnet führt das zu einem wöchentlichen Drift von 64μs/1000/1000*(60*60*24*7)= +38.7072s
Das könnte man durch trial & error in der Software kompensieren, ähnlich wie bereits getan, um die Millisekunden-Zeitbasis zu implementieren.
Parts
20| Qty | Value | Footprint | References |
|---|---|---|---|
| 11 | LED | LED_THT:LED_D3.0mm | D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11 |
| 3 | SW_Push | Button_Switch_THT:SW_PUSH_6mm | SW1, SW2, SW3 |
| 1 | 3.3V CR2032 battery | Battery:BatteryHolder_Keystone_103_1x20mm | BT1 |
| 1 | ATmega48-20P | Package_DIP:DIP-28_W7.62mm_Socket_LongPads | U1 |
| 1 | AVR-ISP-6 | Connector_IDC:IDC-Header_2x03_P2.54mm_Vertical | J2 |
| 1 | Conn_01x03_Pin | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J1 |
| 1 | Crystal | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | Y1 |
| 1 | LOGO | LOGO | G*** |
Questions
How big is the Binary clock PCB?
It measures 100 × 80 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Binary clock use?
20 parts, built around the ATMEGA48-20PI. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Binary clock KiCad files?
From the DavidDubinin/binary-clock repository on GitHub, at the commit this page was made from: the board is binaryclock-kicad/binaryclock.kicad_pcb and its schematic binaryclock-kicad/binaryclock.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Binary clock design in my own project?
Its repository states no licence, so its author keeps all rights: ask DavidDubinin before reusing the design.
Similar boards
- 2 layers

- 2 layers

BinaryClock
tomlonca/SnP-BinaryClock
This project is about designing and implementing a binary clock using an AtMega48 microcontroller and a custom PCB.
17 parts - 2 layers100 × 160 mm

EinTaktReset
michAtEl/Bonsai-Modellcomputer
Es gibt auch eine Simulation des Lerncomputers (https://bonsai.pinyto.de/), die im digitalen Informatik-Schulbuch http://inf-schule.de verwendet wird.
45 parts2GPL-3.0 - 2 layers150 × 100 mm

- 2 layers66.9 × 74.5 mm

- 2 layers86.4 × 64.8 mm

- 2 layers36.2 × 26.8 mm

Esp32 minimal
atopile/atopile
Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️
20 parts4kMIT - 2 layers108.1 × 393.8 mm

Sweep compact ble
davidphilipbarr/Sweep
Sweep - a small promicro based keyboard inspired by the Ferris.
20 parts2.1k