Non-Invasive Smart Electricity Meter

There are a lot of ways to measure energy usage in the home, but most of them involve handling mains voltage. Not only that, but sometimes they require handling mains voltage before it gets through a breaker panel or fuse box, meaning that if you make a mistake there are a lot of bad things that can happen. [Yonas] has been working on this problem, and has come up with a non-invasive, safer way to monitor electricity consumption without having to work directly on live wires.

Please note that you should still not be working on mains voltage without proper training, but if you have the required know-how then the installation should be pretty straightforward. The project is based on the Spark Core, and uses clamp-on current sensors to measure energy use. The sensors wrap around the mains cable, meaning you don’t have to disconnect anything to hook them up. The backend runs on a LAMP server which could be a Raspberry Pi if you have one. [Yonas] runs it on a hosted server as a matter of preference.

All of the source code for this is available, and assuming you can get your hands on the current sensors this could be a great way to get started monitoring your energy usage in the house. Be sure to check out the video below for a demonstration of the operation of this device. Of course, if you have a gas line you’ll need this energy monitoring setup too.

44 thoughts on “Non-Invasive Smart Electricity Meter

  1. You mean no manufacturer has already come up with a smart circuit breaker panel with the current sensors and possibly temperature sensors directly in the breakers (or externally mounted)? This combined with powerline communications…

    1. I worked for a company and thats one of the things they were looking at doing. The problem is the cost. It adds a considerable amount to the panel board if you do it on each branch. CT’s are not cheap and adding them would probably increase the price of the board three times and thats a line item killer right there since probably 90% of the installations will not care if they have branch monitoring.

      You can get branch monitoring units that are external and simple to wire in like the Dent PowerScout 24, it can monitor up to 24 single phase circuits or 8 three phase circuits. This, like a lot of other meters out there does true power, it measures the voltage as well as current which is needed to get the best accuracy.

    2. If you step up to the industrial grade components, you can get smart circuit breakers which include all sorts of features like bus communications, I / P monitoring, remote trip, even remote closing. But they cost the earth :-(.

    3. I was with you up until “powerline communications” – they’re terrible and too easy to interfere with. There are much better solutions to this problem out there, and I think most people would gladly pick a slightly more involved install over shoddy communications to the device…

    4. I know a guy here who spent his whole PhD trying to do exactly this, but the advisor insisted that he use some very exotic technology, using a tiny magnetic bead on the end of a piezo-electric beam, so flowing current would cause deflection.
      The idea was that is that piezo-deflector unit worked, it could just be added to existing circuit breakers everywhere.

      Anyway, even if someone made a simple Hall effect sensor or current transformer sensor breaker, with each breaker have a radio (transplantable submodule?), there is still no rational or reasonable standard for many-node low power wireless sensor networks / “smart dust” / Internet of Things.

      And *really*, that should be built in per-outlet, rather than per breaker.

      I’m actually quite annoyed with PG&E at how terrible their service is for providing me with my own data from my own smart meter.

      1. A fairly poor one then without the voltage. I have a suggestion. Just plug a very small transformer into the line, any plug will do to provide a reference voltage, and send the secondary side voltage into an A/D. Use this for phase and magnitude and do real time multiply and sum in the code. That is how I have been thinking of doing it.

        1. Do you have a code sample of this? I have been looking for a way to read Power Factor and get more accurate readings, but I dont understand how to get the phase angle from the voltage….

          1. Set up a timer that generates an interrupt 60*360 = 21600 / second.
            At the voltage zero crossing clear a counter that is incremented in this interrupt.
            At the current zero crossing capture the counter and zero it.
            Filter this captured value to diminish impulse noise, ideally through a median filter but moving average will do.

            It will be the phase difference in degrees, change as you like for radians.

          2. wilberofdelaware, it wont let me nest another comment, but thanks! That makes sense, I figured there would be a bunch of sampling but have never done it :P
            Again Thanks!!

        2. Seconded.

          Calculation of power factor is a multi- step process:

          First, find true power P by averaging instantaneous voltage v multiplied by current i.
          P = avg(v*i)

          Then, find RMS values of v and i.

          Third, find apparent power S:
          S = Vrms * Irms
          This is what [Yonas] will be getting.

          Finally, power factor PF is given by dividing the real power by the apparent power:
          PF = P / S

          Optional extra: calculate reactive power Q:
          Q = sqrt(S^2 – P^2)

          Notes:
          – in the presence on non- linear loads (and many many loads are non-linear these days), Q will not be very meaningful.
          – there is no need to calculate the phase angle to get power factor
          – calculating phase angle = acos(power factor) will be inaccurate if there are non-linear loads in the system (which there probably are).
          – to find the phase angle, you could lock a PLL onto the voltage signal, and then use Parks transformation (plus some filtering) to extract the real and reactive components of the current, then use atan2() to get the phase. There are other ways.

          Texas Instruments do power measurement chips which include ADCs and all this stuff for you, with an SPI interface.

  2. I would first change the Circuitbrakers theyre from ABB one of the worst Companys in Powerdistribution :P Even the newest product line looks like 30years before and when you have 12 in 12PLE there is nearl 5mm open at the sides… Ok maybe i work too much with ABB products but i think Siemens or Hager would be really better and not only how it looks ;)

  3. Second the voltage measurement need.

    I use the utility meter to monitor my power. There is an ir led on the top of my meter that I count pulses from.

    The trouble with current transformer is that they must have a burden resistor attached anytime current is flowing on the wire. I prefer the ones that have the resistor built in for this reason.

  4. I measure the power use of devices once and then know what they use. Or in most cases it’s not even needed and it’s written on the device.
    Either way, I don’t get why so many people have an interest in a constant monitoring, although I guess it’s just a case of thought manipulation by the likes of google and amazon and what have you, who want you to put the info online so they can gain yet more information on your private life.

    1. I totally agree, common sense is all that is needed, not more IOT sensors! When you leave the room, turn off the light – don’t stand in front of the fridge staring at the contents for 5 minutes – plug all your electronics into switched power strips so they aren’t constantly using power, even when they are “off”. If people spent as much effort on conscious attention to their energy consumption as they do to these gizmos we would all be better off, to say nothing of the raw materials/energy that go into manufacturing this stuff!

      1. The fridge is easy enough as you just close the door. Lights are easy to as there is a switch at a convenient height on the wall.

        Power is a different storey. You may not be able to turn a power board off because there is that *one* device that needs to be on. Then as well the power board may be on the floor behind a couch because that’s where the power socket is.

        Anywhere near the floor is a no go area for me as I have a spinal injury. I would imagine that it is much the same for older people as well.

      2. Or it can be a fun and interesting project for people who are and are not miserly with their energy consumption. For example to track their own personal habits over time, those of guests, or the strange cycling of certain appliances (fridge and freezer defrost cycles) to name a few. All of these things facilitate continued lowering electrical use, increasing aptitude, exercise the brain, give insights to thoughts on distributed generation and storage, etc.

    2. How do you know what the device uses per day or per hour based on the what’s written on the device if the device is not running all the time? Fridge is a good example… defrost cycle runs infrequently; isn’t it also included in what’s written on the device? How to separate?

      1. That’s why I said I measure some devices once.
        But for your specific example: What are you planning to do? Turn the fridge off? I mean it’s a device you have to use as is basically, and fridges now all come with an energy rating to tell you how economical/clean they are, so when you buy one it’s the time to decide if you pick the right one and not after the fact.
        And as Miles says, if you care you think a bit about it and don’t overuse electricity and measuring isn’t too relevant, you only need to realize what devices are on pointlessly and what devices can make an impact on your bill, so it’s more a class than a specific wattage to the microwatt which you might keep in mind. Or in other words, don’t throw a single shorts in the machine and run a cycle.

        Not that you can’t measure it if you want, I mean it’s each person’s choice, I just don’t understand the level of interest there seems to be in constantly monitoring.

        1. I would want to know, when I get my monthly electric bill, what % the fridge (and other appliances) are consuming each month. That would guide me on when (or if) I should consider replacing them. Energy rating is fine for comparing appliances, but like the fuel economy ratings on a car, they are based on lab conditions and do not accurately depict how I use the device. (In fact, some companies are known to tweak their appliances for good test results, similar to some auto manufacturers with their FE ratings, while every day performance is poorer than expected).

          Maybe leaving the doors open on the fridge as I’m looking for something costs me an arm & a leg, or maybe it costs me an extra microwatthour per month… how I can determine all this by just measuring the device once still isn’t clear to me.

    3. Constant monitoring helps build a sense of awareness of how much power your household is using at any given moment, and what reasonable expected ranges are. I’m measuring my house’s power usage to a display next to the thermostat, so I know my house uses a “resting” average of about 0.5 KWh, but when I see it peaking to 6 KWh, then I can check to see where the extra draw is coming from (likely the clothes dryer in that case). As my electricity is fixed-rate, I also display the cost per hour of my current power draw, so I know my clothes dryer costs about $1 an hour to run.

      It’s also useful to find phantom power draws by turning everything in the house off and measuring usage at the panel. I’ve read of a faulty wired-in smoke detector found using this test, as well as a forgotten pipe defroster that was installed by the former house owner and left turned on year-round.

  5. Constant monitoring is great. I run my home and hackerspace on 100% solar power. My inverters and charge controllers do a nice job monitoring everything. i can plot graphs of power usage and power made by the solar array. I suppose for those of you on the grid you can look at your bill for all the monitoring you need for normal usage. But for the really insane people like me i like to see everything about my system i can.

  6. TED5000 non invasive and predates this by almost 8 years.

    I have had one in my electrical panel (clamps around the incoming lines) for years and it works great with not only a nice web panel but a easy to parse XML data stream.

  7. you should still not be working on mains voltage without proper training”
    You should not be writing for Hackaday. Training is not at all necessary. A basic understanding of electricity and the human body is all that is required. And, at least with 120V/60Hz, the consequences of forgetting to shut off a breaker before touching live wire are insignificant. The risks of serious harm are probably less than for crossing the street.

    1. “A basic understanding is all that’s required”… so.. like.. some training?

      You do realize that you’re suggesting that an untrained person is fine playing with 120V mains because it’s safe? And that at the panel, there’s 240V? Which is almost certainly lethal in any given interaction?

      I propose to test your theory. We’ll take turns. You take 120v across the heart, disconnect it under your own control, survive, and then I will cross the street. Back and forth Highlander style until only one remains. According to your claim, I’ll die or be seriously injured first.

      Ludicrous.

      I’m no safety weenie but being competent with anything involving lethal danger is something I’d recommend.

        1. Ironically it’s you that is presenting the straw man argument by claiming his argument is a straw man argument.

          Your claim was “Training is not at all necessary” and was specificity referenced to “you should still not be working on **mains voltage** without proper training”

          Where I am *mains voltage* mean 240 Volts AC @ 50Hz. Any contact with this voltage is likely to be lethal.

          When it comes to electrocution of people that work with mains voltage here it is predominantly apprentices or trades assistants and that clearly indicates that the level of training is a factor.

          To me it is also an indication that the industry is has totally failed in it’s responsibility to provide adequate supervision and safety training to apprentices. A 16 year old boy (or less commonly girl) should NOT die at work especially when someone else is responsible for their safety.

    2. This might be just a misunderstanding of the English word ‘training’.

      I take it to mean ‘learn through study.’ and others might take it to mean ‘learn through attendance in a class taught by a professional.’

      I personally think that someone attempting to work near mains power should train themselves through study before attempting this.

      I personally don’t think this requires professional training.

  8. In the USA, if not other countries, there are many electric utility companies offering “smart meters” that give you real-time updates as to power usage. In Southern California we have these meters and I have one of the wireless readers that diosplays power usage, updated every 3 seconds. It simply makes me more aware of the day-to-day usage (the power company also sends an “email” through this device giving me anticipated cost of power for that month). Another website I follow, http://www.desert-home.com/p/test-html-code.html, has a way to use those Lowe’s IRIS sensors (xbee devices) to read power outlets.

    1. As recently as last year most ‘smart’ meters weren’t certified by UL and, in the US at least, in violation of the national electric code. Make sure yours are certified.

      1. UL certification is not required under the NEC. CE or similar certification can be used in it’s place. Electrical inspectors will often look for UL certification or some other certification on a device they do not recognize, but there is nothing in the NEC that says all electrical parts used in an application must be UL certified.

        1. A CE mark, even a “proper” one, means that a manufacturer, themselves, has declared that a product is safe according to certain European standards.

          A UL mark, on the other hand, means that a product has been tested by Underwriters Laboratories and found to be safe.

          Not to be confused with a very similar CE mark which means essentially “China Export,” which you’ll find on nearly every plastical electronic device from the mainland.

          1. To allow a CE mark to be displayed on a product requires third party verification. It is no different than UL testing a device to verify it meets the requirements of the NEC.

          2. To display the CE marking, the manufacturer must carry out a conformity assessment, set up a technical file and sign a declaration stipulated by the leading legislation for the product.

Leave a Reply to wilberofdelawareCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.