csio-ps1 report

Upload: rajan-waliya

Post on 02-Jun-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 CSIO-PS1 report

    1/14

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

    HOME AUTOMATION

    Controlling Home Appliances throughBluetooth and GSM

    Prepared by -

    Rajan Waliya - 2012A8PS333G

    C.B. Prathap Kumar - 2012A3PS029P

    C. Chandini - 2012A3PS212P

  • 8/10/2019 CSIO-PS1 report

    2/14

  • 8/10/2019 CSIO-PS1 report

    3/14

    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 ofany 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-

  • 8/10/2019 CSIO-PS1 report

    4/14

    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)

  • 8/10/2019 CSIO-PS1 report

    5/14

    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:

  • 8/10/2019 CSIO-PS1 report

    6/14

    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:0000as default.

    Auto-reconnect in 30 min when disconnected as a re-

    sult of beyond the range of connection.

  • 8/10/2019 CSIO-PS1 report

    7/14

    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

  • 8/10/2019 CSIO-PS1 report

    8/14

    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.

  • 8/10/2019 CSIO-PS1 report

    9/14

    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

  • 8/10/2019 CSIO-PS1 report

    10/14

    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+; //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\;// to define re-

    ceivers number

  • 8/10/2019 CSIO-PS1 report

    11/14

    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.

  • 8/10/2019 CSIO-PS1 report

    12/14

    Bulb dimmer using Pulse Width Modulation

    (PWM)

    We can control the average voltage supply to a bulb usingPWM 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.

  • 8/10/2019 CSIO-PS1 report

    13/14

    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.

  • 8/10/2019 CSIO-PS1 report

    14/14