Computing stuff tied to the physical world

Decoding the pulses

In Software on Oct 23, 2012 at 00:01

Receiving the packets sent out yesterday is easy – in fact, since they are being sent out on the same netgroup as everything else here at JeeLabs, I don’t have to do anything. Part of this simplicity comes from the fact that the node is broadcasting its data to whoever wants to hear it. There is no need to define a destination in the homePower.ino sketch. Very similar to UDP on Ethernet, or the CAN bus, for that matter.

But incoming data like this is not very meaningful, really:

  L 22:09:25.352 usb-A40117UK OK 9 2 0 69 235 0 0 0 0 103 0 97 18

What I have in mind is to completely redo the current system running here (currently still based on JeeMon) and switch to a design using ZeroMQ. But that’s still in the planning stages, so for now JeeMon is all I have.

To decode the above data, I wrote this little “homePower.tcl” driver:

Screen Shot 2012 10 21 at 01 52 07

It takes those incoming 12-byte packets, and converts them to three sets of results – each with the total pulse count so far (2000 pulses/KWh), and the last calculated instantaneous power consumption. Note also the “decompression” of the millisecond time differences, as applied on the sending side.

Calculation of the actual Watts being consumed (or produced) is trivial: there are 2000 pulses per KWh, so one pulse per half hour represents an average consumption (or production) of exactly one Watt.

To activate this driver I also had to add this line to “main.tcl”:

  Driver register RF12-868.5.9 homePower

And sure enough, out come results like this:

Screen Shot 2012 10 21 at 01 52 32

This is just after a reset, at night with no solar power being generated. That’s 7 Watt consumed by the cooker (which is off, but still drawing some residual power for its display and control circuits), and 105 Watt consumed by the rest of the house.

Actually, you’re looking at the baseline power consumption here at JeeLabs. I did these measurements late at night with all the lights and everything else turned off (this was done by staring at these figures from a laptop on wireless, running off batteries). A total of 112 Watt, including about 24 Watt for the Wireless router plus the Mac Mini running the various JeeLabs web servers, both always on. Some additional power (10W perhaps?) is also drawn by the internet modem downstairs, so that leaves only some 80 Watt of undetermined “vampire power” drawn around the house. Not bad!

One of my goals for the next few months will be to better understand where that remaining power is going, and then try to reduce it even further – if possible. That 80 W baseline is 700 KWh per year after all, i.e. over 20% of the total annual consumption here.

Here are some more readings, taken the following morning with heavy overcast clouds:

Screen Shot 2012 10 21 at 10 24 37

This also illustrates why the wiring error is causing problems: the “pow3” value is now a surplus (counting down), but there’s no way to see that in the measurement data.

I’ve dropped the packet sending rate to at most once every 3 seconds, and am very happy with these results which give me a lot more detail and far more frequent insight into our power usage around here. Just need to wait for the electrician to come back and reroute counter 3 so it doesn’t include solar power production.

  1. Have you thought about using emoncms? http://emoncms.org

    • Hello Glyn – wow, great site, lots of progress clearly!

      I tend to develop my own solutions, because it gives me more flexibility and lets me learn more. So yeah, EmonCMS looks good, and so do a few other options out there, but I really prefer to reinvent the wheel look for new avenues to explore.

  2. “80 W baseline is… over 20% of the total annual consumption here.” Not bad, you use about 1/3 of the US average, 1.3 kW continuous (11496 kWh per year) according to http://www.eia.gov/tools/faqs/faq.cfm?id=97&t=3

    • Indeed, see also this list of per-capita consumpation values: US = 1363 W, NL = 767. I’m at about 350.

      But these numbers are a bit skewed: heating in the Netherlands is almost entirely by natural gas. I’m probably well above the average levels around here, with 2200 m3/yr (large split-level house, open all the way up).

  3. that unexplained vampire power : could it be your fridge ? aquarium heating ?

    • Fridge would be periodic, right? We have two, but when off I assume they are not consuming much. No aquarium here (anymore). Couple of efficient devices, each drawing 1..2W, but apart from that I haven’t found the source yet. Will probably go through the house one of these days and disable fuses one by one to find the culprit(s). An old alarm clock, perhaps? Nah…

  4. If you graph that 80%, is there any fluctuation? That would suggest a fridge or something running (twice per hour), coinciding with you observing baseline consumption. Other usual suspects are control circuits found in many household appliances (microwave!), central heating drawing a mere 20W doing nothing, switches, appliance modules and LED alarm clocks. Heck, I bet once an iPhone is charged, it displaying Night Stand would consume less than an alarm clock, that gets nicely warm to the touch…

    (I notice that each time I add a comment, after having it added, suddenly many extra comments appear??)

  5. Fridges are perverse – they contain heaters! To prevent condensation forming on the outside panels, instead of improving the insulation, most vendors include heating in the double wall. The smart ones use waste heat from the refrigeration cycle, others use resistive elements across the mains supply.

    And we are not done yet! The reciprocating compressor needs lubrication and a pump/circulator/filter would be complicated (i.e. cost money). So a common technique is to have another heater in the lubricant sump, turned up so the oil fumes – making a mist to oil the piston bore. When the compressor is running, there is enough heat around that the sump heater should turn off – but that’s another dollar gone for a klixon thermostat.

  6. I just white this one, i also have an FV system on my roof and i just want to make a sensor thet send me the pulse counter.(maybe you remember) But … i think the next step for the pulse sensor is to make it work using 2 battery and obviously make it work consuming less power possible. Will you continue with this project please ? Thanks a lot. Denis

    • I have a power outlet right next to the fuse box, so no low-power demands here, sorry. You can probably make it use a lot less power by pulsing the LEDs on the pulse counters (once every few ms is no doubt enough – depends on the brand). This will need a bit of extra control circuitry to turn the 5V on and off. Then again, power is only consumed during a pulse, so just adding code to put the RFM12B to sleep and perhaps even a “Sleepy::loseSomeTime(16)” in loop() may already be enough.

  7. 80W… Isn’t it the pump in the central heating system?

Comments are closed.