SHMS: SMART HOME MANAGEMENT SYSTEM · SHMS: SMART HOME MANAGEMENT SYSTEM Group 21, Senior Design,...
Transcript of SHMS: SMART HOME MANAGEMENT SYSTEM · SHMS: SMART HOME MANAGEMENT SYSTEM Group 21, Senior Design,...
SHMS: SMART HOME MANAGEMENT SYSTEM
Group 21, Senior Design, Feb 14, 2014
Sponsored by Duke Energy Senior Advisor: Dr. Samuel Richie Team Members: Danny Aybar, Oswaldin Azor, Loc Nguyen, Levener Samedi
Problem • Power bills only give consumers a look at
• Monthly power usage • Power usage for the entire house
• Standby Power • Entertainment systems consume power when turned off, including
gaming systems, computers, and almost every other modern device
• Research in leading G8 countries shows that Standby power consumes 8 to 12 percent of a home power bill* • France – 7% • US – 10% • Japan – 12% *The Economist, 2006
• For the average person • 45+ hours at work (8 hour work day, 1 hour break time) • 45+ hours of sleep (7 hours per night) • 90+ hours of the 168 hours in a week
• 72.5 Billion kWh used in houses in the US a year • Roughly 7 billion kWh are wasted
• At national average of .12 cent per Kwh • 840 Million dollars wasted by consumers each year
Smart Home Management System • Equipped with motion sensors to detect
motion to turn on/off lights • Measures the power being consumed in
real time by an appliance plugged into an outlet
• Allows manual or automatic shutdown of an outlet by Android powered devices and a web server
• Records and stores power usage history on a database
• Allows consumers to better change power consumption habits by giving a visual incentive
• Includes solar panel to charge the battery
Specifications & Requirements Req. ID Requirement
01 The microcontroller shall draw no more than 1 mA while in sleep mode
02 The temperature sensor shall have an accuracy of +/- 5 degrees F
03 The infrared sensors shall cover a range of 30 ft. with a field of vision covering at least 90 degrees
04 The Bluetooth connectivity shall have a range of at least 10 meters
05 The data storage shall account for at least 24 hours worth of power and temperature data
06 The solar panel shall provide at least 20 Wh of power under 1 kW/hr solar radiation
07 The battery shall be able to be fully recharged from a discharged state in 4 hours timeframe
Hardware Design Solar Panel Charge
Controller Battery Power Inverter
Outlets Lights Fan
Microcontroller
Motion Sensors
Bluetooth Module
Android App
Router/ Access Point Website
Microcontroller – EKS-LM3S8962 § TI Stellaris 32-bit MCU § ARM Cortex-M3 § 50-MHz Operating Frequency § 256 KB single-cycle flash § 64 KB single-cycle SRAM § 10-bit A/D Converter § 10/100 Ethernet MAC/PHY § UART, SPI, I2C
Microcontroller Comparisons Texas Instruments
EKS-LM3S8962 Texas Instruments
MSP430 Atmel
XMEGA-D4 Operating Voltage 3.3 V 1.6 – 3.6 V 1.6 - 3.6 V
Programmable GPIO’s 42 16 34
Data Width 32-Bit 16-Bit 16-Bit
A/D Converter Resolution
10-Bit 500ksps
10-Bit 200ksps
12-Bit 200ksps
Flash Memory 256 KB 16 KB 128 KB
Bluetooth Module – RN-42 § Bluetooth v2.0+EDR § Operating Voltage: 3.3V - 6V § Power Consumption:
• 26 µA in sleep mode • 3 mA connected • 30 mA transmitting
§ Embedded Bluetooth Stack § On-board chip antenna § UART interface
Hall-Effect Current Sensor – ACS714 § Bidirectional input current
• From -5 A to +5 A
§ Low-resistance current path • About 1.2 mΩ
§ 5 V operation § Linear output voltage
• 2.5 V output @ 0 A • Sensitivity: 185 mV/A
§ High Accuracy § ±1.5 % error @ ambient
temperature
Obtaining RMS Current from Hall Sensor § Given:
• Vout is output voltage of Hall sensor • Sensitivity = 0.185 V/A • Vcc = Vref = 5 V • 10-bit ADC provides 1024 counts
§ Then: • 𝑐𝑜𝑢𝑛𝑡= 1024/𝑉𝑐𝑐 𝑥 𝑉𝑖𝑛 • 𝑉𝑖𝑛= 𝑉𝑐𝑐/2 +(0.185 𝑥 𝐼) • 𝑐𝑜𝑢𝑛𝑡= 1024/𝑉𝑐𝑐 𝑥 (𝑉𝑐𝑐/2 +(0.185 𝑥 𝐼))
§ Therefore: • 𝐼=0.0264 𝑥 (𝑐𝑜𝑢𝑛𝑡 −512)
Selecting a Relay Type • Types of relays considered:
• Electromechanical Relay (EMR) • Solid-State Relay (SSR)
• Chose SSR instead of EMR • Lower power consumption • No magnetic interference • Higher isolation voltage • Smaller form factor • No moving parts (quiet)
Electromechanical Relay
Solid-State Relay
Solid State Relay – Sharp S108T02 § 8 A max output current § 125 VAC output voltage § 3.0 kV input/output isolation § Zero-crossover Switching § Low profile
§ Single Inline Package (SIP)
Relay Comparisons Sharp
S108T02 Panasonic AQH3213
Crydom SDV2415
Supply Voltage 5 Vdc 5 Vdc 3.5-10 Vdc
Max. Load Current 8 A 1.2 A 1.5 A
Operating Voltage Up to 125 VAC Up to 200 VAC Up to 280 VAC
Isolation Voltage
3,000 Vrms 5,000 Vrms 3,750 Vrms
Package Type SIP DIP DIP
Passive IR Motion Sensor – SE-10 ITEM SPEC. UNIT COND. Sensor Type Dual Elmt.
Housing TO5
Element Size 2X1 mm
Spacing 1 mm
Responsivity Min. Typ.
3.2 4.0
xv/w 7…14mm, 1Hz, 100°C
Match Max. <10 % 7…14mm, 1Hz, 100°C
Noise Typ. Max.
20 50
µVp-p V
25°C, 0.4…10Hz
Effect Voltage Min. Max.
0.2 1.5
Re=47XO
Window Material Silicon, coat
Spectral Range Transmission Blocking
T>30 avg. T<0.1
% 7…14 mm <5 mm
Operating Voltage 12 V
Operating Temp. -10~40 °C
Storage Temp. -40~80 °C
Werker Deep Cycle Lead Acid Battery
Weight 28 lbs
Voltage 12V
Peak Voltage 16.8V
Max Charge Current
2Amps
Max Discharge Current
5Amps
Cut off voltage 12V
§ Light weight and higher energy density
§ Longer storage life than NiMH battery
Renogy 50W Solar Panel
21.38in 30.34in 2.97in
Weight 14.5 lbs
Rated Power 30W
Rated Voltage
17.4V
Rated Current
1.72Amps
Open Circuit Voltage
22V
Short Circuit Current
1.88 Amps
Charge Controller
Dimensions
Weight 2 lbs
Voltage Protection Rated :
12V / 24V
Rated Current 15 Amps
Efficiency 95%-97%
• Over-charging protection • Reverse discharge protection • Reverse polarity connection protection
Software Design
Transceiver System Web Application Client Side
Android App Database Web Application Server Side
Android vs iOS
Android • It is the most commonly used
operating system for mobile devices
• If one has experience in Java programming, he/she can create a fully functioning Android application
• Large portion of the public use Android as their primary mobile operating system, roughly about 80% of the market
iOS • iOS is a closed-source
operating system that is the second in term of pure users volume in the market, behind Android
• It is typically developed in Objective-C
• iOS environment is attractive due to the large amount of popularity amongst users
Android App – Functional Flowchart
Android App – Class Diagram
Android App GUI
Website Features
• Gives the homeowner the ability to turn on/off power outlets and lights
• Gives the homeowner the ability to monitor indoor home temperature
• Gives the homeowner the ability to track power usage throughout the home
• Gives the homeowner access to the system from a remote location
Website GUI
Website – Functional Flowchart
Website – Class Diagram
• System testing goes for both hardware and software • It is a process that we have to go through to make sure
that the project works as it should • For that process we have to not only test the design, we
also have to test the behavior, and event. • We want to make sure that the system meets all the
expectations • The overall goal of system testing is to address any
inconsistencies between the integration of the hardware and software units
System Test
Project Prototype & Testing
Light turned on by the microcontroller
Temperature Sensor • Low power consumption • This digital temperature
sensor reading in degrees Celsius.
• The internal temperature sensor of the microcontroller will be used to display the room temperature
• The user can monitor the house temperature and make adjustments as needed
Two Motion Sensors • One motion sensor will
be placed in the main doorway
• Controlled by microprocessor in connection with the hardware interface module
• Second motion sensor will be connected to the microprocessor to monitor the movements inside the house
Outlets, Lights, and Fan How would they be tested? • Each room will have an outlet. When these outlets are not
in use, the microcontroller will put them on sleep mode • The main microcontroller will send a signal to the relay to
turn it on or off • Same scenario will happen for the fan
Fan Operation • However, the fan will be operated a little bit differently • The system will be programmed with a specific code to
run to the fan when necessary depending on the room temperature
• If the room temperature has changed from either high to low or low to high, once the temperature level drops or increases past the threshold, the microprocessor would decide to either turn the fan on or off
PCB Manufacturer: OSH Park • Community PCB Order • 2 layer boards = $5 per square inch
• Includes 3 copies • Ship in under 2 weeks from ordering • Includes shipping costs
• Excellent Reviews
Project Difficulties/Concerns • Accurately measuring power factor for inductive/capacitive loads
• Becoming familiar with the TI Stellaris MCU architecture
• Implementing the embedded web server
Part Cost per unit (USD) Quantity Total Cost
Solar Panel (100W) 199.99 2 399.98 Lead-acid Battery 119.99 2 239.98 Charge Controller 69.99 1 69.99 Power Inverter 39.99 1 39.99 LED Light Bulb 12.99 4 51.96 Fan 14.99 2 29.98 Temperature Sensor 2.49 1 2.49 Motion Sensor 10.99 4 43.96 RF Transmitter/Receiver 4.99 5 24.95 Bluetooth Module 29.99 1 29.99 Wi-Fi Module 49.99 1 49.99 Outlet 1.99 4 7.96 Relay 3.99 10 39.90 Capacitor 0.10 50 5.00 Resistor 0.05 50 2.50 LED 0.15 20 3.00 Operational Amplifier 0.50 10 5.00 Voltage Regulator 1.99 5 9.95 Microcontroller 0.99 5 4.95 Development Board 29.99 1 29.99 Printed Circuit Board 99.99 3 299.97 Hard Disk Drive 59.99 1 59.99 Wireless Router 49.99 1 49.99 TOTAL $1,501.46
Budget to Date Part Cost/Unit Quantity Total
Solid State Relay S108T02
4.46 10 44.60
Bluetooth Module RN-42
39.95 1 39.95
Voltage Reg. 5V
1.25 3 3.75
Voltage Reg. 3.3V 1.95 3 5.85
PIR Motion Sensor 9.95 2 19.90
Hall-Effect Sensor 9.95 4 39.80
TI Stellaris MCU EKS-LM3S8962
83.44 1 83.44
Light bulb Socket 5.99 1 5.99
Power Cord 3.29 6 19.74
Current Total: $ 263.02
Sponsorship:
$ 1,500.00
Current Progress
0 20 40 60 80 100
Overall
Testing
Prototyping
Part Acquisition
Research
Acknowledgements • We would like to thank all the people that had a part in
guiding and sponsoring us: • Dr. Samuel Richie • Duke Energy