
BLDC 4
H2O-Tnp/ganglia
Ganglia is an open BLDC / brushed motor driver platform — custom PCB hardware plus STM32 firmware that runs a real-time control loop on top of FreeRTOS.

Ganglia is an open BLDC / brushed motor driver platform — custom PCB hardware plus STM32 firmware that runs a real-time control loop on top of FreeRTOS.
Ganglia is an open-source printed circuit board by H2O-Tnp, from the H2O-Tnp/ganglia repository on GitHub. It is a 4-layer board of 166.3 × 70 mm with 202 parts on 179 nets, routed with 3,694 tracks and 1,253 vias.
It is built around the 74LVCH245AD, MAX3485ED and LM324, with the AT24C64CN, LM1117-3.3 and TPS2041BDGN among its other parts. Its parts include 72 resistors, 54 capacitors, 22 transistors, 18 diodes and 10 ICs. It belongs with the robots and motor control boards of this library.
Ganglia is an open BLDC / brushed motor driver platform — custom PCB hardware plus STM32 firmware that runs a real-time control loop on top of FreeRTOS. It targets robotics joints and similar position/velocity controlled actuators, exposing the driver over Modbus (RS-485) and USB CDC.
ganglia/
├── PCB/ Schematics and board layouts (gEDA, KiCad, plus legacy ATmel + TI variants)
│ ├── V1, V2, V2.01, V2.02, V3.01 Hardware revisions
│ ├── R1.01, R1.03, STMVersionV1 Production / STM-based revisions
│ └── KICAD_V3.01 Current KiCad project
├── software/
│ ├── stm32/ Main firmware (this is what you'll usually build)
│ ├── asf_based/ Older ATmel-Studio-Framework firmware
│ ├── test01/ Bench / scratch code
│ └── plot_BLDC.m MATLAB/Octave plotting helper for motor_log.txt
└── SelfDocs/Circuits/ LaTeX (circuitikz) notessoftware/stm32)STM32Ganglia.elf, .hex, .bin, plus a CRC-appended
STM32Ganglia-CRC.hex for use with the v3 bootloader| Path | Purpose |
|---|---|
src/ | main.cpp, startup, HAL MSP, syscalls |
control/ | PID + outer control loop (Control.cpp, pid.cpp) |
Motor/ | Motor commutation / drive abstraction |
Encoder/ | Quadrature + SPI absolute encoder |
profile/ | Motion profile generator |
homing/ | Homing state machine |
Modbus/ | RS-485 + Modbus ASCII slave |
Registers/ | Register map — settings, status, control, stream data |
tasks/ | FreeRTOS task entry points (control, Modbus, CAN) |
usbd*/ | ST USB device + CDC class glue |
eeprom/ | EEPROM emulation + Modbus binding |
wdg/, MicroTime/, AveragingBuffer/, CircularBuffer/ | Support utilities |
The build is CMake-driven and expects ST's CubeF3/F4 packages plus FreeRTOS and srecord on disk. Point these env vars at the right places before configuring:
| Variable | Meaning |
|---|---|
STM_FAMILY | STM32F4 or STM32F3 |
STM_COMMON | Root of the STM32CubeF{3,4} package (contains Drivers/, Middlewares/) |
FREE_RTOS | Root of the FreeRTOS source tree |
SRECORD | Directory containing srec_cat.exe (used to append the CRC) |
CPREF | Cross-compiler prefix, typically arm-none-eabi |
Then, from software/stm32:
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../gcc_arm_none_eabi.cmake
make -jThe custom target produces both a plain STM32Ganglia.hex and
STM32Ganglia-CRC.hex. Use the CRC version with ganglia-bootloader-v3; the
plain one is fine for ST-Link / DFU flashing of a bare board.
openocd -f ganglia.cfg (uses stlink-v2-1 + stm32f4x).dfu-util -a 0 -d 0483:df11 -s 0x08000000:leave -R -D STM32Ganglia.binmultiburn, which fans out
dfu-util across several USB ports at once.On Linux you'll want a udev rule so dfu-util can talk to the device without
root — see the snippet at the bottom of CMakeLists.txt.
The PCB/ tree is the full history of the board, including the early
ATmel/TI prototypes. The active design lives in PCB/KICAD_V3.01. Older
gEDA-PCB files (Intelcont*.pcb, main_Atmel*.sch) are kept for archaeology.
This repo started life under Mercurial (.hgflow, .hgignore) and uses a
hgflow-style layout: master is stable, develop is the integration branch,
features live on feature/*, releases on release/*, hotfixes on hotfix/*.
Firmware / hardware versions are baked into software/stm32/inc/version.h
(HW_VERSION, SW_VERSION). Bump SW_VERSION on releases.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 22 | 10k | Resistors_SMD:R_0603 | R3, R12, R16, R20, R21, R23, R24, R26, R29, R35, R38, R41, R43, R44, R46, R48 +6 |
| 18 | 0.01 uF | Capacitors_SMD:C_0603 | C5, C6, C10, C11, C12, C14, C15, C16, C24, C27, C50, C51, C53, C55, C56, C59 +2 |
| 12 | 150 | Resistors_SMD:R_0603 | R18, R19, R28, R30, R37, R40, R52, R55, R59, R62, R65, R81 |
| 7 | 0.1 uF | Capacitors_SMD:C_0603 | C7, C13, C19, C20, C47, C49, C52 |
| 7 | CONN_01X01 | HG_Devices:AWG12 | GND, GND2, P5, P6, P7, PWR, PWR2 |
| 6 | 0.47u | Capacitors_SMD:C_0603 | C23, C26, C48, C54, C57, C58 |
| 6 | 1 | Resistors_SMD:R_0603 | R31, R32, R33, R34, R83, R84 |
| 6 | BSS123 | Housings_SOT-23_SOT-143_TSOT-6:SOT-23 | Q3, Q4, Q13, Q14, Q15, Q16 |
| 6 | BUK969R3 | HG_Devices:sot404 | Q7, Q8, Q9, Q10, Q19, Q20 |
| 6 | PMD3001D | HG_Devices:SOT457 | Q5, Q6, Q11, Q12, Q17, Q18 |
| 6 | PMEG6010 | Diodes_SMD:SOD-323 | D5, D6, D7, D8, D9, D11 |
| 6 | SMAJ16C 16V | HG_Devices:DO-214AC | Z1, Z2, Z10, Z11, Z12, Z13 |
| 4 | 1 uF | Capacitors_SMD:C_0603 | C2, C17, C18, C42 |
| 4 | 220 | Resistors_SMD:R_0603 | R4, R6, R27, R53 |
| 4 | ESH2PD | HG_Devices:DO-220AA | Z4, Z6, Z7, Z9 |
| 4 | LED | LEDs:LED-0603 | LED1, LED2, LED3, LED4 |
| 3 | 0.1 uF polyethylene | HG_Devices:WIMA2824 | C29, C30, C37 |
| 3 | 100k | Resistors_SMD:R_0603 | R90, R91, R92 |
| 3 | 10uF 6.3V | Capacitors_SMD:C_1206 | C22, C28, C31 |
| 3 | 22k | Resistors_SMD:R_0603 | R5, R7, R25 |
| 3 | 27k | Resistors_SMD:R_0603 | R36, R39, R42 |
| 3 | 33k | Resistors_SMD:R_0603 | R47, R50, R79 |
| 3 | BZX384Cxxx | Diodes_SMD:SOD-323 | D14, Z3, Z5 |
| 3 | R_Zero | Resistors_SMD:R_0201 | R8, R13, R17 |
| 2 | 0.1u | Capacitors_SMD:C_0603 | C41, C61 |
| 2 | 1.2k | Resistors_SMD:R_0603 | R45, R49 |
| 2 | 1n | Capacitors_SMD:C_0603 | C39, C60 |
| 2 | 27 | Resistors_SMD:R_0603 | R10, R11 |
| 2 | 33 pF | Capacitors_SMD:C_0603 | C1, C3 |
| 2 | ACS712 | Housings_SOIC:SOIC-8_3.9x4.9mm_Pitch1.27mm | U6, U7 |
| 2 | BC807-40 | Housings_SOT-23_SOT-143_TSOT-6:SOT-23 | Q1, Q2 |
| 2 | EHS2PD | HG_Devices:DO-220AA | Z14, Z15 |
| 2 | Jack3P | HG_Devices:78171-0003 | J5, J6 |
| 2 | R | Resistors_SMD:R_0603 | R67, R68 |
| 2 | ZENER | cpavlina:SOD-80 | D13, Z8 |
| 1 | 0.01u | Capacitors_SMD:C_0603 | C34 |
| 1 | 0.1uF | Capacitors_SMD:C_0603 | C32 |
| 1 | 10 uF 50V | Capacitors_SMD:c_elec_5x5.7 | C4 |
| 1 | 100 uF 25V LOW ESR | Capacitors_SMD:c_elec_8x6.5 | C21 |
| 1 | 1000uF 50V electrolyte | Capacitors_ThroughHole:C_Radial_D16_L25_P7.5 | C25 |
| 1 | 11k | Resistors_SMD:R_0603 | R9 |
| 1 | 12k | Resistors_SMD:R_0603 | R2 |
| 1 | 1k | Resistors_SMD:R_0603 | R22 |
| 1 | 1uF | Capacitors_SMD:C_0603 | C33 |
| 1 | 2.7k | Resistors_SMD:R_0603 | R14 |
| 1 | 68k | Resistors_SMD:R_0603 | R15 |
| 1 | 74LVCH245 | HG_Devices:QFN4525-20 | U4 |
| 1 | AT24C64C | Housings_SSOP:TSSOP-8_4.4x3mm_Pitch0.65mm | U2 |
| 1 | BC817-40 | Housings_SOT-23_SOT-143_TSOT-6:SOT-23 | Q21 |
| 1 | BD9G341EFJ | Housings_SOIC:SOIC-8-1EP_3.9x4.9mm_Pitch1.27mm | U1 |
| 1 | BYG23M-E3 | HG_Devices:DO-214AC | D2 |
| 1 | C | Capacitors_SMD:C_0603 | C43 |
| 1 | CONN_01X05 | HG_Devices:78171-0005 | P1 |
| 1 | LM1117-3.3 | SMD_Packages:SOT-223 | U5 |
| 1 | LM324 | Housings_SSOP:TSSOP-14_4.4x5mm_Pitch0.65mm | U11 |
| 1 | MAX3485 | Housings_SOIC:SOIC-8_3.9x4.9mm_Pitch1.27mm | U8 |
| 1 | MPZ2012S101AT 0.02 Ohms | Capacitors_SMD:C_0805 | L2 |
| 1 | NX8045GB | HG_Devices:2-SMD | X1 |
| 1 | Q_PMOS_GSD | Housings_SOT-23_SOT-143_TSOT-6:SOT-23 | Q22 |
| 1 | R_Zero | Resistors_SMD:R_0603 | R1 |
| 1 | SAM3S4C | Housings_QFP:LQFP-100_14x14mm_Pitch0.5mm | U10 |
| 1 | SRR6038-150Y 15 uH | HG_Devices:SRR6038 | L3 |
| 1 | SS14-E3 | HG_Devices:DO-214AC | D1 |
| 1 | TPS2041BDGN | Housings_SSOP:MSOP-8-1EP_3x3mm_Pitch0.65mm | U3 |
| 1 | USB_B | Connect:USB_Micro-B | P3 |
| 1 | Variable_Resistor | HG_Devices:3314G | R85 |
| 1 | ZENER | HG_Devices:DO-214AC | D4 |

H2O-Tnp/ganglia
Ganglia is an open BLDC / brushed motor driver platform — custom PCB hardware plus STM32 firmware that runs a real-time control loop on top of FreeRTOS.

H2O-Tnp/ganglia
Ganglia is an open BLDC / brushed motor driver platform — custom PCB hardware plus STM32 firmware that runs a real-time control loop on top of FreeRTOS.

daedalus-ind/icarus-hardware
Hardware of the onboard flight computer for the Icarus rocket.


chithigun23/ANUFS-APPPD
An update to the Accelerator Pedal Position Plausibility Device to remain compliant with the use of a paddle shift system.

m-labs/ionpak
A modern, low-cost universal controller for hot-cathode ionization vacuum gauges. (WIP)

iblue/mhi-xy-bus
Reverse engineering of the Mitsubishi Heavy Industries X/Y Bus as used in FDUM air condition

andriy-bilynskyy/rpi-extension
This project is a PCB design to create SDR transceiver using Raspberry Pi and Radioberry boards. Simple connection of boards seems incomplete:

ju6ge/volkszaehler_ir_pcbs_kicad
Converted Volkszaehler PCB Layouts to KiCAD

It measures 166.3 × 70 mm and has 4 copper layers, 1.6 mm thick.
202 parts, built around the 74LVCH245AD, MAX3485ED, LM324 and AT24C64CN. 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 H2O-Tnp/ganglia repository on GitHub, at the commit this page was made from: the board is PCB/KICAD_V3.01/ganglia.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask H2O-Tnp before reusing the design.