Calibration - ideal power voltage adapter

I made a emontx v2.2 based on a meduino nano i had laying around, based on the solderpad drawing. This meduino nano is a arduino nano clone you can set on 3.3V of 5V - mine is set to 3.3V to be safe when connecting it via i2c to my raspberry Pi.

I use the 3Phase firmware found here on the forum. In this firmware one has to enter the calibration coefficients.

I bought a ideal power (euro plug) via the shop here. On the calibration page it says that Vcal is 228.268.

But when using this  factor, i get measurements of 199 a 200V instead of +-240V.

Should i change these coëfficients or is something else wrong?

Robert Wall's picture

Re: Calibration - ideal power voltage adapter

With the voltage wrong by that amount, there may well be a problem somewhere.

Check these things:

1. The d.c. voltage at the input to the ADC. That should be VCC / 2.
2. The voltage from the adapter. That should be about 11 V - 11.5 V with an input of 240 V.
3. The alternating voltage at the input to the ADC. This is best measured across the 10 kΩ resistor that forms the bottom half of the potential divider. That should be one eleventh of the adapter voltage.
4. The voltage of the internal reference. To do this you need to load a test sketch. The Building Blocks "Calibration" article has all the information you need.
5. The accuracy of your meter on the ranges you used.

This should show you where the error has arisen.

There are several articles in Building Blocks about calibration and measurement errors. These should help you to calculate the correct calibration coefficient if the components you used are not the correct values, but if you are sure there is no fault, then by all means change the calibration coefficient to give you the correct reading.

promy's picture

Re: Calibration - ideal power voltage adapter

I checked those things and i also found a bad connection on my pcb :-s

I get these measuremenst:

1: DC: 2.26V 
2: voltage adapter: 11.1V with mains power at this moment 223V
3: AC voltage over 10kOhm: 1V (seems ok, this is +- 1/11th of 11.1V)

for nr 4: the "5V" is actually 4.57V (getting power from usb from the Pi)  / the "3.3V" measures 3.32V. Arduino says that VCC is 3.21V
 

With this i get get voltage reading in the range 206-209V (mains 223V - the 238 from last night must have been a peek?)

What i am uncertain about is the VCC i used: now i connected everything (CTs and powersensor) to the "5V". But now i notice on the solderpad that VCC= 3.3V. Did i connect it wrong? On my meduino i have the 2 voltages available: "3.3V" and "5V"

Robert Wall's picture

Re: Calibration - ideal power voltage adapter

I don't know the Meduino, so I can't comment about that.  The 5V from the RPi is out of specification, so maybe you are drawing too much current from it? I don't know what you are allowed, but the data sheets should tell you.

You can run the Atmel 328P at any voltage up to (I think - check the data sheet) 6 V. We choose to run the emonTx at 3.3 V mainly because that simplifies the interface to the RFM12B radio module and makes battery operation from two 1.5 V cells easy.

It also looks as if you have got your inputs mixed up and you have not followed the emonTx circuit exactly. The d.c voltage at the ADC input should be 1.65 V if it is reporting that the supply is 3.3 V (approx - you say it says 3.21 but that is a calibration issue). If you wish, you can run calypso-rae's sketch RawSamplesTool_4ss_2 (http://openenergymonitor.org/emon/node/1757) which should draw the voltage waveform. If the waveforms are offset from the centre and the voltage clips on the positive peak, that is a sure indication that the input circuit is wrong.

I suggest you check the input circuit carefully and then go through the calibration procedure. The standard emonLib library methods measure the ADC voltage reference with respect to the internal band-gap reference, so the feed from the RPi being low should be corrected in the software.

promy's picture

Re: Calibration - ideal power voltage adapter

Found the problem thanks to your help: i was running the atmega at 3.3V but was using the 5V(4.x V) for the sensors.

When i switched to 3.3V for the sensors, the voltage reading was spot on: less than 1V difference with my handheld multimeter.

Comment viewing options

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