-
Notifications
You must be signed in to change notification settings - Fork 1
Installation and Setup
Albin Varghese edited this page Nov 18, 2024
·
2 revisions
- Introduction
- Prerequisites
- Hardware Setup
- Firmware Setup
- Server Configuration
- Portal and Mobile App Setup
- Testing and Calibration
- Conclusion
This guide provides a step-by-step walkthrough to set up the HydroLink Plus system, including hardware assembly, firmware installation, server setup, and testing. Detailed diagrams and configuration instructions ensure a seamless setup.
- ESP32 Development Board
- pH Sensor
- Turbidity Sensor
- Water Flow Sensor
- Motorized Valve
- Solar Panel (5V, 2W)
- 12V 2200mAh Li-ion Battery
- CN3791 MPPT Solar Charger Module
- Mini 360 Buck Converter
- OLED Display (optional)
- ESP-IDF Framework
- Python 3.x
- Git
- Laravel for Authority Server
- React Native for Mobile App
- MySQL Database
- FastAPI for Controller Backend
The hardware components are assembled into a compact, 3D-printed case.
graph TD;
A[ESP32 Microcontroller] -->|Connects to| B[pH Sensor];
A --> C[Water Flow Sensor];
A --> D[Turbidity Sensor];
A --> E[Motorized Valve];
F[Solar Panel] -->|Powers| G[MPPT Charger Module];
G -->|12V Output| H[Li-ion Battery];
H -->|Step Down| I[Mini 360 Buck Converter];
I -->|3.3V/5V Output| A;
-
Sensor Connections:
- pH Sensor: Connect to
GPIO34for ADC input. - Turbidity Sensor: Connect to
GPIO35for ADC input. - Water Flow Sensor: Connect to
GPIO18for digital pulse input.
- pH Sensor: Connect to
-
Valve Control:
- Motorized valve control pin connects to
GPIO32.
- Motorized valve control pin connects to
-
Power Wiring:
- Solar panel connects to MPPT input.
- MPPT module charges the 12V battery.
- Buck converter steps voltage down for ESP32 and sensors.
Ensure the system is properly powered for continuous operation.
graph TD;
A[Solar Panel] -->|5V Input| B[MPPT Charger Module];
B -->|12V Output| C[Li-ion Battery];
C -->|12V Input| D[Mini 360 Buck Converter];
D -->|3.3V/5V Output| E[ESP32 and Sensors];
- Use appropriate connectors to ensure secure wiring.
- Test solar panel output under sunlight for optimal efficiency.
- Install ESP-IDF from the official ESP32 documentation.
- Configure the environment:
export IDF_PATH=~/esp/esp-idf export PATH=$IDF_PATH/tools:$PATH
(Include an image showing the successful ESP-IDF environment setup in a terminal window.)
-
Clone the HydroLink Plus firmware repository:
git clone https://github.com/your-repo/hydrolink-firmware.git cd hydrolink-firmware -
Configure the firmware:
idf.py menuconfig
- Example menu options:
- Wi-Fi SSID:
your-SSID - Wi-Fi Password:
your-password
- Wi-Fi SSID:
- Pin mappings for sensors and actuators.
- Example menu options:
-
Build and flash the firmware:
idf.py build idf.py flash
gantt
title Firmware Task Scheduling
section Tasks
Sensor Data Collection :active, a1, 2024-11-18, 10s
Valve Control :a2, after a1, 5s
Data Transmission :a3, after a2, 10s
Power Monitoring :a4, after a3, 5s
-
Clone and deploy the Laravel-based server:
git clone https://github.com/your-repo/hydrolink-server.git cd hydrolink-server composer install -
Configure
.envfor database access:DB_CONNECTION=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=hydrolink DB_USERNAME=root DB_PASSWORD=yourpassword
-
Run migrations and start the server:
php artisan migrate php artisan serve
-
Portal:
- Deploy the Next.js portal:
npm install npm run build npm start
- Deploy the Next.js portal:
-
Mobile App:
- Clone the React Native app repository:
git clone https://github.com/your-repo/hydrolink-app.git npm install npx react-native run-android
- Clone the React Native app repository:
-
Sensor Calibration:
- Use provided calibration scripts for pH and turbidity sensors.
- Verify accuracy using known reference solutions.
-
Leak Detection Testing:
- Simulate a leak by manipulating flow rates and verify system responses.
-
Solar Power Test:
- Measure battery charging under different sunlight conditions.
graph TD;
A[Sensor Data] --> B[Firmware Preprocessing];
B --> C[Wi-Fi Transmission];
C --> D[Authority Server];
D --> E[User Portal and Mobile App];
HydroLink Plus 2024
HydroLink Plus ©2024