Skip to the content
4 layers52 × 52 mmCombinedLEDdriverMAX278, the printed circuit board in 3D

Smart Microscope LED Driver based on STM32G431

Size
52 × 52 mm
Copper layers
4
Thickness
1.6 mm
Parts
75
Nets
62
Pads
267
Tracks, vias
416, 156
Pours
172
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
13 Jul 2026
Updated
14 Oct 2026

Overview

CombinedLEDdriverMAX278 is an open-source printed circuit board by williamlin108, from the williamlin108/Olympus-BH-2-LED-Module-G031xMAX20078 repository on GitHub, published under the Apache-2.0 licence. It is a 4-layer board of 52 × 52 mm with 75 parts on 62 nets, routed with 416 tracks and 156 vias.

It is built around the MAX20078ATE+T, SN74AC00D and TPS7E8233AQDBVRQ1, with the TVS2200DRV, D2F-01F and B340A-13-F-MS among its other parts. Its parts include 27 resistors, 18 capacitors, 6 ICs, 6 diodes and 3 connectors. It belongs with the STM32 boards of this library.

Main components

8

README

README.md

USB-C PD High-CRI LED Driver for Olympus BH-2 BHTU Microscopes

A compact, USB-C powered constant-current LED driver built around the Maxim MAX20078 synchronous buck controller and an STM32G031 microcontroller. It drives a high-CRI Nichia 519A emitter at up to 5 A, with user-configurable control, saved settings, safety limits, and heavy input protection.

Built specifically to replace and upgrade the discontinued halogen bulb assembly of Olympus BH2 lab microscopes. It drops into the original lamp housing and swaps the hot, short-lived halogen bulb for a cool, efficient, high-CRI LED, while adding USB-C power, presets, and precise brightness control.

PCB Rendering of latest V3 Revision, to be fabed by 2027

Photos

Driver board and LED moduleRunning on USB-C PD
Driver board next to the LED lamp moduleNichia 519A lit, powered over USB-C

Features

  • USB-C Power Delivery input: Infineon CYPD3177 (EZ-PD BCR) sink controller negotiates a higher PD voltage from any USB-C charger
  • 5 A constant-current buck: MAX20078 synchronous buck LED controller with a BSG0811ND dual N-MOSFET power stage
  • High-CRI output: tuned for the Nichia 519A for accurate color rendering
  • Smart dimming: STM32 firmware handles smooth ramping, gamma-corrected brightness, off mode, and fault latching
  • User extensible: open firmware so users can add their own macros, saved settings, and custom safety limits
  • Hardware-debounced buttons: SR-latch debounce using SPDT switches and an SN74AC00 NAND gate
  • Fault handling: the MAX20078 fault output is monitored and handled in firmware
  • Protection: TVS clamping, fusing, EMI filtering, and gate/transient clamps
  • Custom CNC Nichia 519 Holder Custom designed CNC 6061 Aluminum heatsink and male socket part that slides into the BHTU's rear illumination port with O-rings to prevent wear and ensure a tight friction fit.

System Overview

text
USB-C ──► Fuse ──► TVS2200 ──► BNX025 EMI filter ──► CYPD3177 PD sink ──► VBUS load switch ──► VIN
                                                                                               │
                              ┌────────────────────────────────────────────────────────────────┤
                              ▼                                                                ▼
                    TPS7E82 LDO (3.3 V)                     MAX20078 buck ──► BSG0811ND ──► 4.7 µH ──► Nichia 519A
                              │                               ▲     │   ▲                                     │
                              ▼                               │     │   └── CSP/CSN current sense (shunt) ◄───┘
                     STM32G031 ─────── DIM (PWM) ─────────────┘     │
                        ▲    ◄─────────────────── FLT ──────────────┘
                        │
         SW1/SW2 (SPDT) ──► SN74AC00 SR-latch debounce

Hardware

BlockPartRole
PD sinkInfineon CYPD3177-24LQNegotiates USB-C PD voltage; drives the VBUS load switch
Input protectionTI TVS2200DRVFlat-clamp TVS on VBUS
EMI filterMurata BNX025Input noise suppression
FuseF1Input overcurrent protection
LED controllerMAX20078ATE+TSynchronous buck, constant-current LED regulation
Power stageBSG0811ND dual N-MOSFETHigh-side / low-side switches
Inductor4.7 µHBuck output inductor
Current sense0.1 Ω shunt (Kelvin-routed CSP/CSN)LED current feedback
MCUSTM32G031J6UI, settings, dimming, fault handling
LDOTPS7E8233-Q13.3 V logic supply
Buttons2× Omron D2F-01F (SPDT)User input
DebounceSN74AC00 quad NANDCross-coupled SR latches
EmitterNichia 519AHigh-CRI LED

Protection

  • Fuse on the USB-C VBUS input
  • TVS2200 flat-clamp surge protection against hot-plug and ESD transients
  • Murata BNX025 EMI filter on the input to keep switching noise off the cable
  • Zener gate clamp (MMSZ4702) on the VBUS load switch
  • Schottky diodes (B340A, B5819W) for bootstrap and transient paths
  • Bulk and decoupling capacitance (22 µF ceramics) on input and output
  • Dedicated current-sense net class for accurate, low-noise regulation
  • Firmware limits on maximum current and shutdown on fault

Hardware Debounce

Each button is an SPDT switch wired to a cross-coupled NAND SR latch in the SN74AC00. The latch changes state on the first contact and ignores bounce, so the STM32 sees one clean edge on ENCA / ENCB per press without software debounce delays.

Connectors & Test Points

RefDescription
J1USB-C power input (PD)
J2LED output (LED+, LED−)
J3TC2030 SWD programming / debug
TP1VDC
TP2, TP4GND
TP3GPIO (debug)

Firmware

Written in bare-metal C using the STM32 libraries (no RTOS). The STM32G031 provides:

  • PWM dimming: TIM3 drives the MAX20078 DIM input with 32,000 steps of resolution
  • Smooth ramp: hold up/down to sweep brightness over 3 s; level is computed from elapsed time so the sweep is exact
  • Perceptual curve: square-law gamma so brightness changes look even across the range
  • Off mode: hold down past minimum to turn fully off; press up to wake at minimum
  • Minimum on-time floor: DIM pulses never drop below the width the current loop needs to settle
  • Fault handling: FLT falling edge is confirmed by re-read, then latched; output is held at minimum (not released, which would let the DIM pull-up drive full brightness). Shutdown and wake-up FLT pulses are masked
  • Status LED: blinks while adjusting, solid on a latched fault (clears on power cycle)
  • Software debounce on top of the hardware latches, to reject switching-noise glitches

Extending the Firmware

The firmware is meant to be customized. Users can add their own features, for example:

  • Macros / presets: e.g. a double-press to jump to a saved brightness
  • Saved settings: store the last level in flash and restore it on power-up
  • Custom safety limits: cap the maximum duty for a given emitter or optics setup
PinFunction
PB0TIM3_CH3 PWM → MAX20078 DIM
PA12MAX20078 FLT (active low)
PA13Up button
PA15Down button
PB7Status LED (open drain)

Repository Layout

text
PCBfiles/
  CombinedLEDdriverMAX278.kicad_pro   KiCad project
  CombinedLEDdriverMAX278.kicad_sch   Top-level schematic (buck, MCU, LDO)
  usbc_input.kicad_sch                USB-C PD sink, fuse, TVS, EMI filter
  switches.kicad_sch                  Buttons and SR-latch debounce
Firmware/                             STM32G031 bare-metal C firmware
images/                               Photos used in this README

Getting Started

  1. Flash the STM32 over SWD using a TC2030 cable.
  2. Connect the Nichia 519A to J2, observing polarity.
  3. Plug in a USB-C PD charger capable of the required power.
  4. Hold the up/down buttons to ramp brightness; hold down past minimum to turn off.

Heat sink the emitter properly before running at full current.

LED module in front of an Olympus BH2 microscope

Parts

75
QtyValueFootprintReferences
810kResistor_SMD:R_0603_1608MetricR1, R13, R19, R20, R22, R23, R25, R26
72.2uFCapacitor_SMD:C_0603_1608MetricC1, C3, C4, C8, C13, C15, C17
622uFCapacitor_SMD:C_0805_2012MetricC5, C6, C7, C10, C11, C14
51kResistor_SMD:R_0603_1608MetricR2, R4, R6, R8, R18
45.1kResistor_SMD:R_0603_1608MetricR3, R5, R21, R24
4MountingHoleMountingHole:MountingHole_2.7mm_M2.5H1, H2, H3, H4
30.22uFCapacitor_SMD:C_0603_1608MetricC2, C9, C16
230kResistor_SMD:R_0603_1608MetricR14, R15
24.7Resistor_SMD:R_0603_1608MetricR9, R10
2B5819W SLDiode_SMD:D_SOD-123D3, D5
2D2F-01FFootprint_Lib:D2F-01FSW1, SW2
2LEDLED_SMD:LED_0805_2012MetricD2, D6
10.1Footprint_Lib:R_0805_2012MetricR12
10.1Resistor_SMD:R_0805_2012MetricR11
1100pFCapacitor_SMD:C_0603_1608MetricC12
110kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR27
112kResistor_SMD:R_0603_1608MetricR17
11AFuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolderF1
122uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC18
14.7uHInductor_SMD:L_Vishay_IHLP-4040L1
149.9kResistor_SMD:R_0603_1608MetricR7
168kResistor_SMD:R_0603_1608MetricR16
1B340A-13-FDiode_SMD:D_SMAD4
1BNX025Filter:Filter_Murata_BNX025FL1
1BSG0811NDFootprint_Lib:Infineon_PG-TISON-8-4Q2
1CYPD3177Package_DFN_QFN:QFN-24-1EP_4x4mm_P0.5mm_EP2.75x2.75mmU2
1GNDTestPoint:TestPoint_Pad_D1.0mmTP2
1GNDTestPoint:TestPoint_Keystone_5015_Micro_MiniTP4
1GPIOTestPoint:TestPoint_Pad_D1.0mmTP3
1LEDConnector_Molex:Molex_SPOX_5267-02A_1x02_P2.50mm_VerticalJ2
1MAX20078ATE+TFootprint_Lib:MAX20078_QFNU3
1MMSZ4702T1GDiode_SMD:D_SOD-123D1
1SN74AC00Package_SO:TSSOP-14_4.4x5mm_P0.65mmU6
1STM32G031J6MxPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU5
1Si4101DYPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmQ1
1TC2030Connector:Tag-Connect_TC2030-IDC-NL_2x03_P1.27mm_VerticalJ3
1TPS7E8233AQDBVRQ1Package_TO_SOT_SMD:SOT-23-5U4
1TVS2200DRVPackage_SON:WSON-6-1EP_2x2mm_P0.65mm_EP1x1.6mmU1
1USB_C_Receptacle_PowerOnly_6PConnector_USB:USB_C_Receptacle_GCT_USB4125-xx-x_6P_TopMnt_HorizontalJ1
1VDCTestPoint:TestPoint_Pad_D1.0mmTP1

Similar boards

  • 2 layers34.2 × 31.3 mmNrf52820 hiiri, the printed circuit board in 3D

    Nrf52820 hiiri

    samuwall/hiiri-v1

    open-source wireless gaming mouse (nRF52 + PAW3395)

    46 parts7
  • 2 layers70 × 50 mmJBC controller, the printed circuit board in 3D

    JBC controller

    microbug/soldering-station

    DIY soldering station compatible with JBC C245 handle/tips

    42 parts6MIT
  • 4 layers92 × 92 mmRtihu, the printed circuit board in 3D

    Rtihu

    AMSAT-NA/PacSatDocs

    395 parts4
  • 6 layers133 × 92 mmMotherboard, the printed circuit board in 3D

    Motherboard

    byrantech/laptop

    anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

    264 parts4.3kMIT
  • 4 layers79.5 × 64.5 mmRP2350 Duel, the printed circuit board in 3D

    RP2350 Duel

    OpenStickCommunity/Hardware

    A collection of hardware designs by members of the OpenStickCommunity

    45 parts338
  • 13 layers38.5 × 38.5 mmXbox Charge, the printed circuit board in 3D

    Xbox Charge

    Redherring32/100W-Charging-PCB

    100W USB C PD Lithium Ion charging PCB based on the TPS25750D and BQ25713

    90 parts43
  • 2 layers59 × 20 mmBrother usbc, the printed circuit board in 3D

    Brother usbc

    kosma/usb-c-everywhere

    I Put USB-C Everywhere (and you can't stop me)

    29 parts5
  • 2 layers72 × 26.7 mmLiPo charger Rev 1.0, the printed circuit board in 3D

    LiPo charger Rev 1.0

    marksdude/Pikne

    A modular and repairable power bank

    117 parts1

Questions

How big is the CombinedLEDdriverMAX278 PCB?

It measures 52 × 52 mm and has 4 copper layers, 1.6 mm thick.

What parts does the CombinedLEDdriverMAX278 use?

75 parts, built around the MAX20078ATE+T, SN74AC00D, TPS7E8233AQDBVRQ1 and TVS2200DRV. 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 CombinedLEDdriverMAX278 KiCad files?

From the williamlin108/Olympus-BH-2-LED-Module-G031xMAX20078 repository on GitHub, at the commit this page was made from: the board is PCBfiles/CombinedLEDdriverMAX278.kicad_pcb and its schematic PCBfiles/CombinedLEDdriverMAX278.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the CombinedLEDdriverMAX278 design in my own project?

Its repository publishes it under the Apache-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).