Introduction
Hello, young scientists and future engineers! Today, we have a fantastic project that combines technology, water conservation, and a bit of coding. We are going to build a Rainwater Harvesting and Recharge System with an LCD display using Arduino. This project will not only teach you about water conservation but also introduce you to the exciting world of DIY electronics. Let’s dive in!
Rainwater is a valuable resource, and we can do our part to save it. Rainwater harvesting is an eco-friendly way to collect and store rainwater for various uses, like watering plants, washing cars, or flushing toilets. In this project, we’ll create a smart rainwater harvesting system that automatically pumps rainwater into a primary storage tank and even has a cool LCD display to show us how much water we have. Plus, it has a recharge facility for extra rainwater that doesn’t fit in the primary tank.
Working Principle
The rainwater harvesting and recharge system works like this:
- Rainwater Collection: When it rains, the primary storage tank collects rainwater through a pipe system.
- Primary Storage Control: A float switch in the primary storage tank tells the system when it’s full, and it stops collecting water to avoid overflowing.
- Excess Rainwater Recharge: If the primary tank is full, the excess rainwater is directed to the recharge facility to prevent wastage.
- Pump Control: When the primary storage tank needs more water, a pump transfers it from the recharge facility to the primary tank.
- LCD Display: We have an LCD display near the primary tank that shows the water levels in the primary storage and the recharge facility in real-time..
Things We Need
Before we delve into the circuit and code, let’s gather the components required for this project:
- Overhead Storage Tank
- Recharge Facility
- Submersible Water Pump
- Float Switches (3)
- Arduino Board
- 16×2 LCD Display with i2C module
- Relays
- Pipes and Fittings
- Jumper Wires
- Power Supply
- Waterproof Containers (for the electronics)
Circuit Diagram
For Circuit diagram follow these steps
Working of the System with Arduino
This code uses the LiquidCrystal library to control the LCD display and checks the water levels in the primary storage and recharge facility, controlling the pump accordingly.
Program the microcontroller to:
- Read data from float switches in the primary storage and recharge facility.
- Control the pump using relays.
- Display information on the LCD.
- Implement safety measures to prevent overfilling and ensure efficient water management.
Arduino Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the I2C address and LCD dimensions
LiquidCrystal_I2C lcd(0x27, 16, 2); // Use the correct address for your I2C module
int primaryTankFloatPin = 7;
int rechargeFloatPin = 6;
int pumpControlPin = 3;
void setup() {
// Initialize the LCD with the I2C address
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
// Define pin modes
pinMode(primaryTankFloatPin, INPUT);
pinMode(rechargeFloatPin, INPUT);
pinMode(pumpControlPin, OUTPUT);
}
void loop() {
// Read the float switches
int primaryTankLevel = digitalRead(primaryTankFloatPin);
int rechargeLevel = digitalRead(rechargeFloatPin);
// Check if the primary tank is full
if (primaryTankLevel == HIGH) {
digitalWrite(pumpControlPin, HIGH); // Start the pump
lcd.print("Pump Running ");
} else {
digitalWrite(pumpControlPin, LOW); // Stop the pump
lcd.print("Pump Off ");
}
lcd.setCursor(0, 1);
lcd.print("Primary: ");
lcd.print(primaryTankLevel == HIGH ? "Full " : "Not Full");
lcd.setCursor(10, 1);
lcd.print("Recharge: ");
lcd.print(rechargeLevel == HIGH ? "Full " : "Not Full");
delay(1000); // Update the display every second
}
Conclusion
Automating your rainwater harvesting system using an Arduino and an LCD display not only makes it efficient but also provides real-time feedback on its status. This project can be expanded by adding additional sensors, remote monitoring, or even connecting it to a home automation system. By harnessing rainwater more effectively, we can contribute to water conservation efforts while enjoying the benefits of a sustainable water supply.