Skip to the content
4 layers39.7 × 22.7 mmHat rpizero tx, the printed circuit board in 3D

Hat rpizero tx

Idetic/OCC_boards

Repository to share of OCC related PCB.

Size
39.7 × 22.7 mm
Copper layers
4
Thickness
1.61 mm
Parts
49
Nets
53
Pads
174
Tracks, vias
383, 29
Pours
3
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
20 Sep 2024
Updated
20 Oct 2026

Overview

Hat rpizero tx is an open-source printed circuit board by Idetic, from the Idetic/OCC_boards repository on GitHub. It is a 4-layer board of 39.7 × 22.7 mm with 49 parts on 53 nets, routed with 383 tracks and 29 vias.

It is built around the STM32L432KCU6, MCP6001T-I/OT(MS) and TLV75533PDBVR-MS, with the 2N2222AU, GT-USB-7010C and MK-11C04-G013 among its other parts. Its parts include 18 resistors, 13 capacitors, 4 ICs, 2 diodes and 2 switches. It belongs with the STM32, NXP (LPC, Kinetis, i.MX RT) and Raspberry Pi (Linux) boards of this library.

Main components

7

README

Constant_Current_PCB/last_version/README.md

STM32 Constant-Current LED Driver Board

A compact STM32-controlled LED driver with an adjustable linear current sink, high-side current sensing, USB-C, and expansion headers. The circuit can drive an external LED from a 5 V supply, with the current reference provided by the MCU's PA4 DAC output.

This document describes the checked-in KiCad schematic and PCB. Values are design values, not measured performance guarantees. Output current limits, modulation bandwidth, and thermal performance still require characterization.

Board specifications

ParameterDesign specification
Projecthat_rpizero_tx
CAD versionPCB saved with KiCad 9.0
PCB outline39.67 × 22.70 mm, rectangular, measured from Edge.Cuts
Configured PCB thickness1.6062 mm
Copper layersFour: F.Cu, In1.Cu, In2.Cu, B.Cu
DielectricFR4 in the configured stackup
Configured copper thicknessOuter layers: 35 µm; inner layers: 15.2 µm
Supply railNominal +5 V from USB-C or POWER2
Logic rail+3.3 V, generated by U4 (TLV75533PDBVR)
MicrocontrollerU1: STM32L432KCU6, UFQFPN-32 with exposed pad
External crystalX1: 32.768 kHz, specified component load capacitance 6 pF and tolerance 20 ppm
Crystal capacitorsC1, C2: 8 pF each
LED outputsOne external LED connection, LED1
Current controlU2 MCP6001T-I/OT, Q1 2N2222AU, R5 and R7 trimmers
Current measurementU3 INA199A1DCKR with R8 = 0.110 Ω high-side shunt
InterfacesUSB data, SWD, serial signal header, I²C, PA1–PA3, two DAC signals
FirmwareNo firmware or flashing image included in this directory

The project filename does not establish Raspberry Pi HAT compatibility. The current PCB has no 40-pin Raspberry Pi header.

Power

USB1 VBUS and POWER2 pin 1 connect directly to the same +5 V net. U4 generates +3.3 V for the MCU and logic headers; U2 and U3 use +5 V. USB-C CC1 and CC2 each have a 5.1 kΩ pull-down resistor (R9 and R10).

The design has no separate power-source selection or isolation between USB VBUS and POWER2. Use one supply source at a time unless the external power arrangement explicitly handles the shared rail. The files do not establish an approved input-voltage range or total current budget.

LED current driver

The LED current path is:

text
+5 V → R8 (0.110 Ω) → LED1 pin 1 → external LED
     → LED1 pin 2 → Q1 collector/emitter → R7 → GND

U2 compares the R5 wiper voltage with Q1's emitter voltage and drives Q1's base. R5 is a 10 kΩ trimmer between DAC1/PA4 and ground. R7 is a 100 Ω trimmer used as a variable emitter resistor; its third terminal is unconnected. R6 is a 10 kΩ resistor between Q1 base and emitter.

While the feedback loop is regulating, the approximate relationships are:

text
V_reference = α × V_DAC1                  (0 ≤ α ≤ 1, set by R5)
I_emitter ≈ V_reference / R7_effective
I_LED ≈ I_emitter                        (neglecting base current and R6 current)
V_shunt = I_LED × 0.110 Ω
V_I_LED ≈ G_INA199A1 × V_shunt            (within the amplifier's operating limits)

These equations describe circuit operation, not a safe current range. R7 can approach zero resistance, so its marked 100 Ω value does not provide a fixed minimum current-limiting resistance. The usable current depends on trimmer settings, DAC voltage, LED forward voltage, transistor dissipation, component ratings, and available voltage headroom. The board does not include a switching boost stage.

U3 measures the voltage across R8. Its output is available at SW2 pin 4 (I_LED); the netlist does not connect this output directly to an MCU ADC input. Check the amplifier output range before connecting it to a 3.3 V input.

Connector pinouts

Pin numbers below follow the schematic symbols and PCB pad numbers. Use the footprint's pin-1 marker to determine physical orientation.

ConnectorPinSignalDescription
POWER21+5VSupply input, shared with USB VBUS
POWER22GNDSupply return
LED11LED+LED anode supply, after R8
LED12LED− / CollectorLED cathode connection to Q1 collector; not ground
DAC11DAC1MCU PA4; also feeds R5
DAC12DAC2MCU PA5; this connector has no ground pin
I2C11+3.3VLogic supply
I2C12GNDGround
I2C13SDAMCU PB7, 4.7 kΩ pull-up to +3.3 V
I2C14SCLMCU PB6, 4.7 kΩ pull-up to +3.3 V
USART11+3.3VLogic supply
USART12GNDGround
USART13USART1_TXMCU PA9 through R13 (100 Ω)
USART14USART1_RXMCU PA8 through R14 (100 Ω); see review notes
SW21SWCLKMCU PA14 through R3 (75 Ω)
SW22SWDIOMCU PA13 through R4 (75 Ω)
SW23NRSTIsolated net in the current design; see review notes
SW24I_LEDU3 current-sense output
PA11+3.3VLogic supply
PA12GNDGround
PA13PA1 inputMCU PA1 through R15 (1 kΩ); C13 (100 nF) to ground at MCU side
PA21+3.3VLogic supply
PA22GNDGround
PA23PA2MCU PA2, 10 kΩ pull-up to +3.3 V
PA31+3.3VLogic supply
PA32GNDGround
PA33PA3MCU PA3, 10 kΩ pull-down to ground

The pin headers use 2.54 mm pitch. POWER2 and LED1 use two-position terminal-block footprints with 2.54 mm pitch.

USB1 routes D− to MCU PA11 and D+ to PA12. USB functionality depends on firmware. The serial header exposes logic signals; no RS-232 or RS-485 transceiver is present.

Boot, reset, and programming

  • SW1 selects the BOOT0 connection between +3.3 V and ground through R18 (10 kΩ). R1 adds a permanent 10 kΩ pull-down on BOOT0.
  • SW3 pulls the MCU NRST pin to ground. R2 (10 kΩ) pulls that pin up to +3.3 V, and C9 (100 nF) connects it to ground.
  • SW2 provides SWCLK and SWDIO through 75 Ω series resistors. It provides neither a ground pin nor a +3.3 V reference pin; obtain those from another header when connecting a debugger.
  • Firmware must configure the DAC and peripherals before their intended behavior can be specified. No default LED current, USB protocol, serial baud rate, or modulation waveform is defined by these hardware files.

Design review notes

The following observations are present in both the exported schematic netlist and PCB pad-net assignments:

ItemObservation and implication
SW2 resetSW2 pin 3 is on /NRST, while MCU pin 4, SW3, R2, and C9 are on Net-(U1-NRST). SW2 pin 3 therefore does not provide MCU reset in the current design.
Serial RXThe USART1_RX net connects to PA8, and PA10 is unconnected. Verify the MCU alternate-function mapping and intended firmware before relying on this as a hardware USART receive interface.
MCU exposed padU1 pad 33 is assigned an unconnected net. Confirm the package's exposed-pad connection requirements before fabrication.
Current readbackI_LED is exposed on SW2 pin 4 without a direct MCU ADC connection.

These are connectivity observations, not a complete electrical-rule, routing, or manufacturability review.

Initial setup and characterization

  1. Review the connector orientation, LED polarity, and design notes above.
  2. With power disconnected, set R5 toward its ground end and set R7 to a high effective resistance. Verify the settings with a meter.
  3. Connect the external LED to LED1 and apply a current-limited nominal 5 V supply through one power input.
  4. Verify +5 V and +3.3 V, then program the MCU using SWD with a shared ground and suitable voltage reference from another header.
  5. Start with a low DAC1 reference. Measure LED current externally while adjusting the reference and trimmers; monitor transistor and trimmer temperature.
  6. Record the usable current range, thermal limits, and current-sense calibration before operating at the intended load or modulation rate.

Project files and manufacturing

PathContents
hat_rpizero_tx.kicad_proKiCad project settings
hat_rpizero_tx.kicad_schTop-level schematic, power and connectors
STM32.kicad_schMCU, crystal, boot and reset circuitry
Driver_LED.kicad_schLED current driver and sensing circuitry
hat_rpizero_tx.kicad_pcbPCB layout and stackup
sym-lib-table, fp-lib-tableSymbol and footprint library configuration
models/, models.pretty/, models.3dshapes/Local component resources
jlcpcb/Fabrication and assembly exports
jlcpcb/production_files/BOM-hat_rpizero_tx.csvBOM with values, designators, footprints and LCSC codes
jlcpcb/production_files/CPL-hat_rpizero_tx.csvComponent placement export
jlcpcb_old/, jlcpcb_viaje_turin_03-03-26/Earlier manufacturing export sets
hat_rpizero_tx-backups/KiCad project backups

Open the .kicad_pro file in KiCad 9 or a compatible later version. Resolve any library paths needed on the local machine. Regenerate fabrication and assembly exports from the reviewed PCB before ordering: existing exports are snapshots and are not established here as matching the latest layout. The configured stackup is a CAD setting; confirm the actual fabrication stackup with the manufacturer.

Specifications still to establish

SpecificationStatus
Approved input-voltage range and maximum supply currentNot characterized
Minimum and maximum regulated LED currentNot characterized
Supported LED forward-voltage rangeNot characterized
Current accuracy, ripple and calibrationNot characterized
Continuous power and thermal limitsNot characterized
Modulation bandwidth and optical data rateNot characterized
Operating and storage temperature rangesNot established
Firmware repository, build and flashing instructionsNot supplied
Hardware revision and matching manufacturing releaseNot identified
LicenseNo license file supplied

Parts

49
QtyValueFootprintReferences
4100nFGRM155R71H104KE14D:C0402C3, C4, C7, C9
410kResistor_SMD:R_0402_1005MetricR6, R16, R17, R18
3Conn_01x03Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalPA1, PA2, PA3
3Conn_01x04Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalI2C1, SW2, USART1
2100Resistor_SMD:R_0402_1005MetricR13, R14
210kRC0402FR-0710KL:R0402R1, R2
210uFCL05A106MP5NUNC:C0402C5, C6
21uCapacitor_SMD:C_0603_1608MetricC11, C12
24.7kResistor_SMD:R_0402_1005MetricR11, R12
25.1kResistor_SMD:R_0402_1005MetricR9, R10
275Resistor_SMD:R_0402_1005MetricR3, R4
28pFCapacitor_SMD:C_0402_1005MetricC1, C2
2Conn_01x02DB125:CONN-TH_DB125-2.54-2P-GNLED1, POWER2
10.1uFCapacitor_SMD:C_0402_1005MetricC10
1100nCapacitor_SMD:C_0402_1005MetricC13
1110m1206W4F330LT5E:R1206R8
11kResistor_SMD:R_0402_1005MetricR15
11uFCL05A105KP5NNNC:C0402C8
12N2222AU2N2222AU:SOT-89-3_L4.5-W2.4-P1.50-LS4.0-BRQ1
13296W-1-101_C489979393296W-1-101LF:RES-ADJ-TH_3296WR7
13296W-1-103_C489979373296W-1-103:RES-ADJ-TH_3296WR5
1Conn_01x02Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalDAC1
1GT-USB-7010Ceasyeda2kicad:USB-C-SMD_GT-USB-7010CUSB1
1INA199A1DCKRINA199A1DCKR:SC-70-6_L2.2-W1.3-P0.65-LS2.1-BRU3
1MC-306 32.768kHz 6.0pF 20ppmQ13MC30620006:MC-306_4P-L8.0-W3.2-P5.5-BLX1
1MCP6001T-I/OTMCP6001T-I:SOT-23-5_L3.0-W1.7-P0.95-LS2.8-BRU2
1MK-11C04-G013MK-11C04-G013:SW-SMD_MK-11C04-G013SW1
1STM32L432KCU6models:UFQFPN-32_L5.0-W5.0-P0.50-TL-EP3.5U1
1TLV75533PDBVRTLV75533PDBVR:SOT-23-5_L3.0-W1.7-P0.95-LS2.8-BRU4
1TS-1088-AR02016TS-1088-AR02016:SW-SMD_L3.9-W3.0-P4.45SW3

More from Idetic/OCC_boards

1
  • 2 layers39 × 24.5 mmSignal conditioning, the printed circuit board in 3D

    Signal conditioning

    Idetic/OCC_boards

    Repository to share of OCC related PCB.

    7 parts

Similar boards

  • 2 layers62.7 × 76.4 mmRP2DV Beanz, the printed circuit board in 3D

    RP2DV Beanz

    BrainBoardz/BrainBoardz

    The Repository for All Things BrainBoardz Related

    133 partsGPL-3.0
  • 4 layers150 × 137.1 mmController, the printed circuit board in 3D

    Controller

    CircuitGuy943/Sabre-Integrated-flight-controller

    (🚧) A "Jack of all trades" custom flight controller board. With support for both power and control and the ability for custom firmware

    282 parts2GPL-3.0
  • 4 layers2 × 24.9 mmPedal, the printed circuit board in 3D

    Pedal

    benthacher/pedal

    Digital guitar pedal with game boy micro form factor

    166 parts
  • 4 layers34 × 48 mmNIVA pod, the printed circuit board in 3D

    NIVA pod

    https-shubhamsahu/niva

    Live dashboard · Firmware · Rev C.1 hardware · Scoring rules

    65 parts
  • 6 layers54.6 × 57.1 mmCM5 MINIMA 2, the printed circuit board in 3D

    CM5 MINIMA 2

    piecol/CM5_MINIMA_REV2

    Compact, feature-filled CM5 carrier board

    102 parts170CERN-OHL-S-2.0
  • 2 layers85.6 × 88.9 mmOM Landroid MB, the printed circuit board in 3D

    OM Landroid MB

    rich21044/Openmower-for-Landroid-WR141E

    Taking the hardware developed as part of ClemensElfleins work on Openmower and adapting it to fit a 2019 Landroid WR141E.

    126 parts8GPL-3.0
  • 2 layers45 × 15 mmEz uart adapter, the printed circuit board in 3D

    Ez uart adapter

    easybe/ez-uart-adapter

    An USB-UART adapter that can power-cycle your board

    23 partsCERN-OHL-W-2.0
  • 6 layers59.5 × 62.7 mmCM5 MINIMA 3, the printed circuit board in 3D

    CM5 MINIMA 3

    KiCad/kicad-source-mirror

    This is an active mirror of the KiCad development branch, which is hosted at GitLab (updated every time something is pushed). Pull requests on GitHub are not accepted or watched.

    112 parts3.1kGPL-3.0

Questions

How big is the Hat rpizero tx PCB?

It measures 39.7 × 22.7 mm and has 4 copper layers, 1.61 mm thick.

What parts does the Hat rpizero tx use?

49 parts, built around the STM32L432KCU6, MCP6001T-I/OT(MS), TLV75533PDBVR-MS and 2N2222AU. 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 Hat rpizero tx KiCad files?

From the Idetic/OCC_boards repository on GitHub, at the commit this page was made from: the board is Constant_Current_PCB/last_version/hat_rpizero_tx.kicad_pcb and its schematic Constant_Current_PCB/circuit/signal_conditioning.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Hat rpizero tx design in my own project?

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