Hydraulic Monitoring System with ML
EIUM Institutional Project — Flow control and prediction using sensors, Arduino Nano and Random Forest
View progressAbout the Project
Real-time hydraulic flow monitoring and prediction system, based on five ZJ-S201 sensors, Arduino Nano control, and a Random Forest machine learning model. The project integrates embedded hardware, signal processing, and artificial intelligence to optimize water resource control in educational and industrial environments.
Monitor hydraulic flow in real time with 5 Hall-effect sensors
Control 4 valves and an IBT-2 pump via PWM signals
Predict flow levels with a trained Random Forest model
Provide an interactive educational interface with AI assistant
Physical System
Click on any component to view technical specifications
Click any component to see its specifications
Methodology
Click on each stage for details
System Data (Simulation)
Real-time visualization of 5 flow sensors (L/h)
Simulated data · Real system range: 350–700 L/h per channel
Project Progress
Fase 1: Hardware design and selection
2025-09Physical system definition: ZJ-S201 sensors, relays, IBT-2 pump, Arduino Nano microcontroller.
CompletedFase 2: Physical system implementation
2025-11Hydraulic circuit assembly, Arduino firmware and Python/Tkinter control panel.
CompletedFase 3: ML model development
2026-02Sensor data collection, Random Forest model training, metrics evaluation.
In progressFase 4: Educational interface and AI chatbot
2026-04Development of the educational interface with visualizations and virtual learning assistant.
In progressFase 5: Validation and testing
2026-08Integration tests, model validation under real conditions, fine tuning.
PendingFase 6: Publication and documentation
2026-12Final paper writing, conference presentation, results publication.
PendingTechnology Stack
Hardware
- Arduino Nano (ATmega328P · 16MHz)
- 5× Sensor ZJ-S201 (1–60 L/min)
- 4× Módulo relé 5V (10A/250VAC)
- Driver IBT-2 (PWM H-bridge)
- Fuente 12V DC
Software
- Python 3.11
- PySerial (comunicación serial)
- Tkinter + Matplotlib (GUI)
- joblib (carga de modelos)
Machine Learning
- scikit-learn RandomForestRegressor
- NumPy / Pandas (preprocesamiento)
- Ventana deslizante 10 muestras
- 50 features de entrada · <50ms latencia
Arduino Firmware (excerpt)
// ZJ-S201 — lectura de pulsos por interrupción
volatile uint32_t pulsos[5] = {0};
float lph[5] = {0};
ISR(sensor_entrada) { pulsos[0]++; }
ISR(sensor_v1) { pulsos[1]++; }
void loop() {
if (millis() - lastSend >= 1000) {
// Convertir pulsos a L/h: (pulsos/7.5) * 60
for (int i = 0; i < 5; i++) {
noInterrupts();
uint32_t p = pulsos[i]; pulsos[i] = 0;
interrupts();
lph[i] = (p / 7.5f) * 60.0f;
}
// Enviar trama: F:val0,val1,val2,val3,val4
Serial.print("F:");
for (int i = 0; i < 5; i++) {
Serial.print(lph[i], 1);
if (i < 4) Serial.print(",");
}
Serial.println();
lastSend = millis();
}
} Results and screenshots
Results
Random Forest
Interface
Tutor Chatbot
Team
Equipo EIUM
Institutional Project
EIUM