Skip to the content
PCBKitNew board
2 layers45.5 × 57 mmTimer2 timekeeping, the printed circuit board in 3D

Low-power real-time clock using ATmega32 Timer2 in asynchronous mode, driven by a 32.768 kHz watch crystal on TOSC1/TOSC2.

Size
45.5 × 57 mm
Copper layers
2
Thickness
1.6 mm
Parts
18
Nets
41
Pads
82
Tracks, vias
162, 8
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
1 Jul 2026
Updated
18 Jul 2026

Overview

Timer2 timekeeping is an open-source printed circuit board by Lerrinsyron, from the Lerrinsyron/ATmega32_Asynchronous_Timer2_Timekeeping repository on GitHub. It is a 2-layer board of 45.5 × 57 mm with 18 parts on 41 nets, routed with 162 tracks and 8 vias.

It is built around the ATMEGA32A-PU. Its parts include 4 capacitors, 4 resistors, 4 switches, 3 diodes and 1 IC. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

ATmega32 Asynchronous Timer2 Timekeeping

CT 321 — Group 13

Low-power real-time clock using ATmega32 Timer2 in asynchronous mode, driven by a 32.768 kHz watch crystal on TOSC1/TOSC2. The CPU sleeps between timer events; Timer2 keeps running and wakes the CPU exactly once per second.

Build

bash
cd firmware

# Real hardware
avr-gcc -mmcu=atmega32 -DF_CPU=8000000UL -Os -I/usr/avr/include \
  -o hex/firmware.elf src/main.c
avr-objcopy -O ihex -R .eeprom hex/firmware.elf hex/firmware.hex

# SimulIDE
avr-gcc -mmcu=atmega32 -DF_CPU=8000000UL -DSIMULIDE_MODE -Os -I/usr/avr/include \
  -o hex/firmware_simulide.elf src/main.c
avr-objcopy -O ihex -R .eeprom hex/firmware_simulide.elf hex/firmware_simulide.hex

If /usr/avr/include doesn't exist on your machine, run find /usr -name "io.h" | grep avr to find your avr-libc path.

SimulIDE

Load hex/firmware_simulide.hex into the ATmega32. Set Freq to 8000000 and Serial Monitor baud to 9600.

⚠️ Known limitation: SimulIDE cannot model the external 32.768 kHz crystal on TOSC1/TOSC2. The SIMULIDE_MODE build uses an internal-clock CTC fallback to produce the same 1-second tick. The KiCad design remains correct for real hardware.

Common Issues

Garbage output on serial monitor baud rate mismatch. Confirm SimulIDE Serial Monitor is set to 9600, not 4800.

"SLEEP instruction not fully implemented" warning expected. SimulIDE does not model power-save sleep. Ignore it; everything else works correctly.

Parts

18
QtyValueFootprintReferences
4SW_PushButton_Switch_THT:SW_PUSH_6mmSW1, SW2, SW3, SW4
3330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R3, R4
3LEDLED_THT:LED_D5.0mmD1, D2, D3
2100nFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC3, C4
212pFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC1, C2
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR2
1ATmega32A-PPackage_DIP:DIP-40_W15.24mmU1
1Conn_01x02Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1
1CrystalCrystal:Crystal_HC49-4H_VerticalY1

Questions

How big is the Timer2 timekeeping PCB?

It measures 45.5 × 57 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Timer2 timekeeping use?

18 parts, built around the ATMEGA32A-PU. 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 Timer2 timekeeping KiCad files?

From the Lerrinsyron/ATmega32_Asynchronous_Timer2_Timekeeping repository on GitHub, at the commit this page was made from: the board is kicad/Timer2_timekeeping.kicad_pcb and its schematic kicad/Timer2_timekeeping.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Timer2 timekeeping design in my own project?

Its repository states no licence, so its author keeps all rights: ask Lerrinsyron before reusing the design.

Similar boards

  • 2 layers347.7 × 146.6 mmMysterium pcb, the printed circuit board in 3D

    Mysterium pcb

    coseyfannitutti/mysterium

    TKL keyboard that can be entirely assembled using only through hole components, including usb type-c

    227 parts541GPL-3.0
  • 2 layers344.4 × 130.8 mmSesame, the printed circuit board in 3D

    Sesame

    str-dst/sesame

    Alice type ergo keyboard using only THT parts

    168 parts331
  • 2 layers364.4 × 167.3 mmRedherring, the printed circuit board in 3D

    Redherring

    dcpedit/redherring

    Red Herring Keyboard PCB and case files

    226 parts253CC-BY-4.0
  • 2 layers228 × 114 mmPlanck thk, the printed circuit board in 3D

    Planck thk

    olkb/planck_thk

    Planck Through Hole Kit

    134 parts169GPL-3.0
  • 2 layers371.5 × 145.3 mmBasketweave, the printed circuit board in 3D

    Basketweave

    null-ll/basketweave

    Through-hole Alice-style keyboard with arrow keys and a rotary encoder

    177 parts129GPL-2.0
  • 2 layers439 × 141.6 mmAek2 usb, the printed circuit board in 3D

    Aek2 usb

    str-dst/aek2_usb

    drop-in replacement pcb for the AEK II

    241 parts55
  • 2 layers317.3 × 154.8 mmLCK75, the printed circuit board in 3D

    LCK75

    lyso1/LCK75

    a 75% through-hole keyboard designed by myself with inspiration from the CFTKB Discipline and Yiancar Gingham

    207 parts45
  • 2 layers285.8 × 124.6 mmPunk75, the printed circuit board in 3D

    Punk75

    dsanchezseco/punk75

    Ortholinear keyboard with 75 keys and all components through hole

    194 parts44GPL-3.0