Home Automation System Using Bluetooth

Embed Size (px)

Citation preview

  • 8/11/2019 Home Automation System Using Bluetooth

    1/17

    PGA based

    Home Automation

    System using Bluetooth

  • 8/11/2019 Home Automation System Using Bluetooth

    2/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    Contents at a Glance

    ABSTRACT ....................................................................... 3

    BLOCK DIAGRAM ............................................................. 4

    Home Section .............................................................................................. 4

    Mobile Section ............................................................................................ 4

    Introduction .................................................................... 5

    Bluetooth home automation mobile software ................. 7

    Hardware design and development ................................. 7

    Tool required: .................................................................. 8

    Source Code .................................................................... 8

    Conclusion ..................................................................... 15

  • 8/11/2019 Home Automation System Using Bluetooth

    3/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    ABSTRACT

    Technology advancements have made possible the

    implementation of embedded systems within home appliances.

    This has added new capabilities and features, however, most of

    the time, the implementations are proprietary and networking is

    not always possible. Yet there is an increasing demand for smart

    homes, where appliances react automatically to changing

    environmental conditions and can be easily controlled through

    one common device. This paper presents a possible solution

    whereby the user controls devices by employing a central FieldProgrammable Gate Array (FPGA) controller to which the devices

    and sensors are interfaced. Control is communicated to the FPGA

    from a mobile phone through its Bluetooth interface. This results

    in a simple, cost effective, and flexible system, making it a good

    candidate for future smart home solutions.

  • 8/11/2019 Home Automation System Using Bluetooth

    4/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    BLOCK DIAGRAM

    Home Section

    Mobile Section

    Android

    Mobile Device

    Bluetooth

    Interface

    RS232

    UART

    Spartan3an

    FPGA5v Relay Stepper Motor

    Door Lock

    open/close

    Fan

    light

    AC

    Heater

  • 8/11/2019 Home Automation System Using Bluetooth

    5/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    Introduction

    The Bluetooth wireless technology is set to revolutionize theway people perceive digital devices in our homes and office

    environment. Now they are no longer just the individual devices;

    instead, with the embedded Bluetooth technology, they form a

    network in which appliances can communicate with each other.

    This wireless technology is especially useful in home environment,

    where there exists hardly any infrastructure to interconnect

    intelligent appliances. It could be suitably used for home

    automation in a cost-effective manner. Operating over

    unlicensed, universally available frequency of 2.4 GHz, it can link

    digital devices within a range of 10 m (expandable to 100 m, by

    increasing the transmitted power) at the speed of 1 Mbps.Building upon this theme; we propose a home automation system

    based on Bluetooth technology. There are certain issues involved

    in the design of a home automation system. The system should be

    scalable, so that new device can easily be integrated into it. It should

    provide a user-friendly interface on the host side, so that the devices can

    be setup, monitored and controlled. The interface should also provide

    some diagnostic services so those problems with the system, if any, can

  • 8/11/2019 Home Automation System Using Bluetooth

    6/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    be tracked down. The overall system should be fast enough to

    realize the true power of wireless technology. It should also be

    cost effective in order to justify its application in home

    automation.The system developed consists of android mobile phone and

    a FPGA based Door Lock open/close system and relay on/off to

    control electrical Appliance, that is able to communicate with the

    host through the Bluetooth link.

    Host and client modules in Bluetooth piconet

  • 8/11/2019 Home Automation System Using Bluetooth

    7/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    Bluetooth home automation mobile software

    The Bluetooth home automation mobile software moduleprovides two main services to the users, namely:

    1. Device Registration

    2. Device Control

    Hardware design and development

    A Door Lock open/close system and relay on/off to control

    electrical Appliance circuitry has been developed to demonstrate

    the feasibility and effectiveness of the application. The hardware

    interface component of the Bluetooth based home automation

    system consists of a FPGA with stepper motor, relay interface and

    an RS232 link between the FPGA and the Bluetooth.

  • 8/11/2019 Home Automation System Using Bluetooth

    8/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    Tool required:

    Software: Xilinx ISE 10.1i or above

    Language: VHDL

    Hardware: 1.Spartan3an FPGA kit

    2.Bluetooth Module

    3.JTAG Cable

    4.Serial Cable

    5.Stepper Motor

    6.Relay

    Source Code

    library IEEE;

    use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;

    use IEEE.STD_LOGIC_UNSIGNED.ALL;

  • 8/11/2019 Home Automation System Using Bluetooth

    9/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    entity uart_stepper is

    port ( clk : in std_logic;

    din : in std_logic;

    relay : out std_logic:='0';

    count : out STD_LOGIC_vector(3 downto 0)

    );

    end uart_stepper;

    architecture Behavioral of uart_stepper is

    type state is (ready,b0);

    signal ps : state := ready;

    signal start,stop : std_logic;

    signal store : std_logic_vector(7 downto 0) := "10101010

    type state1 is (a0,a1);

    signal ps1,ps2 : state1 := a0;

    signal s_count:std_logic_vector(3 downto 0);

    begin

    process(clk)

    variable i : integer := 0 ;

  • 8/11/2019 Home Automation System Using Bluetooth

    10/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    begin

    if clk'event and clk = '1' then

    if ps = ready then

    start

  • 8/11/2019 Home Automation System Using Bluetooth

    11/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    end if;

    if i = 23400 then

    store(3)

  • 8/11/2019 Home Automation System Using Bluetooth

    12/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    end if;

    end process;

    process(clk,store)

    variable j,k,l,m:integer:=0;

    begin

    if clk'event and clk = '1' then

    if store = x"33" then

    if(ps1=a0)thenj:=j+1;

    if(j=500000)then

    s_count

  • 8/11/2019 Home Automation System Using Bluetooth

    13/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    if(j=2000000)then

    s_count

  • 8/11/2019 Home Automation System Using Bluetooth

    14/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    if(l=1500000)then

    s_count

  • 8/11/2019 Home Automation System Using Bluetooth

    15/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    ps1

  • 8/11/2019 Home Automation System Using Bluetooth

    16/17

    Join the Technical Community Today!

    http://www.pantechsolutions.net

    Pantech solutions creates information packed technical

    documents like this one every month. And our website is a rich

    and trusted resource used by a vibrant online community of

    more than 1,00,000 members from organization of all shapesand sizes.

    Did you enjoy the read?

  • 8/11/2019 Home Automation System Using Bluetooth

    17/17

    Join the Technical Community Today!

    What do we sell?

    Our products range from Various Microprocessodevelopment boards, DSP Boards, FPGA/CPLD boards

    Communication Kits, Power electronics, Basic electronics

    Robotics, Sensors, Electronic components and much more . Ou

    goal is to make finding the parts and information you need

    easier and affordable so you can create awesome projects and

    training from Basic to Cutting edge technology.