

Mirrorclock2
Digital clock normal and mirrored
- Size
- 220 × 140 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 215
- Nets
- 162
- Pads
- 626
- Tracks, vias
- 1,056, 45
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 4 Jul 2026
- Updated
- 12 Aug 2026
Overview
Mirrorclock2 is an open-source printed circuit board by tkmmiyaji, from the tkmmiyaji/Mirrorclock2 repository on GitHub. It is a 2-layer board of 220 × 140 mm with 215 parts on 162 nets, routed with 1,056 tracks and 45 vias.
It is built around the 74HC390D. Its parts include 154 diodes, 22 resistors, 12 ICs, 5 switches and 3 capacitors. It belongs with the AVR (ATmega, ATtiny) boards of this library.
Main components
1README
README.mdMirrorclock2 --- Through the Looking Glass and How the Digital Clock Looks
鏡の国のデジタル時計 Ver. 2.2 b
by Homebrew and Electronics Lab Cosmic Web, 16 Jul, 2026
Summary
This repository contains the hardware designs (KiCAD) and the software (AVR assembly language). The hardware design and software are distributed with the Beerware license. See LICENSE.md
Hardware
The KiCAD Ver. 10 project files (incl. kicad_pro, kicad_pcb, and kicad_sch files are included with necessary ./KiCAD.
- AVR: The 28-dip pachage of the Atmega48,88,168,328 and variants should work.
- The resistor footprints on the PCB accept either THT (3 DIP pitches/7.62mm between holes) or SMD (1206) components. The LED footprints accept 3mm, 5mm diameter ones that have one DIP pitch (2.54mm) between leads. You may be able to place SMD LEDs if you dare.
- Place the tilt switch diagonally, so that the display is stably in the normal mode (see below) when it is placed on a level surface. See ./Gallery/Tilt_Switch_small.jpg.
Hard-to-find components
- The temperature-compensated Crytsal Module Kyocera KTXO-18 (12.8MHz) or Mercury VCTCXO VM39S5G is used. The latter can be purchased at Akizuki Denshi Tsuusho in Akihabara, Tokyo (https://akizukidenshi.com/catalog/g/g107275/) (availbale as of July, 2026). There may be easier-to find equivalent SMD parts, but to use these a modification in the PCB footprint is required.
Software AVRClock2
This software is written in the assmbly language and can be compiled with avra (https://github.com/Ro5bert/avra) and uploaded to the chip using avrdude (https://github.com/avrdudes/avrdude/), both included in the standard repositories of many Linux distros.
How to Compile/Install (Linux)
- Install avrdude and avra to your system.
- Connect an ISP programmer to the ISP header (6-pin) on board. Watch the orientation. Match the ISP connector bump to that of the PCB drawing.
- Go to directory: ./AVRA
- Open Makefile in your editor and edit the lines with "MCU_TARGET =" and "PROGRAMMER =" to your chip and programmer respectively. Check the port where the programmer is connected and adjust the PORT=/dev/ttyUSB0 line if needed.
- Also the LED brightness auto-adjustment parameters can be set by editing "FA_LIM =" and "BR_LIM =" lines. See Makefile comments for more explanations.
- From the shell:
SHELL>make # This compiles the program.
SHELL>make install # This installs (uploads) the binary to the chip.
Usage Instructions
- Connect an external 12V power source.
- It is highly recommended to connect a 9V rectangular battery (called 006P in Japan) for time backup.
- When the unit turns on or reset with the RST button, the clock displays 00:00 00. The clock starts running.
- Time Adjustment: There are three buttons aligned vertically. With a long (~2 sec) push of the central button (MODE), the system enters the hour adjustment mode. Dots in the hour zone blink. You can adjust hours by pushing the upper (ADJ_FWD) and/or lower (ADJ_BWD) buttons. One more pressing of the central button leads to the minute adjustment mode. Dots in the minute zone blink. Use the ADJ_FWD and/or ADJ_BWD buttons to adjust the minute. Note that a long push will not make the forward/backward move fast. Whenever the minute is changed, the second zone is reset to zero. When you want to adjust the clock to a second level, push the ADJ_FWD/ADJ_BWD button at the exact moment the reference clock ticks a zero second.
- One more push of the MODE will return the clock to the normal mode.
- LED Check: In the normal mode, pressing the upper button will turn on all the LEDs.
- LED brightness changes responding to the ambient brightness. A press of the lower button shows some calibration and brightness information. There is a trimpot for limited adjustments of the ambient-to-LED brightness relation. Wider range of adjustment is possible in the software (See above).
- Normal Mode: When the clock is right-side up or on a level surface (i.e. the HH:MM display is above the circuts), it displays the clock normally.
- Mirror Mode: Turn the clock upside down and look through a mirror! The roles of ADJ_FWD and ADJ_BWD buttons are also exchanged in the time adjustment.
Parts
215| Qty | Value | Footprint | References |
|---|---|---|---|
| 142 | LED | TM_Foot:LED_MULTI | D1, D10, D11, D100, D101, D102, D103, D104, D105, D106, D107, D108, D111, D112, D113, D114 +126 |
| 15 | R220 | TM_foot:R_THT_SMD1206 | R6, R7, R8, R9, R10, R11, R12, R14, R15, R16, R17, R18, R19, R20, R21 |
| 8 | 4N35 | Package_DIP:DIP-6_W7.62mm | U1, U2, U3, U4, U5, U6, U7, U8 |
| 8 | Jumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP1, JP2, JP3, JP4, JP5, JP6, JP7, JP8 |
| 8 | LED | TM_foot:LED_MULTI_SIMPLE | D49, D50, D79, D80, D109, D110, D139, D140 |
| 5 | 10K | TM_foot:R_THT_SMD1206 | R2, R3, R4, R22, R23 |
| 4 | MountingHole | MountingHole:MountingHole_3.2mm_M3_ISO7380 | H4, H4, H4, H4 |
| 2 | 0.1uF | Capacitor_THT:C_Disc_D3.4mm_W2.1mm_P2.50mm | C2, C3 |
| 2 | 1N5819 | Diode_THT:D_DO-41_SOD81_P7.62mm_Horizontal | D5, D6 |
| 1 | 100μF | Capacitor_THT:CP_Radial_D6.3mm_P2.50mm | C1 |
| 1 | 15K | TM_foot:R_THT_SMD1206 | R5 |
| 1 | 1N4148 | Diode_THT:D_DO-35_SOD27_P7.62mm_Horizontal | D4 |
| 1 | 1N5230 4.7V Zener | Diode_THT:D_DO-34_SOD68_P7.62mm_Horizontal | D3 |
| 1 | 50K | Potentiometer_THT:Potentiometer_Runtron_RM-065_Vertical | RV1 |
| 1 | 5CME-3A(5V) | TM_Foot:DCDC-Module-Drok | U11 |
| 1 | 74HC390 | Package_DIP:DIP-16_W7.62mm | U10 |
| 1 | 9V | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | BT1 |
| 1 | ADJ_BWD | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW2 |
| 1 | ADJ_FWD | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW4 |
| 1 | ATMEGA48-88-168-328 | Package_DIP:DIP-28_W7.62mm | IC1 |
| 1 | AVR-ISP-6 | TM_foot:AVRISP-6P | CON1 |
| 1 | DC 12V | Connector_BarrelJack:BarrelJack_Horizontal | CON2 |
| 1 | MODE | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW3 |
| 1 | R200 | TM_foot:R_THT_SMD1206 | R13 |
| 1 | R_Network08_US | Resistor_THT:R_Array_SIP9 | RN1 |
| 1 | R_PHOTO | OptoDevice:R_LDR_5.1x4.3mm_P3.4mm_Vertical | RP2 |
| 1 | Reset | Button_Switch_THT:SW_PUSH_6mm | SW1 |
| 1 | SW_tilt | TM_foot:Sw_tilt_holes | SW5 |
| 1 | ULN2003A/TBD62003A | Package_DIP:DIP-16_W7.62mm | U12 |
| 1 | XTL UNIT 12.8MHz | TM_Foot:Crystal_M39S_KTXO18 | X1 |
Questions
How big is the Mirrorclock2 PCB?
It measures 220 × 140 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Mirrorclock2 use?
215 parts, built around the 74HC390D. 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 Mirrorclock2 KiCad files?
From the tkmmiyaji/Mirrorclock2 repository on GitHub, at the commit this page was made from: the board is KiCAD/Mirrorclock2.kicad_pcb and its schematic KiCAD/LEDArrayL1.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Mirrorclock2 design in my own project?
Its repository states no licence, so its author keeps all rights: ask tkmmiyaji before reusing the design.
Similar boards
- 2 layers152.9 × 74.9 mm

- 2 layers124.5 × 64.8 mm

Pa3gyf gpsdocxo-2016-pll r2
jandejongh/pa3gyf-gpsdocxo
GPS-Disciplined OCXO (In Progress)
298 parts2Apache-2.0 - 2 layers100 × 100 mm

- 2 layers293.6 × 117.7 mm

Ursaminor pcb
markstory/ursa-minor-keyboard
Design and schematics for the ursaminor keyboard
215 parts23 - 2 layers170 × 140 mm

LibreVerter Controller
imendizabal/LibreVerter
Open Source Power Converter - Hardware Components
215 parts22 - 2 layers63.8 × 100 mm

- 2 layers137.2 × 83.8 mm

PWA REV2
PubInv/krake
The Krake™ is a Wi-Fi–enabled server using an MQTT broker, which means it can be controlled remotely by other devices ("clients") via the internet.
215 parts9AGPL-3.0 - 2 layers99.1 × 98.4 mm

Stm32 nucleo-144 proto shield
AnttiNykanen/stm32_nucleo-144_proto_shield
STM32 Nucleo-144 Prototyping Shield
215 parts6