smart home systems · arduino uno microcontroller board . o control the lights using the pir motion...
TRANSCRIPT
SMART HOME SYSTEMS
Group 10 Daniel Moody CpE
Thien Luu EE Joel LeGros EE
Vu Ha EE
Motivations
• Energy efficiency – light automation, appliance control
• Convenience – control through your portable devices
• Security – Alarms and security camera video feed
• Entertainment – Music and intercom
Objectives
• 1. Basic control systems – Relay switch control from internet – Motion/security sensing
• 2. Streaming Audio – Music – Intercom/Voip
• 3. Video – Streaming video to phone
Specs and Requirements
• Low power usages – Needs to run off back-up power for at least a day – System need to draw less then 4 amps max
• Low Cost – Less then $600 for basic system
• Needs smart phone or similar device to fully utilize system
Overall Block Diagram
• Two Processing boards – Spinneret – OMAP
• Arduino and relay talk to spinneret
• Spinneret talks to OMAP
Parallax Spinneret Web Server • Cheap and efficient board made specifically to
run a web server ($60). • 2 MCU
• Propeller P8X32A – 160 MIPS(~80 MHz), 32K RAM, 32 I/O • Wiznet W5100 - Ethernet Controller, 16K Tx/Rx Buffer
• Pros – MicroSD slot for data storage – Doesn’t require OS
• Cons – 8 I/O pins available, (2 which are I2C)
Spinneret Schematic
• Daniel
Zoom OMAP-L138 - TI OMAP- L138 DSP processor
- 456 MHz max - 256 KB cache for DSP processing
- SD Card interface - Run Linux From SD - 10/100 Ethernet - Audio Codec - USB
Use of the Spinneret • Originally decided to use the spinneret because of cost. • Just recently we acquired the TI board on loan. • The TI board can easily handle all of the spinnerets jobs,
plus audio and video processing. • We may use the spinneret as a daughter board to the TI
board because it has already been tested and is working effectively.
Lighting/Outlet Conrol - JQX-15F(787) Relay - rated up to 220 VAC at 20 Amps - Normally open relay - Single pole double throw - Control though Parallax microcontroller - 5 V signal turns the relay off and on
Relay Schematic
Relay/Outlet Control Top Side Bottom Side
-Fits into a single gang box - Control and power cables for the signal will come in on a 3 conductor cable into one side of the box. - GFCI outlet allows LED to see when light or outlet is live.
Parallax PIR Motion Sensor
Detect a IR source up to 30 ft. away 110 degrees x 70 degrees detection range Power: 3.3 to 5 VDC input; 130 µA idle, 23 mA active Single bit high/low output Dimensions: 1.27 x 0.96 x 1.0 in
Applications: Motion-activated lights Alarm systems Holiday animated props
PIR Motion Sensor
Arduino Uno Microcontroller Board
o Control the lights using the PIR motion sensor and the relay o ATmega328 microcontroller o Input Voltage 5-12 VDC o Output 3.3-5 VDC at 40-50 mA o Flash Memory 32KB o Clock speed 16MHz o Interact with base station through a 5 VDC I/O pin
Security Sensors
Door/Window Sensor • SECO-LARM SM-200Q/WH Surface Mount Magnetic Contact
Switch • Weight: 0.05 lbs • Dimensions: 2.48" x 0.5" • Compatibility: Closed circuit systems • handle up to 100mA at 100 volts DC • up to 50 million openings and closings • operate in temperatures between -15°F and 160°F
Security Sensor Applications
• Use for the audio alarm systems • Light activations • when security breached, the security system
will send the user an alert message • Scenarios
– At home – Away
Android Application
• First UI objective to be implemented
• Home Status is for basic control functions – Change I/O – Get status updates
• Users will use the application to stream audio and video to and from the home.
Android Programming • Application is being programmed in Eclipse IDE with Android
plug-ins. • The application uses Apache libraries to setup network
communication. • The application will store the user accounts, system status
changes and commands in an SQLite database. • The database will need to updated from the web server
periodically so all instances of the application will be congruent.
Web Server Code • Spinneret Web Server doesn’t come with any firm-
ware. • Parallax Spinneret Contest created a lot of open-
source resources to draw from. • A generic multi-socket web server program was
modified for the purposes needed in this project. • The program is written in SPIN language (similar to python), specifically made for propeller chips.
Application communication • So far the commutation between the spinneret
web server and home is a simple design. • The communication transactions are always: send
a request and web server sends a response. • Depending on the request the web server will
execute commands, and then send back a response, indicating what it did and the current state of something.
Streaming Data • Streaming audio and data will require RTP
protocols, which the spinneret web server is not programmed for and may not be powerful enough to handle.
• We plan to use PJSIP, a session initiation protocol, on the TI board which is open-source and allows for connections to be set up for real time streaming.
Web Server Security
• Because the web server is receiving request, there needs to be a way to identify who ever is accessing is a user of the smart home system.
• User names and passwords will be used
• An encryption method is being considered, so that user names and passwords will be more when the web server receives request.
Other UI’s
• After the android UI is complete, A website UI will be created to allow the user control from any computer.
• If time permits and everything is smooth sailing, an iPhone and Java application will be created.
System Integration
• Hair straighten appliance left on • System components
– Security System in armed state will turn off predetermined outlets
– Relay on timer for that outlet – Web server can notification
TLV320AIC3106 Audio Codec
• Low power of 15 mW of 48 Khz stereo audio from a 3.3 VDC power supply
• Two digitally controlled microphone preamps • Multiple audio inputs and outputs • SPI and I2C • I2S, left & right justified, TDM audio serial
buses • Onboard DSP capability
Audio Codec Block Diagram
Automatic Gain Control (AGC) -Target Level -Attack Time -Decay Time -Noise Gate
Power Supply
– System runs on 110VAC regular outlet – 9-12VDC input range – Backup battery >= 250mA at 12VDC – Work off of both 110VAC US outlet and
Battery – Efficiency >= 80% – Transient Voltage Protection
Solar Panel
• Technical specs need to look at: – Optimal voltage – Optimal current – Short circuit current – Maximum wattage – Fuse rating – Able to charge a 12V battery set the control at 18V to 20V
12VDC Battery
Cold Cranking Amps 500 Amps
Cranking Amps: 625 Amps Height: 8-11/16 in Length: 9-5/16 in Width: 5 in Reserve Capacity: 85 min Terminal Type: Top Terminal Voltage: 12 VDC Weight: 28 Lbs
110VAC to 12VDC Lead Acid Battery
Charger
Progress
0%10%20%30%40%50%60%70%80%90%
100%
Work Distribution
0%10%20%30%40%50%60%70%80%90%
DanielLuuVuJoel
Budget Item Manufacturer Quantity Cost per unit Total
Spinneret Webserver Parallax 1 $60.00 $60
Main Board TI/LogicPD Omap L138
1 $2000 $0 (loaner)
Relay kit Sparkfun 2 $13.00
$26
GFCI outlet Leviton 2 $10 $20
Motion Sensors Parallax 1 $10 $10
Uno board Ardiuno
1 $35 $35
Door Sensor Seco 3 $6.33 $20
Circuit components NA 20 NA $5.00
Grand Total 176.00
Our Goal Budget
• Budget = $600 • Current spending = $176 • Spending room = $424 • Percent of budget used = 29.3%
Expected Work/Problems
• Limited IO pins • Audio/Video Streaming data rate • Web server security • Motion sensors sensitivity • Back-up Power
Questions