This project demonstrates interfacing water level sensors with an ESP8266 (D1 R1) and controlling LEDs through Wi-Fi using the Blynk app. The LEDs indicate the water level, and the project includes integration with a water level depth detection sensor for precise readings.
_____________________
| | |
| D2 | D3 |
|__________|__________|
| | |
| D6 | D10 |
|__________|__________| ____________
| | | | |
| D1 | GND |---------- | ESP8266 |
|__________|__________| | |____________|
| | | |
| A0 | 3.3v | |
|__________|__________| |
| | |
| | |
| | | ____________
| | | | |
|__________|_________|________| Sensor |
|____________|
- D2, D3, D6, D10: Pins connected to LEDs.
- D1: Pin used to indicate connectivity.
- A0: Analog pin connected to the water level depth detection sensor.
- GND: Ground connection.
- ESP8266: Wemos ESP8266 Wi-Fi Board (D1 R1)
- Sensor: Water Level Depth Detection Sensor
Follow these steps to set up the circuit:
Connect the components as follows:
- Connect LEDs (3.3V Red, Green, Blue, Yellow LEDs) to pins D2, D3, D6, and D10 on the ESP8266 board.
- Connect pin D1 to indicate network and cloud connectivity.
- Connect the negative (shorter) lead of each LED to the ground (GND) on the breadboard to complete the circuit.
- Connect the water level depth detection sensor to pin A0, GND, and 3.3V on the ESP8266 board.
You will need the following components:
- Wemos ESP8266 Wi-Fi Board (D1 R1): Microcontroller board.
- Specifications:
- Microcontroller: ESP8266 (D1 R1)
- Clock Speed: 80MHz (up to 160MHz)
- USB Converter: CH340G
- Operating Voltage: 3.3V
- Flash Memory: 4MB
- Digital I/O: 11
- Analog Inputs: 1
- Communications: I2C, Serial, SPI
- WiFi: Built-in
- Specifications:
- LEDs: For lighting effects.
- Specifications:
- Type: 3.3V LEDs (Red, Green, Blue, Yellow)
- Specifications:
- Water Level Depth Detection Sensor: For precise water level readings.
- Specifications:
- Operating Voltage: DC 3-5V
- Operating Current: < 20mA
- Sensor Type: Analog
- Detection Area: 40mm x 16mm
- Operating Temperature: 10Β°C-30Β°C
- Humidity: 10% - 90% non-condensing
- Specifications:
- Female, Male to Male Jumper Wires: For connecting components.
For detailed connections and pinouts, refer to the component directories in the components
folder.
To connect LEDs on a breadboard, follow these steps:
- Insert the LEDs into the breadboard, ensuring the longer lead (positive) is on one side and the shorter lead (negative) is on the other side.
- Connect the positive (longer) lead of each LED to a digital pin on the ESP8266 board (D2, D3, D6, D10).
- Connect the negative (shorter) lead of each LED to the ground (GND) on the ESP8266 board.
For detailed specifications and connection diagrams of LEDs, refer to the LED component directory in the components
folder.
This directory contains information about the ESP8266 microcontroller board.
- Microcontroller: ESP8266 (D1 R1)
- Clock Speed: 80MHz (up to 160MHz)
- USB Converter: CH340G
- Operating Voltage: 3.3V
- Flash Memory: 4MB
- Digital I/O: 11
- Analog Inputs: 1
- Communications: I2C, Serial, SPI
- WiFi: Built-in
For more details, refer to Wemos ESP8266 Wi-Fi Board (D1 R1) Details
This directory contains information about the LEDs used in the project.
- Type: 3.3V LEDs (Red, Green, Blue, Yellow)
For more details, refer to LED Details
This directory contains information about the water level depth detection sensor used in the project.
- Operating Voltage: DC 3-5V
- Operating Current: < 20mA
- Sensor Type: Analog
- Detection Area: 40mm x 16mm
- Operating Temperature: 10Β°C-30Β°C
- Humidity: 10% - 90% non-condensing
For more details, refer to Water Level Depth Detection Sensor Details
This directory contains information about the male to male jumper wires used in the project.
For more details, refer to Jump Wires Details
This directory contains information about the breadboard used in the project.
- Type: Full-size Breadboard
- Total Holes: 830
- Spacing: 2.54mm (0.1")
- Dimension: 16.5x5.5cm
- Common Rating: 1A @ 5V or 5 Watt
For more details, refer to Breadboard Details
Before uploading the code to the ESP8266 board, make sure you have the Arduino software installed. You can download it from the Arduino website.
Blynk is a platform that allows you to build IoT applications easily. Follow these steps to set up Blynk with your ESP8266 project:
- Go to the Blynk website and sign up for an account.
- Once logged in, create a new project and select the ESP8266 board.
- Configure the project settings and choose the appropriate connection type (Wi-Fi).
- Add widgets to the project dashboard to control the LEDs and monitor connectivity.
- Create virtual pins in your Blynk project to communicate with the ESP8266.
- Assign each LED and connectivity indicator to a specific virtual pin.
- Open the Arduino code file
Water_Tank_Monitoring_System.ino
from this repository. - Include the Blynk library and configure the Wi-Fi credentials.
- Initialize Blynk with your authentication token and connect to the Blynk server.
- Map the virtual pins to the corresponding LEDs and connectivity indicators.
- Implement functions to handle LED control, monitor connectivity status, and read data from the water level depth detection sensor.
- Download and install the Blynk app from the App Store or Google Play.
- Log in to the Blynk app using your account credentials.
- Open the project created earlier in the web interface.
- Configure the app interface by adding buttons, sliders, or other widgets to control the LEDs and display water level readings.
- Create widgets to display the connectivity status of the ESP8266 and water level readings from the sensor.
- Create templates on the Blynk web interface for the project dashboard.
- Customize the templates with the desired layout and functionality, including widgets for controlling LEDs, displaying water level readings, and monitoring connectivity.
- Save the templates and ensure they are synchronized with the mobile app.
- Connect your ESP8266 board to power and ensure it is connected to the Wi-Fi network.
- Open the Blynk app on your mobile device and navigate to the project dashboard.
- Use the widgets to control the LEDs, monitor connectivity, and view water level readings.
- Test different scenarios and functionalities to ensure proper operation.
This project is licensed under the MIT License. Feel free to use, modify, and distribute this project for educational purposes.
Disclaimer: This project is intended for educational purposes only and should not be used in production environments without proper testing and validation.