You are on page 1of 11

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 ones 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.
Benefits:
Users can receive status of devices in the home while away
Heating and cooling can be controlled remotely
Surveillance camera can be switched remotely
Features:
Ability to use cell phone or an internet connected computer to send
commands
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
needed
No special software needs to be installed on either the cell phone or
computer that sends commands

II. Design

C e ll P h o n e o r
E - m a il

T h e r m o s ta t

W eb S erv er

P C w it h
B lu e t o o t h
D o n g le

V id e o C a m e r a

V id e o C a m e r a

T h e rm o s ta t

B lu e t o o t h T r a n s c e iv e r

B lu e t o o t h T r a n s c e iv e r

P I C M i c r o c o n t r o l le r

P I C M ic r o c o n t r o l l e r

LCD
V id e o C a m e r a

Block Description

T h erm al
S ensor

T h e r m o s ta t
I/O

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 usercreated 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
messages.
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
camera
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

S ta rt

W a it 3 0 s e c
If N o n ew m essages
P o ll P O P 3
accou n t

I f m e s s a g e c o n ta in s n o c o m m a n d s

I f n e w m e s s a g e e x is ts

Parse M essage
fo r C o m m a n ds
I f m e s s a g e c o n ta in s c o m m a n d s

In te rpre t
C om m an ds

C h a n g e T h e rm o sta t

O p e r a te V id e o C a m e r a

R e p ly b a c k

D one

Schematics:

C h e c k S ta tu s o f D e vic e s

Power Supply

Thermostat

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.
Thermostat:
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
user.
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

BR-C40 Bluetooth Module


BR-C40 Bluetooth Module
Camcorder
Antenna with SMA connector
Basic Stamp 2px
Radio aircraft transmitter & reciever
Solid State Relay
PIC 16F88
circuit boards
GDM1602K LCD Panel
DS1820 Temperature sensor
LM317T Voltage Regulators
Various Resistors

$69.00
$69.00
$350.00
$18.00
$80.00
$400.00
$3.00
$5.00
$4.00
$12.00
$5.00
$1.79
$0.07

1
1
1
2
1
1
2
3
2
1
2
6
15

$69.00
$69.00
$350.00
$36.00
$80.00
$400.00
$6.00
$15.00
$8.00
$12.00
$10.00
$0.74
$1.05

Shipping
Status
Arrived
Pending
Arrived
Arrived
Arrived
Arrived
Arrived
Arrived
Arrived
Arrived
Arrived
Arrived
Arrived

Trimpots
PIC 18F2520
DC Power Connector
Various Capacitors

$0.10
$10.00
$1.00
$0.10

10
1
4
10

Total:

$1.00
$10.00
$4.00
$1.00

Arrived
Shipping
Shipping
Arrived

$1,1172.00

Schedule
Task

Who

Do background research on Bluetooth connectivity and Both


gather supplies
Research Perl scripting and POP3 mail server
commands, get simple scripts to work
Research PIC commands, get simple PIC program to
work

Target
Completion
Week (meeting
date)
9/26/2006

Hieu

10/3/2006

Mark

10/3/2006

Work on retrieving messages from POP3 account Hieu


correctly, also get started on parsing messages
correctly

10/10/2006

Work on video camera circuit, mainly the PIC logic


which interfaces with the video camera

Mark

10/10/2006

Hieu
Work on getting PC to Bluetooth connectivity
working correctly, then work on integrating
commands sent to the POP3 account and
Bluetooth module
Set up command protocols, help out with getting Mark
Bluetooth interface between computer and
Bluetooth module working
Prepare for mock up demo; show that cell phone to Both
PC to Bluetooth module connections work
properly
Work on interfacing temperature sensor and LCD Hieu
panel with PIC
Mark
Continue working on video camera circuit and
have it functional w/o Bluetooth connectivity

10/24/2006

Start integrating bluetooth connectivity with PIC logic


for all devices
Thanksgiving Break, troubleshoot issues
Test, Test, Test and troubleshoot bugs

Both

11/14/2006

Both
Both

11/21/2006
11/27/2006

10/24/2006

10/31/2006

11/7/2006
11/7/2006