Projects Hub, lesson 33 of 81
Raindrop Detection and Automatic Wiper Control with LCD Output
Introduction
Driving in adverse weather conditions can be hazardous, especially when rain starts pouring down, obstructing your vision through the windshield. To enhance safety and convenience, we can create an automated raindrop detection and wiper control system. In this article, we will explore the working principle, components needed, circuit diagram, and Arduino code to create such a system, which can help drivers maintain clear visibility even during heavy rain.
Working Principle
The core principle behind this raindrop detection and wiper control system is simple: it utilizes a raindrop sensor to detect raindrops on the windshield and then automatically activates the wiper mechanism to clear the rain. Here's how it works step by step:
- Raindrop Detection: The raindrop sensor module consists of a sensor board and a control board. The sensor board has a set of conductive tracks on its surface. When raindrops land on the sensor's surface, it forms a conductive path between these tracks, changing the sensor's resistance.
- Resistance Measurement: The control board measures the resistance across the conductive tracks. As more raindrops accumulate, the resistance decreases.
- Threshold Comparison: The Arduino microcontroller continuously monitors the resistance value. When the resistance drops below a predefined threshold, it triggers the wiper control mechanism.
- Wiper Activation: The Arduino sends a signal to a motor driver circuit, which controls the wiper motor. The motor starts to operate, wiping the raindrops from the windshield.
- LCD Output: Additionally, the system provides real-time feedback on the LCD screen, displaying whether the wipers are active or not.
Things We Need
To build this raindrop detection and wiper control system, you will require the following components:
- Arduino Uno or similar microcontroller board
- Raindrop sensor module
- LCD screen (16x2 or 20x4)
- Motor driver module
- Wiper motor and wiper blades
- Jumper wires
- Breadboard or custom PCB for the circuit
Circuit Diagram
Here's a simplified circuit diagram to help you visualize how the components are connected:
[Insert Circuit Diagram]
Working of the System with Arduino
- Connect the raindrop sensor to the Arduino as per the datasheet or instructions provided with the sensor module.
- Connect the LCD screen to the Arduino using appropriate pins. Libraries like "LiquidCrystal" can help control the display.
- Set up the motor driver circuit to control the wiper motor. Ensure that the connections are made correctly.
- Write an Arduino program that reads the resistance from the raindrop sensor, compares it to a predefined threshold, and activates the wiper motor accordingly. The program should also display the status on the LCD screen.
Code
Below is a simplified code snippet to get you started. Please adjust it according to your specific sensor and motor driver module:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int raindropPin = A0;
const int threshold = 500; // Adjust this value according to your sensor's sensitivity
const int motorPin = 9;
void setup() {
lcd.begin(16, 2);
lcd.print("Raindrop Wipers");
pinMode(raindropPin, INPUT);
pinMode(motorPin, OUTPUT);
}
void loop() {
int raindropValue = analogRead(raindropPin);
if (raindropValue < threshold) {
lcd.clear();
lcd.print("Wipers: ON");
digitalWrite(motorPin, HIGH); // Turn on the wipers
} else {
lcd.clear();
lcd.print("Wipers: OFF");
digitalWrite(motorPin, LOW); // Turn off the wipers
}
delay(1000); // Adjust the delay as needed for your application
}Conclusion
Incorporating a raindrop detection and automatic wiper control system into your vehicle can significantly improve driving safety during rainy conditions. With this system, you can ensure a clear view of the road ahead, reducing the risk of accidents caused by reduced visibility. By following the provided guidelines and adjusting them to your specific components, you can create a reliable and efficient raindrop detection and wiper control system for your vehicle. Stay safe on the road, no matter the weather!

