Sie sind auf Seite 1von 14

Mid-Semester Project Report Mid-Semester Project Report Mid-Semester Project Report

HOME AUTOMATION
Controlling Home Appliances through
Bluetooth and GSM
Prepared by -
Rajan Waliya - 2012A8PS333G
C.B. Prathap Kumar - 2012A3PS029P
C. Chandini - 2012A3PS212P
Our project in CSIO, Chennai is related to home automation.
We are assigned to work on Bluetooth and GSM module in-
terfacing with Arduino board. We worked on Arduino Uno
board.
Arduino Uno Board
Microcontroller ATmega328
Operating Voltage 5V
Digital I/O pins 14(6 PWM)
Analog input pins 6
Flash Memory 32 KB
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
First we had to control state of various output pins of Arduino
Uno using Bluetooth.
There is an android application available on Google Playstore
to connect and communicate with Bluetooth module. We used
Bluetooth module hc-05 with arduino board for serial commu-
nication between arduino and android app (ArduDroid).
With the help of this app, we were able to change status of
different pins and receive input from input pins.
We were asked to control a lamp using this app and arduino
with Bluetooth as medium of communication. Lamp can be
switched on and off, if it gets supply according to the status of
any digital output pin of arduino. But it cannot be directly
connected to arduino board, since the bulb requires high AC
voltage and current. For this purpose we connected lamp and
arduino using a relay (mechanical).
Low voltage signal from arduino pin can be given as control
input to relay and based on its status relay connects or discon-
nects the supply in circuit.
Each relay can handle a load of upto 6A. The relays are driv-
en using uln2003. The ULN2003 is Darlington Transistor Ar-
ray that consists of 7 Darlington Pairs of transistors. Each pair
can drive 1 output requiring higher drive current.
The amount of current that can pass through the load when
connected to a transistor that is
turned on = the input current x the gain of the transistor (hFE)
Total current gain (hFE total) = current gain of transistor 1
(hFE t1) x current gain of transistor 2 (hFE t2)
Bluetooth Module hc-05
1. Hardware features :
Typical -80dBm sensitivity
Up to +4dBm RF transmit power
Low Power 1.8V Operation ,1.8 to 3.6V I/O
PIO control
UART interface with programmable baud rate
With integrated antenna
With edge connector
2. Software features :
Default Baud rate: 38400, Data bits:8, Stop bit:1,Par-
ity:No parity, Data control: has Supported baud rate:
9600, 19200, 38400, 57600, 115200, 230400, 460800.
Given a rising pulse in PIO0, device will be discon-
nected.
Status instruction port PIO1: low-disconnected, high-
connected;
When master and slave are paired, red and blue led
blinks 1time/2s in interval, while disconnected only
blue led blinks 2times/s.
Auto-connect to the last device on power as default.
Permit pairing device to connect as default.
Auto-pairing PINCODE:0000 as default.
Auto-reconnect in 30 min when disconnected as a re-
sult of beyond the range of connection.
This was done only for one device, but in real situations we
have to control many devices. All these devices should be
able to receive signals only meant for them or there should
not be any communication mismatch. To check if there is a
communication mismatch, we connected relay to every pin of
arduino board and tried to control them. We were able to con-
trol each device properly and there was no communication
mismatch.
Another problem that might occur in real condition is due to
many Bluetooth modules available.
Each of these modules is connected to different devices and
user should know about which module is for which devices.
By default all modules have same name and password. How-
ever there is a unique id number for each module that can be
checked while connecting to it, but we cannot expect users to
remember these numbers for each device. Solution to this
problem is to change the names of Bluetooth modules and
their name should represent the devices connected to them.
We changed operating mode of Bluetooth module using key
pin, after that we were able to communicate and send AT
commands to Bluetooth module using Serial monitor of ardui-
no IDE.
We changed device name and password of module success-
fully.
Limitation of Bluetooth module: using Bluetooth module
we can control devices within 10 meters range.
Solution: using GSM module we can control devices from
anywhere.
GSM module
Features:
1. RS-232 Interface in Addition to TTL Pin-outs for Micro-
controller Interfacing
2. On-Board 3db Antenna
3. DC Jack for External Power Supply
4. Telephone Handset Jack
Inbuilt GSM library in Arduino IDE does not work as it is for
arduino GSM shield, we used AT commands to perform dif-
ferent operations.
1. To make voice call:
. AT+CREG=1; //to register on net-
work
. ATD+91<10 digit number>+; //to dial 10 digit
number
We can use this to call user in important situations, for in-
stance user forgets to turn off a device on time or user is leav-
ing the house without switching off.
2. To send text message:
AT+CMGF=1; //to set text mode for message , 0 for
PDU mode
AT+CMGS=\+91<10 digit number>\;// to define re-
ceivers number
<text message>
We can use this to send notification about different devices to
user.
This can be used to send different messages to different users
for a particular device.
We are trying to receive message from user and based on the
contents of the message switching the devices.
Bulb dimmer using Pulse Width Modulation
(PWM)
We can control the average voltage supply to a bulb using
PWM pins available on arduino board, thus controlling the
brightness level of the bulb.
We used the following circuit:
In this circuit:
R1 is used to limit the current through LED in Optocoupler.
Optocoupler is used to provide isolation.
R5 is used to limit the current through D6.
R5, C2 and D6 together form a rectifier.
The four diodes D2, D3, D4 and D5 together form Bridge
Rectifier.
The combination of R3, R4, D1 and C1 together is used to
control the voltage across C2.
The Optocoupler is used to provide the required gate volt-
age for the MOSFET BUZ41A.
FUTURE SCOPE
The circuit which was described above can be used in various
industrial applications to control devices and also further new
innovative ideas can be implemented through this.
After the testing of the circuit and finally it was running, we
have decided to further work on this implementing another
idea.
Our next task is to combine this circuit with a light sensor that
which will capture the daylight and work accordingly. Using
the light sensor we desire to build up a circuit in which the
home appliance either a lamp or a tubelight will automatically
change its brightness accordingly to the availability of day-
light.

Das könnte Ihnen auch gefallen