How saisundarp/smart-rover-safety-telemetry-module works
SSTM is an embedded rover safety module: it samples battery, temperature, motion, and proximity sensors, evaluates faults, then reports state over UART and warns locally with an LED and buzzer. The firmware’s task orchestration is concentrated in main.c, with sensor drivers, shared state, and telemetry framing as supporting layers. The repository also includes component, electronics, and PCB design artifacts. Firmware relationships below are grounded in the sampled source and SOURCE INDEX; design-artifact nodes reflect the documented project scope, not an inspected implementation workflow.
Main entry points: main.c Sensor acquisition · sensor_state.h Shared sensor state · 04_electronics_design.md Electronics design · mpu6050.c Motion sensor
Components 16
Firmware runtime
- Shared sensor state
firmware/inc/sensor_state.h - Fault thresholds
firmware/inc/fault_config.h - Sensor acquisition
firmware/src/main.c - Fault evaluation
firmware/src/main.c
Sensor drivers
- Battery monitor
firmware/src/drivers/ina226.c - Temperature sensor
firmware/src/drivers/tmp102.c - Motion sensor
firmware/src/drivers/mpu6050.c - Proximity sensor
firmware/src/drivers/vl53l0x.c
Safety and communications
- Telemetry task
firmware/src/main.c - Frame encoding
firmware/src/telemetry.c - Local warning
firmware/src/main.c - Task watchdog
firmware/src/main.c
Engineering design
- Electronics design
docs/04_electronics_design.md - PCB design
docs/05_pcb_design.md - Bill of materials
bom/BOM.xlsx
Other components
- Rover computer
Connections 20
- Sensor acquisition → Battery monitor: reads battery
firmware/src/main.c - Sensor acquisition → Temperature sensor: reads temperature
firmware/src/main.c - Sensor acquisition → Motion sensor: reads motion
firmware/src/main.c - Sensor acquisition → Proximity sensor: reads range
firmware/src/main.c - Sensor acquisition → Proximity sensor: resets sensor
firmware/src/main.c - Sensor acquisition → Shared sensor state: updates state
firmware/src/main.c - Fault evaluation → Shared sensor state: reads snapshot
firmware/src/main.c - Fault evaluation → Fault thresholds: uses thresholds
firmware/src/main.c - Fault evaluation → Motion sensor: calculates tilt
firmware/src/main.c - Fault evaluation → Telemetry task: triggers on fault
firmware/src/main.c - Telemetry task → Shared sensor state: reads state
firmware/src/main.c - Telemetry task → Frame encoding: builds frame
firmware/src/main.c - Telemetry task → Rover computer: sends UART
firmware/src/main.c - Local warning → Shared sensor state: reads faults
firmware/src/main.c - Task watchdog → Sensor acquisition: checks liveness
firmware/src/main.c - Task watchdog → Fault evaluation: checks liveness
firmware/src/main.c - Task watchdog → Telemetry task: checks liveness
firmware/src/main.c - Task watchdog → Local warning: checks liveness
firmware/src/main.c - Electronics design → PCB design: guides layout
README.md - Bill of materials → Electronics design: lists components
README.md