Hello,
I'm just getting started with an energy monitoring project with the intention to monitor power use of a 9KW 240VAC 60Hz electric boiler which provides heat for a radiant floor. As this is in the US, I will use a pair of CTs, one for each leg of the 240. I have the 9VAC wall-wart to allow sampling of the voltage as well. I would power the Yun+shield with a 5V USB wall-wart. Ultimately I will send the usage data to my existing linux environment, hence the purchase of the Yun which has convenience of the networking and additional proc. Summary of components purchased (all from the OEM shop other than the Yun):
- Arduino Yun
- EmonTX Shield SMT
- 2 SCT-013-000
- 1 9VAC wall-wart (US plug)
I've found the number of sketches a little dizzying, so I'm trying to start with the basics and build toward the above goal. I thought that calibration building block would make a good starting point. I'm starting with the calibration of the internal reference voltage and using the CalVref sketch. The sketch calls for measuring 3.3 on the batt pins which doesn't seem to apply to the SMT sheild. I'm using a Fluke 87V meter to measure between AREF & GND pins instead. I was expecting to see a fairly stable reference voltage, but instead I observe significant fluctuations, particularly if I'm using the the 5V USB wall-warts; example fluctuations: .040 & .039. There is less fluctuation when I use USB power from my laptop (running off its battery). When I make similar measurements using a Arduino Uno clone (SparkFun redboard), I see much more stable voltage, example fluctuation .004. I think this all boils down to the lack of a 5V regulator on the Yun, which then causes me to question if the Yun is usable for this application unless I provide it with a regulated 5V supply.
The data that I gathered using the Fluke and CalVref running on the Yun follows.
--Larry
Using black KDL-5100A wall-wart USB power
Fluke 87V: Min 4.677 Max 4.717 Avg 4.711
You measured 4.70 V.
That means your internal reference is 254 counts or 1.165 V if measured with your meter.
The constant for that is 1192784L
Using that in "readVcc( )", it will return 4696 mV.
You measured 4.70 V.
That means your internal reference is 234 counts or 1.073 V if measured with your meter.
The constant for that is 1099098L
Using that in "readVcc( )", it will return 4697 mV.
You measured 4.70 V.
That means your internal reference is 234 counts or 1.074 V if measured with your meter.
The constant for that is 1099332L
Using that in "readVcc( )", it will return 4698 mV.
You measured 4.70 V.
That means your internal reference is 247 counts or 1.133 V if measured with your meter.
The constant for that is 1160406L
Using that in "readVcc( )", it will return 4698 mV.
You measured 4.70 V.
That means your internal reference is 235 counts or 1.078 V if measured with your meter.
The constant for that is 1104265L
Using that in "readVcc( )", it will return 4699 mV.
You measured 4.70 V.
That means your internal reference is 235 counts or 1.078 V if measured with your meter.
The constant for that is 1104265L
Using that in "readVcc( )", it will return 4699 mV.
You measured 4.70 V.
That means your internal reference is 234 counts or 1.074 V if measured with your meter.
The constant for that is 1099800L
Using that in "readVcc( )", it will return 4700 mV. The difference is due to integer rounding.
You measured 4.70 V.
That means your internal reference is 234 counts or 1.074 V if measured with your meter.
The constant for that is 1099800L
Using that in "readVcc( )", it will return 4700 mV. The difference is due to integer rounding.
You measured 4.70 V.
That means your internal reference is 234 counts or 1.074 V if measured with your meter.
The constant for that is 1100033L
Using that in "readVcc( )", it will return 4700 mV. The difference is due to integer rounding.
You measured 4.70 V.
That means your internal reference is 234 counts or 1.074 V if measured with your meter.
The constant for that is 1100033L
Using that in "readVcc( )", it will return 4700 mV. The difference is due to integer rounding.
You measured 4.70 V.
That means your internal reference is 234 counts or 1.074 V if measured with your meter.
The constant for that is 1100268L
Using that in "readVcc( )", it will return 4702 mV.
You measured 4.70 V.
That means your internal reference is 233 counts or 1.070 V if measured with your meter.
The constant for that is 1095566L
Using that in "readVcc( )", it will return 4702 mV.
You measured 4.70 V.
That means your internal reference is 234 counts or 1.075 V if measured with your meter.
The constant for that is 1100502L
Using that in "readVcc( )", it will return 4703 mV.
------------------------------------------------------------------------
Using Apple A1265 wall-wart USB power
Fluke 87V: Min 4.556 Max 4.595 Avg 4.593
You measured 4.59 V.
That means your internal reference is 240 counts or 1.077 V if measured with your meter.
The constant for that is 1102559L
Using that in "readVcc( )", it will return 4593 mV. The difference is due to integer rounding.
You measured 4.59 V.
That means your internal reference is 241 counts or 1.081 V if measured with your meter.
The constant for that is 1107153L
Using that in "readVcc( )", it will return 4593 mV. The difference is due to integer rounding.
You measured 4.59 V.
That means your internal reference is 241 counts or 1.081 V if measured with your meter.
The constant for that is 1107153L
Using that in "readVcc( )", it will return 4593 mV. The difference is due to integer rounding.
You measured 4.59 V.
That means your internal reference is 240 counts or 1.076 V if measured with your meter.
The constant for that is 1102320L
Using that in "readVcc( )", it will return 4593 mV.
You measured 4.59 V.
That means your internal reference is 240 counts or 1.077 V if measured with your meter.
The constant for that is 1102559L
Using that in "readVcc( )", it will return 4593 mV. The difference is due to integer rounding.
------------------------------------------------------------------------
Using laptop USB power with SparkFun redboard (Uno clone)
Measuring across AREF and GND pins
Fluke 87V: Min 4.964 Max 4.968 Avg 4.967
You measured 4.97 V.
That means your internal reference is 223 counts or 1.082 V if measured with your meter.
The constant for that is 1107641L
Using that in "readVcc( )", it will return 4967 mV.
You measured 4.97 V.
That means your internal reference is 224 counts or 1.087 V if measured with your meter.
The constant for that is 1112608L
Using that in "readVcc( )", it will return 4967 mV.
You measured 4.97 V.
That means your internal reference is 224 counts or 1.087 V if measured with your meter.
The constant for that is 1112608L
Using that in "readVcc( )", it will return 4967 mV.
You measured 4.97 V.
That means your internal reference is 223 counts or 1.082 V if measured with your meter.
The constant for that is 1107641L
Using that in "readVcc( )", it will return 4967 mV.
Re: Yun+EmonTX Sheild SMT calibration in the US
That's the point of measuring the inaccurate (in terms of the initial value) but stable (over time) internal reference when you are using the supply as the reference for measurements. I believe that, in the past, accuracy and stability have been confused. If you have a supply that is both accurate and stable, then there's no need to calibrate the analogue reference, and you can use a constant value in place of that returned by readVcc(). If you don't - like a battery whose voltage droops over time - then it's necessary to measure the analogue reference to maintain calibration.
Your problem is how stable your supply is between measuring it and completing the measurement sequence. If there are minimal fluctuations during that interval, you can use the emonLib library with calibration by readVcc(). If not, you need a better power supply.
You might like to look at Not all USB power adapters are created equal.