
ESP32-li ion cell monitor pan
pcbreflux/espressif
all espressif stuff will committed here

Custom CAN sensor node: STM32G474 + IMU + environmental, USB-C, 4-layer PCB
Canarynode is an open-source printed circuit board by aboller1212, from the aboller1212/canarynode repository on GitHub. It is a 4-layer board of 50 × 60 mm with 65 parts on 83 nets, routed with 474 tracks and 47 vias.
It is built around the TCAN334GD, BME280 and BMI270, with the TPS62160DGK, USBLC6-2P6 and ESDZL5-1F4 among its other parts. Its parts include 22 capacitors, 18 resistors, 6 ICs, 6 diodes and 6 connectors. It belongs with the sensors and measurement and home automation and IoT boards and the STM32 boards of this library.
A CAN FD sensor node built around an STM32G474. It reads an IMU and an environmental sensor and puts the data on a CAN bus. The firmware is bare-metal — no HAL, no RTOS, no generated code, just CMSIS headers and the reference manual. I'm building it this way because I want to understand what every peripheral is actually doing at the register level, not call somebody's library function and hope.
I designed the board as well, so the schematic and layout live in this repo alongside the firmware.
The custom board is a 4-layer PCB with:
Most of the driver work was done on a Nucleo-G474RE first, bringing up one peripheral at a time, so that porting to the real board would mostly be remapping pins. The custom board is here now and boots.
A couple of things differ between the two: the Nucleo has a G474RET6 (512K flash) and routes CAN to FDCAN1 on PA11/PA12, while my board uses an RCT6 (256K) and puts CAN on PB5/PB6, which is FDCAN2. That's an instance swap, not just a pin change, so it needs its own message RAM offset. My board uses PA11/PA12 for USB instead.
Pin map on the custom board:
| Function | Pins |
|---|---|
| LEDs | PB0, PB1, PB2, PC4 |
| I2C1 (BME280) | PA15 SCL, PB7 SDA |
| SPI1 (BMI270) | PA4 CS, PA5 SCK, PA6 MISO, PA7 MOSI |
| FDCAN2 | PB5 RX, PB6 TX |
| USB | PA11, PA12 |
| SWD | PA13, PA14, NRST on PG10 |
| USART2 | PA2, PA3 |
| BOOT0 jumper | PB8 |
| IMU interrupt | PB10 |
firmware/ — the STM32 firmware, where most of the work ishardware/ — schematic and board filesdocs/ — datasheets and my bring-up notestools/ — scriptsCMake + Ninja with the arm-none-eabi GCC toolchain.
cd firmware
cmake -B build -G Ninja
cmake --build buildProduces build/canary_firmware (ELF) and a .bin next to it.
Two ways, depending on the board.
The custom board can be programmed over USB with no debugger at all. The STM32 has a bootloader burned into ROM — jumper BOOT0 high, plug in USB-C, and it enumerates as a DFU device:
STM32_Programmer_CLI -c port=USB1 -w build/canary_firmware.bin 0x08000000Pull the jumper and power cycle to run the firmware instead. That's handy for quick iteration, but DFU only programs — for actual debugging I use OpenOCD as a GDB server with arm-none-eabi-gdb over SWD.
On the Nucleo I use an external ST-Link V2 on SWD (SWDIO to PA13, SWCLK to PA14, plus GND and 3V3). The onboard ST-Link V3E doesn't work reliably from an Apple Silicon Mac, so its USB stays unplugged and the target gets power from the V2.
Working and verified on the custom board:
Verified earlier on the Nucleo, not yet ported over:
In progress:
Not working yet:
Port the remaining peripherals to the custom board, get the BMI270 talking, write a UART driver so I can print values instead of stepping through a debugger, pack sensor readings into CAN frames, and get those frames onto a real bus where my laptop can decode them.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 14 | 100n | Capacitor_SMD:C_0402_1005Metric | C4, C7, C8, C9, C10, C11, C13, C14, C16, C17, C18, C19, C20, C22 |
| 5 | 0R | Resistor_SMD:R_0402_1005Metric | R4, R5, R6, R12, R13 |
| 4 | 1u | Capacitor_SMD:C_0603_1608Metric | C3, C5, C6, C21 |
| 4 | 330R | Resistor_SMD:R_0402_1005Metric | R15, R16, R17, R18 |
| 4 | LED | LED_SMD:LED_0603_1608Metric | D3, D4, D5, D6 |
| 3 | , , | ||
| 2 | 10u | Capacitor_SMD:C_0603_1608Metric | C1, C15 |
| 2 | 4.7k | Resistor_SMD:R_0402_1005Metric | R10, R11 |
| 2 | 5.1k | Resistor_SMD:R_0402_1005Metric | R8, R9 |
| 2 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J1, J4 |
| 2 | SW_Push | Button_Switch_SMD:SW_SPST_PTS645Sx43SMTR92 | SW1, SW2 |
| 1 | 100k | Resistor_SMD:R_0402_1005Metric | R3 |
| 1 | 10k | Resistor_SMD:R_0402_1005Metric | R7 |
| 1 | 120R | Resistor_SMD:R_0603_1608Metric | R14 |
| 1 | 180k | Resistor_SMD:R_0402_1005Metric | R2 |
| 1 | 22u | Capacitor_SMD:C_0603_1608Metric | C2 |
| 1 | 3.3u | Coilcraft_Local:IND_XFL3012_COC | L1 |
| 1 | 4.7u | Capacitor_SMD:C_0603_1608Metric | C12 |
| 1 | 562k | Resistor_SMD:R_0402_1005Metric | R1 |
| 1 | BME280 | Package_LGA:Bosch_LGA-8_2.5x2.5mm_P0.65mm_ClockwisePinNumbering | U5 |
| 1 | BMI270 | BMI270:BMI270_BOS | U4 |
| 1 | Conn_01x04 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J6 |
| 1 | Conn_02x05_Odd_Even | Connector_PinHeader_1.27mm:PinHeader_2x05_P1.27mm_Vertical_SMD | J5 |
| 1 | ESDZL5-1F4 | Diode_SMD:D_0201_0603Metric | D1 |
| 1 | PESD2CANFD27V-TR | PESD2CANFD27V-TR:SOT23_PESD2_NEX | D2 |
| 1 | STM32G474RETx | Package_QFP:LQFP-64_10x10mm_P0.5mm | U2 |
| 1 | Screw_Terminal_01x03 | BMI270:PhoenixMC_1x03_P3.5_DB2EVC.kicad_mod | J3 |
| 1 | TCAN334G | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U6 |
| 1 | TPS62160DGK | Package_SO:MSOP-8_3x3mm_P0.65mm | U1 |
| 1 | USBLC6-2P6 | Package_TO_SOT_SMD:SOT-666 | U3 |
| 1 | USB_C_Receptacle_USB2.0_16P | Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12 | J2 |
The 64 most common of 65 parts.
It measures 50 × 60 mm and has 4 copper layers, 1.6 mm thick.
65 parts, built around the TCAN334GD, BME280, BMI270 and TPS62160DGK. 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 aboller1212/canarynode repository on GitHub, at the commit this page was made from: the board is hardware/kicad/canarynode.kicad_pcb and its schematic hardware/kicad/canarynode.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask aboller1212 before reusing the design.

pcbreflux/espressif
all espressif stuff will committed here

catuta0/HAB-payload
Carrier PCB for a high-altitude balloon payload. An ESP32 DevKitC V4 (WROOM-32) plugs into the board together with breakout modules for GPS (NEO-8M, I2C or UART header, fit only one), INA260 power monitor, BME280…


kquinsland/modular-rack-mount-power-system
Hardware, firmware, and host tooling for a modular mini-rack power system.

shivamtiwari020505/Automotive-BLE-CAN-Module
KiCad hardware design for an automotive BLE-to-CAN module

tracelabs-pcb/can-do12
4-Layer IC-Gate-Driver for industrial application - Kicad, TPS274160, CANBUS

endsummercamp/badge
Per l'anno 2024 anche l'End Summer Camp si vuole dotare di un badge interattivo e programmabile, in linea con gli eventi simili internazionali.

NewTec-GmbH/esp32-can-iot
A ESP32 based interface between CAN-bus and IoT environments.