Can I use my doorbell transformer to measure voltage for real power measurement?

so I’m calculating 118.5V volts and my meter is reading 119.8V. Wondering if that slight difference is where my +/- 2%

So I added the ability to add an offset to the VCAL value. I started at .25% and increased until my voltages aligned with my multimeter. 1% seems to bring me into perfect alignment. Assuming my meter is correct, I feel like things are as dialed in as they can get. Going to watch the data for the next few days and see what happens to that 1.8% margin of error.

Bear in mind your multimeter too has an accuracy tolerance, as a percentage of the reading plus a count of the display, and there’s no guarantee it’s the same on all ranges even when measuring the same quantity.

If you’re measuring and reading 120 V on the 600 V a.c. range, the tolerance is “0.7% + 3d”. This means the actual voltage might be 120 × 1.007 + 0.3 V or 120 × 0.993 - 0.3 V, that is between 121.4 and 118.9 V.

1 Like

ah yes, good point. I need to drill it in my head that tolerances are in play at every corner here. That makes me ever more curious to see how the data looks with this change. Wish I didn’t have to wait two days for my utility to make their data available.

Not too shabby! thumbsup
:grin: :smiley:

1 Like

this change seems to have really dialed me in to my utilities equipment. More than pleased with the results

I do still see the odd point where I read a bit low… .seems like once a day so I’m thinking some kind of timer or something. Going to log for a few days then check what’s going on when the dip happens.

I suspect this means that you have a small residual “power” coming from noise pickup. What you’ve done is totally legitimate.

You might need to increase the reporting frequency to see exactly when and for how long it happens, in order to identify it.

yeah, I’m going to lock the code down and let it run for 4 or 5 solid days without interruption and see if I can spot the issue. I’m pretty sure I could dial up reporting from 1s to 500ms and not really have any downside aside from some extra disk usage on my influxdb server

If the disturbance is just one point and so less than 2 s duration, unless it happens at a fixed time each day so that you can stand over every power-consuming item in the house in turn and watch it, I’d take the view that with any other recording device, you’d have been in blissful ignorance, so why worry?

I can’t actually see the data on your graph with my display – not enough contrast, so I can’t help.

Apologies! wasn’t trying to make you squint! I get a regular ‘dip’ in my data daily around 19:00 +/-

maybe easier to see like this?

Much better :+1:
You’ll have to go hunting. Make a list of when, what you and anyone else was doing around the time, what it it dipped from and to; and start looking for a pattern.
Don’t be too surprised if your hunt turns into a wild goose chase.

It’s hard to imagine half your load has been missed for two reports - unless you’ve lost a reading on one leg of your 120 V; and why about the same time each day (if indeed it is).

One more point to remember when looking at the data - if you’re using something like our emonLibCM library (I can’t remember if you are), those “points” are the average over the preceding period, so you need to be thinking more in terms of a rectangular block of load that doesn’t fit neatly to the points, but which when averaged will give the value you see.
So, if you lost a block of power 300 W deep starting half-way between the 19:00 and 19:15 points, and ended exactly at 19:30, it would give you the points you have.

I used the emonlib library (GitHub - openenergymonitor/EmonLib: Electricity monitoring library - install in Arduino IDE's libraries folder then restart the IDE) as my starting point thinking I’d basically use it as is… then one thing led to another and I ended up breaking out the code into a multi-threaded design. I have one thread per phase/leg constantly calculating and updating it’s power stats every 20 zero crossings. Then I have a thread that runs spitting out a snapshot of the data via MQTT once a second. The reported data should be pretty well near real time.

Once I have everything polished up, I’m going to toss the code up on github since I did heavily lean on emonlib and your expertise so only fair I publish my work. If I knew then what I knew now, I’d probably have started with the emonLibCM library but this project kind of evolved along it’s own path for me as I went along.

In that case, what I wrote about averaging doesn’t apply. (Actually, I’m a bit surprised people still use emonLib. :frowning_face:)

What you’re seeing is a short duration (~333 ms nominally) snapshot, sent every second (and you’re ignoring the two in between?). That seems a weird way of doing it unless I’ve misunderstood, and that’s very likely.

I’m calculating the power stats for each phase every 10 AC cycles… so every 167ms but I’m only reporting those calculated values once per second… so technically my one second report is whatever the value was in the previous 167ms… definitely a bit of data loss there. I ended up that way from using emonlib as my starting point. I wonder if I should align my power stat calculation to the 1s reporting interval?

Part of me wants to dive into emonLibCM and see how you’re doing it but I’m not sure I want to get myself to tear everything I’ve done apart to rework it lol

@Robert.Wall just taking a quick peek through emonLibCM and it looks like you’re doing what I was thinking of doing in my last post… matching the data calculation to the data reporting interval? Basically keep calculating the ‘sums and squares’ and then right before reporting calculate Vrms/Irms etc. That way I’ve sampled the entire interval?

Exactly. The values available from emonLibCM are the average power, i.e. the sum over the reporting period of the instantaneous powers (product of voltage & current pairs of samples) divided by the sample count; and the rms average voltage and current calculated similarly.

I implemented that change to my code last night (was actually a very easy change, just a few lines of code and a mutex). Now I’m collecting data and waiting the two days for my power company to provide their data so I can reconcile and compare :crossed_fingers:

Ah, the advantage of you keeping hold of YOUR data. :smile:

A few of my friends have been like ‘why are you bothering doing this when you can get the data right from the power company?’

They don’t understand the advantage of being able to monitor this stuff in real time. They also don’t understand how fun electronics and code is :grin: