Skip to the content
2 layers40 × 30 mmLed pwm-4bit, the printed circuit board in 3D

4-bit LED PWM controller for a 24 V strip, driven by a Prusa GPIO Hackerboard (KiCad 10)

Size
40 × 30 mm
Copper layers
2
Thickness
1.6 mm
Parts
39
Nets
22
Pads
86
Tracks, vias
79, 34
Pours
4
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
7 Oct 2026
Updated
8 Oct 2026

Overview

Led pwm-4bit is an open-source printed circuit board by hyiger, from the hyiger/led-pwm-4bit repository on GitHub. It is a 2-layer board of 40 × 30 mm with 39 parts on 22 nets, routed with 79 tracks and 34 vias.

It is built around the ATTINY412-SSN, RC0603FR-0710KL and B160-13-F(MS), with the 0ZCG0010FF2C, 1812L050/60MR and RC0603FR-07100KL among its other parts. Its parts include 11 resistors, 9 capacitors, 4 connectors, 3 diodes and 2 ICs. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

8

README

README.md

led-pwm-4bit

A 40 × 30 mm two-layer board that dims a 24 V LED strip to one of 16 levels set by four open-drain outputs of a Prusa GPIO Hackerboard. An ATtiny412 reads the 4-bit word and drives a low-side N-MOSFET with 10-bit PWM at about 2.4 kHz.

KiCad 10 project. The design brief is docs/spec.md and the reference netlist is docs/netlist.txt.

Top render

Status

StepState
SchematicDone. ERC: 0 violations. check_netlist.py: matches docs/netlist.txt
PlacementDone. Schematic parity clean
RoutingIn progress. DRC: 0 violations; 5 unrouted connections (three HB_GND links to F2, UPDI_BUS R11–D3, SEL3 C8–R10). GND pours stitched with 32 vias
PartsEvery line has a manufacturer part carried by Mouser; see Parts
FirmwareNot started (spec section 9)

Files

PathContents
led-pwm-4bit.kicad_proProject: JLCPCB constraints, net classes (Default, Power)
led-pwm-4bit.kicad_schSchematic, one sheet, KiCad standard symbols only
led-pwm-4bit.kicad_pcbBoard
led-pwm-4bit.kicad_druCustom DRC rules (JLCPCB limits, 0.5 mm power tracks)
check_netlist.pyCompares the schematic netlist with docs/netlist.txt
scripts/export-fab.shRuns ERC, netlist check and DRC, then writes fab/
fab/Schematic PDF, BOM, Mouser order CSV, position file, renders; Gerbers once DRC is clean

Parts

All parts are chosen from manufacturers Mouser stocks, and each was checked against its manufacturer's datasheet for package, pinout and ratings. Capacitor values were also checked against DC-bias data. fab/led-pwm-4bit-bom.csv is the full BOM and fab/led-pwm-4bit-mouser-order.csv is in Mouser's BOM-tool format (BOARDS=n scripts/export-fab.sh scales it). The order rounds the resistors, capacitors and D3 up to at least 10 with spares, which costs less than the exact count at Mouser's single-piece prices.

The Mouser part-number column is left empty on purpose. Mouser blocks automated access, so no Mouser number could be read off its live listing, and a guessed number can import cleanly and still be the wrong part. Mouser's BOM tool matches each line on the manufacturer part number instead. Once a Mouser number is confirmed, add a field named Mouser to that symbol and the export carries it.

RefPartNotes
U1Microchip MCP1792T-3302H/CB55 V input LDO, SOT-23A
U2Microchip ATTINY412-SSNTube; ATtiny212-SSN also fits
Q1ROHM RTR030N05HZGTL45 V, RDS(on) ≤ 95 mΩ at VGS 2.5 V. The 60 V IRLML0060 is not rated below 4.5 V gate drive
D1, D2Diodes Inc B160-13-F60 V 1 A Schottky, SMA
D3onsemi BAT54HT1GSOD-323, pin 1 cathode (BAT54J is out of stock at Mouser)
F1Littelfuse 1812L050/60MR0.5 A hold, 60 V, Imax 10 A
F2Bel Fuse 0ZCG0010FF2C0.1 A hold, 60 V, Imax 100 A; Hackerboard/programmer ground return
C1Murata GRM188R61H225KE11D2.2 µF 50 V X5R 0603, about 0.4 µF at 24 V
C2, C9Murata GRM31CR71H475MA12L4.7 µF 50 V X7R 1206, about 2.7 µF each at 24 V
C3Samsung CL10A106MP8NQWC10 µF 10 V X5R 0603, about 5.9 µF at 3.3 V
C4KEMET C0603C104K5RACTU100 nF 50 V X7R
C5–C8KEMET C0603C103K5RACTU10 nF 50 V X7R
R1–R11YAGEO RC0603FR-07…L1 % 0603; R3–R10 are all 10 kΩ
J1, J2Phoenix Contact 1984617PT 1,5/2-3,5-H, the part the footprint is drawn for
J3Würth 613005111211×5 2.54 mm header
J4Würth 613006111211×6 2.54 mm header

No 10 µF 50 V X7R in 1206 was in stock at Mouser. The Murata 4.7 µF X7R keeps more capacitance at 24 V than any 10 µF 1206 part Mouser stocks.

Routing notes

  • The Power net class (+24V_IN, VIN_F, +24V, LED_NEG, GND) defaults to 0.5 mm, and DRC rejects anything narrower. Signals default to 0.25 mm.
  • Rule areas keep tracks off B.Cu under Q1 and U2, so the bottom pour stays whole there (spec section 8). Ground vias are still allowed.
  • Return Q1's source (pin 2) straight to the GND pad of C2.
  • The pours are stitched with 32 GND vias (0.6/0.3 mm, tented): one beside each GND pad, two between C9 and U1, plus a sparse 8 mm grid. The +24V and +3V3 tracks split the top pour into regions joined only by thin necks, and the vias tie every region to the bottom pour. The vias stay clear of the routes still to be drawn and of the mounting-hole keepout, and no via drill lands on silkscreen. A few via rings reach under the edge of a part outline; they are tented, so this is cosmetic.
  • C6 pad 2 had only one thermal spoke because SEL1 and SEL2 crowd it. It now has a 0.5 mm GND track to a via at (125.75, 108.75).
  • HB_GND joins J3 pin 1, J4 pins 1–2 and F2 pad 1. A 0.25 mm track is enough, and it survives the brief fault current before F2 trips. J3.1 to J4.1 runs easily on B.Cu. Keep it out of the GND pour: F2 is the only connection between the two grounds.
  • scripts/export-fab.sh refills the pours before its DRC, without saving the board.

Wiring and mounting

  • Fuse the 24 V feed at the source: a 2–3 A fast fuse (rated ≥ 32 V DC) in the + lead at the PSU or tap point, or a separate 1–2 A supply. F1 is rated to interrupt only 10 A and does not protect the J1 cable.
  • Run the supply's − wire straight to J1 pin 2. Don't share it with the Hackerboard cable's ground, so only signal current flows through the Hackerboard ground.
  • Check the strip wiring for a short between + and − before the first power-up.
  • Mount the board on standoffs with nylon screws, or keep metal hardware away from any grounded frame. The mounting holes have no copper around them.
  • Avoid hot-plugging J1 at 28 V with long leads (see Open items).

Connectors

Pin 1Pin 2Pin 3Pin 4Pin 5Pin 6
J1 24 V in+24 VGND
J2 LED stripStrip +Strip −
J3 Hackerboard J6 pins 1–5GND (via F2)out0out1out2out3
J4 FTDI adapterGND (via F2)CTS (GND via F2)VCC (n.c.)TXDRXD / UPDIDTR (n.c.)

Hackerboard J6 is a 1×10 2.54 mm footprint, usually bare holes. Its pin 1 is the square pad by the GND label at the 0 end. A straight 1×5 cable from J6 pins 1–5 to J3 matches pin for pin.

Flashing

J4 takes any USB-serial adapter in the standard FTDI pin order with 3.3 V logic (FT232R, CP2102, or a CH340 that really runs at 3.3 V). The SerialUPDI network (D3 and R11) is on the board, so the adapter needs no modification.

  1. Power the board from 24 V. J4's VCC pin is not connected.

  2. Plug the adapter in with its GND on J4 pin 1 (the GND end of the header).

  3. Flash with avrdude 8.x:

    bash
    avrdude -c serialupdi -p t412 -P /dev/cu.usbserial-XXXX -U flash:w:firmware.hex:i

    or pymcuprog:

    bash
    pymcuprog write -t uart -u /dev/cu.usbserial-XXXX -d attiny412 -f firmware.hex --erase --verify

Keep the default 115200 baud at 3.3 V. In the Arduino IDE with megaTinyCore, pick "SerialUPDI - SLOW: 57600 baud", a 10 MHz clock and BOD 2.6 V. Never change the UPDI/reset pin fuse: recovery would then need a 12 V programmer.

A Microchip programmer (Atmel-ICE, MPLAB SNAP, PICkit) connects to J4 pin 5 (UPDI) and pin 1 (GND), with its target-voltage sense lead on TP2 (+3V3) and the board powered from 24 V. Leave "power target from tool" off.

Using it from the printer

gcode
M267 R3 B0    ; once: all expander pins are outputs (firmware default)
M267 R1 B15   ; level 15 (full on); B0 = off, B1..B14 in between

The level persists in the printer's EEPROM. While the printer boots, or when the cable is unplugged, the inputs float high and the strip is off.

Checks

bash
python3 check_netlist.py
bash
scripts/export-fab.sh

The script runs ERC (--severity-all --exit-code-violations), the netlist check and DRC with --schematic-parity after refilling the pours. It writes Gerbers and separate plated and non-plated drill files only when DRC reports no violations and no unrouted connections.

Changes from spec Rev 0.1

  • Resistors and small capacitors are 0603. The 47 µF electrolytic is replaced by two 4.7 µF 50 V X7R 1206 MLCCs (C2, C9), because no 50 V bulk part exists in 0603.
  • J4 is a 6-pin FTDI-style header with a SerialUPDI network (D3, R11 470 Ω) instead of a bare 3-pin UPDI header.
  • SEL pins are permuted for a crossing-free layout: SEL0 = PA2, SEL1 = PA1, SEL2 = PA7, SEL3 = PA6. Section 6 of the spec allows this.
  • Q1 is a ROHM RTR030N05HZGTL (45 V) instead of the AO3422 (55 V), which Mouser does not carry.
  • F2 puts the Hackerboard and programmer grounds (net HB_GND) behind a 0.1 A PPTC, and R7–R10 are 10 kΩ instead of 1 kΩ.
  • Board constraints follow JLCPCB's 2-layer 1 oz capabilities. The design net classes keep the spec's 0.2 mm clearance and 0.25 / 0.5 mm tracks.

Open items

  • Reverse polarity with a shared ground. D1 protects only the board's own +24V rail. If the supply shares ground with the printer and the J1 wires are swapped, board GND rises to supply +. F2 then trips and stops the short through the Hackerboard ground, and the 10 kΩ R7–R10 keep the current into the input pins to about 2.4 mA each. Two exposures remain:
    • The pull-ups R3–R6 draw up to about 11 mA out of +3V3, pulling it about 0.6 V below GND. That is past the U1 and U2 supply-pin limits. A Schottky clamp from GND to +3V3 would fix it.
    • A programming adapter plugged in at the same time sees 41–57 mA through R11, which burns R11 (0.8–1.5 W) and stresses U2's UPDI pin and the adapter. Check J1 polarity before plugging in an adapter. A reverse-polarity MOSFET in the J1 return would remove both by keeping board GND from rising at all.
  • Strip short. F1 protects the wiring and D1, not Q1. A short across J2 while the strip is lit can destroy Q1 (3 A continuous, 12 A for 10 µs). A failed Q1 usually shorts and leaves the strip on. Replace Q1 after any strip short.
  • Hot-plug overshoot. The all-ceramic 24 V input rings when J1 is hot-plugged, and D1 holds the peak on +24V. At 24 V with leads of 2 m or less the first peak is about 30–36 V. At 28 V with heavy leads and F1 near its minimum resistance it can reach 45–50 V, above Q1's 45 V and the capacitors' 50 V rating. A 47 µF 50 V electrolytic on +24V would damp it to under 30 V.
  • Prusa lists the Core One INDX as not compatible with the GPIO Hackerboard, although firmware 6.9.1 and 6.10.1 still enable the M262–M268 commands on it.
  • JLCPCB charges a small-board fee when a side is 30 mm or less. 40 × 31 mm avoids it.

Parts

39
QtyValueFootprintReferences
810kResistor_SMD:R_0603_1608MetricR3, R4, R5, R6, R7, R8, R9, R10
410n 50V X7RCapacitor_SMD:C_0603_1608MetricC5, C6, C7, C8
24.7u 50V X7RCapacitor_SMD:C_1206_3216MetricC2, C9
2B160Diode_SMD:D_SMAD1, D2
2M3MountingHole:MountingHole_3.2mm_M3H1, H2
1+24VTestPoint:TestPoint_Pad_D1.0mmTP1
1+3V3TestPoint:TestPoint_Pad_D1.0mmTP2
10.1A 60VFuse:Fuse_1812_4532MetricF2
10.5A 60VFuse:Fuse_1812_4532MetricF1
1100Resistor_SMD:R_0603_1608MetricR1
1100kResistor_SMD:R_0603_1608MetricR2
1100n 50V X7RCapacitor_SMD:C_0603_1608MetricC4
110u 10V X5RCapacitor_SMD:C_0603_1608MetricC3
12.2u 50V X5RCapacitor_SMD:C_0603_1608MetricC1
124V INTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalJ1
1470Resistor_SMD:R_0603_1608MetricR11
1ATtiny412-SSNPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU2
1BAT54HT1GDiode_SMD:D_SOD-323D3
1FTDI-UPDIConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ4
1GNDTestPoint:TestPoint_Pad_D1.0mmTP3
1HACKERBOARDConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ3
1LED STRIPTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalJ2
1LED-TestPoint:TestPoint_Pad_D1.0mmTP5
1MCP1792T-3302H/CBPackage_TO_SOT_SMD:SOT-23U1
1PWMTestPoint:TestPoint_Pad_D1.0mmTP4
1RTR030N05HZGPackage_TO_SOT_SMD:SOT-23Q1

Similar boards

  • 6 layers66 × 54 mmJC8012P4A1C I W Y CAN, the printed circuit board in 3D

    JC8012P4A1C I W Y CAN

    Meisterschulen-am-Ostbahnhof-Munchen/JC8012P4A1C_I_W_Y_CAN

    JC8012P4A1C_I_W_Y addon PCB for CAN-Bus

    45 partsGPL-3.0
  • 2 layers100 × 140 mmWrectangle V4, the printed circuit board in 3D

    Wrectangle V4

    Wildcat-Rocket-Engineering-Club/WRECtangle

    WRECtangle code

    137 parts
  • 2 layers60 × 111.3 mmSilkscreen pcb, the printed circuit board in 3D

    Silkscreen pcb

    iandchasse/silkscreen-pcb

    Silkscreen: open-hardware ESP32-S3 e-paper reader mainboard (KiCad 9). Formerly the de-link hub.

    189 parts589CERN-OHL-S-2.0
  • 4 layers85 × 56 mmAnthC, the printed circuit board in 3D

    AnthC

    Anthilla/AnthC

    Anthilla AnthC Board

    211 parts40
  • 8 layers358 × 185 mmMonolith ducktop2, the printed circuit board in 3D

    Monolith ducktop2

    EwoudVV/ducktop2

    An open-source 16-inch laptop designed from scratch.

    1,225 parts26MIT
  • 2 layers63.5 × 99.1 mmBlugasm, the printed circuit board in 3D

    Blugasm

    saawsm/Blugasm

    A battery powered nogasm with support for bluetooth toys.

    74 parts19GPL-3.0
  • 4 layers46.4 × 99.8 mmTrimix Analyzer, the printed circuit board in 3D

    Trimix Analyzer

    magnus188/aegir

    Open-source ESP32-P4 trimix analyzer prototype for technical diving,

    171 parts14
  • 2 layers119.9 × 57 mm1v2boost, the printed circuit board in 3D

    1v2boost

    benkrasnow/1v2-boost-converter

    Schematics and PCB layout for a boost converter 0.9V minimum input, 30A maximum input current

    77 parts7MIT

Questions

How big is the Led pwm-4bit PCB?

It measures 40 × 30 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Led pwm-4bit use?

39 parts, built around the ATTINY412-SSN, RC0603FR-0710KL, B160-13-F(MS) and 0ZCG0010FF2C. 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 Led pwm-4bit KiCad files?

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

Can I use the Led pwm-4bit design in my own project?

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