How mustafasedhom/smart-predictive-unit-spu- works
SPU is an industrial equipment monitoring system: sensor firmware samples motor, pump, belt and overall signals, then sends JSON for a Python service to process, persist, analyze and expose to an app. The tree and excerpts support the sensor, ingestion, database and AI branches; the README’s screen images indicate app capabilities, but Flutter application logic is not present in the supplied source excerpts. Some subsystem links are therefore omitted where their runtime caller is not shown.
Main entry points: AI_Main_module.py AI runtime · Data_Base_Manager.py Database manager · SPU_main_Data_handlig.py Database access · main.cpp Sensor firmware
Components 19
Sensing and ingestion
- Sensor firmware
code_of_project/SPU_Sensors_and_Esp32_code/Sensors Code/src/main.cpp - UART reader
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Recieve_Data_from_Slave_Board/Recieve_Data_From_Slave_Board.py - Sensor JSON parser
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Rrocess_Data_From_Slave_Board/All_Sensor_Data_After_Processing/All_Sensor_Data_After_Processing.py - Sensor processing
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Rrocess_Data_From_Slave_Board
Data backend
- Database access
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Data_Base_Python/SPU_main_Data_handlig.py - Database manager
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Data_Base_Python/Data_Base_Manger/Data_Base_Manager.py - Equipment settings
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Data_Base_Python/Setting_Data/Min_Normal_Max_Values.py - JSON database files
- Historical data files
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Store_and_Read_process_Data/AI_Store_Process_Data.py - Direct data storage
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Store_Data_directly/AI_Store_Data_directly.py
AI analysis
- AI runtime
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Main_module.py - Analysis dispatcher
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Analysis_Actuator_Data/Analysis_Data.py - Actuator health analysis
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Analysis_Actuator_Data/Actuator_Analysis - Fault prediction
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Analysis_Actuator_Data/Actuator_Analysis/calc_predicated_fault_of_actuator/calc_predicated_fault_of_actuator.py - Alarm analysis
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Analysis_Actuator_Data/Alarm_Analysis
App and alerts
- Email notifications
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Analysis_Actuator_Data/Alarm_Analysis/Send_Notification/Gmail_Massage.py - Monitoring app
code_of_project/SPU_Flutter_app_code/spu_linux_app
Other components
- Sensors and actuators
- Operator
Connections 19
- Sensors and actuators → Sensor firmware: provides readings
- Sensor firmware → UART reader: sends JSON
- AI runtime → UART reader: reads UART
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Main_module.py - AI runtime → Sensor JSON parser: parses readings
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Main_module.py - AI runtime → Sensor processing: processes readings
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Main_module.py - Sensor JSON parser → Sensor processing: builds sensor data
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Rrocess_Data_From_Slave_Board/All_Sensor_Data_After_Processing/All_Sensor_Data_After_Processing.py - AI runtime → Database access: updates database
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Main_module.py - Database access → Database manager: creates manager
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Data_Base_Python/SPU_main_Data_handlig.py - Database manager → JSON database files: loads JSON
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Data_Base_Python/Data_Base_Manger/Data_Base_Manager.py - Database manager → Equipment settings: initializes settings
code_of_project/Background_Process_Code/Handle_Data_Base_Code/Data_Base_Python/Data_Base_Manger/Data_Base_Manager.py - AI runtime → Direct data storage: stores readings
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Main_module.py - Direct data storage → Historical data files: writes history
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Store_Data_directly/AI_Store_Data_directly.py - AI runtime → Analysis dispatcher: runs analysis
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Main_module.py - Analysis dispatcher → Actuator health analysis: dispatches analysis
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Analysis_Actuator_Data/Analysis_Data.py - Actuator health analysis → Fault prediction: calculates faults
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Analysis_Actuator_Data/Actuator_Analysis/Belt_Analysis.py - AI runtime → Email notifications: sends notices
code_of_project/Background_Process_Code/AI_Brain_Of_Project/AI_Main_module.py - Operator → Monitoring app: views status
- Alarm analysis → Email notifications: notifies
- Monitoring app → Database access: accesses status