
Decabox pin pcb
arvindsa/decabox
A compact, intelligent battery management system for 6× Decapo batteries used with cochlear speech processors. This project monitors cell voltage, ambient light, and battery state-of-charge in real-time, with visual…

A compact, intelligent battery management system for 6× Decapo batteries used with cochlear speech processors. This project monitors cell voltage, ambient light, and battery state-of-charge in real-time, with visual…
Decabox pcb is an open-source printed circuit board by arvindsa, from the arvindsa/decabox repository on GitHub. It is a 2-layer board of 22 × 60 mm with 61 parts on 71 nets, routed with 707 tracks and 71 vias.
It is built around the OPT3001DNPT, W25Q128JVSIQ and AH1806-W, with the BQ24074RGTR, LP5907MFX-3.3 and AO3401A among its other parts. Its parts include 20 resistors, 19 capacitors, 8 ICs, 6 connectors and 1 transistor. It belongs with the lEDs and displays boards and the STM32 boards of this library.
A compact, intelligent battery management system for 6× Decapo batteries used with cochlear speech processors. This project monitors cell voltage, ambient light, and battery state-of-charge in real-time, with visual feedback via WS2812B RGB LEDs and a 128×64 OLED display.
Competition: element14 Project14 / Spring Clean 2026
Status: Complete firmware + hardware design
MCU: STM32U031C8T6 (56 MHz Cortex-M0+, 12KB SRAM)
Three boards included:
hardware/| Signal | GPIO | Function |
|---|---|---|
| I2C1_SCL/SDA | PB6/PB7 | I²C bus — all sensors |
| USART2_TX/RX | PA2/PA3 | Debug UART → ST-Link V3 |
| WS2812B_DATA | PA1 (TIM2_CH2) | 6× LEDs, DMA-driven @ 800 kHz |
| OLED_EN | PA11 | OLED power control (AO3401 gate) |
| HALL_SW | PA0 (EXTI0) | Hall switch — Stop2 wake |
| PGOOD | PA9 (EXTI9) | USB power good — Stop2 wake |
| FG_ALRT | PA8 (EXTI8) | MAX17048 low-battery alert |
| OPT_INT | PA10 (EXTI10) | OPT3001 interrupt |
| CHG | PA12 | BQ24074 charge status |
| FLASH_CS/MOSI/MISO/SCK | PA4–PA7 | SPI1 to W25Q128JVS (reserved) |
| ADS_RDY1/2/3 | PB10–PB12 | ADS1115 ready/alert pins |
| SWDIO/SWCLK/SWO | PA13/PA14/PB3 | ST-Link debug |
| Address | Device | Function |
|---|---|---|
| 0x36 | MAX17048 | Fuel gauge — LiPo SOC% |
| 0x3C | SSD1306 | OLED 128×64 display |
| 0x44 | OPT3001 | Ambient light sensor |
| 0x48 | ADS1115 #1 | Cells 1+2 voltage |
| 0x49 | ADS1115 #2 | Cells 3+4 voltage |
| 0x4A | ADS1115 #3 | Cells 5+6 voltage |
SLEEP (Stop2) → HALL_SW rises or PGOOD falls → WAKE
WAKE → Read sensors → Update LEDs + OLED → SLEEPSleep target: < 15 µA (Stop2 mode, OLED powered off via PA11, all timers disabled).
firmware/
Core/
Inc/
app/
battery_map.h — Cell voltage (mV) → LED color mapping
display.h — OLED framebuffer + layout
drivers/
max17048.h — Fuel gauge (I²C register map)
ads1115.h — ADC reads, mux config
opt3001.h — Lux reading, auto-range
ssd1306.h — OLED I²C framebuffer
ws2812b.h — PWM/DMA bit encoding
main.h, stm32u0xx_hal_conf.h, stm32u0xx_it.h
Src/
app/
battery_map.c — Color thresholds
display.c — OLED layout rendering
drivers/
max17048.c, ads1115.c, opt3001.c, ssd1306.c, ws2812b.c
main.c — FSM, init, ISRs
stm32u0xx_hal_msp.c — HAL clock/GPIO setup
stm32u0xx_it.c — Interrupt handlers
syscalls.c, sysmem.c, system_stm32u0xx.c
Makefile, Drivers/, startup_stm32u031xx.s, STM32U031xx_FLASH.ldFrom STM32CubeIDE (GUI):
firmware/ as an existing projectFrom CLI:
cd firmware
make -C Debug/ all
# Flash via ST-Link
st-flash write Debug/decabox.bin 0x08000000
# or via STM32_Programmer_CLI
STM32_Programmer_CLI -c port=SWD -d Debug/decabox.elf -v -rstDebug UART (115200 baud):
minicom -D /dev/ttyACM0 -b 115200 # Linux/macOS
# or use PuTTY/Tera Term on COM port (Windows)| Color | Threshold | Status |
|---|---|---|
| WHITE | < 100 mV | No cell or sensor error |
| GREEN | ≥ 1350 mV | Full |
| YELLOW–GREEN | ≥ 1200 mV | Good |
| ORANGE | ≥ 1050 mV | Low |
| RED | < 1050 mV | Critical |
Brightness: OPT3001 lux linearly mapped to 15–50% over 1–10,000 lux range.
800 kHz PWM/DMA on TIM2_CH2 (PA1):
Each ADS1115 reads 2 differential channels with configurable gain. Resistor divider on pogo contacts scales 0–6V to 0–2V ADC range. Calibration divider ratio defined in firmware/Core/Inc/drivers/ads1115.h.
i2c_scan() to detect all devices (should see 0x36, 0x3C, 0x44, 0x48–0x4A)All component datasheets included in datasheets/:
decabox/
README.md ← This file
firmware/ — STM32CubeIDE project
Core/ — Application code + drivers
Drivers/ — STM32 HAL (auto-generated)
Makefile, *.ld, *.s — Build files
hardware/
main/ — Main PCB (KiCad)
pin-pcb/ — Pin adapter board ×2 (KiCad)
datasheets/ — Component datasheets (PDF)Design and firmware are open source. Refer to the LICENSE file in the repository.
Project: DEV CI/BOX — Cochlear Implant Battery Monitor
Platform: element14 Project14
MCU: STM32U031C8T6
Build: STM32CubeIDE + GCC ARM
For questions, issues, or hardware discussions, see the GitHub repository.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 9 | 100nF | Capacitor_SMD:C_0603_1608Metric | C1, C2, C3, C4, C5, C6, C17, C18, C20 |
| 8 | 10K | Resistor_SMD:R_0603_1608Metric | R1, R2, R3, R4, R18, R19, R23, R24 |
| 6 | 10K | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R7, R8, R9, R12, R13, R14 |
| 4 | 1u | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C8, C10, C11, C12 |
| 3 | Conn_01x07 | Connector_JST:JST_SHL_SM07B-SHLS-TF_1x07-1MP_P1.00mm_Horizontal | J4, J5, J6 |
| 3 | MountingHole | MountingHole:MountingHole_2.2mm_M2 | H1, H2, H3 |
| 2 | 10uF | Capacitor_SMD:C_0603_1608Metric | C19, C21 |
| 2 | 2K | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R10, R11 |
| 2 | 4.7u | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C9, C13 |
| 2 | 5.1K | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R5, R6 |
| 2 | SW_Push | Button_Switch_SMD:SW_Tactile_SPST_NO_Straight_CK_PTS636Sx25SMTRLFS | SW_RST1, SW_RST2 |
| 1 | 0.1u | Capacitor_SMD:C_0603_1608Metric | C40 |
| 1 | 100K | Resistor_SMD:R_0603_1608Metric | R21 |
| 1 | 1K | Resistor_SMD:R_0603_1608Metric | R20 |
| 1 | 1uF | Capacitor_SMD:C_0603_1608Metric | C7 |
| 1 | AH1806-W | Package_TO_SOT_SMD:SC-59 | U9 |
| 1 | AO3401A | Package_TO_SOT_SMD:SOT-23 | Q1 |
| 1 | BQ24074RGT | Package_DFN_QFN:VQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm | U4 |
| 1 | Conn_ST_STDC14 | Connector_PinHeader_1.27mm:PinHeader_2x07_P1.27mm_Vertical | J1 |
| 1 | LOGO | LOGO | G1 |
| 1 | LP5907MFX-3.3 | Package_TO_SOT_SMD:SOT-23-5 | U3 |
| 1 | MAX17048 | Arvind_Power_IC:MAX17048G+T10 | U2 |
| 1 | OPT3001DNPT | Arvind_Sensor_IC:OPT3001 | U8 |
| 1 | SSD1306 128x32 Module | Connector_JST:JST_SH_BM04B-SRSS-TB_1x04-1MP_P1.00mm_Vertical | U10 |
| 1 | STM32U031C8Tx | Package_QFP:LQFP-48_7x7mm_P0.5mm | U1 |
| 1 | SolderJumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP1 |
| 1 | USB_C_Receptacle_USB2.0_16P | Arvind_Connector_USB:USB_C_Receptacle_GCT_USB4085_NoSilkScreenoverPCBedge | J2 |
| 1 | W25Q128JVS | Package_SO:SOIC-8_5.3x5.3mm_P1.27mm | U11 |
| 1 | ~ | Connector_JST:JST_PH_S2B-PH-SM4-TB_1x02-1MP_P2.00mm_Horizontal | J3 |

arvindsa/decabox
A compact, intelligent battery management system for 6× Decapo batteries used with cochlear speech processors. This project monitors cell voltage, ambient light, and battery state-of-charge in real-time, with visual…



neggles/esp-pmsa
Makefile uses Jan Mrázek's KiKit, which I cannot recommend enough, and therefore has to be available on your system.

joeycastillo/Sensor-Watch
A board replacement for the classic Casio F-91W wristwatch

SamWarmuth/SWSplitFlap
3D printable split flap display (software/pcb/STLs), for a more detailed split flap project see https://github.com/scottbez1/splitflap

stanford-ssi/sapling-avionics
2S3P Li-ion battery pack for CubeSat designs. - Fits 18650 cells (like the LG INR18650-MJ1) - Meets maximum capacity requirements of common CubeSat integrators - Uses components with radiation testing heritage -…

ElvinC/solidaq
Simple DAQ board with support for load cells, thermocouples, and a 4-20 mA pressure transmitter

open-pasture/opencollar
OpenCollar: a virtual-fence collar you can buy assembled or build from published parts.
It measures 22 × 60 mm and has 2 copper layers, 1.6 mm thick.
61 parts, built around the OPT3001DNPT, W25Q128JVSIQ, AH1806-W and BQ24074RGTR. 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 arvindsa/decabox repository on GitHub, at the commit this page was made from: the board is hardware/main/decabox-pcb.kicad_pcb and its schematic hardware/main/Hall Effect Switch.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 arvindsa before reusing the design.