SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By donnib
#130184
Hi,
What is the best and easiest way to measure current for a 220V appliance ? Is the http://www.sparkfun.com/products/8883 sufficient ? How precise is it ? I can't seem to figure that out, sure it's stated but i don't know where to look.

I see that in the us people use Kill-A-Watt. I want to make something similar for 220V without all the fancy display and buttons but wireless transmission just like the hack there is on the net for the Kill-A-Watt. What do they use in the Kill-A-Watt to measure current ? I guess that's the best solution.

donnib
By donnib
#130212
fll-freak wrote:How large an appliance? What is the wattage? The sensor you pointed to is good to 5 amps only and must be wired into the circuit. A simpler solution might be to use this:

http://www.sparkfun.com/products/10341
I guess i need something that can handle somewhere up to 1500W

I know there is an bigger one like this http://www.solarbotics.com/products/23210/.

I am not much of a fan of the clamp solution because it's external. I also heard that it's precision starts from 10W. Correct me if i a wrong ?
By fll-freak
#130220
1500W = V(rms) * I(rms) assuming a fairly resistive load. In your case, at 220V(rms) that means you need to measure a minimum of 6.82 Amps (rms). These means 6.82 * sqrt(2) or +-9.6 amps. The sensor you pointed to is only good for +-5 amps.

I think that Allegro makes sensor that go to a higher current rating. I even think they sell evaluation boards for them. That would be one way to go. The other would be to buy a shunt resistor of a tenth of an ohm or so and of the proper wattage and measure the voltage drop across it. Or you can use a clamp on CT like the one I first pointed to.

I like the clamp on because I do not disturb the appliance or the wiring. I also think that it is safer to have an external device. Lets risk of killing myself and becoming the next nominee for the Darwin Awards.

As for accuracy, just how accurate do you need? And what are you planning on measuring? Not measuring voltage and current at the same moment and sampling and integrating at a fast enough rate will more than overcome any gains you have in measurement accuracy.
By donnib
#130222
fll-freak wrote:1500W = V(rms) * I(rms) assuming a fairly resistive load. In your case, at 220V(rms) that means you need to measure a minimum of 6.82 Amps (rms). These means 6.82 * sqrt(2) or +-9.6 amps. The sensor you pointed to is only good for +-5 amps.

I think that Allegro makes sensor that go to a higher current rating. I even think they sell evaluation boards for them. That would be one way to go. The other would be to buy a shunt resistor of a tenth of an ohm or so and of the proper wattage and measure the voltage drop across it. Or you can use a clamp on CT like the one I first pointed to.

I like the clamp on because I do not disturb the appliance or the wiring. I also think that it is safer to have an external device. Lets risk of killing myself and becoming the next nominee for the Darwin Awards.

As for accuracy, just how accurate do you need? And what are you planning on measuring? Not measuring voltage and current at the same moment and sampling and integrating at a fast enough rate will more than overcome any gains you have in measurement accuracy.
I was thinking to measure regular appliences but down to lets say 5W.
By fll-freak
#130225
So you need a current sensor that will do 0 to +-10+ amps DC and supports 220V. Now you need to decide what you want to measure/compute! The whole power measurement "thing" is not as simple as measuring a voltage and a current. Since it is AC, you need to measure many voltages and associated currents and integrate them over the sine wave. Or you can simplify the design with a RMS to DC circuit for both the voltage and current and make the assumption that your power factor is about 1.0.

So before looking at a solution, what is your goal?
By donnib
#130229
fll-freak wrote:So you need a current sensor that will do 0 to +-10+ amps DC and supports 220V. Now you need to decide what you want to measure/compute! The whole power measurement "thing" is not as simple as measuring a voltage and a current. Since it is AC, you need to measure many voltages and associated currents and integrate them over the sine wave. Or you can simplify the design with a RMS to DC circuit for both the voltage and current and make the assumption that your power factor is about 1.0.

So before looking at a solution, what is your goal?
Hmm i don't know exactly what i want. I mean i know what result i want but how i don't know so i need some more help. What i want is to measure current so i can use ohms law to calculate power. If there is a circuit that can do that for me then it's great.
By fll-freak
#130230
Ohms law: V = I * R only works at an instant in time. Since you are talking about an AC circuit, voltage and current are changing all the time. If you take a sample of voltage, it could be anywhere from 311 volts (220*sqrt(2)) to -311V. When we talk about 220 volt circuits, we are talking about RMS voltage (a type of average). Now assume you sampled the voltage at the moment it crosses zero volts. You would expect to see 0 current and as a result 0 watts (P = V * I). But 1/100th (2* 50Hz) of a second later, the voltage would be at its maximum (or minimum). Now if you sampled the voltage and current at that moment, you would get a very different calculation of wattage.

So to accurately determine wattage, you must simultaneously sample voltage and current multiply them together and sum thousands of these over one 50Hz cycle. This will be the wattage of your appliance.

A less accurate method is to measure with an RMS meter, the RMS voltage and current and multiply them together. For a purely resistive load like an incandescent the two methods are the same. But many household loads are not purely resistive. A laptop power supply, refrigerator, hairdryer, TV, are all reactive to some degree. Look at the screen shots I posted here:
viewtopic.php?f=14&t=28957
The hot air gun (hair dryer on steroids) is very non-linear. Just using RMS V and I will not get you the right wattage.

So now that I have complicated your view of Ohm's Law, what are your goals? Do you want to know the exact wattage of something, or that appliance A is better than B? Do you want to know the peak current use, or the RMS? Do you care if your power sags bellow 220 RMS? What about the power factor (think of it as the difference between ideal resistive power use and your actual use)?

One solution is to just assume that your voltage is always at 220 and also assume your appliance is resistive. Then you can pass the output of your sensor through an RMS to DC converter chip http://www.analog.com/en/special-linear ... index.htmlthat will give you a DC voltage proportional to the RMS current. This you can "multiply by 220" to get wattage. This avoids the high frequency sampling.

The above explanations are somewhat simplistic. They are meant to convey concepts not necessarily absolute truth.

PS: And attached is a current plot of a switching power supply. Notice how the current draw is not sinusoidal like a light bulb. The current spikes up as the voltage nears its peaks.

Edit 7/17/2011:
It was brought to my attention that some of my numbers are wrong. Specifically the timing of a 50Hz wave. The time for a full cycle is 0.020 seconds or twenty milliseconds. The time from a zero crossing to a peak is 1/4 of 20 milliseconds or 1/200 (5 ms) not the 1/100 that I stated. I had divided by two not four. Glad I have an editor watching over me!
You do not have the required permissions to view the files attached to this post.