Skip to the content
PCBKitNew board
2 layers60 × 62 mmCPG, the printed circuit board in 3D

CPG is a mains-powered BleRiot node for controlling a circulation pump and a motorized 3-way or 4-way valve in floor-heating and radiator-heating circuits.

Size
60 × 62 mm
Copper layers
2
Thickness
1.6 mm
Parts
39
Nets
40
Pads
140
Tracks, vias
186, 125
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
2 Aug 2026
Updated
3 Nov 2026

Overview

CPG is an open-source printed circuit board by burgrp, from the burgrp/bleriot-CPG repository on GitHub. It is a 2-layer board of 60 × 62 mm with 39 parts on 40 nets, routed with 186 tracks and 125 vias.

It is built around the HLK-PM03, PAN2110P0AA and BTA08S-600CW(KTP), with the WS2812B among its other parts. Its parts include 14 resistors, 6 capacitors, 6 ICs, 5 diodes and 3 connectors.

Main components

4

README

README.md

BleRiot Circulation Pump Group Controller

CPG is a mains-powered BleRiot node for controlling a circulation pump and a motorized 3-way or 4-way valve in floor-heating and radiator-heating circuits. It provides one switched output for the pump and two interlocked directional outputs for a reversible valve actuator.

alt text

The board is intended for supervisory heating control. Its triac channels are on/off outputs; they are not phase-angle dimmers.

Functions

  • Circulation pump on/off control.
  • Clockwise and counter-clockwise valve actuation.
  • Firmware interlock preventing both valve directions from being energized at the same time.
  • 100 ms break-before-make delay when changing valve direction; the latest command received during the delay wins.
  • PAN2110 sub-GHz radio running the BleRiot register protocol.
  • WS2812 status LED for local state indication.
  • Explicit watchdog lease with a configurable safe valve position.
  • 30-second RF link-loss fail-safe.
  • Onboard PY32F030 microcontroller and mains-to-3.3 V power module.

This arrangement supports common motorized mixing and diverting valves whose actuator has a neutral connection and separate CW and CCW live inputs. Confirm the actuator wiring and required reversal delay against its documentation.

Connections

Connector numbering follows the KiCad schematic and PCB footprints.

ConnectorPinFunction
J1 MAINS1Protective earth (PE)
J1 MAINS2Neutral (N)
J1 MAINS3Line (L)
J2 VALVE1Valve neutral (N)
J2 VALVE2Valve CCW switched live
J2 VALVE3Valve CW switched live
J3 PUMP1Protective earth (PE)
J3 PUMP2Pump neutral (N)
J3 PUMP3Pump switched live

The three switched outputs use BTA08S-600CW triacs driven through MOC306x optotriacs. The pump channel is independent. Valve CW and CCW share a firmware interlock and must also be treated as mutually exclusive by any external controller.

BleRiot Registers

TagNameTypeMeaning
1vcwboolValve clockwise output
2vccwboolValve counter-clockwise output
3pumpboolCirculation pump output
5watchdogintSafety lease remaining time in seconds

A value of 0 is off and 1 is on. During valve reversal both valve registers report off until the dead time expires and the pending direction is energized. Null and unknown writes are ignored, and other boolean values are normalized to 1. The former test-only LED register is retired.

The watchdog starts expired. Positive writes arm it for up to 60 seconds, and reads return the remaining whole seconds rounded up. Zero, negative, and NULL writes expire it immediately. While expired, pump and valve writes are ignored. Re-arming does not restore prior commands; the controller must send fresh output writes.

While the BleRiot link is online and the watchdog is armed, the status LED is automatic:

Operating stateLED indication
All outputs offAmber (0xa05000)
Pump on, no valve activeGreen (0x00ff10)
Valve CW activeRed (0xff000a)
Valve CCW activeBlue (0x0020ff)

Valve state has priority over pump state. During valve dead time, the LED shows the pump indication when the pump is on and the idle indication otherwise. An expired watchdog blinks blue (0x0000ff): 200 ms on and 800 ms off. An RF offline link blinks orange (0xff3000) with the same timing and takes priority over the watchdog indication.

When the watchdog expires, firmware switches the pump off and commands the valve to its configured safe end. Valve reversal still uses the configured break-before-make delay. WatchdogSafePositionCCW in fw/cmd/dev/main.go selects the safe end: false selects CW and true selects CCW. The current baked configuration selects CW. The safe direction remains energized for actuators with internal end-limit switching.

Independently, 30 seconds without a valid RF packet marks the link offline and applies the same safe state once. Startup remains all-off until the explicit watchdog is armed; output writes are ignored before then.

Firmware And Pin Mapping

The firmware targets a PY32F030F1 MCU and controls a PAN2110 radio over three-wire SPI.

FunctionMCU pinSchematic netBehavior
PumpPB4PUMPActive-low output
Valve CCWPB5VALVE_CCWActive-low output
Valve CWPB6VALVE_CWActive-low output
Status LEDPB7LEDWS2812 data
PAN2110 CSNPF3~RF_CSActive-low chip select
PAN2110 SCKPA2RF_SCKClock
PAN2110 dataPA3RF_DATABidirectional data

At startup, firmware preloads PB4-PB6 high before changing them to outputs so the active-low optotriac inputs remain off. All three switched outputs start off. The status LED uses the offline heartbeat until a valid packet is received.

There is no mains zero-cross input. The MOC306x optotriacs shown in the schematic are zero-cross devices, so these channels provide on/off switching only.

Repository Layout

  • board/ contains the KiCad schematic, PCB, BOM, and fabrication outputs.
  • fw/ contains the importable cpg TinyGo firmware and board-owned build profile.
  • fw/spec/ contains the configuration, register contract, chip, and firmware manifest.
  • fw/cmd/dev/ contains the local inventory and BleRiot CLI.
  • burgrp/tinygo-drivers/ws2812 contains the reusable 24 MHz PY32 WS2812 driver.
  • sub/hw-kicad/ is the shared KiCad library submodule.

Initialize the hardware library after cloning:

bash
git submodule update --init --recursive

Build And Test

The firmware requires Go, TinyGo with the PY32 target support used by this project, GNU Arm Embedded binutils, and pyOCD with the Puya device pack.

bash
cd fw
go test ./...
go run ./cmd/dev node gen --name cpg
go run ./cmd/dev node build --name cpg --disassembly

BleRiot generates a private entry point under .bleriot/firmware/cpg and calls cpg.Run with the configured identity and spec.Config. The firmware profile selects py32f030x8, scheduler-none, leaking GC, RTT serial, and a 100 kHz pyOCD connection.

The first board was programmed through a WCH-Link at 100 kHz using an under-reset connection. With the board connected:

bash
cd fw
go run ./cmd/dev node install-pack --name cpg
go run ./cmd/dev node build --name cpg --flash --rtt

Confirm the fitted MCU density before relying on the py32f030x8 target. Check the physical board before using X1: older board revisions route the SWD header labels to the wrong MCU pins and do not expose target voltage or reset.

Hardware Status

The current firmware has been built, flashed, and exercised on the board:

  • PAN2110 startup was confirmed over RTT on BleRiot channel 37 with spread factor S8.
  • Safe startup was confirmed with pump, CW, and CCW outputs all off.
  • The valve interlock and latest-command state machine are covered by host tests.
  • The WS2812 waveform and all RGB channels were validated at 3.3 V.

End-to-end testing with the intended pump, valve actuator, heating controller, and RF hub is still required for each installation.

Safety

This design connects directly to hazardous mains voltage. Assembly, installation, testing, and enclosure work must be performed by suitably qualified people using applicable electrical codes and safe isolation practices.

Before deployment, independently verify at least:

  • Input fusing and upstream over-current protection.
  • PCB creepage and clearance for the applicable mains category.
  • Protective-earth continuity and enclosure construction.
  • Triac current, thermal, and inductive-load commutation margins.
  • The exact MOC306x trigger-current grade and the fitted 270 ohm input resistor.
  • WS2812 operation at 3.3 V, below the linked part's specified supply range.
  • Pump and valve actuator voltage, current, wiring, and duty-cycle limits.
  • Required valve reversal delay and behavior after RF or controller loss.

After watchdog or RF timeout expiry, the pump switches off and the configured valve direction remains energized. Confirm that the actuator has suitable internal end-limit switching, and define maximum pump and valve run times for the installation.

Do not connect a pump, valve, or mains supply based only on the connector table; verify the assembled board against the schematic, PCB, and the equipment manufacturer's wiring documentation.

Parts

39
QtyValueFootprintReferences
9680RResistor_SMD:R_0805_2012MetricR4, R5, R6, R8, R9, R10, R12, R13, R14
3100nCapacitor_SMD:C_0805_2012MetricC2, C4, C5
3270RResistor_SMD:R_0805_2012MetricR3, R7, R11
3BTA08S-600CWPackage_TO_SOT_SMD:TO-252-2D3, D4, D5
3MOC306XMSPackage_DIP:SMDIP-4_W7.62mmU4, U5, U6
21uCapacitor_SMD:C_0805_2012MetricC1, C3
110kResistor_SMD:R_0805_2012MetricR1
116MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
1330RResistor_SMD:R_0805_2012MetricR2
147uCapacitor_SMD:C_0805_2012MetricC6
1Antenna_ShieldRF_Antenna:Texas_SWRA117D_2.4GHz_RightA1
1B72650M251K72Resistor_SMD:R_1210_3225MetricRV1
1HLK-PM03Drake:HLK-PM01U3
1LEDLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD2
1MAINSConnector_Phoenix_MSTB:PhoenixContact_MSTBA_2,5_3-G_1x03_P5.00mm_HorizontalJ1
1MountingHoleMountingHole:MountingHole_3.7mm_Pad_ViaH1
1PAN2110P0AAPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU1
1PUMPConnector_Phoenix_MSTB:PhoenixContact_MSTBA_2,5_3-G_1x03_P5.00mm_HorizontalJ3
1PY32F030F1xPxPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU2
1SWDDrake:SWDX1
1VALVEConnector_Phoenix_MSTB:PhoenixContact_MSTBA_2,5_3-G_1x03_P5.00mm_HorizontalJ2
1WS2812BLED_SMD:LED_WS2812B_PLCC4_5.0x5.0mm_P3.2mmD1

Questions

How big is the CPG PCB?

It measures 60 × 62 mm and has 2 copper layers, 1.6 mm thick.

What parts does the CPG use?

39 parts, built around the HLK-PM03, PAN2110P0AA, BTA08S-600CW(KTP) and WS2812B. 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 CPG KiCad files?

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

Can I use the CPG design in my own project?

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

Similar boards

  • 2 layers150 × 48 mmSSR5A, the printed circuit board in 3D

    SSR5A

    burgrp/bleriot-SSR5A

    10 channel mains switch

    66 parts
  • 2 layers40 × 42 mmBleriot rs485, the printed circuit board in 3D

    Bleriot rs485

    burgrp/bleriot-rs485

    DIN rail mounted RS485 to WiFi bridge

    21 parts1
  • 2 layers314 × 27 mmBleriot REG6, the printed circuit board in 3D

    Bleriot REG6

    burgrp/bleriot-REG6

    REG6 is a six-channel solid-state-relay controller built around a PY32F030 and PAN2110. This repository contains the KiCad hardware and a standalone TinyGo/BleRiot module under fw/ that exposes one integer percentage…

    85 parts
  • 2 layers77 × 51 mmAt32f455-bob, the printed circuit board in 3D

    At32f455-bob

    burgrp/hw-at32f455-bob

    66 parts
  • 4 layers68 × 19 mmBob, the printed circuit board in 3D

    Bob

    burgrp/bleriot

    BleRiot is a compact request/response protocol for reading and writing named integer registers on low-power RF nodes. A Linux hub polls the nodes and bridges their registers to an external Registry service.

    25 parts
  • 2 layers55 × 22 mmBleriot sense, the printed circuit board in 3D

    Bleriot sense

    burgrp/bleriot-sense

    BleRiot Sense is a compact single-sensor BleRiot node built around a PY32F003L16S6TU microcontroller and a PAN2110 long-range 2.4 GHz radio. Its sensor input is configured at assembly time for one of four uses:

    19 parts
  • 2 layers50 × 35 mmFan switch, the printed circuit board in 3D

    Fan switch

    burgrp/hw-fan-switch

    12V DC Fan switch based on ESP8266

    23 parts