Close
0%
0%

Power Monitor

Non-intrusive feedback loop for electrical systems.

Similar projects worth following
I designed these boards based on a schematic documented by Christopher McNally (copy can be found on my github page).

This board monitors the temperature and humidity of a room with the DHT22, and uses the current transformers to monitor amperage going through the main lines.

Each datapoint for the current readings in the Xively screen shot is the Peak RMS for each reading.

I have been using this board at home to monitor the electrical consumption in the house, but the board also can sense ground faults, and be used to detect soil moisture levels.

See PDF on github page.

1. What the system will do?

The primary function of this system is to monitor power consumption in a home, business, or appliance/equipment. The device works on anything that uses AC power, and can monitor certain aspects of the function of a device or many devices simultaneously. This system, with the proper setup, is also capable of detecting ground faults and soil moisture levels.

When reading the power consumption of many devices, such as being hooked to the incoming mains of a home, the system should be able to interpret when an 'event' has occurred and be able to interpret the nature of the event.

2. Who are the users of the software?

This devices is intended to be used by business owners/operators, those in the agricultural industries, home owners, and marine applications. Essentially, this device is intended for use by anyone using AC power that either needs a better feedback loop than the 30 days that is provided by power companies through the billing cycle, or anyone that needs near real-time feedback of the power-state of a machine or multiple machines.

3. What are the business rules?

Hardware:

System Design Considerations:

Right now the only hard requirement is that there is a LAN network present. Each node in this system should be able to function independently, or as a part of a larger system. For example, if an Internet connection is present then the power monitor is capable of pushing data to xively.com allowing the user to view their data through that service, and if so desired a custom application could be built that pulls the data from the xively service, but if an Internet connection is not available then it is possible to push data straight to a user defined database, a pre-built system such as emoncms ( http://emoncms.org/ ), or a solution such as phant.io ( http://phant.io/ ).

That said, there should be a system defined configuration page that allows for a user defined formatting of the data string and a system setup selection with the previously mentioned options.

The only other option that I am aware of that parallels my project is the openEnergyMonitor ( http://openenergymonitor.org/emon/ ), however, there are a number of proprietary and open source home automation projects. The primary difference between my system and other systems is the 'base station', or lack of one. As stated previously this system is intended to work at a minimum with out any external appliances, only requiring an Internet connection. The proposed consumer system however would be a wireless b/n/g router with Ethernet hub and computer preferably built into the same box, this is intended to be used as the base station to communicate with all sensors (This is not a system requirement though, any home with a computer and a LAN setup should be able to install the software and build the system). This would allow anyone using the project to essentially be able to implement a 'plug and play' setup.

Another primary design consideration is to keep the system 'hackable' and open source. Design specifications for the computer/router are as follows:

- Phant.io (currently using MySQL, phant needs to be tested)

- The unit is to be treated as a headless appliance with a web interface

- Programmed in python, interface uses flask and flask-socket.io

- Router using dd-wrt or openWRT (havn't used yet)

- All data manipulations are done on the computer, sensors only report data

- The computer/router is an appliance that could be used as if a product in and of itself without external sensors

- Sensors are 'modules' allowing easy installation and incorporation for system expansion, as well as intuitive implemented use of custom user defined sensors


Sensor Design Considerations:

Power Monitor:

- Capture Temperature

- Capture Humidity

- Capture RMS Amperage

- Capture RMS Voltage

- Capture Instantaneous Amperage

- Capture Instantaneous Voltage

- Remotely Programmable

- Selection of Output String Formatting

- Selection of Output String Destination

Other board features:...

Read more »

  • 1 × DHT22 Temperature and Humidity Sensor
  • 1 × LM358N Amplifier and Linear ICs / Operational Amplifiers
  • 2 × 3000:1 Current Transformer or 2000:1 Current Transformer
  • 1 × Arduino

  • Progress

    jlbrian704/04/2019 at 23:40 0 comments

    I find it exciting that there are a number of commercially available products that address the same issue as this project, and there are single chips that address the electrical side of this project, but people still find it interesting.

    I still find it interesting as well.  While the chips that make this projet simpler are fantastic, I continue to find something lacking with the companies that address the processing issue. 

    I have run into the same issues I have had with this project in a number of other projects, and I am working towards a solution, but with the development of other software and hardware projects this has only just become within grasp (at least as far as I can tell).  

    Hopefully there is an update in the not too distant future.

  • Industrial Function Test

    jlbrian701/19/2016 at 20:12 0 comments

    Update shortly...

  • New Board to try.

    jlbrian705/21/2015 at 01:17 0 comments

  • Hadoop

    jlbrian703/21/2015 at 20:57 0 comments

    I spent a good part of the afternoon watching videos from this udacity course ( https://www.udacity.com/course/ud617 ). From the examples that they showed for using hadoop for sorting through logs I think that this might be a good tool to sort through my apache logs, and my xbmc/kodi logs and provide updates, as well as the inputs from various devices. There is going to be some learning curve, it looks like I will have to use hadoop, mapreduce, and I am not sure which, hive or impalla or both, and sqoop.

    If I get it to work I am hoping that I can use old computers as we generate them to break the throwaway cycle.

  • Current Rate

    jlbrian703/19/2015 at 19:47 0 comments

    At the current rate I am posting data from one input at the rate of every 2-3s, and it looks like this will equate to ~3.5GB/yr.

  • A little more to show for the effort.

    jlbrian703/15/2015 at 16:32 0 comments

    (http://blog.trifork.com/2014/07/29/creating-charts-with-c3-js/)

    (http://mbostock.github.io/d3/talk/20111018/tree.html)

    The data is static right now, but hopefully I will have it loading dynamically soon. I am going with a different node concept than what emoncms uses. Here, all nodes are virtual devices that provide an output based on processed information from a real device, and after creation are treated as a real device.

    Other than handling inputs this is all still 'smoke and mirrors' after this gets further along I will create it's own project page.

  • Input

    jlbrian703/13/2015 at 02:39 0 comments

    It doesn't look like much, but this involved setting up a new router (remember - Backup early and often), and since I was at it, I set up asterisk again (I had two old computers bite the dust over the summer). The instructions on this project page still work http://hackaday.io/project/1486-freepbx-google-voice, with the addition of a few notes.

    I had run into a problem with the electric imp where I could post data to my server over the lan from any computer in the house, but the electric imp could not. I had this problem when I had first set up phant, and I had fixed it, but I don't remember how. This is what prompted setting up asterisk again. To get around the problem I set apache up on the new computer with http://freedns.afraid.org just as I had done for the pbx and forwarded the traffic to my flask server.

    If anyone knows the solution to use the electric imp on the lan please post it. THANKS!

    So, a full day for two lines on a web page and the beginning of finding out how many data points I can hold on my computer.

  • UI/Dataprocessing

    jlbrian703/08/2015 at 16:21 0 comments

    I am a little less than half complete with porting emoncms ( http://emoncms.org )to python. This was an exercise in just seeing how the cms worked, changing somethings that I didn't like (I particularly dislike php) and extending the capabilities. I also wanted to be able to rapidly test and add data processing filters. I think that I am a day or two from logging data with the cms, and a week from applying filters (in an ideal world). The primary usage is that it will capture any data sent to it so long as a unique identifier is provided (this can be anything so long as it is unique to the user write key), once the system has begun capturing data a node id is mapped to the data stream, and then data processing can be done on a node. While the data processing that comes with emoncms is mostly power related, I wanted something more universal some ideas are: kalman filter, greatest integer, and gradient descent, and some prediction processing. The processing functions are to be modular so that they can be programmed and dropped into the system and run.

    I am pulling various rss feeds into the system, because it saves me from clicking all around the internets, and also hopefully at some point I will find the time to play with NLTK.

    This is a port of bleextop ( https://github.com/crysfel/Bleextop ) to python for administration (The port was successful and complete, but extending it has met with disastrous results. There is a learning curve with extjs.)

    And while there isn't much to see, this is the look of the py-emoncms.

    (at the bottom of every page it does say "Powered by openenergymonitor.org | v<"?php echo $emoncms_version; ?">" and is built from v8.3.5 (Beta))

    In the end each bit of functionality in the main program should be modular as well, so that features can be add or removed as desired for space considerations and usage needs.

    Eventually I would like to add financial capabilities with the yahoo finance api ( https://pypi.python.org/pypi/yahoo-finance/1.1.4 ) and Icarra ( http://www.icarra.com ).

    The FreePBX was redirecting to my server, but I will eventually port it as well.

    As is usual for me, I have set my goals far beyond what my capabilities and time allow for, but it should keep me busy for a while.


  • Data

    jlbrian702/06/2015 at 15:55 0 comments

    I have been going through a number of sources covering topics from Bayesian statistics, genetic algorithms, machine learning, binomial regression, Bayesian binomial regression, gradient descent, and on and on and on. Right now I am thinking it is going to take me years to wade through the muddy waters of machine learning, understand each branch of mathematics, reread the material, apply it, and I would probably have better luck getting this thing to listen to enlgish and speak in french than I would interpreting my data.

    However, I have had a book sitting on my shelf for a couple of years 'Computation: Finite and Infinite Machines' by Marvin L. Minsky. After finally picking up the book and reading the first two chapters I began to understand the first part of the problem I am having. I completely over looked the 'machine' part of machine learning, and the reality of this device. I have been looking at this circuit as some abstract of an idea, where in reality it is a finite machine.

    Just as a mechanical adding machine has a finite number of parts and a finite number of outputs based on inputs, so too is the nature of this device.

    So from section 2.2 'For a given machine M at a given time t, we can imagine an infinite variety of possible histories. The one that has actually occurred will determine the machine's response to the next stimulus. Now it may be that some events from the very remote past may contribute to determining this response function. If this is the case, one can say that the machine shows some "trace", or "memory", of those remote events. If every ancient event left a separate, independent trace, the machine would need to have infinite capacity, in some sense, to store them.'

    I had gotten lost in the infinity because I smoothly skipped over the fundamentals of 'what is a machine'. Now since infinite storage capacity is not practical, nor necessarily useful I hope that I can break the problem down and focus on the finite number of histories that need to be considered. And, hopefully the rest of the book continues to be as helpful as the beginning (and hopefully I am not just fooling myself into thinking that I am understanding).

  • ESP8266

    jlbrian701/03/2015 at 23:50 0 comments

    Over the next couple of months I wil try to replace the electric imp with an esp8266 and make some other revisions.

View all 34 project logs

Enjoy this project?

Share

Discussions

Gabriel wrote 04/16/2016 at 12:15 point

Hi, how did you get into xively? 

Ive been trying to negotiate a deal with them for months for my company.... im at the stage where im to small to be taken seriously and too big to continue with free services.

  Are you sure? yes | no

jlbrian7 wrote 04/16/2016 at 12:28 point

I had used a free account service, but as the service got progressively less useful I began to use sparkfun's phant.io, and I have partially rewritten emoncms in python and that is what I am using now.

  Are you sure? yes | no

Gabriel wrote 04/16/2016 at 12:47 point

Phant does not offer real time graphs like thingspeak as i understand.... right?

  Are you sure? yes | no

jlbrian7 wrote 04/16/2016 at 12:32 point

I believe that adafruit had also talked about building something similar to phant.io, but I am not sure if anything came of that.  

Pubnub may provide what you are looking for though.

https://pubnub.com/

  Are you sure? yes | no

Gabriel wrote 04/16/2016 at 12:46 point

Hey! Pubnub seems great.... calling them monday morning, and setting up a demo account. (I like to call people, call me oldschool)

  Are you sure? yes | no

Gabriel wrote 04/22/2016 at 02:30 point

Hey, I contacted pubnub, had a nice call with them... im migrating all my stuff to them!

I gotta change all my stuff to be "RESTful" but seems easy enough.

Thanks for the heads up!

  Are you sure? yes | no

jlbrian7 wrote 04/16/2016 at 15:25 point

No, phant is just data storage.  If you want realtime graphing with it, then I think you would have to work it out on your own.

  Are you sure? yes | no

jlbrian7 wrote 04/16/2016 at 15:25 point

At least that is what it was the last time I looked.

  Are you sure? yes | no

J Groff wrote 07/23/2014 at 20:56 point
I wonder if you can pot these in urethane such that the sensors are not obscured, for ruggedization.

  Are you sure? yes | no

jlbrian7 wrote 07/23/2014 at 23:31 point
Conforma coat ...

http://www.frys.com/product/7649767?source=google&gclid=Cj0KEQjwur2eBRDtvMS0gIuS-dYBEiQANBPMRyPB9YnQ2JqvLSIf-RyRzyWUQ9hZd2Ww1HTrcOtqhtwaAjPc8P8HAQ

and as far as that goes I thought if it ever came to it the board could be put in a watertight box and use amphenol or seacon connectors to mate with the electrical interfaces, but this would have to be a very specific situation.

  Are you sure? yes | no

diysciborg wrote 07/13/2014 at 10:28 point
A MASSIVE amount of work on power monitoring has been done at OpenEnergyMonitor. Check it out.
http://openenergymonitor.org/emon/

  Are you sure? yes | no

jlbrian7 wrote 07/13/2014 at 11:36 point
already seen that thanks

  Are you sure? yes | no

Adam Fabio wrote 06/17/2014 at 04:02 point
Looking good so far! Thanks for submitting your power monitor to The Hackaday Prize! Don't forget to upload some videos of the monitor doing it's thing - I really like the ground fault detection feature!

  Are you sure? yes | no

jlbrian7 wrote 06/23/2014 at 18:46 point
I should have a couple of video's up within the week. I have to build a box to induce a ground fault.

  Are you sure? yes | no

arre_diels wrote 05/16/2014 at 22:23 point
For an AC power monitor, you are missing a power-factor calculation, no? Just measuring the current will only do for resistive loads. (or am I missing the voltage measurement somewhere?)
Otherwise cool project though

  Are you sure? yes | no

jlbrian7 wrote 05/16/2014 at 22:30 point
the 150ohm resistor that ties the two lines together is the load

  Are you sure? yes | no

jlbrian7 wrote 05/17/2014 at 01:05 point
Sorry I misunderstood. You are correct I am not taking voltage measurements right now. So this only measures apparent power not true power.

  Are you sure? yes | no

Jeff wrote 05/16/2014 at 20:37 point
You could also list 'em on Tindie. Seems like the appropriate place for that kind of thing.

  Are you sure? yes | no

jlbrian7 wrote 05/16/2014 at 22:30 point
I will look into it.

  Are you sure? yes | no

ucasano wrote 05/16/2014 at 15:23 point
How do I reach the github page?

  Are you sure? yes | no

perez.ernesto.j wrote 05/16/2014 at 14:15 point
just let me know ebay link, ill gladly support by buying at least one of the shields

  Are you sure? yes | no

jlbrian7 wrote 05/16/2014 at 15:33 point
Will do. It should be up soon.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates