Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

No.FO.8.2.

1-V0

KPS

HAL.
1/1

Format PBM :
MIDDLE TEST

DIR

16 Februar i 2011

Course
Course code
Years
Study program
Day/Date
Time
Exam type
Lecturer

:
:
:
:
:
:
:
:

Microcontroller System
EL-2312
2014-2015
Electronics Engineering
Monday, Oct 27th 2014
18.50 22.20 WIB
Open Book
Hendawan Soebhakti ST., MT.

An autonomous clothesline (Jemuran Otomatis) is running with the following procedure :

If water sensor detect some water (rain) then clothesline stick will be pull in to the house.
If there is no rain detected, then microcontroller read sunlight conditions, if light is bright or

cloudy, then
clothesline stick will be push out. But if light is dark, then clothesline stick will be pull in. Here is truth table for
all conditions :
Water Condition
Rain
Not Rain
Clothesline In
Clothesline Out
Clothesline In
Clothesline Out
Clothesline In
Clothesline In

Sun Light Condition


Bright
Cloudy
Dark

In

Out
Clothesline stick

Water Sensor

Sensor
circuit

DC Motor

A0

Ar duino Uno
Boar d
13

Light Sensor

DC Motor
Drive

12

Sensor
circuit

A1

A dc motor drive is connected to pin 12 and 13 and works as follow:


If pin 12=0, pin 13=1, then clothesline stick will be pull in.
If pin 12=1, pin 13=0, then clothesline stick will be push out.
If pin 12=0, pin 13=0, then clothesline stick will be stop.
A water sensor is connected to analog input A0 and and works as follow:
If water detected (rain) the data will be 200 to 255.
If no water detected the data will be 0 to 100.

A light sensor is connected to analog input A1 and and works as follow:


If sunlight is bright, the data will be 0 to 50.
If sunlight is cloudy, the data will be 100 to 150.
If sunlight is dark, the data will be 200 to 255.
Questions :
Write the sketch for the autonomous clotheline !

Pray before test, be honest and Good Luck

You might also like