Skip to the content
PCBKitNew board
2 layers50 × 80 mmTimer, the printed circuit board in 3D

24 VDC cyclic relay timer: MG51 firmware + KiCad PCB generated from scratch

Size
50 × 80 mm
Copper layers
2
Thickness
1.6 mm
Parts
45
Nets
43
Pads
138
Tracks, vias
359, 94
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
8 Oct 2026
Updated
8 Oct 2026

Overview

Timer is an open-source printed circuit board by Dhruv6576, from the Dhruv6576/CYTM-Digital-Timer repository on GitHub. It is a 2-layer board of 50 × 80 mm with 45 parts on 43 nets, routed with 359 tracks and 94 vias.

It is built around the BA56-12EWA, L78M05ABDT-TR and SS8050, with the 1N4148W, MMBTA06 and SMBJ28CA among its other parts. Its parts include 15 resistors, 7 diodes, 5 capacitors, 5 transistors and 4 switches. It belongs with the home automation and IoT boards of this library.

Main components

8

README

hardware/README.md

CYTM V5 Digital Timer PCB

24 VDC cyclic relay timer board for the firmware in ../Final/5-26.c (MG51FB9AE, unchanged pin map). 2-layer, 50 x 80 mm, display/LEDs/keys/terminal on the front, everything else on the back.

Status: prototype (Rev A). ERC 0 errors / 0 warnings, DRC 0 violations, 0 unconnected, schematic parity clean.

Rebuild

Everything is generated from scripts/circuit.py (parts, nets, placement). One command rebuilds and checks it all:

text
python scripts/build.py

Needs: KiCad 10 (C:\Program Files\KiCad\10.0), Python 3.10+ with PyMuPDF, Java 17, and tools/freerouting-1.9.0.jar (not in git; get it with gh release download v1.9.0 -R freerouting/freerouting -p freerouting-1.9.0.jar -D hardware/tools). scripts/env.py holds the paths. Takes about 4 minutes, most of it autorouting and 3D renders.

Freerouting does not give the same tracks on every run. build.py only reports BUILD OK when the new board passes every test, ERC and DRC, so any accepted run is clean; the files in output/ belong to the last run.

StepScriptOutput
Project librariesgen_symlib.pytimer.kicad_sym, timer.pretty/, timer.3dshapes/
Schematicgen_sch.pytimer.kicad_sch
Board + placementgen_pcb.py (KiCad python)timer.kicad_pcb
Routingroute.py (KiCad python + Freerouting 1.9.0)routed timer.kicad_pcb
Fabrication filesexport.pyoutput/
Filmsfilms.pyoutput/films_panel_3x2.pdf
Checkstests/*.py, ERC, DRCoutput/erc.rpt, output/drc.rpt

Outputs (output/)

  • gerbers.zip: Gerber X2 (both copper, mask, paste, legend, outline) + Excellon drill. Upload to the PCB maker.
  • bom.csv: parts grouped by value and footprint.
  • positions.csv: pick-and-place, mm, origin at the board's bottom-left corner.
  • schematic.pdf
  • render_top.png, render_bottom.png, render_iso.png
  • films_panel_3x2.pdf: 1:1 films, 3 x 2 panel, one page per layer (back layers mirrored, mask negative). Check the 10 mm scale bar after printing.

Circuit summary

  • 24 V in: SMBJ28CA bidirectional TVS on the raw input, then SS36 (60 V) reverse-polarity diode, 100 uF bulk, L78M05 (DPAK) to 5 V.
  • Relay: SRD-24VDC-SL-C, 24 V coil from the protected rail, MMBTA06 driver (80 V), 1N4148W flyback. COM is fed from raw IN+ so load current bypasses the diode. IN+ -> COM, NO -> OUT+ and IN- <-> OUT- are 3 mm tracks (5 A).
  • Display: 3-digit 0.56" common anode (BA56-12EWA pinout). Each digit and the LED group is driven by an SS8050 emitter follower, so "pin high = digit on" (firmware polarity) and the digit pins carry only base current. The 8 segment pins each sink their segment current through 330 ohm (~4.5-6 mA peak).
  • The 3 mm load tracks are not tinned (no mask opening): they run under the terminal and relay bodies. 3 mm of 1 oz copper carries 5 A at about 10 C rise.
  • LEDs on the LED group (P0.6): SEC = seg A, ON/OFF = seg B (relay on), MIN = seg C, SET = seg F (setting mode).
  • Keys to GND: SET P1.7, START P2.0 (10k pull-up), STOP P3.0.
  • ICP header J2: 1 VDD, 2 ICE_DAT (P1.6), 3 ICE_CLK (P0.2), 4 nRST (P2.0), 5 GND.

Before ordering in volume

  1. MCU pinout. The MG51FB9AE symbol assumes the N76E003 / MS51FB9AE TSSOP-20 pinout (scripts/gen_symlib.py, checked by tests/test_libs.py). Confirm it against the Nuvoton MG51 datasheet.
  2. Display. Pinout taken from Kingbright CA56-12 with pin 6 not connected (3-digit BA56-12EWA, 37.8 x 19 mm). Confirm the part you buy uses the same 12-pin layout.
  3. Enclosure. Board size, display, key, LED, hole and terminal positions are assumptions. Measure the enclosure and change the coordinates in scripts/circuit.py, then run build.py.
  4. Firmware. The SEC and MIN LEDs are wired (seg A / seg C in the LED-group slot) but the current firmware does not light them. ON/OFF and SET already work.
  5. Relay rating. The tracks carry 5 A. The SRD relay is rated 10 A, but the terminal block and board are not.
  6. Surges. The L78M05 is rated 35 V; the SMBJ28CA clamps up to 45 V on a full-energy surge. For harsh supplies use a 40 V+ regulator (or a small buck converter) in the same position.
  7. Prototype checks. Measure the regulator tab temperature (about 0.9 W at 24 V) and the display brightness (330 ohm gives about 1.2-1.5 mA average per segment; 220 ohm is brighter but heats the regulator more).
  8. Inductive loads. For valves or contactor coils on OUT, fit a freewheel diode at the load.

Parts

45
QtyValueFootprintReferences
8330Resistor_SMD:R_0805_2012MetricR1, R2, R3, R4, R5, R6, R7, R8
51kResistor_SMD:R_0805_2012MetricR9, R10, R11, R12, R13
4M3MountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
4SS8050Package_TO_SOT_SMD:SOT-23Q1, Q2, Q3, Q4
3LED 3mm redLED_THT:LED_D3.0mmLED1, LED2, LED3
3Tact 6x6x5mmButton_Switch_THT:SW_PUSH_6mmSW1, SW2, SW3
210kResistor_SMD:R_0805_2012MetricR14, R15
210uF 16V X5RCapacitor_SMD:C_0805_2012MetricC3, C5
1100nF 50V X7RCapacitor_SMD:C_0805_2012MetricC4
1100uF 50VCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC1
110uF 50V X7RCapacitor_SMD:C_1206_3216MetricC2
11N4148WDiode_SMD:D_SOD-123D3
1BA56-12EWAtimer:Display_3Digit_0.56in_CAU3
1L78M05ABDTPackage_TO_SOT_SMD:TO-252-2U2
1LED 3mm greenLED_THT:LED_D3.0mmLED4
1MG51FB9AEPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU1
1MKDS 1,5/4-5,08TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_HorizontalJ1
1MMBTA06Package_TO_SOT_SMD:SOT-23Q5
1PinHeader 1x5 2.54mm (ICP)Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ2
1SMBJ28CADiode_SMD:D_SMBD2
1SRD-24VDC-SL-CRelay_THT:Relay_SPDT_SANYOU_SRD_Series_Form_CK1
1SS36Diode_SMD:D_SMAD1

Questions

How big is the Timer PCB?

It measures 50 × 80 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Timer use?

45 parts, built around the BA56-12EWA, L78M05ABDT-TR, SS8050 and 1N4148W. 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 Timer KiCad files?

From the Dhruv6576/CYTM-Digital-Timer repository on GitHub, at the commit this page was made from: the board is hardware/timer.kicad_pcb and its schematic hardware/timer.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Timer design in my own project?

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

Similar boards

  • 4 layers101.2 × 82 mmNIVARA ceaser, the printed circuit board in 3D

    NIVARA ceaser

    CEASER2116/Ceaser_Rios_electiva_2025_C2

    200 parts
  • 2 layers91.4 × 75.6 mmBuck converter V6, the printed circuit board in 3D

    Buck converter V6

    HakanD1/24v-to-5v-50w-buck-converter-stm32

    24V to 5V 50W Digital Controlled Buck Converter Hardware, Software, and Control Design. Features an STM32-based closed-loop PI regulation, 120kHz PWM, custom PCB, and a Nextion HMI display interface.

    88 partsMIT
  • 2 layers100 × 70 mmComp PDU, the printed circuit board in 3D

    Comp PDU

    UofA-SPEAR/pcb_designs

    A place for SPEAR PCBs

    50 parts3
  • 6 layers100 × 53.8 mmPower, the printed circuit board in 3D

    Power

    SSL-A-Team/electrical

    circuit board design files, gerbers, and circuit analysis

    175 parts6MIT
  • 2 layers69 × 99.1 mmSmuk, the printed circuit board in 3D

    Smuk

    bodri/smuk

    An SMU by kapuki

    62 parts
  • 4 layers164 × 118 mmOpenEFI rev4 bkp, the printed circuit board in 3D

    OpenEFI rev4 bkp

    Churrosoft/OpenEFI-PCB

    Coleccion de PCB y planos recomendados para montar una OpenEFI

    345 parts8CERN-OHL-S-2.0
  • 4 layers116.5 × 98 mmHw v1, the printed circuit board in 3D

    Hw v1

    Churrosoft/uEFI-v6.x

    Speeduino compatible board, x4 ignition channels, x4 injection channels, 2&4 wire IAC

    248 parts2
  • 2 layers177 × 35 mmPower, the printed circuit board in 3D

    Power

    plektra/syntsamix

    Analog mixer for synthesizers

    97 parts