Automatic Wiper System

A windscreen wiper is a device used to remove rain, snow, ice and debris from a windscreen or windshield. Here we propose an automatic wiper system that automatically switches ON on detecting rain and stops when rain stops. For this purpose we use rain sensor along with ATMega328 microcontroller and amplifier to drive the wiper servo motor. Our system uses rain sensor to detect rain, this signal is then processed by the microcontroller and take the desired action.

Required Parts:

Circuit Diagram: In this project, I made my own DIY Arduino board with PCB and some components using the following circuit.

Coding the Microcontroller: For making the project with a DIY Arduino board, you just need to prepare the microcontroller by programming it from a separate Arduino board.

Burn this code to your Arduino.

#include <Servo.h>

Servo myservo;

int pos = 0;
int SensorPin = 14;

void setup()
{
pinMode(SensorPin, INPUT);
myservo.attach(9);                   // attaches the servo on pin 9 to the servo object
}

void loop()
{
if(digitalRead(SensorPin)==LOW){
for(pos = 120; pos>=0; pos-=1)                   // goes from 120 degrees to 0 degrees
{
myservo.write(pos);    // tell servo to go to position in variable ‘pos’
delay(8);        // waits 15ms for the servo to reach the position
}
for(pos = 0; pos <= 120; pos += 1) // goes from 0 degrees to 120 degrees
{                              // in steps of 1 degree
myservo.write(pos);                    // tell servo to go to position in variable ‘pos’
delay(8);                                            // waits 8ms for the servo to reach the position
}
}

}

 

Checkout the video:

Leave a Reply

Your email address will not be published. Required fields are marked *