Hi,
So I'm in the process of building a system to monitor my entire electrical panel;
First step, is to get 1 CT working.
I'm getting weird results. Voltage here is 120 V.
+5 voltage divider, along with burden resistor... without CT attached, I'm seeing anything but 0?
loop{
irms = ct1.calcIrms(1480);
// Print power
Serial.print(irms * 120.0);
Serial.print(" ");
Serial.println (irms);
}
37.98 0.32
26.62 0.22
28.17 0.23
29.54 0.25
35.87 0.30
44.08 0.37
27.76 0.23
26.96 0.22
19.91 0.17
30.87 0.26
If I put the analog pin to GND, I get 0. Shouldn't I see 0 all the time also, without CT attached?
Sean
Re: no ct connected
Yes, you should see zero with no CT, but unfortunately this is a common problem. It is noise from the digital part of the processor getting in to the analogue front end. The rms calculation rectifies the noise so that it appears as a small current. You don't say what hardware you have. The emonTx V3 suffers least from this, as much care was taken at the design stage to screen and filter the supply to the analogue part. If you add a voltage monitor and use the calcVI method, you should see an improvement.
Re: no ct connected
Ok, that makes sense.
I'm using my own homemade board... i'll add in a ac/ac adaptor.
One thing I did calculate out, 0-30 amps, * 120 volts = 0 - 3600 watts. I want 1 watt resolution. So ideally need a/d 3600*2 = 7200 samples, or like 12 bits of resolution...
Re: no ct connected
It doesn't work quite like that. The (current) wave is digitised and then the power calculation is done, so you need enough waveform to get a reasonable approximation of the wave shape. And at very small amplitudes, everything depends on where the quiescent mid-point sits in relation to the ADC steps. It gets very messy and I wouldn't like to calculate what happens. If you do indeed need that sort of resolution with a reasonable degree of accuracy, then you can't use the Atmel 328P and the in-built ADC, you need to go to a better ADC and you need to pay a lot of attention to keeping the digital hash out of the analogue side of things
The reason for the improvement when you add the voltage input is that the noise no longer gets rectified, so assuming the noise is random, the noise "power" - the product of noise current and voltage - is essentially random (though the envelope is modified by the voltage) and thus tends to average towards zero.
Re: no ct connected
With a burden resistor set up for 4kW max, I find that a 40W bulb gives a fairly consistent value which rarely fluctuates by more than a watt or two. If the value does drift, that's because the mains voltage has moved. All results of mine have been taken with the 10-bit ADC in the Atmega 328P I always use a voltage sensor, and recordable power values are averaged over at least a second.
For the MK PV Router's operation, power is evaluated over every individual mains cycle, and those values do jump about a bit. But when averaged over a second or more, the overall value for energy-flow always settles down nicely.