I got the EmonTX & EmonBase today and started playing with it. Initially, I hooked both CTs (SCT-013-000) up to the EmonTX in the CT3 & CT4 positions (CT1 & CT2 will get the WC1's when they get here to monitor the main feeds) and clipped them on the hot feed to a 65W light bulb. One CT was reading 4-5W lower than the other. From further reading, it seems that 65W bulb wasn't enough of a draw to get an accurate reading, although assuming a 65W incandescent bulb actually draws 65W, the readings were real close (around 67W & 62W).
I dug out a radiant heater that is supposedly rated at 1000W according to the label. I also picked up a 'Kill-A-Watt' meter and some plugs to make up a better test rig to clip CTs to. Maybe I can add a hair dryer as well to increase the draw and use the Kill-A-Watt as a reference.
The problem is I'm having a hard time wrapping my head around exactly what I'll need to change in the sketches, and I'm not even really sure which sketch I'd need to use. According to the 'Node information' page, the Tx us running 'V1_6_emonTxV3_4_DiscreteSampling'. I ASSUME that the 'emonTxV3_4_DiscreteSampling.ino' sketch that was part of the zip I downloaded from GIT is the same as what's already loaded.
From reading, it seems 'const float Ical' lines are the calibration values for the CTs. How does changing these values affect the reading? Does increasing the value increase the reading value or decrease it? The next thing I see that looks like it needs to change is the 'float Vcal' as it seems to be set up for the UK in the sketch. But then there is 'const float Vcal_USA=' and 'boolean USA=FALSE'. Do I just need to change the last one to 'boolean USA=TRUE', rather than the 'float Vcal'? Also, I note that 'TIME_BETWEEN_READINGS' is 10 (I assume seconds). Is there any problem with dropping that down to 5 (I'd like closer data points)?
Is there anything I'm missing? I know I'm going to have to calibrate it for the WC1s, even if I don't for the SCTs... I don't want to screw up the functioning TX...
Re: Calibrating EmonTX
The default sketch is indeed that one - it says so in the Wiki. Read the pages about calibration in Building Blocks for everything you need to know about calibration.
Re: Calibrating EmonTX
Well, it seems the voltage is off by a bit - plugged into my online UPS that is putting an almost steady 120v out (The UPS is reporting the output as fluctuating between 119 & 120v; my servers are reporting a solid 120v on one PS and 114v on the other), the TX is reporting between 116.8 & 117.9, with 117.3 being the average - If I understand the formula correctly, then I would do 130 * (119.5 / 117.3) = 1.018755328218244, so '1.018755328218244 * 130.0 = 132.4381926683717, or round to 132.4. So place that in the 'const float Vcal_USA=' line?
One thing that I didn't see anywhere: What voltage should the USB-Serial adapter be outputting to the TX? Mine has a 3.3v<>5v switch on it - too low and it probably won't program right, too high and I have a paperweight. Since it can use a 5v USB and the A/C adapter is 9v, I would ASSUME, that 5v would be ok, but you know what they say about assumption...
As far as the CTs, it seems both CTs are probably reading the same - I swapped their positions on the TX and the readings stayed pretty much the same - the same inputs were still high and low, they didn't follow the CTs, so that would point to variation in the TX causing the different readings. There are the formulas as to put in the 'const float Ical' values based on the transformer and such, but what I haven't seen is how the readings change if you adjust those numbers for fine tuning - is there a formula to calculate how much and which way to change the value based on how many Watts you want to adjust it? Or is it just a WAG - change the value a bit and see what happens?
Re: Calibrating EmonTX
Voltage calibration - yes, that's what you change.
USB programmer - I've never actually measured the signal amplitude, but as the AtMega 328P runs at 3.3 V, and there is no voltage divider in the RX line, I'd say use 3.3 V.
5 V is the power supply only - there's no USB I/O, there's an on-board regulator to provide 3.3 V to (almost) everything. The circuit diagram is in the Wiki I think.
CT calibration: The calibration takes account of tolerances in the CT (± 3% from memory) and in the burden resistor (1%). So it would seem your two CTs are the same (but how far off is another question!). If you've got a means of measuring rms current and you can view the rms current output with the serial monitor, then that's the easiest way to calibrate (and the same procedure as the voltage will get you there). Otherwise you can do the current via power in much the same way as the voltage but it's abstracted by one layer.
Re: Calibrating EmonTX
Dumb question: Is the 'Watts' reading a function of the current read by the CT along with the voltage? I know figuring Watts is usually volts * amps = Watts, but I don't really know if the CTs are reading the amps or the watts (I can't imagine the electric companies meters are intelligent enough {at least not the one on my house} to know what the actual voltages are of the legs, and they keep track of Watts/Watt hours/Kilowatt hours, not amps).
I tested programming and was able to without issue, so I did some experimenting. I'm reasonably good with electronics, and am quite familiar with working with mains voltage and inside live panels, but you lost me with the RMS talk :). I ended up experimenting with the 'const float Ical' values and in the end, got them REALLY close to each other after three dozen plus flashes, and although I'm not sure I trust the 'Kill-A-Watt' meter (It was reading like 3v low), based on a test with that 60W bulb both with a single pass through the CT and two passes through (for a 120W reading), I'd say they're REALLY close. Much closer than they were to begin with, and they were reading darn close to each other. Don't think I could get them much closer.
With the CT4 input, is the 'high precision' rating and 120ohm (vs 22ohm) resistor a 'requirement' due to the input used on the Atmega, or could the 120ohm resistor be replaced with a 22ohm resistor to make it identical to the other three?
Re: Calibrating EmonTX
"Is the 'Watts' reading a function of the current read by the CT along with the voltage?"
Yes - it's a true average power calculation. You can see the maths in emonLib if you open up EmonLib.cpp.
"I can't imagine the electric companies meters are intelligent enough..."
Oh yes they are. Read up about energy meters in Building Blocks.
"could the 120ohm resistor be replaced with a 22ohm resistor to make it identical to the other three?"
Indeed it can be. There are holes, so all you need to do is add the appropriate value (27 Ω) in parallel with the 120 Ω SMT resistor. (That comes to 22.04 Ω and should be close enough!)
What's so hard about rms values? It's the Root of the Mean Square. It's the value of current that gives the same heating effect as a direct current of the same value. So it's the value that everyone uses for measurements of alternating voltage and current. A good multimeter will calculate it and display it, a cheap one will measure the rectified average and display a number that will be the rms value if (and only if) the wave is a true sine wave.
Re: Calibrating EmonTX
Well, I think my multimeter is flaky. I was checking the resistors I got for the Wattcore CTs and was getting readings much higher than I should have (17+ Ohms for a 15Ohm Resistor) and different readings on the same resitor :/. One day I should probably buck up and buy a decent one like a Fluke.
At any rate, I think I got the Wattcore CTs pretty much dialed in. Using the same 1000W heater I used with the YHDC CTs, along with the YHDC CTs, and got all four CTs reading within 1-3W of each other. With the 60W bulb again, readings were also real close to 60W, and the wire run through the CTs twice, was pretty much spot on around 120W. I doubt I could get them any closer. It's interesting how on the same wire, with the same load and such, the readings from the CTs fluctuate differently.
Is there some kind of foam or other filler that would be safe to wrap around the wires under the YHDC CTs to keep them well centered over the wire? The Wattcores over the main feeds are pretty much a perfect fit, but the YHDCs on my sub-panel feeds have a lot of 'wiggle room'.
Now that I have the whole hose monitored, on to play with EmonCMS :).
Re: Calibrating EmonTX
Is there some kind of foam or other filler that would be safe to wrap around the wires under the YHDC CTs to keep them well centered over the wire? The Wattcores over the main feeds are pretty much a perfect fit, but the YHDCs on my sub-panel feeds have a lot of 'wiggle room'.
Here's a thread that answers that question: http://openenergymonitor.org/emon/node/3360
Re: Calibrating EmonTX
"One day I should probably buck up and buy a decent one like a Fluke."
There's a Building Blocks article about multimeters that you should read before spending your money.