120v/60hz AC to 12v AC Divider/Software calibration

I'm in North America (120v/60hz per pole) trying to calibrate the software for a 12v ac transformer. (I can't dig up a 9v)

The 12v transformer I have yields 13.7vac at 119vac and 13.4vac at 116vac.

Using a same 10k - 100k divider it should produce 1.25vac.  Add the DC bias 2.5v for a max of 3.75v DC.

First is this correct?  and if so what changes do I make to the EMON example app and/or calcVI to adjust it's range?

Thank you
You all are an incredible resource!!!

Robert Wall's picture

Re: 120v/60hz AC to 12v AC Divider/Software calibration

The full theory behind the calculation of the calibration of the input components is here: http://openenergymonitor.org/emon/buildingblocks/measuring-voltage-with-... and for the coefficients it is here: http://openenergymonitor.org/emon/buildingblocks/ct-and-ac-power-adaptor...

I'm afraid your understanding is a bit wobbly:  "Add the DC bias 2.5v for a max of 3.75v DC." isn't quite right.

But it looks as if your components are good. From "Add the DC bias 2.5v" I infer that you are using an Arduino running at 5 V (not an emonTx at 3.3 V).

Your transformer gives 13.7 V a.c - add say 5% for the highest possible system voltage = 14.38 V. This is divided down by 1/11 by the resistors to give 1.3 V rms, or 3.69 V peak-peak. This peak-peak voltage is well within the input range (0 - 5 V) of the Arduino so is OK, and all you have to do is adjust the calibration. (If that number had been close to 5 V, I would have gone on to check that you had at least a further 5% in hand to allow for the bias chain resistor tolerances, because if they were wrong, it would limit the range by shifting the bias point away from the middle).

Your voltage calibration constant (from the second link above)  =  119 * 11 / 13.7 = 95.547

You use this in the call to voltageTX

ct1.voltageTX(95.547, 1.7);               // Voltage: calibration, phase_shift

You should expect to have to change this because the calculation assumes the divider chain resistors are exact, in reality they will be ± 1 % or even ± 5 %, giving a possible 2% or 10% error for the voltage constant. The way you change it is measure the voltage with your meter and adjust the number to give you the same answer. The theoretical calibration is a good check that you have everything correct. If you have to change it outside the expected range, you should look for an error somewhere.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.