Critical Design Review

advertisement
Household Power
Measurement System
Group 2
Manuel Rodriguez
Frank Ladolcetta
Amir Shahnami
Alex Demos
Project Description
Meter that will measure the power
consumption of household appliances
 Send the information wirelessly to an LCD
display
 Display the approximate hourly and
monthly power consumption of the
appliance being monitored

Project Motivation
Keep track of energy usage in order to
use less energy and spend less money
 Prevent surprising power bills at the end
of the month
 Corroborate energy savings of “energy
efficient appliances”
 Make system user friendly

Project Overview





Build a circuit to measure the current and
voltage used by an appliance
Make program to calculate power
Program transceivers to communicate with
each other
Build circuit to display information on LCD
Make program to display information
Project Specifications






No more than 5% accuracy error
Wireless operation using Xbee wireless
protocol
Wireless transmission should be no less
than 30 feet
Ability to turn off appliance from head unit
Measure current up to 15 A
Measure voltage up to 120 V
Block Diagram of System
Wall Outlet
Relay
Current Measurement
Voltage Measurement
Microprocessor
Wireless transmission
Microprocessor
Display
Meter Overview
Ryobi Power Meter- printed with
permission from Jason Swanson of
Ryobi Tools
Requirements
Meter circuit should draw very little
power
 Meter circuit design should be safe
 Achieve accuracy goals

Power measuring methods
• Voltage measurement using a voltage
divider
• Current measurement using a .2 ohm
current sensing resistor
• Use an Avago technologies HCPL-7520
optoisolator to isolate and amplify the
signal
• Use a relay to turn the appliance on
and off
Power Meter diagram
Relay Circuit Design Used by permission from Bruce R Land, Cornell University
Voltage measurement
Voltage will be measured directly
from the house main wiring
 A voltage divider will bring down the
voltage to a level usable by the
microprocessor

Current measurement
Current sensing resistor will be
installed in the neutral side of the
outlet wiring
 A hall effect sensor was considered
but it is too expensive
 A current transformer was
considered but it is a less accurate
method and more expensive

Component specifications
5% tolerance, 1 watt power rated
1Mohm resistor
 .2 ohm, 3W rated current measuring
resistor
 12A, 240V relay
 Avago Technologies HCPL-7520
linear optoisolator

Limitations
Meter cannot measure appliances
that run on 240V
 Current to be measured can’t be
more than 15A

LCD DISPLAY
Proposed diagram of device
LCD display requirements
One row to list the information to identify what is
display on the screen.
 Three rows of data pertaining to three separate
sensor devices.
 Must have a traversable menu to view up to 1000
different sensors.
 Must display power consumption data in terms of
dollars spent.
 Simple character display method.
 LED backlight for nighttime use.
 Low power consumption. (< 3W typical)
 Low price. (<$50)
 Readily available.

LCD Specs & Technical Data
• 4 lines x 40 characters
• 2 - HD44780 equivalent
•
•
•
•
•
•
microcontrollers
190mm x 54mm x13.6mm
18 - 2.54mm pins (14
Logic, 3 Supply, 1 NC)
Requires a 5.0V Power
Supply
11 Built-in instructions
5V, 1.2mA typical for LCD
(.006W)
3.5V, 80mA typical for
Backlight (.28W)
NHD-0440WH-ATFH-JT
Reprinted with permission of Newhaven Display International
Limitations
1.
2.
3.
4.
5.
6.
With the LED on, it
drains 48 times more
energy then when it is
off.
Viewing angle from
above is only 25°.
Poor horizontal viewing
angle.
Small pin size.
Relatively slow rise and
fall times.
Many pin outs
Our Resolution
1.
2.
3.
4.
5.
6.
Include an LED on/off switch
to conserve battery power
Place device high on wall so
all users can view
information
Put device in a central
viewing location
Practice our soldering skills
Update data values every 60
seconds instead of
continuously.
No solution, opt for
microcontroller with more
pins
Push Buttons/ Switches




We require three tactile
(push-to-make) pushbuttons
on the front of device.
Two of these buttons will be
used for movement within the
LCD menu.
One pushbutton will
disconnect supplied power to
selected appliance.
We also require a Single
pole, single throw switch on
the side of the device to
control the LED backlight
Pushbutton Examples
Reprinted under creative commons 3.0 license
SPST Example
Reprinted with access from public domain
User - LCD Interfacing
•
•
•
•
•
•
LCD will be connected to pushbuttons via internal
microcontroller.
With microcontroller’s coding, a cursor will move
through the list of devices when up/down buttons are
pressed.
When the user continues pushing the up/down buttons
to view more than the three listed devices, new devices
will appear in their place
When the user hits then end of the list of transmitting
devices, the cursor will stop moving.
A user can terminate the supplied power to the cursor
selected device by pushing the power button.
Pressing a combination of buttons will allow the user to
enter a menu in order to set up the date and cost of
electric bills.
Instruction List
Instructions




To operate, the device has 2
separate internal microcontrollers
to display to the LCD.
A specific instruction must be
selected by the main
microcontroller and sent to the
eight data pins.
When the instruction is sent, the
device must be enabled on the
selected microcontroller (E1 or E2)
to have the device complete the
instruction.
If characters are to be displayed,
the RS pin must be set on and the
device will output the selected
character to the specified location
designated by the set address
command
Reprinted with permission of Newhaven Display International
Coding
•
•
•
•
The microcontroller uses C
programming language, and
the Newhaven Display
provides libraries for use
with their product.
The code will start off with an
initialization section for initial
power up of device.
Then the device will display
the data every minute from
the MC in a line by line
fashion to ensure all sensors
are updated.
Separate functions will be
called for cursor movement,
menu setup, and sensor
power down.
Coding example (Turning device on)
Int main(void)
{
P1 = 0x0c;
W = 0;
RS = 0;
E1 = 1;
//Top half of the display
delay(2);
E1 = 0;
E2 = 1;
//2nd half of the display
delay(2);
E2 = 0;
}
Block
Diagram
Schematic
Microprocessor Design
Microprocessors








One single type of microprocessor for both
applications
Both applications use ATMega168 with a
preloaded bootloader.
Programmed with a USB to serial adapter.
6 analog input pins
14 digital input/output pins
1.8 to 5.5 volt operating voltage
Programmed with Arduino software v. 0018
using C/C++
Each pin draws up to 0.22W (from 40mA),
VCC draws up to 0.275W (from 50mA)
Reprinted with permissions from Sparkfun
Programming
Main unit programming:
Initialize()
{
double kwhrs;
int month, day;
}

Sets up initial parameters
 Can be called further down the program to change values put in
initially.
Programming
Main unit programming:
update_lcd()
{
int out0, out1, out2…
int power, scroll_up, scroll_down;
}

Used to update information printed to the LCD screen.
 Handles scrolling of information displayed and ability to turn
off and on any given device
Programming
Sensing unit programming:
read_measures()
{
int voltage_in, current_in, power;
}
Takes in all values read in by the “sensing” components
 Manipulates the data to be transmitted as a single value

Programming
Sensing unit programming:
change_relay()
{
int relay_status;
}

Serves to open the relay to cut off all power to any given device
Proposed Main Unit
Schematic
• Receives power through
batteries and bucked
down to usable voltages.
• Pull down resistors to
prevent button inputs
from floating high.
• Schematic based on
Arduino Pro Mini.
Proposed Sensor
Schematic
• Receives power
through an AC to
5VDC converter
(not shown)
• Transistor used
to flip the relay as
it uses more
current than the
processor can
output.
• Based on the
Arduino Pro Mini
Wireless Communication
Wireless Telecommunications
There were four types of wireless technology that
were taken into consideration.
•Zigbee: Cheap, Good distance, Hard to learn
•Bluetooth: High data rate, Great delivery percentage, Hard
to learn
•WiFi: Great delivery percentage, Expensive
•XBee: Easy to learn, Cheap, Good distance
XBEE
Of the many possible options, we chose
XBee technology as our means of
wireless telecommunications.
XBee Chip
•
•
•
XBee OEM RF
802.15.4
The range was
good enough for
the group having
a max range of
100ft (30m)
24.38mm x
27.61mm
XBee Specs
•The XBee costs $19.00 per unit.
•250kbps might seem small for a commercial product but for a simple
project, like the power sensors and the central unit, it will be sufficient to
work properly.
•It is an RF transceiver. It runs at 2.4 GHz, which is what all the devices run at
that the group has examined.
•Voltage range from 2.8 to 3.4V.
•The current:
•when it is receiving data is 50mA,
•while it is transmitting information, the current is flowing at 45mA
•and while it is in power-down mode it runs below 10µA.
•Its sensitivity is at -92dBm.
•The chips operating temperature has a range between -40* and +85*C
XBee Adapter
•
•
•
$10/kit
Connects to
microcontroller
Cord connects to
computer to
program the chip
Programming of XBee
•
•
•
Using the AT command mode is the how
the XBee chip will be programmed.
AT commands deal with all things from
setting the sleep mode to resetting the chip.
The command below is a sample command
will display the low 32 bits of the address.
Block Diagram of XBee
How data is received
from one device and then
sent to another device:
Timeline, Budget and
Completion Summary
Timeline
Our timeline for Senior Design was based on bimonthly goals.
April 30th: Complete Research & Documentation
May 31st: Have good understanding of all of our
parts
June 17th: All parts tested
July 1st: Have all parts put together
July 15th: All parts tested and working, also
giving us two weeks to figure out any problems
and preparing ourselves ready for presentation
Approximate Budget
Required
Acquired
Estimated ($)
Spent ($)
LCD
1
1
24
35
Arduino
0
3
100
100
Relay
3
5
5
20
Arduino Programmer
2
2
0
40
AC/DC converter
3
4
15
20
Current Sensing Resistor
3
5
6
9
Optocoupler
6
5
40
30
PIC microprocessor
3
5
20
30
Xbee transceiver
5
2
300
120
Xbee Cords
1
0
15
0
Pushbuttons
3
0
6
0
Switch
1
0
5
0
Project Box
4
0
15
0
RLC
?
0
30
0
TOTAL
35
32
$581
$404
Completion Summary
Completion Percentage
Design
Prototyping / Testing
Software
Parts Acquisition
0
10
20
30
40
50
60
70
80
90
100
Questions?
Download