Skip to the content
2 layers27 × 65.3 mmOcn LCD, the printed circuit board in 3D

Coin-cell elapsed-time counter with a 4-digit LCD and a magnetic off switch (MSP430FR4131, KiCad 10, CERN-OHL-P v2)

Size
27 × 65.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
23
Nets
67
Pads
122
Tracks, vias
134, 49
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
2 Oct 2026
Updated
7 Nov 2026

Overview

Ocn LCD is an open-source printed circuit board by z2amiller, from the z2amiller/ocn-LCD repository on GitHub, published under the CERN-OHL-P-2.0 licence. It is a 2-layer board of 27 × 65.3 mm with 23 parts on 67 nets, routed with 134 tracks and 49 vias.

It is built around the MSP430FR4131IPMR, AO3401A and CR2032. Its parts include 12 capacitors, 3 resistors, 1 IC, 1 transistor and 1 connector. It belongs with the lEDs and displays boards and the MSP430 boards of this library.

Main components

3

README

README.md

ocn-LCD

A coin-cell elapsed-time counter with a 4-digit LCD and a magnetic off switch. While a magnet sits at the marked end, the board is switched off. Take the magnet away and it powers up and counts elapsed time in hours and minutes, up to 99:59 (about 100 hours). Put the magnet back and it powers down a few seconds later; the next time the magnet comes off, counting starts again from 00:00.

Front, 3D render Isometric, 3D render

The renders leave out the LCD (on the back), the coin-cell holder and the reed switch, which have no 3D models.

Status: revision 0.1, not yet built. The firmware is in firmware/: it runs on TI's MSP430FR4133 LaunchPad, and its driver for this board's LCD hasn't been tried on real glass yet.

How it works

  • Counting. An MSP430FR4131 drives the LCD directly with its built-in LCD controller and keeps time from a 32.768 kHz crystal. It spends almost all its time in its deepest sleep mode with the display still running, so it should draw 1–2 µA while counting (see the power budget below).
  • Magnet switch. The magnet closes a normally open reed switch (SW1). That pulls the gate of a P-channel MOSFET (Q1) up to the cell voltage and cuts power to everything after it. With the magnet away, a 10 MΩ resistor pulls the gate low and the board runs. While switched off, the only drain on the cell is that resistor, about 0.3 µA.
  • Reset on purpose, not by accident. 14 µF of capacitance after the switch keeps the board running for several seconds after the magnet arrives, so a brief knock or switch bounce does not reset the count. Leaving the magnet in place longer than that powers the board down and clears it.
  • Display. The LCD is a Good Display GDC04212: 4 digits with a colon, 1/4 duty, 3 V. It mounts on the back of the board, so the front carries every surface-mount part.

Power budget

Estimates at 3.0 V and 25 °C, from the TI datasheet (SLAS865) and the part specs. They will be replaced by measurements on the board. Until then, the firmware's measurements on the LaunchPad are the nearest guide: 2.2 µA asleep with its much larger LCD.

ItemCounting (magnet away)Off (magnet in place)Basis
MCU asleep (LPM3.5), with the 32 kHz crystal, RTC, LCD controller and charge pump running0.94 µA0Datasheet typical, supervisor (SVS) off
LCD glass: recharging the segments about 30 times a second0.2–1 µA0Estimate from typical TN glass capacitance (~2 nF); the biggest unknown
Waking once a minute to advance the count and rewrite the display~0.01 µA0~2 ms at ~0.4 mA per wake; waking every second instead would cost ~0.8 µA
Colon blink~00Done by the LCD hardware, no CPU wake
Gate pull-down R3 (10 MΩ across the cell while the reed is closed)00.3 µA3.0 V / 10 MΩ
Q1 MOSFET leakage while off–a few nATypical; the datasheet maximum is specified at 30 V
Hold-up capacitors C1–C3, leakage~1 nA0MLCC insulation resistance; under 0.1 µA even at the spec minimum
Reset pull-up, reed switch, unused pins (driven low)00No DC path
Totalabout 1.2–2 µAabout 0.3 µA

Estimated runtime on one CR2032 (225 mAh nominal), allowing about 1 %/year for the cell's own self-discharge:

ModeEstimated runtime
Counting continuouslyabout 11–18 years
Off (magnet in place)over 40 years

Both are longer than a CR2032's rated shelf life of about 10 years, so in practice the cell's age sets the limit, not this circuit. Cold reduces the cell's usable capacity, so expect less in cold conditions.

Firmware choices that keep it there:

  • Leave the voltage supervisor (SVS) off in LPM3.5; it costs about 0.2 µA. The brownout reset stays on regardless.
  • Update the count once a minute, not once a second.
  • Blink the colon with the LCD hardware, not by waking the CPU.
  • Drive every unused pin low, including the RX pin when nothing is connected to it.

Placing the magnet

The reed switch is at the end marked MAGNET DISABLE and runs along the length of the board. It responds to field along its own length, so use a magnet magnetized through its flat faces (a neodymium cylinder or disc), at that end, with its axis along the board and its face toward the board's end. SW1's axis is 4.4 mm in from the long edge that carries the LCD pins, and a magnet centered on that line gives the most margin.

A magnet centered on the board's width sits about 9 mm off SW1's axis and puts roughly half to a quarter as much field along it. Even so, a model of a typical 10 × 8 mm N42 cylinder (no nearby steel) gives several times the switch's ~2–3 mT pull-in out to about 20 mm. Check the actual magnet on the bench, especially if steel sits near it.

The switch lets go only once the magnet is a few centimeters away (the same model puts it at about 35–40 mm in line), so move the magnet well clear to start counting.

Key parts

RefPartLCSC
U1TI MSP430FR4131IPM, LQFP-64 (FR4132/FR4133 also fit)C1879660
DS1Good Display GDC04212 4-digit LCD, 12 pins at 2.54 mmnone (hand-soldered)
BT1Lian Xin BS-CR2032-8 coin-cell holder, for a CR2032C7498149
SW1Littelfuse 59170-1-S-00-D reed switch, normally open, 10–15 ATC315909
Q1AO3401A P-channel MOSFET, SOT-23C15127
Y1TKD SF32WK32768D31T002 32.768 kHz crystal, 3215, 12.5 pF (any 3215 12.5 pF crystal fits)C271654

Every part in the BOM carries its LCSC number. The LCD, J1 and TP3 are left out of the BOM and the placement file. The passives are 0603 and 1206.

Ordering

JLCPCB can make the board and fit all the surface-mount parts. docs/ORDERING.md walks through the order, screen by screen.

Assembly

  1. Surface-mount parts first, all on the front. A stencil helps with the 0.5 mm pitch MCU. The holder and the reed switch are rated for reflow, so a hotplate works.
  2. LCD last, by hand. The LCD is through-hole on the back. Solder it after reflow and keep the iron off the glass. The silkscreen marks its pin 1.
  3. Programming header (J1). It is only needed on the bench.
  4. Battery. Fit the CR2032 after programming.

Programming

The MCU is programmed over Spy-Bi-Wire from the eZ-FET programmer on a TI MSP-EXP430FR4133 LaunchPad. Any MSP430 LaunchPad with an eZ-FET should also work. J1 carries the four programming signals plus the MCU's serial port.

  1. Take the coin cell out. The LaunchPad powers the board at 3.3 V, and with a cell fitted it would push current back into it. The board's silkscreen says so too.

  2. Pull every jumper off the LaunchPad's J101 isolation block. That disconnects the LaunchPad's own MCU, so the eZ-FET talks only to this board.

  3. Wire J1 to J101 with dupont jumpers. Use the J101 pins on the eZ-FET (emulator) side, not the side that runs to the LaunchPad's own MCU:

    ocn-LCD J1LaunchPad J101, eZ-FET side
    3V3V3
    RSBW RST
    TSBW TST
    GNDGND
    RX (optional, serial)RXD
    TX (optional, serial)TXD

    The serial names match straight across. J101 labels its pins from the target MCU's point of view, so its RXD carries data into this board's RX.

  4. Flash the firmware with TI UniFlash or Code Composer Studio. Select the MSP430FR4131 and the LaunchPad's eZ-FET as the connection. Or, with msp430-gcc and DSLite installed (see firmware/README.md), run make GLASS=gdc04212 MCU=msp430fr4131 flash in firmware/.

  5. Unplug the LaunchPad before measuring current or fitting the cell. The programming and serial lines draw current of their own.

Measuring battery current. R2 (1 Ω, 1206) sits in series with the cell. Lift it and connect a current meter across its pads. TP3 is a test pad on the switched 3 V supply.

Files

  • ocn-LCD.kicad_pro, .kicad_sch and .kicad_pcb: the KiCad 10 project. The board is 27 × 65.4 mm, two layers.
  • lib/: the board's own symbols and footprints: the MSP430FR413x, the GDC04212 and its footprint, the coin-cell holder and the reed switch. The project's library tables point at this folder, so the project opens without any other library installed.
  • firmware/: the MCU's firmware, in C for msp430-gcc, with its own README covering how it works, how to build and flash it, and the current measurements.
  • GERBER-ocn-LCD.zip and jlcpcb/production_files/ (BOM and CPL): the JLCPCB fabrication and assembly files. docs/ORDERING.md explains how to use them.

License

The board (everything outside firmware/) is licensed under the CERN Open Hardware Licence Version 2 – Permissive (CERN-OHL-P v2). See LICENSE and NOTICE.

You may make, modify, and sell boards from these files, with no obligation to publish your changes.

The firmware in firmware/ is licensed under the MIT License; see firmware/LICENSE. It is just as permissive, in the form usual for software.

Parts

23
QtyValueFootprintReferences
6100nCapacitor_SMD:C_0603_1608MetricC4, C5, C13, C14, C15, C16
34.7uCapacitor_SMD:C_1206_3216MetricC1, C2, C3
220pCapacitor_SMD:C_0603_1608MetricC9, C10
110MResistor_SMD:R_0603_1608MetricR3
11RResistor_SMD:R_1206_3216MetricR2
11nCapacitor_SMD:C_0603_1608MetricC11
132.768kCrystal:Crystal_SMD_3215-2Pin_3.2x1.5mmY1
13VTestPoint:TestPoint_Pad_1.5x1.5mmTP3
147KResistor_SMD:R_0603_1608MetricR1
1AO3401APackage_TO_SOT_SMD:SOT-23Q1
1CR2032LowPower:BatteryHolder_LianXin_BS-CR2032-8_1x2032BT1
1GDC04212LowPower:LCD_GDC04212_1x12_P2.54mmDS1
1MSP430FR4131IPMPackage_QFP:LQFP-64_10x10mm_P0.5mmU1
1PROGConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ1
1REED (NO)LowPower:SW_SPST_REED_Littelfuse_59170_GullWingSW1

Similar boards

  • 4 layers107.6 × 59.8 mmTimeDisk, the printed circuit board in 3D

    TimeDisk

    garrettsworkshop/TimeDisk

    Apple II memory expansion card with 1 MB battery-backed RAM and NoSlotClock-compatible clock

    70 parts19
  • 2 layers119 × 27 mmPuya spinner, the printed circuit board in 3D

    Puya spinner

    ArcaneNibble/puya-spinner

    Puya PY32 deliberately-overengineered fidget spinner

    52 parts40BSD
  • 2 layers100 × 98.6 mmPCB Christmas Tree, the printed circuit board in 3D

    PCB Christmas Tree

    KNEAGHUST/PCB_Christmas_Tree_AGH

    PCB Christmas tree designed for the AGH University of Krakow

    45 parts2MIT
  • 2 layers100 × 50 mmClock pcb, the printed circuit board in 3D

    Clock pcb

    MitchellStride/Hummingbird-RP2040-Clock-Module

    RP2040 RTC Module, highly compatible with JLCPCB's basic SMT components.

    124 parts2
  • 2 layers153.8 × 100.3 mmEaster Egg AGH, the printed circuit board in 3D

    Easter Egg AGH

    KNEAGHUST/PCB_Easter_Egg_AGH

    77 parts1MIT
  • 4 layers130 × 130 mmSmart Metering, the printed circuit board in 3D

    Smart Metering

    frahncky/Smart-Metering

    Analisador trifásico de energia e qualidade de energia com interface gráfica touchscreen.

    230 parts
  • 2 layers90 × 50 mmH2S Sensor, the printed circuit board in 3D

    H2S Sensor

    Global-Health-Engineering/h2s-monitor

    Design and Development of a Low-Cost Hydrogen Sulfide Sensor System for Biogas Monitoring

    56 parts
  • 2 layers53.7 × 99.6 mmXmascard2020, the printed circuit board in 3D

    Xmascard2020

    ktims/xmascard2020

    If you're here, it's probably because I sent you a card/ornament and you can't get it to work, thought it might be fun to hack on, or you were curious how it was designed. Unless it's the first one, awesome!!

    29 parts

Questions

How big is the Ocn LCD PCB?

It measures 27 × 65.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Ocn LCD use?

23 parts, built around the MSP430FR4131IPMR, AO3401A and CR2032. 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 Ocn LCD KiCad files?

From the z2amiller/ocn-LCD repository on GitHub, at the commit this page was made from: the board is ocn-LCD.kicad_pcb and its schematic ocn-LCD.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Ocn LCD design in my own project?

Its repository publishes it under the CERN-OHL-P-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).