Post on 17-Jan-2016
Household Power Household Power Measurement SystemMeasurement System
Group 2
Manuel RodriguezFrank LadolcettaAmir ShahnamiAlex Demos
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
ProjectProject DescriptionDescription
ProjectProject MotivationMotivation
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 OverviewProject 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 SpecificationsProject 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 SystemBlock Diagram of System
Voltage Measurement
Current MeasurementRelay
Microprocessor
Wireless transmission
Microprocessor
Display
Wall Outlet
Meter Overview
Ryobi Power Meter- printed with permission from Jason Swanson of Ryobi Tools
RequirementsRequirements
Meter circuit should draw very little power
Meter circuit design should be safeAchieve accuracy goals
Power measuring methodsPower 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 diagramPower Meter diagram
Relay Circuit Design Used by permission from Bruce R Land, Cornell University
Voltage measurementVoltage 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 measurementCurrent 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 specificationsComponent specifications
5% tolerance, 1 watt power rated 1Mohm resistor
.2 ohm, 3W rated current measuring resistor
12A, 240V relayAvago Technologies HCPL-7520
linear optoisolator
LimitationsLimitations
Meter cannot measure appliances that run on 240V
Current to be measured can’t be more than 15A
LCD DISPLAYLCD DISPLAY
Proposed diagram of device
LCD display requirementsLCD 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 DataLCD 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)
Reprinted with permission of Newhaven Display International
NHD-0440WH-ATFH-JT
Limitations
1. With the LED on, it drains 48 times more energy then when it is off.
2. Viewing angle from above is only 25°.
3. Poor horizontal viewing angle.
4. Small pin size. 5. Relatively slow rise
and fall times.6. Many pin outs
1. Include an LED on/off switch to conserve battery power
2. Place device high on wall so all users can view information
3. Put device in a central viewing location
4. Practice our soldering skills5. Update data values every
60 seconds instead of continuously.
6. No solution, opt for microcontroller with more pins
Our Resolution
Push Buttons/ SwitchesPush 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
Reprinted under creative commons 3.0 license
Pushbutton Examples
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.
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
Instruction List
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.
Int main(void){P1 = 0x0c;W = 0;RS = 0;E1 = 1; //Top half of the displaydelay(2);E1 = 0;E2 = 1; //2nd half of the displaydelay(2);E2 = 0;}
Coding example (Turning device on)
Block Diagram
Schematic
Microprocessor DesignMicroprocessor 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 CommunicationWireless Communication
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
Wireless Telecommunications
Of the many possible options, we chose XBee technology as our means of wireless telecommunications.
XBEE
• 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 Chip
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
• 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.
Programming of XBee
How data is received from one device and then sent to another device:
Block Diagram of XBee
Timeline, Budget and Timeline, Budget and Completion SummaryCompletion Summary
TimelineOur timeline for Senior Design was based on bi-monthly goals.
April 30th: Complete Research & DocumentationMay 31st: Have good understanding of all of our partsJune 17th: All parts testedJuly 1st: Have all parts put togetherJuly 15th: All parts tested and working, also giving us two weeks to figure out any problems and preparing ourselves ready for presentation
Approximate BudgetApproximate BudgetRequired 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 SummaryCompletion Summary
Questions?Questions?