You are on page 1of 51

REPORT OF INDIVIDUAL DESIGN PROJECT

INTAKE 37

AUTOMATIC CLOTHESLINE RETRIEVAL SYSTEM


FOR DOMESTIC PURPOSES

BY
K.N. PERERA
D/ENG/20/0079

BACHELOR OF SCIENCE IN ENGINEERING IN ELECTRONIC & TELECOMMUNICATION

GENERAL SIR JOHN KOTELAWALA DEFENCE UNIVERSITY


2021

1
ABSTRACT

This report addresses a common issue faced by most households in Sri Lanka. Drying clothes can be
troublesome for working families. Due to unpredictable weather, washed clothes which are exposed to
sunlight, get soaked and drenched in rain water, and further cause an unpleasant smell. With the busy
schedules of working families, to avoid the issue mentioned, avoid drying clothes under sunlight and
and indoor drying is approached. But research has proved that indoor drying is unhygienic and cause to
lead allergies hence, is an ineffective method of drying. Also, Indoor dryers are much costly.

In case in need of dried clothes, the users have to go and check if the clothes are dried from time to time,
which is cumbersome with the piled of work. Due to the above mentioned issues faced by most working
families, an effective and automatic solution should be surpassed and introduced.

Hence, as a solution this project introduces an Automatic clothesline retrieval system that can retrieve in
and out to shelter in the presence of rain. This system inputs presence of rain, light, drying state of cloth,
and user manual feedback to the Arduino microcontroller. Which in turn activates a stepper motor
controlled by a driver circuit, and also inform the user, using a GSM module in the events of rain and
drying states. The stepper motor rotates a gear connected to a railing which intern moves the slots back
and forth from shelter to outdoors.

2
TABLE OF CONTENTS

ABSTRACT ............................................................................................................................................... 1
TABLE OF CONTENTS ........................................................ ERROR! BOOKMARK NOT DEFINED.
LIST OF TABLES .................................................................................................................................... 5
LIST OF FIGURES .................................................................................................................................. 6
1 CHAPTER 1 INTRODUCTION .......................................................................................................... 7
2 CHAPTER 2 PRODUCT SURVEY ..................................................................................................... 9
2.1 EXISTING PRODCUTS……………………………………………………………………………9
2.1.1 TRADITION CLOTHRACK (T-POLES.…………………………………………………...…9
2.1.2 CLOTH RACK……...…………………………………………………………………………9
2.1.3 RETRACTABLE CLOTHELINE……………………………………………………………10
2.1.4 FOLDING CLOTHRACK…………………………………………………………………....10
2.2 MAIN DRAWBACKS IN EXISTING PRODUCTS……………………………………………..11
3 CHAPTER 3 OBJECTIVES AND AIMS.......................................................................................... 12
3.1 AIM……………………………………………………………………………………………...….12
3.2 OBJECTIVES………………………………………………………………………………………12
4 CHAPTER 4 METHODOLOGY…………………………………………………...……………….13
4.1 SOFTWARE ANALYSIS………………………………………………………………………….13
4.2 COMPONENT SELECTION………………………………………………………………………14
4.3 SENSOR ANALYSIS……………………………………………………………………………...14
4.3.1 RAIN SNESOR TEST………………………………………………………………………...14
4.3.2 LDR TEST…………………………………………….………………….…………….……..15
4.3.3 DRYER MOSITURE SENSOR TEST…………………………………………………….….15
4.4 CIRCUIT DEVELOPMENT……………………………………………….………………………17
4.5 WORKING PRINCIPLE…………………………………………………………….……….…….18
4.5.1 FLOWCHART………………………………………………….………….……………….…18
4.5.2 ARDUINO CODE………………………………………………………...…………….…….19
4.5.3 SUMMARY……………………………………………………….……….………………….19

3
4.6 HARDWARE ANALYSIS………………………………………………………….……………...20
4.7 MATERIAL SELECTION………………………………………………………….……………...20
4.8 PROTOTYPE DESIGN………………………………………………………………………….....21
4.9 COST ANALYSIS………………………………………………………………………………....22
5 CHAPTER 5 FINAL OUTCOME AND DISCUSSION ................................................................. 23
5.1 FINAL OUTCOME………………………………………………………………………………...23
5.2 DISCUSSION…………………………………………………….……………………………........24
5.2.1 ENCOUNTERED PROBLEMS AND IMPLEMENTED SOLUTIONS…………………….25
5.2.2 LIMITATIONS……………………………………………………………………………......25
5.2.3 KNOWLEDGE GAINED……………………………………………………………………..26
6 CHAPTER 6: CONCLUSIONS AND FUTURE WORKS………………………………………...26
6.1 CONCLUSION…………………………………………………………………………………......27
6.2 FUTURE WORK……………………………………………………………………………….......27
7 ANNEXURE 1………………………………………………………………………………………...28
7.1COMPONENT SELECTION……………………………………………………………………….28
4.2.1 ARDUINO UNO R3…………………….……………………………………………………28
4.2.2 RAIN SENSOR MODULE…………………………………….…………………………….29
4.2.3 LDR MODULE……………………………………………………………………………….30
4.2.4 DRYER MOISTURE SENSOR…………………………………………...………………….30
4.2.5 GSM MODULE………………………………………………………………………….……31
4.2.6 STEPPER MOTOR AND DRIVER……………………………………………………….….31
4.2.7 LIMIT SWITCH………………………………………………………………………………31
8 ANNEXURE 2………………………………………………………………………………………..33
8.1 ARDUINO CODE………………………………………………………………………………….33
REFERENCES………………………………………………………………………………….............50
ABBREVIATIONS……………………………………………………………………………………..51

4
LIST OF TABLES

TABLE 1 : MAIN DRWABACKS OF EXISTING PRODUCTS …………………………………..11


TABLE 2:SOFTWARE COMPONENTS…………………………………………………………….13
TABLE 3:HARWARE COMPONENTS……………………………………………………………...20
TABLE 4:COST BREAKDOWN ……………………………………………………………………..22

5
LIST OF FIGURES

FIGURE 1:T-POLES……………………………………………………………………………………9
FIGURE 2: CLOTH RACK …………………………………………………………………………....9
FIGURE 3:RETRACTABLE CLOTH RACK……………………………………………………….10
FIGURE 4:FOLDING CLOTH RACK……………………………………………………………….10
FIGURE 5:DRY STATE…………………………………………………………………………...…..14
FIGURE 6:RAIN STATE……………………………………………………………………………...14
FIGURE 7:DRY CLOTH……………………………………………………………………………...15
FIGURE 8: DRY STATE OF CLOTH………………………………………………………………..15
FIGURE 9: WET CLOTH……………………………………………………………………………..16
FIGURE 10:WET STATE OF CLOTH……………………………………………………..………..16
FIGURE 11:SCHEMATIC DIAGRAM………………………………………………………………17
FIGURE 12:FLOWCHART…………………………………………………………………………...18
FIGURE 13:SIDE VIEW……………………………………………………………………………....21
FIGURE 14:FRONT VIEW………………………………………………………………….…..……21
FIGURE 15:TOP VIEW……………..………………………………………………………………...21
FIGURE 16:FRONT……………………………………………………………………………………23
FIGURE 17:SIDE………………………………………………………………………………………23
FIGURE 18: LINE WITH HOOKS…………………………………………………………………...23
FIGURE 19:ARDUINO UNO R3……………………………………………………………………...28
FIGURE 20: RAIN SENSOR………………………………………………………………………….29
FIGURE 21:LDR MODULE…………………………………………………………………………..30
FIGURE 22: SIM 800L GSM MODULE……………………………………………………………..31
FIGURE 23: NEMA 17 STEPPER MOTOR…………………………………………………………32
FIGURE 24:TB6600 MOTOR DRIVER……………………………………………………………...32
FIGURE 25:LIMIT SWITCH…………………………………………………………………………32

6
CHAPTER 1: INTRODUCTION

Nowadays, as students and as working adults, people have a lot of work to do at one time. One of the
most troubling things faced in household chores is the laundry drying on the clothesline. The tight
schedule from classes and piling work makes the user unavailable to attend to their clothes on the
clothesline when rain suddenly hits, leading to damp and soaked clothes. The most prominent technique
to get rid of liquid in clothes is to convert it to vapor using the evaporation process, which converts
liquid to gas. As a result, people developed a means of drying their clothes by hanging them outside in
the sun and also outdoor drying is most efficient and eco-friendly as it reduces greenhouse emission
unlike, other methods of drying. Drying clothes by keeping under the hot sun is a traditional method of
drying, used by the whole world, especially Sri Lanka. Most people use a cloth line, which is set at two
points, but now with the advancement of innovation, a cloth line is further developed in to a cloth rack,
retractable racks which occupied less space and withstand a huge amount of clothes at once.

But many busy working households, with the unpredictable weather patterns in Sri Lanka, are reluctant
to dry clothes under sun and go to respective workspaces, as they worry about sudden rains. And if there
is a sudden cause of rain, the washing and drying cycle is repeated again, resulting in stress and worries
for working families. In this case, as a solution people approach indoor drying. But research has proved
that indoor drying may cause allergies and unhygienic conditions for people suffering from diseases like
Asthma. Laundry dryers are another solution, but it is costly and consumes a ton of electricity. Other
than that, each load of laundry dried will also produces carbon footprint which equivalent to 2
Kilograms of carbon dioxide (Ball, 2008). It will not directly impact humans of course, but will have a
huge impact on our climate and planet.

Working household don’t often have time to manage their routines. When in need of dried clothes,
people have to halt their respective work, and check repeatedly if the clothes are dried or not, which
cause a heavy menace and increase of their workload. Furthermore, if the clothes are kept in excess
sunlight, as long term results, cloth materials such as silk. Starts to fade. This is called photo
degradation. Clothes contain chemical bonds which present due to the chromophores in the dyes. When
the clothes are exposed under heavy and excessive sunlight, the ultraviolet rays can break down the
chemical bonds of the chromophores and thus fading the clothes like a bleaching process.

7
Therefore, it is essential to develop an automatic way of retrieving a clothesline in and out from
outdoors to shelter, vice versa, during the events of rain.

Hence this project introduces an automatic way to recover clothes in and out, by sensing rain, light and
wetness of clothes and thereby informing the user in the respective events.

8
CHAPTER 2: PRODUCT SURVEY

2.1 EXISTING PRODUCTS


2.1.1 TRADITIONAL CLOTH RACK(T-POLES)
This type of clothesline is the most common which is used in Sri Lanka. A typical rope or a line is fixed
in between 2 fixed points, stranded on 2 poles or T poles, and clothes are hung directly or using hangers.

Figure 1: T poles

2.1.2 CLOTH RACK

An aluminum, or plastic framework, which is used to hold up to 10-20kg of cloth load. Sizes and colors
are varied. Uses less space and can be stored easily.

Figure 2: Cloth rack

9
2.1.3 RETRACTBALE CLOTHESLINE

A retractable clothesline is one where you pull the clothesline out of a housing when it is needed and
attach it to a wall or post directly opposite. To store, can be retracted back into the housing. Retractable
clotheslines have 4 to 6 lines and they can extend up to 10 meters, depending on the manufacturer.
Can be installed in different configurations, to best suit the layout of the garden. These include wall to
wall, post to wall, wall to post, and post to post.

Figure 3: Retractable cloth line

2.1.4 FOLDING CLOTH RACK

Contains aluminum or stainless steel folds which can be easily folded back and forth for storing
purposes.

Figure 4: Folding cloth rack

10
2.2 MAIN DRAWBACKS OF EXISTING PRODUCTS.

Table 1: Main Drawbacks of Existing Products

Product Name Drawbacks Price Range


(LKR)
T poles  Not automated. 4000- 6000
 Goes through an
installation process.
 Needs large space.

Cloth rack  Not automated. 6000-8000


 No method to inform
user when whole load is
dried.
Retractable Clothesline  Not automated. 10,000-12,000
 No method to inform
user when whole load is
dried.
Folding Cloth rack  Not automated. 6000-8000
 No method to inform
user when whole load is
dried.

11
CHAPTER 3: OBJECTIVES AND AIMS

3.1 AIM
To design an Automatic Clothesline Retrieval system for domestic purposes using Arduino which is able
to provide a comfortable home and work experience for household users.

3.2 OBJECTIVES
 To avoid the laundry getting in continuous contact with rain and becoming damp.
 To increase user comfort of not having to check if laundry is fully dried.
 To prevent clothes from harmful effects due to excess drying.
 To implement a design, compatible with the economy status of households with respect to a laundry
dryer.

12
CHAPTER 4: METHODOLOGY

This project divides into to two sections as software and hardware development.
Hardware development involves in building of prototype with the specified materials and Software
developments includes circuitry and Coding using ARDUINO IDE.

4.1 SOFTWARE ANALYSIS.


Table 2: Software Components

COMPONENT FUNCTION
Rain sensor module To detect rain drops.
Light dependent resistor module To detect day/night
GSM Module To inform user when whole cloth load is
dried/events of rain.
Dryer Moisture Sensor Module(LM324 OP- To detect wetness/dryness of clothes.
AMP/preset variable resistors, crocodile clips)
Manual Switch For user requirements.
Stepper Motor To control retrieval of railing and gear.
Motor Driver To control direction , and speed of motor.
Arduino Microcontroller For communication of sensors and respective
outputs.
Arduino IDE To program the whole code according to
specifications
Solid works To design 3D model of prototype.
Proteus To design schematic diagram and PCB layout.

13
4.2 COMPONENT SELECTION.
Components and its’ detailed specifications are listed on Annexure 1.

4.3 SENSOR ANALYISIS


This process involves a few tests on the functionality of sensors according to the change of environment.
In this project, three types of sensors are used, rain sensor module, LDR module and the dryer moisture
sensor.

4.3.1 RAIN SENSOR TEST.


Depending on the volume of water the displayed voltage was analyzed on the serial monitor. Different
volumes of water were used as the manipulative variable. Read analog signal code was uploaded to the
Arduino board and the results were obtained. The minimum amount of activation was enabled to be 0.15
ml of water with the voltage level 800. The dry state of the plate recorded to give a voltage level of
1023.

Figure 5: Dry State Figure 6: Rain State

14
4.3.2 LDR TEST
Depending on the light intensity of the environment. The analogue voltage across the LDR was expected
to change once the light intensity changes. it is observed that when the surrounding has low light
intensity the logic level 1 is displayed, while logic level 0 when high light intensity. The sensitivity of of
LDR is increased by rotating the knob of the comparator for accurate results.

4.3.3 DRYER MOISTURE SENSOR TEST

A wet and dry cloth were clipped to two crocodile clips and the voltage level on the serial monitor was
observed. With a maximum of 3.7V was given as power to the sensor, and the preset variable resistor
was adjusted to give a more of a high impedance value, so as to limit the current flowing through
Arduino board. The highest voltage level was observed to be in the range of 700s.

Figure 7: Dry cloth Figure 8: Dry state of Cloth

15
Figure 9: Wet Cloth Figure 10: Wet state of Cloth

16
4.4 CIRCUIT DEVELOPMENT
The circuit schematic diagram was designed using PROTEUS.

The dryer moisture sensor and rain sensor were pinned to A1, A0 respectively.

The LDR, manual switch, GSM module, limit Switch and motor driver were pinned to digital pin
2,5,10,11 ,8,7 and 3.

Figure 11: Schematic Diagram

17
4.5 WORKING PRINCIPLE

4.5.1 FLOWCHART
First, the user has the opportunity to get full control on the system, using the manual switch. Hence the
code first checks if the switch state is 0 or 1. If the switch state is 1 the clothesline is sent to shelter as
per the user instruction. The LDR bulbs is activated, and according to specified light intensity levels, at
night (1) the clothesline will be sent to shelter and at day (0), it will be at outdoors. Next, is the rains
sensor senses any drops of rain water according to given limit specifications, the clothesline will be sent
to shelter, via alerting the user using SIM800L GSM module (“Raining, clothesline is sent to shelter)”.
According to the wetness state of the cloth which takes the highest amount of time to dry, with the
specified values, if it is completely dried, the clothesline will be sent to shelter, by alerting the user that
the whole cloth line is dried. (“Whole clothesline is dried, sent to shelter”)

Figure 12: Flow Chart

18
4.5.2 ARDUINO CODE
Code is filed on Annexure 2.

4.5.3 SUMMARY
The cloth line was retrieved in and out by controlling the direction of stepper motor using a driver
circuit. The inputs to the system were perceived using rain sensor, LDR, dryer moisture sensor and
manual switch. The outputs from the system were direction control of the stepper motor and alerting use
via SMS.

19
4.6 HARDWARE ANAYSIS

The mechanical section of the project includes, hardware sorting, gathering and assembly.

Table 3: Hardware Components

COMPONENT FUNCTION
Metal Bars and tubes To assemble design
Railing To retrieve in and out
Stepper Motor For rotation purpose of Railing
Design enclosure To act as a shelter
Flexible Coupling To join the motor with the railing

4.7 MATERIAL SELECTION

When deciding the material to be used as the product, factors such as light weight, resistance to rusting,
splash proofing ability, durability, and ability to withstand a certain weight was considered. Therefore,
Aluminum was chosen as the material as it ticks all the boxes of the above factors.

20
4.8 PROTOTYPE DESIGN

The prototype was designed using AutoCAD.

Figure 13: Side View

Figure 14: Front View Figure 15: Top View

21
4.8 COST ANALYSIS
Table 5: Cost Breakdown

Items Prototype Cost(LKR) Actual Cost(LKR)


Arduino microcontroller 1500.00 1500.00
Circuitry elements 1000.00 1000.00
Hardware elements 5400.00 6500.00
Hardware assembly 3000.00 3000.00
Circuit enclosure 1000.00 1000.00
Total Cost 11,900.00 13,000.00

22
CHAPTER FIVE: FINAL OUTCOME AND DISCUSSION

5.1 FINAL OUTCOME


An automatic clothesline which can retrieve in and out with selected whether conditions and states was
implemented successfully.

Figure 16: Front and Top

Figure 18: Customized Line with hooks

Figure 17: Side

23
5.2 DISCUSSION
The system is modelled for busy working households, who are unable to look after their laundry drying
process.

The automatic clothesline retrieval system is an easy an automatic way of handling all the laundry
drying.

The system uses an ARDUINO microcontroller as the main communication getaway, and uses 4 sensor
inputs and 2 model outputs. The rain sensor module and LDR module is able to detect the environment
changing patterns, and by programming and testing specifications and limits, the clothesline can be
retrieved in and out by varying the direction of stepper motor. The dryer moisture sensor senses the
wetness/dryness of the cloth load. A clip is attached to the cloth which takes the highest amount of time
to dry, of a certain cloth load. The theory behind this is water being able to conduct electricity.
Therefore, an external voltage is supplied, so as to flow a small portion of the current through the clip
and attached cloth. When the cloth is dried, at that certain contact area won’t let any flow of current to
pass, hence detaching the circuit.

The manual switch is able to retrieve the clothesline according to the users liking.

The system is able to inform the user when the whole cloth load is dried and at the events of rain so user
worries can be minimized.

This project advances to a new technological era. By the successful implementation of this project, our
laundry is automatically safeguarded without human intervention. As a result, this project promotes,
comfort, time saving and decreased human effort.

24
5.2.1 ENCOUNTERED PROBLEMS AND IMPLEMENTED SOLUTIONS
The automatic clothesline was first designed to retrieve clothes in and out only using a rain sensor.

Slight modifications were designed to take the design to an effective and more accurate level.

To check if the whole cloth load is dried a measure of time can be calculated. An assumption can be
made for the maximum time of drying and hence retrieve the clothes and inform the user after the
assumed maximum time is completed. But the downfall of this process is that since people don’t have a
defined or constant amount of clothes that are dried, and further clothes can be varied in sizes and
materials. Hence an assumed time will be less accurate and by that time the whole cloth load may or
may not be dried.

Another measure is assuming a maximum weight of the cloth load. Since Clothes take various sized due
to having vivid materials, the measure of weight is hence, less accurate.

Therefor and effective measure should be taken to sense the wetness/dryness of clothes and accordingly,
retrieve in and inform the user.

As a solution a DIY sensor which I call the” dryer moisture sensor” was crafted.

The system requires power to start, by the electrical grid or battery, which might drain an excessive use
of electricity. As a solution, a charged solar panel can be activated to channel and balance the power, for
working homes.

5.3.2 LIMITATIONS
The model is a custom tailor made design. The design can be modeled according to the user’s choice,
depending on their housing proportion. Hence, this model cannot be implemented in small spaced
houses.

25
5.3.3 KNOWLEDGE GAINED
“Automatic Clothesline Retrieval system” was my first individual design project conducted as an
undergraduate.

Being an engineering undergraduate, and especially being a woman related to this field, I was able to
come up with a solution for a major problem for busy women, in order to get their lifestyles
comfortable.

Therefore, I had to face several difficulties while building and customizing this project and I was able to
look into the researches done by other researchers similar to this project to overcome those challenges.
By conducting this project, I was able to apply the theoretical knowledge learned previously in Arduino
into developing a new strategy to overcome a major problem, which is not noticed by the common eye.
Further, I was able to improve my coding skills in by applying it to a real life problem. This project also
increased my creativity skills when designing the most comfortable design for users. Gaining knowledge
on similar systems and developing strategies to improve them was one of the challenges that I
successfully confronted. I was also able to get hand on experience on the mechanical section of the
project. Since this was my first individual project, I was also able to improve my academic writing
skills.

Conducting a project under the current situation of Covid-19 in the country was superficially
challenging, especially when finding components for the prototype. With the given restrictions,
limitations and all the challenges faced solutions were implemented to overcome them by managing the
two months of time efficiently and effectively, gave a deep insight and hands on experience on
conducting projects as a future engineer to be.

26
CHAPTER 6: CONCLUSIONS AND FUTURE WORKS

6.1 CONCLUSION
It can be briefed that; an Automatic cloth line retrieval system is successfully implemented according to
a series of conditions. With the unpredictable weather and busy lifestyles of working household in Sri
Lanka, with the advancement of technology the laundry process is definitely lightened up. Working
people are able to leave without the constant worrying that our clothes might get drenched and no longer
need to rush home as the clothes will be in safe hands. Easy alert system that introduces with this project
can ease the user about the current state of their clothesline and laundry.
The model can be advanced to motor using a high powered engine to withstand a heavier duty
clotheslines.

6.2 FUTURE WORK

 The system can be modified to measure the weight of clothes and send a warning signal when
the weight limit is exceeded.
 The system can be modified at a higher scale where a common line is used to detect the wet / dry
state of clothes.
 The system can be further implemented to fold the laundry after the whole clothesline is dried,
by a conveyor belt and robotic arm.

27
ANNEXURE 1

7.1 COMPONENT SELECTION

7.1.1 ARDUINO UNO R3


The Arduino Uno is a microcontroller board which is was supported by the ATmega328. It has twenty
digital input or output pins and six pins use as Pulse Width Modulation (PWM) outputs and six of it are
used as analogue inputs, as sixteen MHz resonator, as Universal Serial Bus (USB) association, as an
influence jack, as Associate in Nursing in-circuit system programming ICSP header, and as a button. It
contains everything required to support the microcontroller, simply connects it to a PC with a Universal
Serial Bus (USB) cable or power it with an Alternating Current (AC) to Direct Current (DC) adapter or
battery to power up the Arduino. In this project, the Arduino board was powered by a 12V Adapter.

Figure 18: ARDUINO UNO R3

28
7.1.2 RAIN SENSOR MODULE
A rain sensor is needed to detect the availability of raindrops. A rain sensor module is selected as it is
more compatible to the Arduino microcontroller. The working principle of it is quite similar to a
variable resistor. As more rain drops are detected on the sensor, its resistance will reduce, hence
displaying a low voltage level on serial monitor. It requires a power supply between 3.3V and 5V and is
powered by connecting to VCC of Arduino board and input to pin A0.

 Power supply voltage: 3.3-5V


 Digital switch output and analog voltage output
 Anti-oxidation and anti-conductivity.
 LM393 comparator; Comparator output signal waveform is good, driving ability is 15mA.
 Voltage Rating: 5V

Figure 19: Rain Sensor

29
7.1.3 LDR MODULE.

LDR acts as a switch. This is due to its ability in detecting or measuring light intensity as this project
requires the system to respond with the change of surrounding light intensity. Also a variable resistor,
the resistance of LDR will change according to the light intensity exposes on it. As the light intensity
increases, the resistance will reduce, and hence at day displaying 0 and at nigh displaying 1 on the serial
monitor.

Specifications

 Operating Voltage: 3.3V to 5V DC


 Operating Current: 15ma
 Output Digital - 0V to 5V, Adjustable trigger level from preset
 Output Analog - 0V to 5V based on light falling on the LDR
 LEDs indicating output and power
 LM393 based design

Figure 20: LDR Module

7.1.4 Dryer Moisture Sensor.


This sensor was made using an LM324 Op-amp, preset variable resistor and 1K resistors.

Crocodile clips with a covering was used as the clip which was attached to the cloth which takes the
highest amount of time to dry. A 3.7V power was given to the set up. The highest voltage level was in
the ranges of 780-790 when detecting wetness level. The input pin is set to A1.

30
7.1.5 GSM MODULE/SIM 800L.
GSM module is used for transmission of messages between hardware and the user. A SIM800L module
which can be used both for GSM and GPRS technology was used. A message was sent to user as”
Whole cloth load is dried. Sent to shelter” when the cloth load is dried and consequently a message was
also sent to the events of rain.

Specifications

 Voltage: 4.1 ~ 5VDC

Figure 21: SIM 800 L GSM Module

7.1.6 STEPPER MOTOR AND MOTOR DRIVER.


An electric motor is an electrical machine that converts electrical energy into mechanical energy. The
reverse of this is the conversion of mechanical energy into electrical energy and is done by an electric
generator. A stepper motor which is controlled by a driver circuit is used to retrieve the line in and out.

Nema 17 Bipolar stepper motor which can bear a considerable amount of weight and TB6600 stepper
motor driver is used. Specifications:

 Rated Voltage: 12V DC


 Current: 1.2A at 4V
 Step Angle: 1.8 deg.
 No. of Phases: 4
 200 steps per revolution, 1.8 degrees

31
Figure 22 : Nema 17 stepper motor Figure 23: TB6600 Motor driver

7.1.7 LIMIT SWITCH

A limit switch is an electromechanical device operated by a physical force applied to it by an object.


Limit switches are used to detect the presence or absence of an object. Here, the limit switch is used to
check the status of the clothe line; if it is inside or outside.

Figure 24: Limit Switch

32
ANNEXURE 2

8.1 ARDUINO CODE

#include <SoftwareSerial.h>

SoftwareSerial sim800l(10,11); // Tx,Rx pins

// stepper motor pins

int stepPin=3;

int dirPin=7;

const int stepsPerRevolution = 1600;

//function to send sms when raining

void SendSMSrain()

{sim800l.print("AT+CMGF=1\r"); //Set the module to SMS mode

delay(100);

sim800l.print("AT+CMGS=\"+94778176997\"\r"); //Your phone number don't forget to include your


country code, example +212123456789"

delay(500);

sim800l.print("Raining,clothesline is sent to shelter"); //This is the text to send to the phone


number, don't make it too long or you have to modify the SoftwareSerial buffer

delay(500);

sim800l.print((char)26);// (required according to the datasheet)

delay(500);

sim800l.println();}

//function to send sms when drying is complete

33
void SendSMSdry()

{sim800l.print("AT+CMGF=1\r"); //Set the module to SMS mode

delay(100);

sim800l.print("AT+CMGS=\"+94778176997\"\r"); //Your phone number don't forget to include your


country code, example +212123456789"

delay(500);

sim800l.print("Clothesline is dry,sent to shelter"); //This is the text to send to the phone number,
don't make it too long or you have to modify the SoftwareSerial buffer

delay(500);

sim800l.print((char)26);// (required according to the datasheet)

delay(500);

sim800l.println();}

void setup() { pinMode(4,INPUT_PULLUP); //Manual switch

pinMode(2,INPUT) ; // LDR CONFIGURATION

pinMode(A0,INPUT); // Rain sensor Configuration

pinMode(A1,INPUT); // Dryer Moisture Sensor

pinMode(8,INPUT_PULLUP); // limitswitch

pinMode(7,OUTPUT); //direction pin

pinMode(3,OUTPUT); //step pin

sim800l.begin(9600); Serial.begin(9600);}

void loop() { // read inputs

int ldrState = digitalRead(2);

34
int rainState=analogRead(A0);

int dryState=analogRead(A1);

int bswitch =digitalRead(4);

int limits=digitalRead(8);

//write limit state

Serial.print("limit State is ");

Serial.println(limits);

if (limits==1){ //CLOTHESLINE IS INSIDE

if(ldrState==0 && bswitch==0 && rainState>500 && dryState>100 ) //day,no user,not


raining,wet

{ // write inputs

Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

digitalWrite(dirPin,HIGH); // rotate clkwise // BRING OUT

// Spin the stepper motor 9 revolutions :

for (int i = 0; i < 9*stepsPerRevolution; i++) {

35
// These four lines result in 1 step:

digitalWrite(stepPin, HIGH);

delayMicroseconds(500);

digitalWrite(stepPin, LOW);

delayMicroseconds(500);}

do {digitalWrite(stepPin, LOW); //stop motor

ldrState = digitalRead(2); // read inputs

rainState=analogRead(A0);

dryState=analogRead(A1);

bswitch =digitalRead(4);

}while(ldrState==0 && rainState>500 && dryState>100 && bswitch==0) ; }}

//read and write limit state

limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if (limits==0){ //CLOTHELINE IS OUTSIDE

if(ldrState==0 && rainState<500 && dryState>100 && bswitch==0) //day,no user,raining,wet

{ //write inputs

Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

36
Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

digitalWrite(7,LOW); //anticlkwise BRING in

// Spin the stepper motor 9 revolutions :

for (int i = 0; i < 9*stepsPerRevolution; i++) {

// These four lines result in 1 step:

digitalWrite(stepPin, HIGH);

delayMicroseconds(500);

digitalWrite(stepPin, LOW);

delayMicroseconds(500);}

do

{ digitalWrite(stepPin, LOW); //stopmotor

ldrState = digitalRead(2); //read inputs

rainState=analogRead(A0);

dryState=analogRead(A1);

bswitch =digitalRead(4);}

while(ldrState==0 && rainState<500 && dryState>100 && bswitch==0);

SendSMSrain() } }

//read and write limit state

limits=digitalRead(8);

Serial.print("limit State is ");

37
Serial.println(limits);

if (limits==HIGH){ //CLOTHELINE IS OUTSIDE

if(ldrState==0 && rainState>500 && dryState<100 && bswitch==0 ) //day,no user,not


raining,dry

{ //write inputs

Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

digitalWrite(dirPin,LOW); //Anticlkwise BRING IN

// Spin the stepper motor 9 revolutions :

for (int i = 0; i < 9*stepsPerRevolution; i++) {

// These four lines result in 1 step:

digitalWrite(stepPin, HIGH);

delayMicroseconds(500);

digitalWrite(stepPin, LOW);

delayMicroseconds(500);}

SendSMSdry();

38
do

{digitalWrite(stepPin, LOW);

ldrState = digitalRead(2);

rainState=analogRead(A0);

dryState=analogRead(A1);

bswitch =digitalRead(4);

}while(ldrState==0 && rainState>500 && dryState<100 && bswitch==0);

} }

//read and write limit state

limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if (limits==0){ //CLOTHELINE IS OUTSIDE

if(ldrState==0 && rainState<500 && dryState<100 && bswitch==0) //day,nouser,raining,


clothline is dry

{//write inputs

Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

39
Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

digitalWrite(dirPin,LOW); //Anticlkwise BRING IN

// Spin the stepper motor 9 revolutions :

for (int i = 0; i < 9*stepsPerRevolution; i++) {

// These four lines result in 1 step:

digitalWrite(stepPin, HIGH);

delayMicroseconds(500);

digitalWrite(stepPin, LOW);

delayMicroseconds(500);}

SendSMSrain();

SendSMSdry();

do

{digitalWrite(stepPin, LOW); //stop motor till next condiiton

ldrState = digitalRead(2);

rainState=analogRead(A0);

dryState=analogRead(A1);

bswitch =digitalRead(4);

while(ldrState==0 && rainState<500 && dryState<100 && bswitch==0);

}}//read and write limit state

40
limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if(limits=0) { //CLOTHLINE IS OUT

if(ldrState==0 && bswitch==1) //day and USER

{ //write inputs

Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

digitalWrite(dirPin,LOW); //Anticlkwise BRING IN

// Spin the stepper motor 9 revolutions :

for (int i = 0; i < 9*stepsPerRevolution; i++) {

// These four lines result in 1 step:

digitalWrite(stepPin, HIGH);

delayMicroseconds(500);

digitalWrite(stepPin, LOW);

41
delayMicroseconds(500);}

do {digitalWrite(stepPin, LOW);

ldrState=digitalRead(2);

bswitch=digitalRead(4);}

while(ldrState==0 && bswitch==1); }}

//read and write limit state

limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if (limits==0){ //CLOTHLINE IS OUTSIDE

if(ldrState==1) //night

{//write inputs

Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

digitalWrite(dirPin,LOW); //Anticlkwise BRING IN

// Spin the stepper motor 9 revolutions :

42
for (int i = 0; i < 9*stepsPerRevolution; i++) {

// These four lines result in 1 step:

digitalWrite(stepPin, HIGH);

delayMicroseconds(500);

digitalWrite(stepPin, LOW);

delayMicroseconds(500);}

do{digitalWrite(stepPin, LOW);

ldrState = digitalRead(2);}

while(ldrState==1); } }//read and write limit state

limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if(limits==0) //CLOTHLINE IS OUTSIDE

{ if(ldrState==0 && bswitch==0 && rainState>500 && dryState>100 ) //day,no user,not


raining,wet

{ Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

Serial.println(dryState);

43
Serial.print("SWICTH State is ");

Serial.println(bswitch);

//NO ACTION STOP MOTOR

do {digitalWrite(stepPin, LOW); //stop motor

ldrState = digitalRead(2); // read inputs

rainState=analogRead(A0);

dryState=analogRead(A1);

bswitch =digitalRead(4);

} while(ldrState==0 && rainState>500 && dryState>100 && bswitch==0) ;} }

limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if(limits==1) { //CLOTHLINE IS INSIDE

if(ldrState==0 && rainState<500 && dryState>0 && bswitch==0) //day,no user,raining,wet

{ Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

44
//NO ACTION STOP MOTOR

do

{ digitalWrite(stepPin, LOW); //stopmotor

ldrState = digitalRead(2); //read inputs

rainState=analogRead(A0);

dryState=analogRead(A1);

bswitch =digitalRead(4);}

while(ldrState==0 && rainState<500 && dryState>100 && bswitch==0);

SendSMSrain(); } }

limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if(limits==1) { //CLOTHLINE IS INSIDE

if(ldrState==0 && rainState>500 && dryState<100 && bswitch==0 ) //day,no user,not raining,dry

{ Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

45
//NOACTION STOPMOTOR

SendSMSdry();

do

{ digitalWrite(stepPin, LOW);

ldrState = digitalRead(2);

rainState=analogRead(A0);

dryState=analogRead(A1);

bswitch =digitalRead(4);}

while(ldrState==0 && rainState>500 && dryState<100 && bswitch==0);

}}

limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if(limits==1) { //CLOTHLINE IS INSIDE

if(ldrState==0 && rainState<500 && dryState<100 && bswitch==0) //day,nouser,raining, clothline


is dry

{Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

46
Serial.print("DRY State is ");

Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

//NOACTION STOPMOTOR

SendSMSrain();

SendSMSdry();

do

{ digitalWrite(stepPin, LOW);

ldrState = digitalRead(2);

rainState=analogRead(A0);

dryState=analogRead(A1);

bswitch =digitalRead(4);}

while(ldrState==0 && rainState<500 && dryState<100 && bswitch==0);}}

limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if(limits==1) { //CLOTHLINE IS INSIDE

if(ldrState==0 && bswitch==1) //day and USER

{Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

47
Serial.println(rainState);

Serial.print("DRY State is ");

Serial.println(dryState);

Serial.print("SWICTH State is ");

Serial.println(bswitch);

digitalWrite(dirPin,LOW); //NO ACTION STOPMOTOR

do { digitalWrite(stepPin, LOW);

ldrState=digitalRead(2);

bswitch=digitalRead(4);}

while(ldrState==0 && bswitch==1); }}

limits=digitalRead(8);

Serial.print("limit State is ");

Serial.println(limits);

if (limits==1){ //CLOTHLINE IS INSIDE

if(ldrState==1) //night

{Serial.print("LDR State is ");

Serial.println(ldrState);

Serial.print("RAIN State is ");

Serial.println(rainState);

Serial.print("DRY State is ");

Serial.println(dryState);

48
Serial.print("SWICTH State is ");

Serial.println(bswitch);

digitalWrite(dirPin,LOW); //NO ACTION STOP MOTOR

do

{ digitalWrite(stepPin, LOW);

ldrState = digitalRead(2);}

while(ldrState==1); } }}

49
REFERENCES
[1] Lynn, O.W., 2015. Hang-and-Go: A Smart Laundry Hanging System, IRC, Universiti Teknologi
PETRONAS. [online] Available at: http://utpedia.utp.edu.my/15963/>

[2] Suandanwar, "Rain Detector," Cytron Technologies Tutorial, 20 September 2018. [Online].
Available: https://tutorial.cytron.io/2018/09/20/rain-detector/.

50
ABBREVIATIONS

GSM – Global System for Mobile

LDR – Light Dependent Resistor

DIY- Do It Yourself

51

You might also like