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

ok I have a circuit built that when connected to my doorbell transformer outputs .750V centered around 1.65V at the maximum voltage the transformer will put out unloaded. I should be able to read this with my ESP32 and toss it at EmonLib to see what output I get.

(I’m going to power my electronics separately via USB wall wart. The only action that transformer will see aside from my monitoring device is the doorbell that gets rung once every five years lol

This sounds like a 3.3 V ADC? I normally recommend designing to 1.1 V rms at the input to a 3.3 V ADC, and 1.6 V rms to a 5 V ADC (the input range, not necessarily the power supply!)

I may adjust. I want to do some testing with the ESP32 ADC which as I’m sure you’ve heard is notoriously inaccurate… I tried to keep the voltage near the center of the ADC range because that’s where the ESP32 seems to be the most accurate. As my testing progresses, I’m leaning towards using the ADS1015 for all my ADC stuff though. It’s a great little ADC.

You may want to have a look at this:

There’s some good info about using the “1015” ADC in that thread.

1 Like

Excellent. I will give that a thorough read. I had a GenerLink installed yesterday on my meter and while the power was off I installed my clamp sensors. I’m eager to start using them instead of my bench test setup but still a lot of development to do before I’m ready. So far in my testing the 1015 has been giving me fairly accurate readings using the calcIrms method but I really need to do some testing with the voltage sensor in place as well.

The link above is to post number 174 in that thread.
(my mistake. wasn’t paying enough attention. :grin:)

The link I should’ve posted is: (this one takes you to the top of the thread)

1 Like

Looks like the fella in that post tried the 1115 but didn’t try out the 1015 he ordered.

Nuts!

I forgot that he ended up using an MCP3008.
That was 4 years ago. I’m surprised I remebered it at all! :grin:

Still, plenty of good info in the thread.

I re-read it yesterday and looking back, he did a fantastic job. Do an exact repeat (if all the information is still out there) and you won’t go far wrong.

Yep, I still read through it all :smiley:

Honestly, half the fun for me is figuring out everything. There’s all kinds of off the shelf solutions and examples of devices people have made and I try to check them all out but I do enjoy the learning aspect of these types of builds. Having you two experts dumping your brains all over this forum for reference is invaluable!

@Robert.Wall @Bill.Thomson

I have a 7.2A test load on my bench and the doorbell transformer with my above described circuit feeding into two ADS1015 ADC’s being read by an ESP32. I feel like I’m REALLY close to having this working properly and I just need some slight tweaking of the calibration values.

My kill-a-watt shows 115.1V, 0.72A, 0.99 PF. My CT is on a 10X AC line splitter and it’s seeing 7.2A confirmed by my clamp meter.

This is the output from my code. The Irms is almost bang on but the other values are iffy. Am I right to think the answer is in my calibration values?

realPower: -806.450418, apparentPower: 802.525900, powerFactor: -1.004890, Vrms: 111.712001, Irms: 7.183883
realPower: -808.429352, apparentPower: 804.401080, powerFactor: -1.005008, Vrms: 111.732405, Irms: 7.199354
realPower: -809.406273, apparentPower: 805.347553, powerFactor: -1.005040, Vrms: 111.717377, Irms: 7.208794
realPower: -790.941580, apparentPower: 786.696327, powerFactor: -1.005396, Vrms: 110.699411, Irms: 7.106599
realPower: -793.567831, apparentPower: 789.400843, powerFactor: -1.005279, Vrms: 110.671800, Irms: 7.132809
realPower: -795.405009, apparentPower: 790.970227, powerFactor: -1.005607, Vrms: 110.908621, Irms: 7.131729
realPower: -794.114144, apparentPower: 789.991446, powerFactor: -1.005219, Vrms: 110.910364, Irms: 7.122792
realPower: -790.627114, apparentPower: 786.579755, powerFactor: -1.005146, Vrms: 110.716731, Irms: 7.104434
realPower: -806.045420, apparentPower: 801.995503, powerFactor: -1.005050, Vrms: 111.954315, Irms: 7.163596
realPower: -796.708321, apparentPower: 792.448003, powerFactor: -1.005376, Vrms: 110.716234, Irms: 7.157469
realPower: -793.847827, apparentPower: 789.626218, powerFactor: -1.005346, Vrms: 110.732209, Irms: 7.130953
realPower: -795.405121, apparentPower: 791.249223, powerFactor: -1.005252, Vrms: 110.878893, Irms: 7.136157
realPower: -794.032091, apparentPower: 789.908474, powerFactor: -1.005220, Vrms: 110.629336, Irms: 7.140136
realPower: -794.387068, apparentPower: 790.215660, powerFactor: -1.005279, Vrms: 110.829208, Irms: 7.130031
realPower: -796.982294, apparentPower: 792.788894, powerFactor: -1.005289, Vrms: 110.872116, Irms: 7.150480
realPower: -810.542431, apparentPower: 806.298440, powerFactor: -1.005264, Vrms: 111.870528, Irms: 7.207425
realPower: -794.233934, apparentPower: 790.057322, powerFactor: -1.005286, Vrms: 110.651326, Irms: 7.140062
realPower: -790.023375, apparentPower: 785.727074, powerFactor: -1.005468, Vrms: 110.542516, Irms: 7.107917
realPower: -803.265009, apparentPower: 798.571866, powerFactor: -1.005877, Vrms: 111.057805, Irms: 7.190597
realPower: -795.229142, apparentPower: 790.886224, powerFactor: -1.005491, Vrms: 110.769297, Irms: 7.139941
realPower: -797.786514, apparentPower: 793.690712, powerFactor: -1.005160, Vrms: 110.905961, Irms: 7.156430
realPower: -795.726083, apparentPower: 791.167977, powerFactor: -1.005761, Vrms: 110.720662, Irms: 7.145622
realPower: -809.444397, apparentPower: 805.581942, powerFactor: -1.004795, Vrms: 111.807714, Irms: 7.205066
realPower: -794.953964, apparentPower: 790.607379, powerFactor: -1.005498, Vrms: 110.844495, Irms: 7.132581

unrelated, it’s neat to change the clamp orientation and see the realPower change sign

The first thing I notice is your voltage measurements are about 10 volts low.
(unless of course, your line coltage really is 110 Volts, but it should be closer to 120 V)

Have you measured your line voltage with a reasonably accurate meter?

The other thing that sticks out is your measured power factor.
PF can never be greater than 1, so you have an issue there as well.

yes, I measure 115.x V with my multimeter and the kill-a-watt agrees. I’ll keep testing but I figured I’d get some input on what I’m seeing so far. I was thinking my calibration values were to blame but I’ve double checked and I think I have them calculated properly.

If your line voltage measures ~115 VAC, and your device is reporting ~110 VAC, that says to me,
at least one cal factor is off.

Then there’s the Power Factor. Something’s off there too.

I’ll keep testing. Was hoping one of you would see an obvious error based on my numbers but you’ve given me some things to look out for as I progress :slight_smile: appreciate the feedback

Keep hammerin’ at it!

thumbs_up thumbsup

1 Like

How did you measure the line voltage and the output of the transformer at the same time? What I’m suggesting is, unless you’ve got a pair of multimeters, the voltage probably changed between measurements. Probably not all of the discrepancy will be due to this alone, but some will be.

But what happens next, is this voltage (I don’t think you’ve mentioned the value) going straight into the ADC, or do you divide it again? If you do, what’s the value and tolerance of these components?

Two ADC’s? do they have the same voltage reference? If your ADC’s reference is not what you think, there’s another source of calibration error.
And bear in mind that the law of natural perversity says all the individual errors must add up in the worst possible combination.

There’s definitely an approximation somewhere in your maths, because you should be using the same voltage and current (as numbers) for both the real and the apparent power calculation, so you shouldn’t be getting a power factor greater than 1. if you’re using the old discrete sample version of emonLib, then it’s almost certainly the interpolation in that which is the source of this error. If it worries you, you can use the maths from these contributions EmonLib: Inaccurate power factor and
Rms calculations in EmonLib and Learn documentation - #3 by mafheldt;
and this has been incorporated into emonLibDB (but not into either emonLibCM or emonLib).

I’m out right now so I’m going to read this in depth when I get home. Just figured I’d share my little test setup so you can see how I’m measuring the voltage and transformer at the same time. I’m using a kilowatt and an AC line splitter. I can see the voltage on both the killawatt and with my meter on the test points of the AC line splitter. The transformer wire can’t be seen in this photo. I have it running to my bench setup from a wire from my panel.