

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
8BA56-12EWA
DIP-120.56 3 37.6mmx19mmx8.1mm 7 Segment 75mW Common Anode Red DIP-12 LED Segment Displays ROHSKingbrightLED Segment DisplaysL78M05ABDT-TR
TO-252-2(DPAK)-40℃~+125℃@(Tj) 1 2V@(350mA) 35V 40uV 500mA 5V 62dB@(120Hz) 6mA Fixed Over Temperature Protection、Short Circuit Protection Positive TO-252-2(DPAK) Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSSTMicroelectronicsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsSS8050
SOT-323-55℃~+150℃ 1 NPN 1.5A 100MHz 100nA 200 25V 300mW 500mV 5V NPN SOT-23 Bipolar (BJT) ROHSJiangsu Changjing Electronics Technology (CJ)Bipolar (BJT)1N4148W
SOD-123150mA 1A 1V@50mA 1uA@75V 400mW 4ns 75V Independent SOD-123 Switching Diodes ROHSSTMicroelectronicsSwitching DiodesMMBTA06
SOT-23-55℃~+150℃ 1 NPN 100MHz 100nA 250mV 300mW 400 4V 500mA 80V NPN SOT-23 Bipolar (BJT) ROHSALJBipolar (BJT)SMBJ28CA
DO-214AA(SMB)ESD And Surge Protection (TVS/ESD)hongjiachengSRD-24VDC-SL-C
插件,19.2x15.6mm1.6kΩ 100mΩ 10ms 10ms 15A 24V 250V@AC 360mW 5 Non-Polarized - Single Coil One set changeover: 1C (SPDT - changeover) 插件,19.2x15.6mm Power Relays ROHS松乐Power RelaysSS36
SMA(DO-214AC)-55℃~+125℃ 3A 500uA@60V 60V 700mV@3A Independent SMA(DO-214AC) Schottky Diodes ROHSMDDSchottky Diodes
README
hardware/README.mdCYTM 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:
python scripts/build.pyNeeds: 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.
| Step | Script | Output |
|---|---|---|
| Project libraries | gen_symlib.py | timer.kicad_sym, timer.pretty/, timer.3dshapes/ |
| Schematic | gen_sch.py | timer.kicad_sch |
| Board + placement | gen_pcb.py (KiCad python) | timer.kicad_pcb |
| Routing | route.py (KiCad python + Freerouting 1.9.0) | routed timer.kicad_pcb |
| Fabrication files | export.py | output/ |
| Films | films.py | output/films_panel_3x2.pdf |
| Checks | tests/*.py, ERC, DRC | output/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.pdfrender_top.png,render_bottom.png,render_iso.pngfilms_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
- MCU pinout. The MG51FB9AE symbol assumes the N76E003 / MS51FB9AE TSSOP-20 pinout
(
scripts/gen_symlib.py, checked bytests/test_libs.py). Confirm it against the Nuvoton MG51 datasheet. - 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.
- Enclosure. Board size, display, key, LED, hole and terminal positions are assumptions. Measure the
enclosure and change the coordinates in
scripts/circuit.py, then runbuild.py. - 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.
- Relay rating. The tracks carry 5 A. The SRD relay is rated 10 A, but the terminal block and board are not.
- 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.
- 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).
- Inductive loads. For valves or contactor coils on OUT, fit a freewheel diode at the load.
Parts
45| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | 330 | Resistor_SMD:R_0805_2012Metric | R1, R2, R3, R4, R5, R6, R7, R8 |
| 5 | 1k | Resistor_SMD:R_0805_2012Metric | R9, R10, R11, R12, R13 |
| 4 | M3 | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 4 | SS8050 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2, Q3, Q4 |
| 3 | LED 3mm red | LED_THT:LED_D3.0mm | LED1, LED2, LED3 |
| 3 | Tact 6x6x5mm | Button_Switch_THT:SW_PUSH_6mm | SW1, SW2, SW3 |
| 2 | 10k | Resistor_SMD:R_0805_2012Metric | R14, R15 |
| 2 | 10uF 16V X5R | Capacitor_SMD:C_0805_2012Metric | C3, C5 |
| 1 | 100nF 50V X7R | Capacitor_SMD:C_0805_2012Metric | C4 |
| 1 | 100uF 50V | Capacitor_THT:CP_Radial_D8.0mm_P3.50mm | C1 |
| 1 | 10uF 50V X7R | Capacitor_SMD:C_1206_3216Metric | C2 |
| 1 | 1N4148W | Diode_SMD:D_SOD-123 | D3 |
| 1 | BA56-12EWA | timer:Display_3Digit_0.56in_CA | U3 |
| 1 | L78M05ABDT | Package_TO_SOT_SMD:TO-252-2 | U2 |
| 1 | LED 3mm green | LED_THT:LED_D3.0mm | LED4 |
| 1 | MG51FB9AE | Package_SO:TSSOP-20_4.4x6.5mm_P0.65mm | U1 |
| 1 | MKDS 1,5/4-5,08 | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_Horizontal | J1 |
| 1 | MMBTA06 | Package_TO_SOT_SMD:SOT-23 | Q5 |
| 1 | PinHeader 1x5 2.54mm (ICP) | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J2 |
| 1 | SMBJ28CA | Diode_SMD:D_SMB | D2 |
| 1 | SRD-24VDC-SL-C | Relay_THT:Relay_SPDT_SANYOU_SRD_Series_Form_C | K1 |
| 1 | SS36 | Diode_SMD:D_SMA | D1 |
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 mm

- 2 layers91.4 × 75.6 mm

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 mm

- 6 layers100 × 53.8 mm

- 2 layers69 × 99.1 mm

- 4 layers164 × 118 mm

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 mm

Hw v1
Churrosoft/uEFI-v6.x
Speeduino compatible board, x4 ignition channels, x4 injection channels, 2&4 wire IAC
248 parts2 - 2 layers177 × 35 mm
