Loading 3D model… large boards can take a moment.
This repository contains the complete design files and source code for a custom, battery-powered STM32 microcontroller board designed for environmental monitoring and data logging. Measuring at a compact 40 x 58 mm, the board features integrated temperature, humidity, and ambient light sensors, alongside an SD card slot for local data storage. It includes a complete Li-Ion power management system with USB-C charging, load sharing, and battery protection.
The user interface is driven by a rotary encoder and an external SPI display, making it suitable for standalone automated environments like humidity control or ambient monitoring.
STM32CubeMX (.ioc) configuration file for peripheral initialization and the C/C++ code with the needed drivers.The power architecture is designed for safe, continuous operation whether plugged in or running on battery:
Designing this board within a 40x58mm footprint required careful attention to PCB stackup and signal routing:
The firmware is structured around an event-driven state machine that handles user interaction, data logging, and strict power efficiency:
.txt file on the MicroSD card at strict 10-second intervals. Simultaneously, this data is continuously broadcast over the USB-CDC COM port to a connected PC for live monitoring.STOP state. A subsequent button press triggers an EXTI hardware interrupt, waking the system back to full operation instantly.While currently operating as a standalone datalogger, this board was engineered to serve as the precision sensor node for future automated control systems. By linking the onboard environmental telemetry to external physical actuators (such as fans, humidifiers, or motorized blinds), the hardware will transition into a dynamic closed-loop control environment.
The high-resolution empirical data currently gathered via the SD card and USB interface provides the foundation for mathematical system identification. This allows the physical environment's behavior to be accurately modeled in software like MATLAB, enabling the future calculation of transfer functions and the implementation of tuned PID or automated sequential control logic directly onto the STM32.
No comments yet. Be the first to ask about this board.