How ridddle-en/ffs-troubleshooting-system works
This is a semi-automatic Form Fill and Seal troubleshooting system: ESP32 sensors collect machine and environment measurements, the Raspberry Pi gateway reads them over SPI, interprets telemetry, raises alerts, records history, and controls actuators; a web app exposes monitoring and operator controls. The graph preserves sensing, calibration, diagnostics, storage, and UI capabilities. Some subsystem links are documented only at the system level; those use README evidence, and unsampled implementation details are not inferred.
Main entry points: pi_backend.py API and telemetry · main.py Gateway startup · sensors.cpp Sensor processing · spi_comms.py SPI communications
Components 19
ESP32 sensing
- Sensor processing
esp32/arduino/src/sensors.cpp - Motor sensing
esp32/arduino/src/motors.cpp - Bag detection
esp32/arduino/src/bag.cpp - Load cell
esp32/arduino/src/loadcell.cpp - Sensor calibration
esp32/arduino/src/calibration.cpp - ESP32 SPI protocol
esp32/arduino/src/spi.cpp
Pi gateway
- Gateway startup
raspberry_pi/main.py - SPI communications
raspberry_pi/spi_comms.py - Telemetry interpretation
raspberry_pi/interpreter.py - API and telemetry
raspberry_pi/pi_backend.py - Fault alerts
raspberry_pi/alerts.py - History and logs
raspberry_pi/database.py - Actuator control
raspberry_pi/motors.py
Web interface
- Monitoring and controls UI
web/app/static/js/app.js - Web application
web/app/app.py
Machine hardware
- Machine sensors
- Machine actuators
Other components
- Machine operator
- Web server
Connections 24
- Machine sensors → Sensor processing: measure
README.md - Sensor processing → ESP32 SPI protocol: provide readings
esp32/arduino/src/sensors.cpp - Motor sensing → Sensor processing: supply motor data
- Bag detection → Sensor processing: supply bag data
- Load cell → Sensor processing: supply weight
- Sensor calibration → Load cell: calibrate
- Gateway startup → SPI communications: creates
raspberry_pi/main.py - Gateway startup → API and telemetry: starts telemetry
raspberry_pi/main.py - Gateway startup → History and logs: initializes
raspberry_pi/main.py - Gateway startup → Fault alerts: initializes
raspberry_pi/main.py - Gateway startup → Actuator control: initializes
raspberry_pi/main.py - ESP32 SPI protocol → SPI communications: exchange sensor data
README.md - API and telemetry → SPI communications: reads telemetry
raspberry_pi/pi_backend.py - API and telemetry → Telemetry interpretation: interprets readings
raspberry_pi/pi_backend.py - API and telemetry → Actuator control: applies controls
raspberry_pi/pi_backend.py - API and telemetry → Fault alerts: evaluates readings
raspberry_pi/pi_backend.py - API and telemetry → History and logs: stores telemetry
raspberry_pi/pi_backend.py - API and telemetry → History and logs: serves history
raspberry_pi/pi_backend.py - API and telemetry → SPI communications: calibration commands
raspberry_pi/pi_backend.py - Actuator control → Machine actuators: drives GPIO
README.md - Machine operator → Monitoring and controls UI: operates
README.md - Monitoring and controls UI → Web application: uses app
- Web application → API and telemetry: requests API
- Web server → Web application: hosts
README.md