smart home systems · arduino uno microcontroller board . o control the lights using the pir motion...

38
SMART HOME SYSTEMS Group 10 Daniel Moody CpE Thien Luu EE Joel LeGros EE Vu Ha EE

Upload: others

Post on 04-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SMART HOME SYSTEMS · 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

SMART HOME SYSTEMS

Group 10 Daniel Moody CpE

Thien Luu EE Joel LeGros EE

Vu Ha EE

Page 2: SMART HOME SYSTEMS · 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

Motivations

• Energy efficiency – light automation, appliance control

• Convenience – control through your portable devices

• Security – Alarms and security camera video feed

• Entertainment – Music and intercom

Page 3: SMART HOME SYSTEMS · 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

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

Page 4: SMART HOME SYSTEMS · 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

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

Page 5: SMART HOME SYSTEMS · 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

Overall Block Diagram

• Two Processing boards – Spinneret – OMAP

• Arduino and relay talk to spinneret

• Spinneret talks to OMAP

Page 6: SMART HOME SYSTEMS · 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

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)

Page 7: SMART HOME SYSTEMS · 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

Spinneret Schematic

• Daniel

Page 8: SMART HOME SYSTEMS · 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

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

Page 9: SMART HOME SYSTEMS · 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

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.

Page 10: SMART HOME SYSTEMS · 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

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

Page 11: SMART HOME SYSTEMS · 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

Relay Schematic

Page 12: SMART HOME SYSTEMS · 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

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.

Page 13: SMART HOME SYSTEMS · 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

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

Page 14: SMART HOME SYSTEMS · 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

PIR Motion Sensor

Page 15: SMART HOME SYSTEMS · 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

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

Page 16: SMART HOME SYSTEMS · 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

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

Page 17: SMART HOME SYSTEMS · 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

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

Page 18: SMART HOME SYSTEMS · 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

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.

Page 19: SMART HOME SYSTEMS · 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

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.

Page 20: SMART HOME SYSTEMS · 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

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.

Page 21: SMART HOME SYSTEMS · 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

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.

Page 22: SMART HOME SYSTEMS · 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

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.

Page 23: SMART HOME SYSTEMS · 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

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.

Page 24: SMART HOME SYSTEMS · 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

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.

Page 25: SMART HOME SYSTEMS · 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

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

Page 26: SMART HOME SYSTEMS · 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

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

Page 27: SMART HOME SYSTEMS · 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

Audio Codec Block Diagram

Page 28: SMART HOME SYSTEMS · 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

Automatic Gain Control (AGC) -Target Level -Attack Time -Decay Time -Noise Gate

Page 29: SMART HOME SYSTEMS · 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

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

Page 30: SMART HOME SYSTEMS · 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

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

Page 31: SMART HOME SYSTEMS · 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

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

Page 32: SMART HOME SYSTEMS · 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

110VAC to 12VDC Lead Acid Battery

Charger

Page 33: SMART HOME SYSTEMS · 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

Progress

0%10%20%30%40%50%60%70%80%90%

100%

Page 34: SMART HOME SYSTEMS · 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

Work Distribution

0%10%20%30%40%50%60%70%80%90%

DanielLuuVuJoel

Page 35: SMART HOME SYSTEMS · 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

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

Page 36: SMART HOME SYSTEMS · 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

Our Goal Budget

• Budget = $600 • Current spending = $176 • Spending room = $424 • Percent of budget used = 29.3%

Page 37: SMART HOME SYSTEMS · 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

Expected Work/Problems

• Limited IO pins • Audio/Video Streaming data rate • Web server security • Motion sensors sensitivity • Back-up Power

Page 38: SMART HOME SYSTEMS · 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

Questions