Giter Site home page Giter Site logo

lab11 / powerblade Goto Github PK

View Code? Open in Web Editor NEW
53.0 22.0 9.0 53.63 MB

1 in² AC power meter

C 4.34% C++ 13.31% Makefile 5.71% Shell 0.60% CMake 6.69% Python 43.52% XSLT 0.02% JavaScript 6.86% Java 0.72% Batchfile 1.10% SMT 10.78% Gnuplot 0.25% MATLAB 0.04% CSS 0.10% HTML 0.15% Objective-C 5.26% SQLPL 0.54%
power-meter hardware ble msp430 university-project

powerblade's Introduction

PowerBlade

PowerBlade is a miniature plug load power meter - it is small enough to fit between the plug and the outlet while performing its metering operation. Achieving this form factor requires targeting every aspect of traditional power meters, including contact method, power supply, voltage and current sensing, and data communication (Bluetooth Low Energy, in this case).

There have been multiple iterations of PowerBlade, starting with a backscatter- based variant and eventually transitioning to the BLE version. Along the way there have been several iterations of the contact method, starting with flexible PCB layers to touch the prongs and ending with spring-loaded pins which make contact more reliably and repeatably.

Future work on this system will include improvements to the accuracy of the unit (PowerBlade readings currently have 5% to 10% error but we believe this can be significantly lower), as well as safety.

How Do I View My PowerBlade's Data?

  • Option 1: Install Summon [Android, iOS].

  • Option 2: Run a node.js script to view packets on your computer.

    cd data_collection/advertisements/
    npm install
    sudo node powerblade_adv.js

    This requires that you have support for running as a BLE master on your machine. To get setup, see the instructions below.

BLE and node.js Setup

  1. Install Node.js for your platform. Node.js provides a JavaScript runtime to execute the data collection script in.

  2. Install BLE dependencies for your platform.

powerblade's People

Contributors

adkinsjd avatar bradjc avatar brghena avatar nealjack avatar nklugman avatar rohit507 avatar sdebruin avatar sdebruinss avatar tzachari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powerblade's Issues

Changes to support 220 volts

According to Sam DeBruin:

One of my recent goals has been to determine why PowerBlade doesn’t work on 220v, even though it definitely should. I recently ran a test on the 220v source, and although PowerBlade boots and sends packets, the values for voltage and power are wrong. I determined that the voltage AC wave is actually saturating the amplifiers at 220v, which leads to the error.

I also found the cause. If you do the amplifier math (I use KCL) the voltage measurement circuit is actually wrong. The GND symbol at (-2.3 -1.6) on page 5 should actually be VCC. I can take a picture of my math if you want, but its pretty simple to do the calculation yourself. The GND symbol adds a +Vcc/2 term to the output equation, which leads to saturation at high voltages.

The message: in future revisions change that GND to VCC. i.e. RI2 goes from the common terminal to VCC rather than GND. I would also recommend turning down the gain slightly, although that is less important.

We should fix this before producing any additional PowerBlades.

How do you get PowerBlades

@Jovonni asked:

How are you guys even able to work on this on your own? Can you purchase one?

Thanks for the interest. PowerBlade has been a very fun system to work with. We're graduate students in Lab11 and have been lucky to have the resources to pursue projects like these.

Unfortunately, we are not currently selling PowerBlades. However, all the hardware files are open source and available in this github repo. Theoretically, you could fabricate and assemble some yourself (or alternatively, take part of the design and include it in some other work inspired by PowerBlade). The PCB was designed in Eagle.

Hardware files (we are currently using rev 3_5): https://github.com/lab11/powerblade/tree/master/eagle/powerblade

PowerBlade reports bad values

After running continuously for several days, @bradjc has noticed that PowerBlade occasionally gives bad data. The data looks fine up until a certain point, then is totally invalid. On next packet it works again. See attached for dump of several incidents.

This seems like it could be a UART transmission issue where bad data is accepted. We might see if a checksum/crc fixes the problem.

bad_powerblade_data.txt

PowerBlade isn't reversible

Need to come up with a solution to allow PowerBlade reversibility.

The problem, is that a load at 10 W one direction measures identically to a load at 0 W the other direction. Put another way, we don't know which direction we are plugged in. However, it is easy to tell the difference with higher wattage loads (~20 watts and up). For example, a 100 watt load plugged in backwards will read -100 W.

One solution that might work for now, is to keep track in FRAM of which direction you are plugged in. If you ever register multiple readings less than -20 watts (or some number like that) make the decision that you are backwards and reverse the real power logic. This will still allow us to detect a 0 W load, as long as the load has previously drawn greater than 20 W.

Num Received Number Confusing?

With multiple powerblades, sometimes it prints 8, sometimes 0, which I believe are both incorrect (assuming it is a count of the repeated advertisements that powerblade sends). After a brief look, it seems like iden_count is a global value that will get incremented by multiple powerblades, leading to what I'm seeing.

Can't meter ACme++

Gives some very strange readings when an ACme++ is plugged into the PowerBlade.

Get a hold on the LEDs on BBB

Something like this (from a root shell on boot or something)

echo timer > /sys/devices/ocp.3/gpio-leds.8/leds/beaglebone:green:usr0/trigger
echo 10000 > /sys/devices/ocp.3/gpio-leds.8/leds/beaglebone:green:usr0/delay_off
echo 750 > /sys/devices/ocp.3/gpio-leds.8/leds/beaglebone:green:usr0/delay_on
echo none > /sys/devices/ocp.3/gpio-leds.8/leds/beaglebone:green:usr1/trigger
echo none > /sys/devices/ocp.3/gpio-leds.8/leds/beaglebone:green:usr2/trigger
echo none > /sys/devices/ocp.3/gpio-leds.8/leds/beaglebone:green:usr3/trigger

This will turn off 3 LEDs and leave one as a heartbeat that blinks occasionally. Not sure if that won't still be annoying, but it's much better than the default.

Now only if we could do something about the power LED.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.