Cell Phone Controlled House Automation

Document Sample
Cell Phone Controlled House Automation Powered By Docstoc
					                                                                             Hieu Huynh
                                                                              Mark Jiang
                                                                           Design Review
                                                                           Sept. 25, 2006

            Cell Phone Controlled House Automation
       I.      Introduction

        A cell phone is quickly becoming one of the items we never leave home without.
Using a cell phone, we wish to be able to control and acquire the status of several devices
that exist in one’s home. In particular, we want to be able adjust the temperature using
commands sent by a cell phone, and also be able to receive the home temperature status.
We would also want to control a security camera remotely for home security purposes.

           Users can receive status of devices in the home while away
           Heating and cooling can be controlled remotely
           Surveillance camera can be switched remotely

           Ability to use cell phone or an internet connected computer to send
           Commands sent through SMS, so nearly any cell phone can be used to
              send commands
           Bluetooth communication with lights and thermostat, so no extra wiring is
           No special software needs to be installed on either the cell phone or
              computer that sends commands
    II. Design

Cell Phone or
                         Web Server

                          PC with
   Thermostat             Bluetooth                   Video Camera

Video Camera                                Thermostat

 Bluetooth Transceiver                      Bluetooth Transceiver

  PIC Microcontroller                       PIC Microcontroller

                                                   Thermal           Thermostat
                                                   Sensor               I/O
     Video Camera
Block Description

      Cell phone/E-mail: The method of sending commands to the system would be
       through SMS text messaging through a cell phone or an email sent to the user-
       created mail account.
      Web Server: The web server will collect messages containing commands sent
       from the cell phone or another PC. The server will be polled every minute for new
      PC with Bluetooth Dongle: The PC will download messages from the mail
       server and parse them for commands. The commands will then be sent via
       Bluetooth to the lights and/or the video camera.
      Video Camera: The Video Camera circuit consists of the Bluetooth transceiver
       that will receive and transmit commands/statuses. A microcontroller is connected
       to the transceiver to interpret commands and then send signals to the video
      Thermostat: The Thermostat consists of a Bluetooth transceiver and PIC
       microcontroller to send/receive information and interpret commands. A thermal
       sensor detects the current room temperature, and an LCD panel displays this
       information, along with the current state of the heating and cooling switches.
Program Flowchart

                                           Wait 30 sec

           If No new messages

                                            Poll POP3               If message contains no commands

                         If new message exists

                                         Parse Message
                                         for Commands

                                                    If message contains commands


     Change Thermostat                 Operate Video Camera               Check Status of Devices

                                           Reply back


Power Supply
Video Controller:
Schematic Descriptions

Power Supply:

The power supply takes a 9V DC source and outputs a 3.3V line and a 5.0V line. We use
2 LM317T voltage regulators, and adjust the output voltage using the two resistors R1
and R2 according to this formula:

                       Vout = VRef(1 + R2 / R1) + Iadj(R2)

with VRef =1.25 V. We use potentiometers for R2 so that we can fine tune the output
voltage so that it equals 3.3V and 5.0V.

   1. BR-C40 Bluetooth module receives commands from the PC and sends them as
      outputs to PIC18f
   2. PIC18f interprets commands and performs selected functions. Will also transmit
      as output the temperature status to the BR-C40
   3. Thermal sensor DS1820 sends temperature data as output to PIC
   4. LCD takes in as input temperature information and other display information
      from PIC

Video Controller:

   1. This PIC works as an intermediary from the video camera to the Bluetooth and
   2. It is controlled by two inputs, 16 input pins and the output from the Bluetooth.
      There is also a 20mHz clock and
   3. The PIC will be hard programmed with certain signals using Assembly language
      and outputted to an infrared LED.

Performance Requirements

The Bluetooth module should be able to receive transmissions from the PC from a
distance of at least 70 ft indoors. We wish to be able to transmit this far even with walls
and other obstructions included. The cycle time for sending a command and receiving
some sort of feedback should be kept below 2 minutes. The largest variable that will
affect this will be the response time of the POP3 mail account.

Testing Procedures

Power Supply:

We wish to test the power supply so that it outputs the correct voltage, and also will not
damage our components if large amounts of voltage or current are supplied. To test this
out, we will use a multimeter to measure the output voltage and make sure that it stays
within 5% of the target output voltage.

Bluetooth Communication and Reception:

We will test our Bluetooth modules by sending commands from a PC with a Bluetooth
Dongle attached, and attempt to switch the logic levels of the I/O pins to make sure
commands sent by the PC affect the Bluetooth module.

Cell Phone SMS Communication:

We will test out the cell phone to webserver communications by sending a message from
the cell phone and seeing if our software will be able to automatically download and
parse the message correctly.

Video PIC:

The step would be to get the PIC to operate the video camera without the confusion of
any inputs. Next would be to get the PIC to operate with the password and button
commands. Finally, get the PIC to operate from the Bluetooth commands. Then, test the
Bluetooth commands under several conditions like through a wall and long distances.

Ethical Considerations

The main ethical issue that relates to our project is safety. We have to make sure that in
our design of the thermostat, we will automatically shut down the heater/cooler if
temperature extremes are reached. Also, the safety of personal identification is taken into
consideration, as the user is urged to create a new and dedicated POP3 email account that
will only be used for home automation functions.

Cost Analysis

       Part                              Cost        Quantity   Total        Shipping
       BR-C40 Bluetooth Module           $69.00      1          $69.00       Arrived
       BR-C40 Bluetooth Module           $69.00      1          $69.00       Pending
       Camcorder                         $350.00     1          $350.00      Arrived
       Antenna with SMA connector        $18.00      2          $36.00       Arrived
       Basic Stamp 2px                   $80.00      1          $80.00       Arrived
       Radio aircraft transmitter &      $400.00     1          $400.00      Arrived
       Solid State Relay                 $3.00       2          $6.00        Arrived
       PIC 16F88                         $5.00       3          $15.00       Arrived
       circuit boards                    $4.00       2          $8.00        Arrived
        GDM1602K LCD Panel               $12.00      1          $12.00       Arrived
        DS1820 Temperature sensor        $5.00       2          $10.00       Arrived
        LM317T Voltage Regulators              $1.79      6      $0.74        Arrived
        Various Resistors                      $0.07      15     $1.05        Arrived
        Trimpots                              $0.10       10     $1.00        Arrived
        PIC 18F2520                           $10.00      1      $10.00       Shipping
        DC Power Connector                    $1.00       4      $4.00        Shipping
        Various Capacitors                    $0.10       10     $1.00        Arrived
        Total:                                                   $1,1172.00

Task                                                      Who        Target
                                                                     Week (meeting
Do background research on Bluetooth connectivity and Both            9/26/2006
gather supplies

Research Perl scripting and POP3 mail server              Hieu       10/3/2006
commands, get simple scripts to work
Research PIC commands, get simple PIC program to          Mark       10/3/2006
Work on retrieving messages from POP3 account Hieu                   10/10/2006
correctly, also get started on parsing messages
Work on video camera circuit, mainly the PIC logic        Mark       10/10/2006
which interfaces with the video camera
Work on getting PC to Bluetooth connectivity              Hieu       10/24/2006
working correctly, then work on integrating
commands sent to the POP3 account and
Bluetooth module
Set up command protocols, help out with getting           Mark       10/24/2006
Bluetooth interface between computer and
Bluetooth module working
Prepare for mock up demo; show that cell phone            Both       10/31/2006
to PC to Bluetooth module connections work
Work on interfacing temperature sensor and LCD            Hieu       11/7/2006
panel with PIC
Continue working on video camera circuit and              Mark       11/7/2006
have it functional w/o Bluetooth connectivity
Start integrating bluetooth connectivity with PIC logic   Both       11/14/2006
for all devices
Thanksgiving Break, troubleshoot issues                   Both       11/21/2006
Test, Test, Test and troubleshoot bugs                    Both       11/27/2006

Shared By:
yaohongm yaohongm http://