### calibration of ICAL and VCAL

Im running my arduino with 5V

now when im using the following page: http://openenergymonitor.org/emon/buildingblocks/ct-and-ac-power-adaptor-installation-and-calibration-theory

Im ending up with ridiculous answers

for the voltage side:

for the voltage my resistors are both 10Kohm where that for emontx are 470Kohm, however, the ratio is still 1/11 since they add up for the same voltage divider. and 9V for 230V adapter:

`counts = (input pin voltage / 3.3) x 1024`
`input pin voltage = adapter output voltage / 11`

`adapter output voltage = mains voltage x transformer ratio`

where im taking mains voltage to be 230v and the transformer ratio (230/9)

therefore my final calculation is:

counts = ((230*230/9)/(11*5)) * 1024

counts =109433.5354

`Vmains = count x a constant`

230=109433.5354 *Vcal

0.002=VCAL

for the current side:

im using a 33ohm resistor and 10Kohm resistor and yhdc sct 013 000 again following the calculations

`current constant = (100 / 0.050) / 18 = 111.11`

therefore im working it like this

(100/0.05)/33 =66.6 for ICAL

i think im putting wrong values  if someone can help me in one way or another please, i will appreciate it, since now i was able to get the xbees working and the webserver is up, and this is taking readings.. however the readings i am receiving for a simple fan stand of 60w  50 Hz and 240V are like 20000W for reactive power and 330 for Vrms for example

thanks a lot

### Re: calibration of ICAL and VCAL

You have your transformer ratio the wrong way up. The transformer ratio is defined in this line:

`adapter output voltage = mains voltage x transformer ratio`

Read the calibration page again and understand where the numbers come from. Then put your numbers into the calculations. You should get a value close to 280. (That is if your transformer really gives 9 V out with 230 V in, it might say that on the label but don't believe it if you can measure it accurately - there's a thing called "transformer regulation" - also briefly explained on the calibration page).

The calibration page says that the Arduino supply voltage (5 V) is already included in the calculations. You need to trace through the software in the sketch and the library to see why this is so.

(100/0.05)/33 =66.6 for ICAL

I think you hit a wrong button or didn't read your calculator correctly when you did this sum!

Finally, you must not expect great accuracy when you are reading very small currents. See here http://openenergymonitor.org/emon/buildingblocks/measurement-implication... You can expect significant errors when the current is below about 1 A.

### Re: calibration of ICAL and VCAL

so here you are taking that the voltage of the mains is always 230 V. what if I want to read it directly??? and therefore work these equations with the voltage of the mains being read constantly?? do i have to insert a voltage probe which goes into and arduino analog in  or toggle the pins..something????

### Re: calibration of ICAL and VCAL

"so here you are taking that the voltage of the mains is always 230 V."

No, I am saying that the voltage of the mains is NEVER exactly 230 V, but varies according to how much power everyone else in the neighbourhood/country is using. That is the purpose of measuring it with the voltage input.

All you need to do with the transformer is measure the mains voltage (TAKE CARE!) then measure the output voltage. Better, measure both at the same time using two meters. You use these two numbers in your calculation to get the voltage calibration constant. That is all. You do not need to do any measuring on or with the Arduino.

You need to do this because the label on your transformer says "9 V output"  but in practice, it gives 9 V at full load. You are not using it at full load, so you need to know the output voltage with no load. It is likely to be up to 25% higher than 9 V, depending on exactly how the transformer was designed and made.

Once you have calculated the constant, check the voltage that the Arduino outputs and see how different it is from the true mains voltage. The difference should be less than 10%. If it is, alter the constant so that you read the correct voltage. If it is not, either you have made a mistake in your calculations, of you have a problem with your circuit that you need to find and correct.

When your Arduino is in use measuring voltage and current, it does not matter that the voltage is not 230 V, the input to the Arduino will vary as the mains voltage varies.