Sep
23rd

Analysis

Posted by Mike Costa

final blog in a series of 5

There is still quite a bit of detective work to be done. A cursory look at our graphs shows we are using on average 40kWatts (the equivalent of 400, 100 Watt, light bulbs) during nights/weekends and about 120kWatts peak during normal business hours.

From the below graph we can see that during business hours something is causing large spikes. Since this only happens during typical work hours we could probably attribute this behavior to the power hungry tools in our awesome Models Shop, or maybe the elevator. The spikes are probably due to the inductive load introduced when a motor such as a saw or compressor is turned on.

blog5_image1

The chart below is a display of power use over a ten day period. You can see the reduced power consumption over the weekends and holidays. I would gather that since there is a small amount of power consumption on Monday May 25th (Memorial Day) some Continuumites are workaholics!
blog5_image2

What’s Next

Possible improvements
Migrate data server applications to a proper web server
Add multi client capabilities so we can host data from other users.
Tie in real time power cost metrics
Carbon footprint tie in
Tie in weather parameters such as outside temperature and humidity.

Contribute
If you find this design intriguing and would like to contribute in some way, or if you have any questions feel free to email me at mcosta@dcontinuum.com


Sep
11th

Software

Posted by Mike Costa

#4 of 5 part series

The client application runs on the iMx21 meter reader. It contains 2 endless threads SocketThread and LCD Thread.

LCDThread – each iteration of the loop it performs a frame grab using the EZFB API. It converts the image to grayscale then calculates the average pixel intensity for the square we care about. The pixel intensity is low when the box on the Elster LCD is “on” and goes up when the box is cleared. This thread also draws a square onto the LCD screen so the person installing the meter reader can easily align the video camera.

Images of the meter reader output LCD.
The Kh box is visible, note the O/F text output. 1 means the box has been detected.
meter04_01

The Hr box is not visible, note the O/F text output. 0 means the box has not been detected.
meter04_02

The second thread is the SocketThread. This thread waits for a new measurement from the LCDThread. When a new value is ready it just sends the power value over Socket to the web server.

Testing
I tested the accuracy of the box blink rate algorithm with a test LCD display. Using a Microchip Explorer16 Dev board and a PIC24H processor, I rigged up a simple blinking box on the explorer16 LCD. With this test setup I set the blink rate to .1Hz, 1Hz, and 10Hz to verify my Emeter application.

Calculations
This application converts Blink Time to power in kilo-watts. The formula for this calculation is:

Power (kW) = (.9kWh * 3600s * 200) / BlinkTime
The .9kW and 200 are values taken from the meter.

Data & Web Server
The web server is running Ubuntu Hardy Heron, ProFTPD and Apache 2.0

EMeterServer Application
The EMeterServer has only one simple socket thread. This thread just sits and waits for a new Power value from the client. If there is a new value, it writes it to a MySQL database table.

Web Server
The data server hosts the data via simple RSS feed, and Perl scripts. Any internet ready device or web page could access the scripts or RSS feeds to get real time power use.

PowerRss.php – Returns an XML RSS feed that contains the latest power use value.

graphUpdateLong.pl- Returns a link to an image of a graph of the power use over time.

meterUpdate.pl – Returns a link to an image indicating the power use as a simple needle meter.

GoogleJSON2.pl -Returns a JSON object table containing historical power use. (used for Google Visualizations API)

Insert a link to these files in your web browser and you will see the results

http://209.48.56.105/power/PowerRss.php

http://209.48.56.105/power/graphUpdateLong.pl

http://209.48.56.105/power/meterUpdate.pl

http://209.48.56.105/power/GoogleJSON2.pl

  • Subscribe

  • Categories