
Drone fc
neilpate/Drone
A learning project: build a quadcopter from scratch — own hardware, own firmware, no existing flight stack.

A mains-powered, Zigbee-connected controller for a hydronic 3-way mixing valve — it regulates the supply-water temperature of a floor heating/cooling system and keeps regulating autonomously if the Zigbee link goes down.
ValveController is an open-source printed circuit board by afewyards, from the afewyards/HydroMix repository on GitHub, published under the MIT licence. It is a 4-layer board of 94.5 × 99.8 mm with 123 parts on 99 nets, routed with 821 tracks and 506 vias.
It is built around the ESP32-C6-WROOM-1-N4, IRM-03-5 and Z0103MN, with the IS31FL3730-QFLS2-TR, TPS61040DBV and HCPL-354-06AE among its other parts. Its parts include 41 resistors, 22 capacitors, 15 diodes, 10 connectors and 8 ICs. It belongs with the ESP32 and RISC-V boards of this library.
A mains-powered, Zigbee-connected controller for a hydronic 3-way mixing valve — it regulates the supply-water temperature of a floor heating/cooling system and keeps regulating autonomously if the Zigbee link goes down.
One repo, three parts: a custom KiCad PCB (ESP32-C6), ESP-IDF firmware with a host-testable control core, and a Zigbee2MQTT converter.
Status: Firmware 2.0.0 (rev-B:
HydroMix2identity, AUX 24VAC outputs, iPWM2 pump drive, on-board 8×8 display) is implemented on this branch and passes the full host-side unit suite (23/23); on-target bring-up is pending assembled boards, perfirmware/REVB_BRINGUP.md. Firmware 1.7.0 remains the released, OTA-deployed firmware (2026-08-11) on the currently-installed board. PCB rev A — the board 2.0.0 targets — is layout-complete and fab-ready (4-layer, 100 % routed, DRC clean); boards ordered 2026-08-12, not yet assembled/bench-tested (the schematic/PCB title block labels this board revision "A"; firmware docs call it rev-B — the 1.x board predates the lettering). Personal project.

A 3-way valve mixes SOURCE water (the hot or cold secondary side of a heat exchanger) with RETURN water from the floor loop to produce SUPPLY water at a target temperature. The controller:
Valve position 0 % = full recirculation (return water only — thermally harmless). 100 % = full source (full hot or cold). Parking the valve "closed" (100 %) would run the floor at full source temperature and is dangerous — so the safe park/idle position is mid-travel (~50 %), and a resync always drives toward the 0 % end, never the source end. See the design spec for the full rationale.
Custom single-board design in KiCad (pcb/). Rev A highlights:
| Block | Parts |
|---|---|
| MCU | ESP32-C6-WROOM-1-N4 (RISC-V, 802.15.4 Zigbee radio, 4 MB flash) |
| Power | 230 V AC → Mean Well IRM-03-5 (5 V) → TLV75733 LDO (3.3 V); USB-C 5 V is diode-OR'd in (B5819W) so the board bench-powers and flashes over USB-C with no mains |
| Pump interface | TPS61040 boost to 24 V, driving a Wilo Para ST 15-7-50 iPWM2 circulator over its PWM/feedback interface |
| Valve drive | 2× channel: MOC3063S zero-cross opto-triac → Z0103MN triac, switching the 230 V 3-point actuator; RC snubbers + X2 safety caps |
| AUX outputs | 2× CPC1035N PhotoMOS channels (24 VAC) with HCPL-354 loop-open/short detection |
| Mains protection | Varistor (B72210S) + fuse |
| Sensing | 5× DS18B20 on dedicated 1-Wire connectors (4.7 k pull-ups) |
| I/O | Tactile button, 8×8 LED matrix (KWM-20881AGB + IS31FL3730 driver), USB-C — native USB-Serial-JTAG (power, flash, console, JTAG in one port) |
| Connectors | Phoenix pluggable terminal blocks (mains in, actuator) + 5 sensor headers |
Full parts list: pcb/ValveController.csv. Custom 3D component models
live in pcb/3dmodels/; board.step (repo root) is the assembled-board export.
ESP-IDF 5.5.x, plain C on FreeRTOS. See firmware/README.md for the
full build/flash/monitor guide, GPIO map, partition/OTA scheme, console commands, and gestures.
The control logic lives in a pure-C, IDF-free component (firmware/components/ctrl_core/) so
it compiles and unit-tests on the host (macOS/Linux) before any hardware is involved:
feedforward — exact mixing physics, (T_set − T_return) / (T_source − T_return)pi — PI trim with conditional anti-windupgovernor — outermost safety stage; ramps toward recirculation on any supply excursionmode_detect — heating/cooling/idle with asymmetric dwell + hysteresisdegradation — sensor-fault fallback ladderpos_estimator, interlock, alarm, config_mapThe IDF-side glue (firmware/main/) wires that core to hardware: sensors_hw, valve_hw,
zigbee, ota, ui, console, control_task, config.
Quick start:
. ~/esp/esp-idf/export.sh
cd firmware
idf.py set-target esp32c6 # first time only
idf.py build
idf.py -p <PORT> flash monitor # over USB-C; Ctrl+] to exit the monitorHost-side control tests (plain CMake + Unity, no hardware): firmware/test_host/.
Router role · manufacturer Knife · model HydroMix.
water_running = regulation enable, driven by the host's
pump/flow automation), Thermostat (local temp = supply; setpoints clamped 17–35 °C; mode is
auto-detected, host SystemMode writes accepted-but-ignored), Analog Output (manual position,
writable only while regulation is off), OTA client, and a manufacturer-specific cluster
(0xFC00) exposing ~10 tunables, a self-clearing resync, and read-only alarm/fault bitmaps.z2m/valvectl.mjs is the external Zigbee2MQTT converter (friendly entity names,
tunables as settings, alarms as binary sensors, OTA index). The manufacturer OTA-publishing steps
are documented in the comment header of that file.
ValveController/
├── pcb/ KiCad project (schematic, board, DRC rules, BOM)
│ ├── 3dmodels/ custom STEP models
│ ├── Kleist2.pretty/ project footprint library
│ └── backups/ local pre-edit snapshots (git-ignored)
├── firmware/ ESP-IDF application
│ ├── main/ IDF glue (sensors, valve, zigbee, ota, ui, console)
│ ├── components/ctrl_core/ pure-C control logic (host-testable)
│ └── test_host/ Unity unit tests
├── z2m/valvectl.mjs Zigbee2MQTT external converter
├── docs/superpowers/ design spec + implementation plan
├── analysis/ design review reports (schematic, PCB layout)
└── board.step assembled-board 3D export⚠️ This board switches 230 V AC mains. All bench work — firmware, sensor reads, triac-drive
verification — can be done on USB-C power alone; do not connect mains until the drive channels
are verified per firmware/BENCH_CHECKLIST.md. And keep the position
convention in mind: the safe idle is mid-travel, not "closed."
Personal project by Thierry Kleist. Released under the MIT License.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 16 | 10k | Resistor_SMD:R_0402_1005Metric | R2, R3, R7, R8, R9, R13, R16, R20, R21, R22, R24, R26, R27, R28, R29, R39 |
| 7 | 100nF | Capacitor_SMD:C_0402_1005Metric | C2, C7, C8, C14, C16, C17, C20 |
| 6 | 100 | Resistor_SMD:R_0402_1005Metric | R12, R34, R35, R36, R37, R38 |
| 5 | 100 | Resistor_SMD:R_1206_3216Metric | R15, R17, R40, RS1, RS2 |
| 5 | 1770966 | TerminalBlock_Phoenix:TerminalBlock_Phoenix_PTSM-0,5-3-2.5-V-THR_1x03_P2.50mm_Vertical | J8, J9, J10, J11, J12 |
| 5 | 4700 | Resistor_SMD:R_0402_1005Metric | RS4, RS5, RS6, RS7, RS8 |
| 5 | PEC3205CS | Diode_SMD:D_SOD-323F | D8, D9, D10, D11, D12 |
| 4 | 4.7k | Resistor_SMD:R_0402_1005Metric | R18, R19, R23, R25 |
| 4 | MountingHole | MountingHole:MountingHole_3.2mm_M3_ISO7380 | H1, H2, H3, H4 |
| 3 | 10uF | Capacitor_SMD:C_0805_2012Metric | C4, C5, C6 |
| 3 | 1990986 | Kleist2:TerminalBlock_Phoenix_SPT-2,5-3-H-5.0_1x03_P5.00mm_Horizontal | J2, J3, J14 |
| 3 | 1uF | Capacitor_SMD:C_0402_1005Metric | C3, C15, C19 |
| 3 | 4.7nF X1/Y2 | Capacitor_THT:C_Rect_L13.0mm_W5.0mm_P10.00mm_FKS3_FKP3_MKS4 | C18, CS1, CS2 |
| 2 | 100k | Resistor_SMD:R_0402_1005Metric | R32, R33 |
| 2 | 180 | Resistor_SMD:R_0402_1005Metric | RL1, RL2 |
| 2 | 1k | Resistor_SMD:R_0402_1005Metric | R30, R31 |
| 2 | 2.2uF | Capacitor_SMD:C_1206_3216Metric | C10, C11 |
| 2 | 360 | Resistor_SMD:R_0603_1608Metric | RG3, RG4 |
| 2 | 470 | Resistor_SMD:R_0402_1005Metric | RL3, RL4 |
| 2 | 5.1k | Resistor_SMD:R_0402_1005Metric | R5, R6 |
| 2 | CPC1035N | Package_SO:SOP-4_3.8x4.1mm_P2.54mm | Q6, Q7 |
| 2 | HCPL-354-06AE | Package_SO:SO-4_4.4x3.6mm_P2.54mm | U8, U9 |
| 2 | MBR130LSFT1G | Diode_SMD:D_SOD-123F | D4, D5 |
| 2 | MOC3063S-TA1 | Kleist:MOC306XS_LTO-L | Q3, Q4 |
| 2 | SMF33A | Diode_SMD:D_SOD-123F | D20, D21 |
| 2 | SMF51CA | Diode_SMD:D_SOD-123F | D18, D19 |
| 2 | Z0103MN | Package_TO_SOT_SMD:SOT-223 | D2, D3 |
| 1 | 100uF | Capacitor_SMD:C_1210_3225Metric | C1 |
| 1 | 10nF | Capacitor_SMD:C_0402_1005Metric | C12 |
| 1 | 10uH | Inductor_SMD:L_Taiyo-Yuden_NR-40xx | L1 |
| 1 | 13.3k | Resistor_SMD:R_0402_1005Metric | R11 |
| 1 | 1990999 | Kleist2:TerminalBlock_Phoenix_SPT-2,5-4-H-5.0_1x04_P5.00mm_Horizontal | J15 |
| 1 | 2.2k | Resistor_SMD:R_1206_3216Metric | R14 |
| 1 | 249k | Resistor_SMD:R_0402_1005Metric | R10 |
| 1 | 4.7uF | Capacitor_SMD:C_0805_2012Metric | C9 |
| 1 | 46205000000 | Fuse:Fuse_Littelfuse-NANO2-462 | F2 |
| 1 | 82pF | Capacitor_SMD:C_0402_1005Metric | C13 |
| 1 | A6S-1102-H | Button_Switch_SMD:SW_DIP_SPSTx01_Slide_Omron_A6S-110x_W8.9mm_P2.54mm | SW3 |
| 1 | B72210S0271K101 | Varistor:RV_Disc_D12mm_W5.4mm_P7.5mm | R1 |
| 1 | BZT52B27 | Diode_SMD:D_SOD-123F | D7 |
| 1 | CSD17313Q2 | Kleist2:CSD17313Q2 | Q5 |
| 1 | ESP32-C6-WROOM-1-N4 | Kleist:MOD28_ESP32-C6-WROOM-1_EXP | U5 |
| 1 | IRM-03-5 | Converter_ACDC:Converter_ACDC_MeanWell_IRM-03-xx_THT | U1 |
| 1 | IS31FL3730 | Package_DFN_QFN:QFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm | U7 |
| 1 | KWM-20881AGB | Kleist2:LED_Matrix_8x8_20mm | DS1 |
| 1 | KleistLabs_Logo_8mm_Copper | Kleist2:KleistLabs_Logo_8mm_Copper | G1 |
| 1 | QR_HydroMix_SilkOnDark | Kleist2:QR_HydroMix_250um_SilkOnDark | G2 |
| 1 | RB160MM-60TR | Diode_SMD:D_SOD-123F | D6 |
| 1 | TL9320AF400QG | Kleist2:SW_SPST_TL9320 | SW1 |
| 1 | TLV75733P | Package_SON:WSON-6-1EP_2x2mm_P0.65mm_EP1x1.6mm_ThermalVias | U2 |
| 1 | TPS61040 | Package_SON:WSON-6-1EP_2x2mm_P0.65mm_EP1x1.6mm_ThermalVias | U6 |
| 1 | USB4145-03-0170-C | Kleist2:USB_C_Receptacle_GCT_USB4145-03-0170-C_Vertical_SMT | J13 |
| 1 | USBLC6-2SC6 | Package_TO_SOT_SMD:SOT-23-6 | U10 |
It measures 94.5 × 99.8 mm and has 4 copper layers, 1.6 mm thick.
123 parts, built around the ESP32-C6-WROOM-1-N4, IRM-03-5, Z0103MN and IS31FL3730-QFLS2-TR. 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.
From the afewyards/HydroMix repository on GitHub, at the commit this page was made from: the board is pcb/ValveController.kicad_pcb and its schematic pcb/ValveController.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

neilpate/Drone
A learning project: build a quadcopter from scratch — own hardware, own firmware, no existing flight stack.

FREILab/easyVerwaltungHardware
Hardware und Firmware für alle Geräte im Bezug zu easyVerwaltung

ADDTDR/MicroBarALS317
Small bragrh display board based on is31fl3730 driver and als317 led display

Envious-Data/EnvOpenEnvSensor
a simple sensor pcb with a display to show some environment conditions


JMET04/aicad-agent
Deterministic CAD/EDA agent plugin for 2D drawings, AutoCAD, SolidWorks, KiCad, review gates and auditable delivery.


antmicro/artix-dc-scm
Experimental Xilinx Artix-7 driven Data Center Security Communication Module