I’m thrilled to unveil my recent project—a Smart Irrigation System that integrates Angular, Node.js, Firebase, and the ESP32 microcontroller. This innovative solution is designed to optimize agricultural irrigation through both manual and automatic control.
Here’s a detailed look at the project and its features:
- Frontend: Angular
- Backend: Node.js
- Database: Firebase
- Microcontroller: ESP32
-
Frontend Development (Angular) 🚀
- Setup Angular project
- Implement real-time data visualization
- User interface for manual and automatic irrigation control
-
Backend Development (Node.js) 🛠️
- Set up Express.js server
- Integrate with Firebase to store and retrieve sensor data
- Real-time data updates using WebSockets
-
Firebase Configuration 🔧
- Create and configure Firebase project
- Set up Realtime Database for live data storage
- Initialize Firebase SDK in both frontend and backend
-
Sensor Integration 📡
- Configure ESP32 to send sensor data
- Implement Express.js routes to handle incoming data
- Use Firebase Admin SDK to save data
-
System Features 🌟
- Manual Mode: Allows users to control the irrigation pump manually
- Automatic Mode: Automated irrigation based on rain detection, soil moisture, and water levels
- Notifications & Alerts: Real-time alerts for low water levels and insufficient soil moisture
-
Error Handling & Testing
⚠️ 🧪- Implement error handling in both frontend and backend
- Test Firebase integration, ESP32 data transmission, and Angular data display
This project represents a significant step forward in smart agriculture, leveraging cutting-edge technology to make irrigation more efficient and responsive.
Feel free to reach out if you’re interested in learning more about the project or if you have any questions!
#SmartIrrigation #Angular #NodeJS #Firebase #ESP32 #WebSockets #IoT #AgricultureTech
This project involves creating a smart irrigation system using an ESP32 microcontroller. The system utilizes various sensors and actuators to manage irrigation based on real-time data and user-defined settings. The ESP32 is connected to Firebase for remote monitoring and control.
- ESP32 Microcontroller: Main control unit.
- WiFiManager Library: Manages WiFi connections.
- FirebaseESP32 Library: Handles Firebase interactions.
- Various sensors and actuators: Includes water level sensors, rain sensors, and more.
- Pin:
A0
- Description: Measures the water level in the reservoir. The analog value is read to determine the water level status (
LOW
,MEDIUM
,HIGH
).
- Pin:
27
- Description: Detects rain. When the rain is detected, it sends a digital signal indicating
HIGH
(rain detected) orLOW
(no rain).
- Pin:
A3
- Description: Measures soil moisture percentage. This sensor helps in determining if irrigation is needed based on soil moisture levels.
- Pin:
A0
(shared with Water Level Sensor) - Description: Additional water level detection; ensure this pin is correctly managed if used for multiple purposes.
- Pin:
19
- Description: Controls the irrigation pump. When activated, it turns the pump ON or OFF based on the system's requirements.
- Firebase Host:
iot-irrigation-smart-default-rtdb.firebaseio.com
- Firebase Auth:
AIzaSyCba_eDDCMY7-vQREAOJY4w_DQB1_PB28A
- NTP Server:
pool.ntp.org
- GMT Offset:
3600 seconds
(1 hour) - Daylight Offset:
0 seconds
- System Status:
/Status_du_system/status
- Rain Sensor Status:
/System_irrigation_smart/Captuer_de_pluie/status
- Irrigation Mode:
/Mode/status
- Water Level Sensor Status:
/System_irrigation_smart/capteur_niveau_eau/status
- Soil Moisture:
/System_irrigation_smart/humidite_du_sol/value
- Humidity Agriculturist Value:
/humiditer_agriculteur/status
- Pump History ON:
/Historique/historiquePompeOn
- Pump History OFF:
/Historique/historiquePompeOff
- Water Level Sensor History:
/Historique/historiqueCapteurdeWaterlevel
- Rain Sensor History:
/Historique/historiqueCapteurDEPLUIE
- Pump History:
/Historique/historiquePompe
- Pump Status:
/System_irrigation_smart/pompe/status
- Install Required Libraries: Ensure you have the
WiFiManager
,WiFi
,FirebaseESP32
, andWire
libraries installed in your Arduino IDE. - Connect to WiFi: The ESP32 will attempt to connect to the WiFi network specified by
ssid
andpassword
. - Configure Firebase: Replace
FIREBASE_HOST
andFIREBASE_AUTH
with your Firebase project details.
- Manual Mode: The system can be controlled manually through Firebase. Adjust water levels and pump status as needed.
- Automatic Mode: The system will automatically manage irrigation based on sensor data and pre-defined thresholds.
- Connection Issues: Ensure WiFi credentials are correct and check for network connectivity.
- Sensor Calibration: Verify sensor readings and calibrate if necessary.
This project is licensed under the MIT License - see the LICENSE file for details.