Reference
CheckoutSource code references, build configuration, hardware datasheet pointers, useful commands and the embeddedpre-deployment simplifiedchecklist. from ERC
Source Code References
If you made it till here, you a true G.☮️
Source thisCode was rather useful, check this out... ERC Embedded Simplified OfficialReferences
Main Application
File | Purpose |
|---|---|
| Main entry |
Sensor and Actuator Drivers
Component | Location |
|---|---|
IMU | components/sensor_board/imu/imu_sensor.h / .c |
pH | components/sensor_board/ph/ph_sensor.h / .c |
Load Cell (HX711) | components/sensor_board/load_cell/load_cell_sensor.h / .c |
Pressure (FSR) | components/sensor_board/pressure/pressure_sensor.h / .c |
Flow Sensor | components/sensor_board/sampling/flow_sensor/flow_sensor.h / .c |
Pump | components/sensor_board/sampling/pump/pump.h / .c |
Utilities | components/sensor_board/sensor_basics/sensor_basics.h / .c |
Shared Components
|
|
|
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf Definitions
Message definitions (PBEnvelope, SensorBoardPHInfo, SensorBoardIMUInfo, SensorBoardLoadCellInfo, SensorBoardPressureInfo, SensorBoardFlowSensorInfo, SensorBoardPumpInfo, SensorBoardDiagnostics) live in the For detailed protobuf message format documentation, see:ERC-Protobufs git submodule and are compiled to C by nanopb during the PlatformIO build. If the build cannot find the .pb.h headers, initialize the submodule:Sensor Board Protobuf
ERC-Protobufs/components/sensor_board/git ├──submodule diagnostics.protoupdate --init Board-level diagnostics and health status
├── sensor.proto - Aggregated sensor state message
├── gps_sensor.proto - GNSS positioning data
├── imu_sensor.proto - Inertial measurement (acceleration, gyro, mag)
├── ph_sensor.proto - Water quality pH measurement
├── load_cell.proto - Force measurement (gripper control)
└── pressure_sensor.proto - Pressure measurement (gripper control)ERC-Protobufs
Build Configuration
File | Purpose |
|---|---|
| Build configuration for all boards (env:sensor_board for this one) |
|
|
|
|
TestDevelopment ReferencesWorkflow
TestUseful SuitesCommands (PlatformIO CLI)
test/sensor_board/
├── test_gps_sensor/
├── test_imu_sensor/
├── test_load_sensor/
├── test_ph_sensor/
├── test_pressure_sensor/
└── test_sensor_basics/Running Tests
//# Build allthe sensor board firmware
pio run -e sensor_board
# Flash to the Nucleo board
pio run -e sensor_board -t upload
# Serial monitor (115200 baud)
pio device monitor -b 115200
# Run the unit tests
pio test -e sensor_board
Development RunCycle
- Change peripherals in CubeMX (firmware.ioc), regenerate with
verboseKeepoutputUserpioCode - Implement
testor-eupdatesensor_boardthe-vdriver//in components/sensor_board/ - Build
onlyand(norunrun)unitpioteststeston-ethesensor_boardhost - Flash,
--no-runwatch the serial log, verify the per-sensor status lines - Enable sendUDP and verify packets on the network
Hardware References
Microcontroller
STM32H753ZI- ARM Cortex-M7, 480 MHz, 1 MB FlashDatasheet: ST Microelectronics STM32H7 reference
Ethernet
LAN8742- Ethernet PHYInterface: RMII (Reduced Media Independent Interface)Link Speed: 10/100 Mbps auto-negotiation
Sensors
| Model | Protocol | Note | ||
|---|---|---|---|---|---|
|
|
|
| ||
Ethernet PHY | LAN8742 | RMII | 10/100 Mbps auto-negotiation | ||
pH | DFRobot SEN0161 | Analog ADC | 40-sample averaging, 5 V board (scale output below 3.3 V) | ||
IMU | Reference design TBD |
|
| ||
|
|
|
| ||
Load Cell |
| ADC |
| GPIO bit-bang | 24-bit, channel A gain 128 |
Pressure |
|
|
| ||
Flow | FM-PS2216 | GPIO EXTI pulses | 40 to 150 ml/min, 5.5 pulses/ml | ||
Pump | Grothen 12 V DC mini peristaltic | PWM ( | Single MOSFET, unidirectional, open loop |
DevelopmentNetwork WorkflowQuick Reference
Building
Item | Value |
|---|---|
Board
| 192.168.0.111 (
|
Destination (
| 192.168.0.222 |
UDP port | 1500 |
Netmask | 255.255.255.0
|
Quick Reference Checklist
Before Deployment
- ERC-Protobufs submodule initialized, firmware builds clean
- All connected sensors
connectedrespondingand(OPERATINGresponding| OK in the log) - Network IP/MAC configured
correctlyand sendUDP enabled - Calibration
parametersset forpH/pH (offset/slope) and load cells (tare/scale) - Serial monitor showing sensor data at 115200 baud
- Heap usage
monitoredhealthy (>8KBwellfree)above the 4096 byte critical threshold) - UDP packets reaching
destination Protobuf192.168.0.222:1500encodingandverifieddecoding as PBEnvelope
Monitoring in Production
CheckWatch per-sensor state/status codes in the log lines- Monitor the free heap
usagetrendtrendprinted each loop - Verify data ranges match expectations (pH 0-14, flow below 150 ml/min)
- Track error rates per sensor
Reviewnetworkandpacketpump/flowstatisticscross-check warnings
Hope you had fun☮fun.☮️ End of documentation for the Sensor Board.
ENDMay OFThe DOCUMENTATIONForce FORBe SESORWith BOARD☮️You or Live Long and Prosper, depending on what you like.... but remember the Dark Side always has cooler toys
Last Updated: April 14, 2026