Problem with the current sensors

Greeting,

My name is Barral Pierre and i’m a student In the University Institute of Technology in Nîmes (France).

With my partner, we are actually working with an EmonTx V3 ,EmonCms and a raspberry to coordonate both software and hardware.

But we have a problem.

Last student worked with it and now we have problem to calibrate the current sensors. (we had 77, -34 and -48 for valors with EmonCms and our ammeter was precisly 25 A).

Do you have any tips or tutorial on how calibrate the current sensor and the EmonTx to have regular and plausible Valor ?

Best regards.

BARRAL Pierre

There are several articles about calibration, you can reach them via Resources > Building Blocks.

If you do not read repeatable values, check that your current transformer has been installed correctly, and that the faces of the ferrite core are clean and fit closely together with no air gap.

The standard sketch “emonTxV3_4_DiscreteSampling” will measure current on the 3-phase supply that you have in France, and if the three line voltages are always the same, it will read apparent power correctly.

But the standard sketch cannot measure real power on a three-phase supply. For that, you need a sketch with “3-phase” in the name.

thanks for the anwser.

We continue our work on the EmonTx. My Professor Gave me the Uart connector to be able to reprog the emonTx and that’s pretty cool, i didn’t try it out because i had to do some research about how to do it and stufff like that.

I went on the Github and found the sketches you were referencing about !

i guess thursday i’ll try it with Platformio. i installed it on my linux computer.

By the way i have two little questions.

Do i really have to download the skectch on github and install it via the Linux terminal thanks to platformio ? or should i do it in another way ?

After some researches, i found there is a debug mode with the Uart programmer and it gives us important information like calibration for exemple. I will be very glad to be able to run a debug mode for it but there aren’t any tutorial or any explanation about how to do it on the wiki. Is there a way to run it in the terminal ?

Thanks again for all the help you are gaving us answering our questions !

No, you can, but it is not necessary to do that. I do not use Platformio, you can follow the instructions for installing the Arduino IDE - Linux or Windows.

There is no real debugger for Arduino that I know of. You cannot step through the code line by line and observe the results, like you can with most computers. All you can do is insert “Serial.print( )” statements that will show you the value of a variable at that point. You cannot modify the contents of a variable from the terminal.

Ok we finally install the Discrete sampling firmware (skectch) and we understood that our current sensors are 100a/50mA.

Now we are working on the Arduino Ino file and we had

for 20A a 2300 valor on the debbugging mode of the Arduino software.

We are going to change the calibration numbers to be able to get “real” numbers.

Thanks for all your help, and if you have other tips we are glad to read them.

Pierre Barral

There is a lot of information in Resources > Building Blocks.

Ok after reading all the stuff and Testing our emonTx, changing the burden resistor to a 22 Ohm we made a graph and this is our problem, the factor is too important and we don’t understand how we can change it thanks to emonCmc (We tried but doesn’t work ) and we aren’t able to work on the sketch directly because we didn’t found the line or the formula that impact the current analysis of the EmonTx.

and i’m mad because i can’t attach my Excel, but when we compare real current and the EmonTx Current with Arduino monitor we have

f(x)=216.35x + 35.1818

Also we have doubt about the burden resistor placement, we placed it in the pins next to The UART, in the Gnd and 3rd pin.

Thanks

The burden resistor fitted in the emonTx as manufactured is 22 Ω for current channels 1 - 3, and 120 Ω for channel 4. The 22 Ω are printed with “22R0” and the 120 Ω is printed with “1200” (120 x 100).

If you are using the default sketch, the lines to change the current calibration are these:

//http://openenergymonitor.org/emon/buildingblocks/calibration

const float Ical1=                90.9;                                 // (2000 turns / 22 Ohm burden) = 90.9
const float Ical2=                90.9;                                 // (2000 turns / 22 Ohm burden) = 90.9
const float Ical3=                90.9;                                 // (2000 turns / 22 Ohm burden) = 90.9
const float Ical4=                16.67;                               // (2000 turns / 120 Ohm burden) = 16.67

The burden resistor is the larger SMT resistor R7, R8, R9 & R18 immediately behind the 3.5 mm socket, there are two holes to take a wire-ended resistor in parallel (or instead) at each end of the SMT resistor.

You must have a burden resistor. Without it, there is nothing to convert the current from the CT into a voltage, therefore you will risk damaging the emonTx analogue input with a current greater than a very few amperes, because the CT will attempt to generate an infinite voltage!

The number “35.1818” in your equation is most probably due to electrical noise picked up by the analogue input circuit of the emonTx. It is worse when you measure current, because the rms calculation rectifies the noise, so it can never average towards zero. It will be much smaller when you measure real power, because then no rectification happens in the mathematics.

When you write:

what is the name of the variable that has that value? You should be looking at ct1.Irms, ct2.Irms etc.
You should have some lines like:

Serial.print(ct1.Irms); Serial.print(" ");
Serial.print(ct2.Irms); Serial.print(" ");
Serial.print(ct3.Irms); Serial.print(" ");
Serial.print(ct4.Irms); Serial.println(" ");

somewhere near line 410 in the sketch.