intro.docx
TRANSCRIPT
Introduction
This project presents the overall design of Home Automation System (HAS) along with
Security using a low cost and wireless remote control. This system is designed to assist and
provide support in order to fulfill the needs of elderly and disabled in home. Also, the smart
home concept in the system improves the standard living at home. The main control system
implements wireless Bluetooth technology to provide remote access from PC/laptop or smart
phone. The design remains the existing electrical switches and provides more safety control on
the switches with low voltage activating method. The switches status is synchronized in all the
control system whereby every user interface indicates the real time existing switches status. The
system intended to control electrical appliances and devices in house with relatively low cost
design, user-friendly interface and ease of installation.
The “Home Automation” concept has existed for many years. The terms “Smart Home”,
“Intelligent Home” followed and has been used to introduce the concept of networking
appliances and devices in the house. Home automation Systems (HASs) represents a great
research opportunity in creating new fields in engineering, architecture and computing HASs
becoming popular nowadays and enter quickly in this emerging market. HAS when security
features incorporated will be a great contribution to the technology enabled world.
Due to the advancement of wireless technology, there are several different of connections
are introduced such as GSM, WIFI, ZIGBEE, and Bluetooth. Each of the connection has their
own unique specifications and applications. Among the four popular wireless connections
that often implemented in HAS project, Bluetooth is being chosen with its suitable capability.
Bluetooth with globally available frequencies of 2400Hz is able to provide connectivity up
to 100 meters at speed of up to 3Mbps depending on the Bluetooth device class.In addition, a
Bluetooth master device is able to connect up to 7 devices in a “Piconet”. The capabilities of
Bluetooth are more than enough to be implemented in the design. Also, most of the current
laptop/notebook or cell phones are come with built-in Bluetooth adapter. It will indirectly reduce
the cost of this system.
The Bluetooth connection in this system is established by Bluetooth module that directly
receives/ transmits commands from/to smart phone. For the GUI, an application running on an
Android OS on Smart Phone is chosen based on the high user distribution in current market. In
term of cost, this system implemented low cost microcontroller and Bluetooth module as the
system main core. With this low budget, this system is still performed with powerful remote
functions to make our life in home become easier.
SYSTEM OVERVIEW
Figure below illustrates the overall control function of the system. The system is directly
installed beside the conventional electrical switches on the wall. The Bluetooth wireless
connection enabled the system communicates with graphical user interface (GUI) on Android
smart phone without cable. The target home appliances are controlled by the system Main
Control Board.
The user can easily touch on the screen of the phone to control the home appliances. This
portable method is able to assist the disabled people who have problem with locomotion
difficulty.
The sensors that connected to the main control board constantly check for any door tamper or
motion when the security feature is enabled in the house. The indication from the sensor is able
to remind the user to switch on/off the heater, fan or air cond. in the house. The home appliance
on/off status synchronized to the GUIs smart phone. The switches status and sensor reading are
in real-time monitoring by the main control board. Any changes on the status will be transmitted
to the two GUIs.
HARDWARE DESIGN
Figure below demonstrates the hardware block diagram in the main control board. AVR
Microcontroller, ATMEGA16 is chosen due to its high processing capability and speed of
performance which enables the Bluetooth connection to the GUI and other operations.The door
sensor is a magnetic reed relay which when brought together gives a logic ‘0’and when detached,
gives a logic ‘1’.For the Bluetooth module, low cost Cytron Bluebee Bluetooth module is chosen
to establish the Bluetooth connection between main control board and the GUIs.
Microcontroller
ATMEGA 16
Bluetooth Serial Module
MOC3020/4N35 Opto Coupler
Interface
STA401 Motor Driver
Unipolar Stepper Motor
ULN2003 Relay Driver
Relays
LOAD1
LOAD2
LOAD3
BUZZER
Door Sensor
IR Object Sensor
MICROCONTROLLER SECTION
The heart of the device is microcontroller ATMega16 from Atmel Corp. which comes under
the AVR family of microcontrollers. AVR was chosen due to its low power consumption,
availability and reliability. The availability and usability of the development environments
available is also great. Other advantages include added EEPROM to store data over a power off
time. An internal oscillator and an internal power on reset make the AVR working without any
other components.
-A watchdog to handle hanging software states is added. The divider between XTAL and cycle
time is reduced from 12 to one. So the instruction time is many times faster than the 8051.
BLUETOOTH SECTION
The microcontroller communicates with the Bluetooth module using the serial protocol. baud
rate chosen was 9600 since the Bluetooth module is configured at 9600 baud rate when shipped.
OUTPUT DRIVER SECTION
The relay driver section is accomplished with the help of a ULN2003 IC. A ULN2003 is an
Integrated Circuit (IC) chip with a High Voltage/High Current Darlington Transistor Array. It
allows you to interface TTL signals with higher voltage/current loads. The chip takes low level
signals (TLL, CMOS, PMOS, NMOS - which operate at low voltages and low currents) and acts
as a relay of sorts itself, switching on or off a higher level signal on the opposite side.
The maximum power available on a TTL signal depends on the type, but generally does not
exceed 25mW (~5mA @ 5V), so it is not useful for providing power to something like a relay
coil. Microcontrollers generate TTL signals. On the output side the ULN2003 is generally rated
at 50V/500mA, so it can operate small loads directly. Alternatively, it is frequently used to
power the coil of one or more relays, which in turn allow even higher voltages/currents to be
controlled by the low level signal. In electrical terms, the ULN2003 uses the low level (TTL)
signal to switch on/turn off the higher voltage/current signal on the output side.
PA0, PA1, PA2 and PA3 from the microcontroller are used to drive LOAD1, LOAD2, LOAD3
and Buzzer respectively.
STEPPER MOTOR DRIVER SECTION
A Unipolar stepper motor is used to simulate the door open/ close action. Since motors are
electromagnetic devices, they introduce EMI into the whole system and this could some times
damage the microcontroller. To avoid this, we have used opto couplers in our design which
optically isolate the microcontroller section and the driver section. Separate power supplies are
used for the motor driver section and the rest of the section. The opto couplers used are either
MOC3020/21 or 4N35 type. Both are pin compatible and the optimum values of operation falls
under our operating conditions. The output of the opto couplers are used to drive the inputs of the
STA401A motor driver circuit. The STA401 drives the motor under 12V.
PA4, PA5, PA6 and PA7 from the microcontroller are used to drive the stepper motor.
DOOR SENSOR SECTION
Once the Door Close command is received, the microcontroller program enables the Security
feature of the device. Now onwards, the door can be opened only using the GUI in Android
mobile phone. If somebody tampers the door, the door sensor opens and is detected by the AVR.
It suddenly raises the alarm and send the signal through the Bluetooth. The door sensor is a
magnetic reed relay which when closed will output a logic ‘0’ and when open outputs a logic ‘1’.
The microcontroller continuously monitors the status of the door sensor once after the security
mode is enabled. It sends the value to the Bluetooth module once a tamper is detected. Pin PC6
of AVR is the input pin used for Door sensor. When this input goes high, the program identifies
as the door is open and when this input goes low, the program identifies as door is closed.
GND PA6
IR OBJECT DETECTOR SECTION
An LM358 based IR object detector is used to detect the presence or motion when the security
mode is enabled. Pin PC7 of AVR is used as the input pin for this.When an object is detected,
the output goes high and when no object is detected, the output goes low. An IR LED and an IR
Photodiode are used along with the LM358 to detect the object. Ther’s a sensitivity adjuster Pot
for the circuit.
POWER SUPPLY SECTION
The microcontroller part works under 5V. This is derived from a 12V/1A adapter type SMPS.
Nowadays these are cheap and easily available and is a reliable replacement for transformer
based power supplies. A 7805 voltage regulator converts the 12V into 5V and supplies to the
microcontroller, Bluetooth, ULN2003 inputs, Opto coupler inputs and to the sensors. The 12V is
Reed Switch
applied to the output section of ULN2003 since the relays are driven under 12V. The Buzzer is
also 12V type and draws from the same 12V applied to ULN2003 output section.
Another 12V/1A power supply is used to supply power to the stepper motor. This avoids any
EMI induced in the motor to be transferred to the microcontroller and thus prevents damage.
230VAC In 12V DC 5VDC
12V/1A Adapter type SMPS Power Supply
7805 Voltage regulator
Microcontroller/ Bluetooth Module/ Optocoupler Inputs/ UL2003 Inputs/ Sensors
ULN2003 Outputs(Relays)/ Buzzer/ Stepper Motor Driver STA401A