Overview The Sensor Board is an embedded system that acquires environmental and process data from multiple sensors and actuates the sampling hardware (water pump). It integrates water quality (pH), motion (IMU), force (load cells), pressure (FSR pads), and water flow measurement, and transmits all data over Ethernet using Protocol Buffer encoding. It also receives control packets (for example pump commands) over the same link. Implementation Status Disclaimer: The sensor board code was only partially tested and never fully implemented on hardware. Due to time constraints and other technical issues faced by the 2025-2026 team, several drivers remain compile gated or placeholder (pH ADC path, pressure ADC path, IMU bus access, flow sensor EXTI line). The load cell (HX711), pump (PWM), networking and protobuf pipeline are implemented in firmware; end to end validation on the assembled board was not completed. Hardware Platform Item Value Microcontroller STM32H753ZI (NUCLEO-H753ZI board), ARM Cortex-M7 (480 MHz capable, currently clocked at 64 MHz, see STM32CubeMX Sensor Configuration) Real-Time OS FreeRTOS with CMSIS-RTOS V2 Ethernet LAN8742 PHY, RMII, LwIP stack (static IP, no DHCP) Serial logging ST-Link VCP (USART3, 115200 baud) FreeRTOS heap 64 KB (configTOTAL_HEAP_SIZE = 65536) Message encoding nanopb (Protocol Buffers), definitions in the ERC-Protobufs submodule Key Board Features Single main task polls all sensors in one loop (5 second interval) Network integration via UDP/Ethernet with protobuf envelopes (PBEnvelope) Inbound packet dispatcher for control signals (pump command handler actuates hardware) Real-time logging to UART (115200 baud) with uniform per-sensor status lines MAC address filtering for selective communication Static ARP entry for the destination board, re-added on link up LED status indicators (Green, Blue, Red toggled each loop) Heap monitoring with critical threshold alert (below 4096 bytes free pauses the loop) Integrated Sensors and Actuators Device Model / Interface Count Firmware status pH Sensor DFRobot SEN0161, analog ADC 1 Driver complete, ADC path compile gated (PH_SENSOR_USE_ADC), poll returns RESULT_ERR_UNIMPLEMENTED until an ADC is enabled in CubeMX IMU TBD, I2C1 (PB8/PB9) 1 Data structure, math and validation helpers implemented; hardware poll is a placeholder Load Cell (Weight) HX711 24-bit ADC, GPIO bit-bang 2 Implemented, auto-tare on init, scale calibration API Pressure (FSR) Analog force sensing resistor pads, ADC 2 Driver complete, ADC path compile gated (PRESSURE_USE_ADC), poll returns RESULT_ERR_UNIMPLEMENTED until an ADC is enabled Flow Sensor FM-PS2216 (5.5 pulses/ml), GPIO EXTI pulse counting on PA4 1 Implemented; EXTI4 must still be enabled in CubeMX for pulses to be counted Water Pump Grothen 12 V DC mini peristaltic pump, single MOSFET on TIM3 CH3 PWM (PC8) 1 Implemented, open loop, unidirectional; health cross-checked against the flow sensor Check this out for compiling code and more about project structure- Project Structure Related Pages STM32CubeMX Sensor Configuration Sensor Board Utility Library Architecture Configuration pH Sensor Load Cell (Weight Sensor) Pressure Sensor Testing Reference