Hi, I'm doing energy monitoring project using arduino uno. Recently I encounter problem getting power value, the readings shown on the serial monitor is way too far from actual power. For example: I'm measuring a 100W lamp and the value shown in the serial monitor is 150-170 when it's ON and it doesn't drop to zero when it's OFF. Another problem is when I switch to another equipment(eg: 50W Fan) the value show in the serial monitor remains at 100+. Appreciate if anyone could solve my problem
See if your current sensor if producing reasonable values by itself. It makes NO sense to pass the data to some other library until you KNOW that the data is good.
Done a series of sensitivity test on SCT013 current sensor. It works fine. So I can't figure out where goes wrong.
Anyway appreciate for all the replies
annasun:
Hi, I'm doing energy monitoring project using arduino uno. Recently I encounter problem getting power value, the readings shown on the serial monitor is way too far from actual power. For example: I'm measuring a 100W lamp and the value shown in the serial monitor is 150-170 when it's ON and it doesn't drop to zero when it's OFF. Another problem is when I switch to another equipment(eg: 50W Fan) the value show in the serial monitor remains at 100+. Appreciate if anyone could solve my problem
Can you show your schematic and link to what the energy monitor library expects for its circuit?
For example if the energy monitor library is expecting your CT to be biased at VCC/2 but you are biasing it from GND, then it would calculate the wrong Irms.
I don't know the turns ratio for your CT so I can't check if you calculated your calibration factor correctly, but your basic circuit seems to be OK (although I'm not sure what you're doing with R3/R4 on Tx of the HC-05...but that's a different part of the circuit).
Do you have any way to measure the actual RMS current? Using the Watts rating on your loads isn't that good of a way to verify your Arduino's measurement of Volt-Amps (which is what you are getting when multiplying your RMS current by your RMS voltage).
For example your 50W fan is going to be a highly inductive load so it will draw a lot more current than 50W/230Vrms = 0.217Arms. The current won't be in phase so it won't deliver power over the entire line cycle.
Your 100W lamp, however, I would expect to be drawing close to a pure in-phase sine wave if you're talking about the incandescent type. If you're talking about a CFL, LED, or something else that might not be true however and you'll find that Irms * Vrms != Watts.
Hopefully this helps. Your CT circuit and your code seem to be fine, so all it seems that it can be is you are trying to test with loads that do not have a unity power factor. The way to prove this would be to compare your Irms measurement to the actual Irms.
DC voltage between GND and junction of two 10k resistors is 2.45V
When I OFF the equipment the value drop from approximately 140 to 120 which is not significant