Rain sensor with arduino UNO and LCD in proteus simulation
In this article we will learn how to interface arduino UNO with Rain sensor & LCD in proteus.
In the last post we will learn how to interface arduino with Thermocouple and LCD in proteus. You can visit our website,
I hope you appreciate my work, let’s discuss about today’s project.
Components which we use in this project are listed below:
- Rain sensor
- Arduino UNO
- I2C
- LCD display
- Jumper wires
Diagram of this project is below:
Its raining
No Rain
Construction of Rain sensor with arduino UNO and LCD in proteus simulation:
- Connect the OUT pin of rain sensor with the pin 2 of arduino UNO
- Connect the GND pin of rain sensor with the GND
- Connect the VCC pin of rain sensor with the +ve point
- Connect the test Pin of rain sensor with the logic pin 1
- Connect the A4 pin of arduino UNO with the pin 15 of I2C
- Connect the A5 pin of arduino UNO with the pin 14 of I2C
- Connect the A0,A1,A2 of I2C with the GND
- Connect the VSS pin of LCD display with the GND
- Connect the VDD pin of LCD display with the +ve point
- Connect the P0 pin of I2C with the pin RS of LCD display
- Connect the P1 pin of I2C with the pin RW of LCD display
- Connect the P2 pin of I2C with the pin E of LCD display
- Connect the P3 pin of I2C with the pin D3 of LCD display
- Connect the P4 pin of I2C with the pin D4 of LCD display
- Connect the P5 pin of I2C with the pin D5 of LCD display
- Connect the P6 pin of I2C with the pin D6 of LCD display
- Connect the P7 pin of I2C with the pin D7 of LCD display
Working of Rain sensor with arduino UNO and LCD in proteus simulation:
A rain sensor with an Arduino Uno and an LCD can be used to detect rainfall and display the rainfall status on an LCD screen. The rain sensor typically has a set of conductive pads that act as a sensor. When these pads come into contact with water (rain), they complete a circuit, allowing the Arduino to detect the rainfall.
Applications of Rain sensor with arduino UNO and LCD in proteus simulation:
- Rainfall Monitoring Station
- Automatic Plant Watering System
- Weather Station
- Home Automation
- Irrigation Control
Advantages of Rain sensor with arduino UNO and LCD in proteus simulation:
- Real-time Rainfall Monitoring
- Data Visualization
- Alerts and Notifications
- Data Logging
- Automation
Program code of this project is below:
#include <Wire.h> // Include the Wire library for I2C communication
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x20, 16, 2); // Initialize the LCD with its I2C address (0x3F) and size (16×2)
void setup() {
lcd.begin();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print(“Hello”); // Turn on the backlight
delay (1000);
pinMode(2, INPUT); // Configure pin 2 as an input for the rain sensor
}
void loop() {
int rain = digitalRead(2);
lcd.clear(); // Clear the LCD display before printing new text
lcd.setCursor(0, 0); // Set the cursor to the first line
if (rain == HIGH) {
lcd.print(“It’s Raining”);
} else {
lcd.print(“No Rain”);
}
delay(500);
}