Project Final1 | PDF | Rectifier | Power Supply
0% found this document useful (0 votes)
2 views

Project Final1

Uploaded by

anandhusk55555
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Project Final1

Uploaded by

anandhusk55555
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

AUTOMATIC ROOM LIGHT CONTROL

USING ARDUINO UNO

PROJECT REPORT

Submitted in partial fullfillment of


the requirment of the award of Diploma in electronics engineering
of State Board of technical education.

Submitted by
ADERSH.J.A 2101040504
ROJAN .J.S 2101042492
ANANDHU.S.K 2101042490
AKASH.B.S 2101042488
ADITHYAN.B 2101042525
Sixth semster
Diploma in Electronics Engineering.

DEPARTMENT OF ELECTRONICS
GOVT POLYTECHNIC COLLEGE NEDUMANGAD

THIRUVANANTHAPURAM
2023
DEPARTMENT OF ELECTRONICS
GOVT POLYTECHNIC COLLEGE NEDUMANGAD
THIRUVANANTHAPURAM

CERTIFICATE

This is to certify that this seminar report entitled “RAIN


DETECTION AND CLOTHES PROTECTION SYSTEM” is a bonified
record of the work done by
ADERSH.J.A , ROJAN .J.S , ANANDHU.S.K , AKASH.B.S , ADITHYAN.B
Under our guidance towards the partial fulfillment of the
requirements for the award of the Diploma in electronics
engineering, of the State Board of Technical Eduction during the
year 2023.
Head of the department
Parvathy Bhaskar
Dept. of ELS

Sherin I.L. Maya K.G


Lecturer Lecturer
Dept. of ELS. Dept. of ELS
(Project Guide). (Project Guide)
ACKNOWLEDGEMENTS

I would like to express my sincere and gratitude and heartful indebtedness


to my guide Sri Sherin.I.L(lecturer) and Smt Maya K.G (lecturer) department of
electronics in engineering for the valuable guidance and encouragement in
pursuing this Project.
I am also very much thankful to Smt Parvathy Bhaskar ,Head of the
department of electronics engineering for their help and support.
My sincere thank to all the teachers of the department of ELS and to all
my friends for their support.
Above all, I thank God for the immense blessing at all the stages of the
project.

ADERSH.J.A
ROJAN .J.S
ANANDHU.S.K
AKASH.B.S
ADITHYAN.B
ABSTRACT

Rain water Detection & Cloth Protection is a system designed to be


helpful in household uses where wet cloths
can be hang on system hangers so that whenever rain comes the
system retrieves in the cloths to a shaded area and wetting of cloth are
been avoided. Likewise, when rain stops the machine retrieves back
the cloth to open atmosphere to continue drying. This includes
conversion of electrical energy into mechanical energy. It is hard to
keep the clothes out for drying when the weather changes from
sunny to a rainy day. People often forget to lift the suspension of
clothing during the day rain. For people who working, they don’t have
to worry about their clothes that have been dried outside. People often
don’t have time to manage their routine. This project develop for
working couple, it is hard to find time to have laundry day where the
cloth is dried through the whole day because the weather can
change from sunny to rainy days. This project will automatically retrieve
out the clothes when it is the sunny day and oppositely retrieve
in the clothes when it is a rainy day.
This part needs DC motor to convert electrical power into mechanical
power for retrieve-out and retrieve-in all the clothes.
Rain sensor also will be use to sense when it begins to rain outside
by detecting rain water from sensor locate at the rod. The dry time of
the clothes will be setup using rotary knob switch and it will
automatically retrieve-in the clothes using DC motor when the dried
time is finished.
TABLE OF CONTENTS

1.INTRODUCTION ........................................8
2. LIST OF COMPONENTS..............................9
3. WHAT IS ARDUINO UNO ?.........................10
1. About Arduino Uno..........................................11
2. Arduino Programing language.........................11

4. WORKING...................................................12
1. Uses of Components.........................................12
1. IR sensor..................................................12
2. Relay........................................................13
3. Arduino Uno............................................13
4. jumper cables...........................................14
5. LCD display.............................................14
2. Device and implementation..............................15
3. Schematic diagram of program........................17

5. ALGORITHM OF PROGRAM ......................18


6.VISUAL REPRESENTATION........................19
7. ADVANTAGES AND DISADVANTAGES......22
8. CONCLUSION...............................................27
LIST OF TABLES

1.list of components..............................8
LIST OF FIGURES

1. Arduino Uno .........................................................9


2. Circuit diagram of Arduino Uno.............................10

3. Pin description of Arduino......................................10


4. IR sensor..................................................................11
5. Circuit diagram of IR sensor..................................11
6.Relay.......................................................................12

7. Jumper cables..........................................................13

8. LCD display............................................................14

9. Device and implementation...................................17

10. Schematic diagram......................................17

11. Algorithm...... ...............................................18

12. Visual representation...................................19


CHAPTER 1
INTRODUCTION

The life of human race has greatly changed with number of


inventions. There are many inventions that satisfy people needs.
Though these modern discoveries of technology and with their
increasing power and versatility, people have became dependent on
this machine in their day to day endeavor of their business and
lifestyle. In this age invention is given a great impact in everything
that
we do . It makes peoples work and satisfies human needs. With this
premise our group thought of something that could help ease the
burden of all people when it comes to their laundry because there
are some that still rely on manual base system. In this research we
will able to look for a possible solution in protecting clothes lie to
decreased stressful lifestyle.
For a working couple, it is hard to find time to have laundry day
where the cloth is dried through the whole day because the
weather can change from sunny to rainy days. This projects use At
mega 328P Microcontroller to install all program that will give
instructions to conduct this system properly. This project will
automatically retrieve-out the clothes when it is the sunny day and
oppositely retrieve-in the clothes when it is a rainy day. This part
needs DC motor to convert electrical power into mechanical power
for retrieve-out and retrieve-in all the clothes. Rain detector
also will be use to sense when it begins to rain outside by detecting
rain water drops which falls on the sensor which is placed on the
rod. This will automatically retrieve-in the clothes using DC motor
when the sensor is actuated.
CHAPTER 2
LIST OF COMPONENTS

Sl.no component type quantity


1 Arduino Uno ATmega328p 1
2 Rain sensor HL 83 2
3 Motor driver L298N 3
4 DC Gear Motor 12v dc motor 4
CHAPTER 3
WHAT IS ARDUINO UNO

Arduino is an open-source electronics platform based on easy-to-use


hardware and software. Arduino boards are able to read inputs - light
on a sensor, a
finger on a button, or a Twitter message - and turn it into an output -
activating a motor, turning on an LED, publishing something online.
You can tell your board what to do by sending a set of instructions to
the microcontroller on the board. To do so you use the Arduino
programming language (based on Wiring), and the Arduino Software
(IDE), based on Processin Over the years Arduino has been the brain
of thousands of projects, from everyday objects to complex scientific
instruments. A worldwide community of makers - students,
hobbyists, artists, programmers, and professionals - has gathered
around this open-source platform, their contributions have added up
to an incredible amount of accessible knowledge that can be of great
help to novices and experts alike.

fig(3.1)
3.1. About Arduino Uno

Historically, an Arduino board consists of an Atmel 8-, 16-, or 32-


bit AVR[14] microcontroller with complementary components that
allow for programming and integration into other circuits. The
Arduino's standard connectors are an essential feature since they
enable users to link the CPU board to a number of interchangeable
add-on modules known as shields. Few shields interact directly
with the Arduino board via different pins, but several shields are
individually addressable via an I2C serial bus, allowing many
shields to be in parallel. It provides 14 digital I/O pins,
produce pulse width modulated signals, and six analogue inputs,
which can also be used as six digital I/O pins. This board has a 5
volt linear regulator and a 16 MHz crystal oscillator[21].

..
fig(3.2)

Microcontroller ATmega 328Operating Voltage - 5V


Input Voltage (recommended) - 7-12V Input Voltage
(limits)- 6-20V Digital I/O Pins - 14 (of which 6 provide
PWM output) Analog Input Pins - 6 DC Current per I/O
Pin - 40 mA DC Current for 3.3V Pin - 50 mAClock
Speed - 16 MHz
Arduino is an open-source microcontroller platform with
development environment thatimplements Processing/Wiring
language which is a subset of C and includes several libraries.
Inorder to maximize performance and parallelism, the AVR uses
Harvard architecture withseparate memories and buses for
program and data. Instructions in the program memory
areexecuted with a single level pipelining. Modular design of
Arduino board allows easy and fastintegration with other hardware
(eg. displays, motors, keyboards ) and makes AVRmicrocontroller
easier to program.
Arduino’s processor basically uses the Harvard architecture where
the program code and program data have separate memory. It
consists of two memories- Program memory and the
datamemory[3]. The code is stored in the flash program memory,
whereas the data is stored in thedata memory. The Atmega328 has
32 KB of flash memory for storing code (of which 0.5 KB isused for
the boot loader), 2 KB of SRAM and 1 KB of EEPROM and operates
with a clockspeed of 16MHz. Arduino Uno consists of 14 digital
input/output pins (of which 6 can be used asPWM outputs), 6 analog
inputs, a 16 MHz crystal oscillator, a USB connection, a power jack,
anICSP header, and a reset button.

Power Jack
: Arduino can be power either from the pc through a USB or
through externalsource like adaptor or a battery. It can operate on
a external supply of 7 to 12V. Power can beapplied externally
through the pin Vin or by giving voltage reference through the IO
Ref pin.
Digital Inputs
: It consists of 14 digital inputs/output pins, each of which provide or
take up40mA current. Some of them have special functions like pins
0 and 1, which act as Rx and Txrespectively , for serial
communication, pins 2 and 3-which are
external interrupts, pins3,5,6,9,11 which provides pwm output
and pin 13 where LED is connected.
Analog inputs
: It has 6 analog input/output pins, each providing a resolution of
10 bits.
A Ref
: It provides reference to the analog

inputs Reset

: It resets the microcontroller when low.The most important


advantage with Arduino is the programs can be directly loaded to
the devicewithout requiring any hardware programmer to burn the
program. This is done because of the presence of the 0.5KB of
Boot loader which allows the program to be burned into the
circuit.Programs written in Arduino are known as sketches. A basic
sketch consists of 3 parts-1. Declaration of Variables2.
Initialization: It is written in the setup () function.3. Control code: It
is written in the loop () function.
The sketch is saved with in extension. Any operations like verifying,
opening a sketch, saving asketch can be done using the buttons on
the toolbar or using the tool menu

The sketch should be stored in the sketchbook directory


Chose the proper board from the tools menu and the serial port
numbers.
Click on the upload button or chose upload from the tools
menu. Thus the code is uploaded bythe boot loader onto the
microcontroller [4-5].

3.2. Arduino Uno programing language

Arduino uses a variant of the C++ programming language. The code is


written in C++ with an addition of special methods and functions.
Moreover, when you create a ‘sketch’ (the name given to
code files in this language), it is processed and compiled to
machine language.

3.3. Pin discription of Arduino Uno

...

fig(3.3)

Fig. 3. Arduino UNO block diagram

Arduino is widely preferred now a days the reason being it’s


the various advantages.
It comeswith an open source hardware feature which enables users
to develop their own kit using alreadyavailable one as a reference
source. The Arduino software is compatible with all types
ofoperating systems like Windows, Linux,
CHAPTER 4
WORKING

1. Uses of Components

1. Rain sensor

2. The HL83 rain sensor is a device used to detect


rainfall. It typically consists of a series of conductive
strips or wires that are separated by an insulating
material. When raindrops fall on the sensor, they
create a conductive path between the strips, causing a
change in resistance or capacitance, depending on the
sensor design.

3. This change in resistance or capacitance is then


measured by the sensor's circuitry, which can be
calibrated to determine the intensity of the rainfall.
This information can be used for various applications,
such as activating automatic windshield wipers on
vehicles, controlling irrigation systems, or monitoring
weather conditions.

4. The HL83 rain sensor is designed to be durable and


weather-resistant, making it suitable for outdoor use.
It typically requires minimal maintenance and can
provide reliable performance in a range of
environmental conditions.

5. Overall, the HL83 rain sensor offers a simple yet


effective solution for detecting rainfall and can be
integrated into various systems to automate processes
or provide valuable data for analysis.
The rain sensor works on the principle of total internal reflection. An
infrared light shone at a 45 degree angle on a clear area of the
windshield is reflected and is sensed by the sensor inside the car.
When it rains, the wet glass causes the light to scatter and a lesser
amount of light gets reflected back to the sensor.

An additional application in professional satellite communications


antennas is to trigger a rain blower on the aperture of the antenna
feed, to remove water droplets from the mylar cover that keeps
pressurized and dry air inside the wave-guides.

Rain sensors for irrigation systems are available in both wireless and
hard-wired versions, most employing hygroscopic disks that swell in
the presence of rain and shrink back down again as they dry out —
an electrical switch is in turn depressed or released by the
hygroscopic disk stack, and the rate of drying is typically adjusted by
controlling the ventilation reaching the stack.

fig(4.1)
Principle of Working of Rain Sensors

A rain sensor is one kind of switching device which is used to


detect the rainfall. It works like a switch and the working principle
of this sensor is, whenever there is rain, the switch will be
normally closed.

The rain sensor module/board is shown below. Basically, this


board includes nickel coated lines and it works on the resistance
principle. This sensor module permits to gauge moisture through
analog output pins & it gives a digital output while moisture
threshold surpasses.

This sensor is a resistive dipole, and based on the moisture only it


shows the resistance. For example, it shows more resistance when
it is dry and shows less resistance when it is wet.

Pin1 (VCC): It is a 5V DC pin


Pin2 (GND): it is a GND (ground) pin
Pin3 (DO): It is a low/ high output pin
Pin4 (AO): It is an analog output pin
This sensor is used as a water preservation device and this
is connected to the irrigation system to shut down the
system in the event of rainfall.
This sensor is used to guard the internal parts of an
automobile against the rainfall as well as to support the
regular windscreen wiper’s mode.
This sensor is used in specialized satellite communications
aerials for activating a rain blower over the opening of the
aerial feed, to get rid of water droplets from the mylar
wrap to keep pressurized as well as dry air within the
waveguides.

.Circuit diagram of Rain sensor

fig(4.1.1)

Motor Driver

The L298N motor driver module is a popular dual H-


bridge motor driver IC (integrated circuit) module.
Here's a detailed explanation of its components and how
it works:
1.H-Bridge Configuration: The L298N module contains two H-bridges,
which are electronic circuits that enable the control of the direction and
speed of DC motors. Each H-bridge consists of four transistors
arranged in a specific configuration to allow bidirectional current flow
through the motor.

2.Input Pins: The module has input pins for controlling the speed and
direction of each motor. These typically include two digital pins for
direction control (one for forward and one for reverse) and a PWM
(Pulse Width Modulation) pin for controlling the motor speed. By
varying the PWM signal's duty cycle, you can adjust the motor's
speed.

3.Output Pins: The output pins connect to the DC motors. Each motor
is connected to a pair of output pins, allowing bidirectional control of
motor rotation.

4.Motor Power Supply: The L298N module requires an external power


supply to power the motors. It typically accepts a wide range of voltage
inputs, such as 5V to 35V, depending on the specific module.

5.Logic Power Supply: In addition to the motor power supply, the


module also requires a separate logic power supply, usually 5V, to
power the control circuitry and logic-level inputs.

6.Current Sensing and Protection: The L298N module often includes


features for current sensing and protection. This helps prevent
damage to the motors and the driver module by limiting the current
flow through the motor and shutting down the driver in case of
overcurrent conditions.

7.Heat Sink: The L298N IC can generate heat during operation,


especially when driving high-current loads. Many L298N modules
come with a built-in heat sink or provisions for attaching an external
heat sink to dissipate heat and keep the IC cool.
8.Applications: The L298N motor driver module is widely used
in robotics, RC (remote-controlled) vehicles, CNC (Computer
Numerical Control) machines, and other applications requiring
precise control of DC motors.

Overall, the L298N motor driver module provides a convenient


and versatile solution for controlling DC motors with ease,
making it a popular choice among hobbyists and professionals
alike.

fig:

Principle of working of motor driver

Motor driver is used to control motion of a motor and its direction


by feeding current accordingly. Output of a motor driver is in digital
form so it uses PWM (Pulse Width Modulation) to control speed of
a motor. Motor Driver are basically current amplifiers followed by
input signals. It can also drive inductive loads such as relays,
solenoids, transformer etc.
Today (2021) many types of motor driver modules available in the
market. Using a single transistor is simplest form of motor driver. L293D
IC is used commonly for general purpose motor driver. Like other driver
it is capable of driving two motor independently both clockwise and anti-
clockwise. Positive and Negative supply should not be altered otherwise
this IC gets damage easily. This type of IC use H Bridge circuit for
reverse and forward direction.

In terms of capacity It is better than L293 It is a high voltage (upto 46V),


high current (upto 4A) dual full-bridge driver designed to accept
standardTTL logic levels. If you are using big motor then go for L298N
motor driver.

You can also use mini L293N. It is good for battery powered smart cars,
toy cars, robots. This is small size, Low weight, Low cost driver module.
It works at 2V to 10V supply and maximun output current is 1.5A

Fig:
4.1.2. DC Gear Motor

A DC gear motor is a type of electric motor that incorporates a


gearbox to reduce speed and increase torque. Here's a detailed
explanation of its components and how it works:

1.DC Motor: At its core, a DC gear motor contains a DC (direct


current) motor. This motor converts electrical energy into
mechanical energy through the interaction of magnetic fields.

2.Gearbox: The gearbox is attached to the output shaft of the DC


motor. It consists of a set of gears with different sizes. These gears
mesh together to transmit torque and alter the rotational speed of
the motor's output shaft. Gearboxes are crucial for applications
requiring varying torque and speed requirements.

3.Gears: Gears in the gearbox come in different configurations,


such as spur gears, worm gears, planetary gears, etc. Each
configuration offers unique advantages in terms of torque
multiplication, efficiency, and compactness. For example, planetary
gears are popular for their high torque output and compact size.

4.Torque and Speed: By selecting the appropriate gear ratio, a DC


gear motor can achieve the desired balance between speed and
torque. Gear reduction increases torque while decreasing speed,
and vice versa. This allows DC gear motors to deliver high torque at
low speeds, making them suitable for applications such as robotics,
conveyor systems, and automotive mechanisms.

5.Control: DC gear motors can be controlled using various methods,


including PWM (Pulse Width Modulation) signals, H-bridges, and
motor drivers. These control mechanisms regulate the speed and
direction of the motor, providing precise control over its operation.

.
6.Applications: DC gear motors find applications in a wide range of
industries, including robotics, automation, automotive, aerospace,
and household appliances. They are commonly used in applications
requiring precise control, high torque, and reliable performance.

Overall, a DC gear motor combines the efficiency and simplicity of a


DC motor with the versatility and adaptability of a gearbox, making it
an essential component in many electromechanical systems.

fig(4.1.2)

4.1.3. Arduino Uno

Historically, an Arduino board consists of an Atmel 8-, 16-, or 32-


bit AVR[14] microcontroller with complementary components that
allow for programming and integration into other circuits. The
Arduino's standard connectors are an essential feature since they
enable users to link the CPU board to a number of interchangeable
add-on modules known as shields.
fig(4.1.3)

4.1.4. jumper cables

Jumper wires are used for making connections between


items on your breadboard and your Arduino's header pins. Use them
to wire up all your circuits!

fig(4.1.4)

4.1.5. 12v Adaptor

Many LED lighting systems run on 12-volt DC power, making a


12-volt power supply a popular choice for lighting projects.
Charging batteries: A 12-volt power supply can be used to
charge a variety of batteries, including car batteries, marine
batteries, and rechargeable batteries.
Voltage Input: AC 100-240V
Frequency Response: 50/60Hz
Voltage Output: DC 12V
Electric Current: Max. 2A
Power: 24W
Length of the cable: approx. 86.36 cm
(34 inch)
Internal diameter of the connector: 2.1 -
2.5 mm (0.1 inch)
External diameter of the connector: 5.5
mm (0.21 inch)

fig(4.1.5)

12v adaptor working explanation

Firstly, 220V AC is converted into 12V AC by using simple step-


down (220V/12V) transformer.
Secondly, output of this transformer is given to the rectifier circuit,
which will convert the ac supply into dc supply. The output of the
rectifier circuit that is DC contains the ripples in the output
voltage. To filter out these ripples, capacitor of 2200 uf, 25V is
used.
Lastly, the output of the capacitor that is pure DC is given to
voltage regulator IC 7812 and IC7912 which will regulate the
output voltage at 12V and -12V DC, despite the change in input
voltage.
Step-I: Converting 220v AC into 12v AC using Step Down Transformer

The primary terminals of the centre tapped transformer is connected


with household supply (220V ac, 50Hz) and output is taken from
secondary terminals of the transformer. The centre tapped describes
the voltage output of a center tapped transformer. For example: A 24V
centre tapped transformer will measure 24V ac across the outer two
taps (winding as a whole), and 12V ac from each outer tap to the
center-tap (half winding). These two 12V ac supplies are 180 degrees
out of phase with each other, thus making it easy to derive positive and
negative 12 volt dc power supplies from them. The advantage of using
a centre tapped transformer is we can get the both +12V and -12V dc
supply using only one transformer.

Step – II: Converting 12v AC into 12v DC using Full Bridge Rectifier

The outer two terminals of the centre tapped transformer are


connected to the bridge rectifier circuit. Rectifier circuit is a converter,
which converts ac supply in to dc supply. It is generally made up of
diode switches as shown in Circuit Diagram.

To convert ac into dc, we can make two types of rectifiers, one is half
bridge rectifier and second is full bridge rectifier. In half bridge
rectifier, output voltage is half of the input voltage. For example, if
input voltage is 24V, then output dc voltage is 12V and number of
diode used in this type of rectifier is 2. In full bridge rectifier, number
of diodes is 4 and it is connected as shown in figure and output
voltage is same as the input voltage.

Here, full bridge rectifier is used. So, number of diodes are 4 and
input voltage (24V ac) and output voltage is also 24V dc with ripples
in it.

For, full bridge rectifier output voltage,


fig(4.2)

In this Dual Power Supply Circuit, Diode bridge rectifier is made up


of 6A four power diodes. Rating of this diode is 6A and 400V. It is
not necessary to use this much of high current capacity diode but
because of safety and flexibility purpose, high current capacity
diode is used. Generally, because of surges in current, it is possible
to damage the diode, if we used low ampere rating diode.

The output of rectifier is not pure dc, but it contains ripples in it.

Step-III: Filter the Ripples from the output:

Now, 24V dc output which contains peak to peak ripples can’t be


connected directly to the load. So, to remove ripples from the
supply, filter capacitors are used. Now, two filter capacitor of rating
2200uF and 25 V are used as shown in circuit diagram. The
connection of both capacitors are such that the common terminal
of the capacitors is connected directly to the centre terminal of the
centre tapped transformer. Now, this capacitor will get charged up
to 12V dc as both are connected with the common terminal of a
transformer. Furthermore, the capacitors will remove the ripples
from the dc supply and give a pure dc output. But, the output of
both the capacitors are not regulated.
Step-IV: Regulate the 12v DC Power Supply

The next important thing is to regulate the output voltage


of the capacitors which will otherwise be varying as per the
input voltage change. For that depending upon the output
voltage requirement, regulator ICs are used. If we need
the output voltage +12V then IC 7812 is used. If required
output voltage is +5V, then 7805 IC is used. Last two
digits of the IC gives output voltage rating. Third last digit
shows voltage is positive or negative. For positive voltage
(8) and for negative voltage (9) number is used. So
IC7812 is used for +12v regulation and IC7912 is used for
-12v voltage regulation.

Now connection of two ICs are done as shown in circuit


diagram. The ground terminal of both ICs are connected
with the centre tap terminal of the transformer in order to
create a reference. Now, the output voltages are measured
between the output terminal and ground terminal for both
ICs.

INPUT: 12V dc (pure dc but not regulated)

OUTPUT: +12V dc between output terminal of 7812 and


Ground (pure dc and regulated)
Block diagram

Fig(4.3)

Working

This project consist of arduino uno,dc gear motor ,driver


module,rain sensor and 12V adaptor.Rain sensor is connected to
analog ports of the arduino and it's work by using digitally reading
the analog value.Driver module is connected to digital ports of the
arduino board,12 V adaptor is connected to arduino and driver
module is connected to Vin pin of the arduino.

Whenever value from rain sensor became '0' it means rain has come
and motor will rotate,it will retrieve in clothes.Whenevr value from
rain sensor became '1' it means rain is gone and it will retrieve out
clothes.
Working model

Fig:

Whenever value from rain sensor became '0' it means rain has come
and motor will rotate , it will retrieve in clothes .Whenever value from
rain sensor became '1' it means rain is gone and it will retrieve out
clothes.

Program for working


int x=0,y=0;
void setup() {
// put your setup code here, to run
once:
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(A0, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run
repeatedly:
if(analogRead(A0)>800)
{
if(x==0)
{
digitalWrite(2,1);
digitalWrite(3,0);
delay(3000);
digitalWrite(2,0);
digitalWrite(3,0);
x=1;
}
}
else
{
if(x==1)
{
digitalWrite(2,0);
digitalWrite(3,1);
delay(3000);
digitalWrite(2,0);
digitalWrite(3,0);
x=0;
}
}
}
Code Explanation

The coding for the arduino microcontroller is the major play master
of the whole project.Arduino programming is basically a physical
computing process. Physical computing isconcerned with developing
software that interacts with the world beyond the host computer
through a combination of hardware and software.The Arduino
interacts with the worldthrough actuators and sensors. One common
way sensors work is that their electrical properties change as an
effect of the changes in the conditions in which it is
operating.Actuators, on the other hand, are electronic components
that are used to react to an externalevent.Sensors and actuators,
thus, are used to achieve complementary objectives: one senses,and
the other reacts.The Arduino is an open-source electronics
prototyping platformcomposed of two major parts: the Arduino
board which is the hardware interface and the Arduino IDE which is
the software. The Arduino IDE is used to write the program that
willinteract with Arduino board and the devicesconnected to it. In
the Arduino world, such a program is called a sketch, which has its
origin in its mother language.
ESTIMATE RATE

Sl.no component type price


1 Arduino Uno ATmega328p 650
2 Rain sensor HL 83 185
3 Motor driver L298N 250
4 DC Gear Motor 12v dc motor 150
CHAPTER.8
CONCLUSION

It is hard that keep the clothes out for drying when weather
changes from sunny to rainy day.This project will
automatically retrieve out clothes when it is sunny day and
will do the opposite when it is rainy day .This project is very
useful for couples who do not get time to workout for their
house hold activities.
REFERENCE

[1]. G. Smith, Introduction to Arduino, September 30, 2011


[2]. T. S. Jayadev, Infrared sensorS: detectors, electronics, and signal
processing, Society of Photo- optical Instrumentation Engineers 24 july
1999
[3]. ARDUINO - Wikipedia.
[4]. Sensor - Wikipedia

You might also like