DIY Kill-A-Watt

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
First of all, DON'T DO THIS UNLESS YOU KNOW WHAT YOU'RE DOING! This is pretty simple, but if you mess it up, you can electrocute yourself, burn down your house, etc.</disclaimer>

So my brother bought himself a Kill-A-Watt the other day. I'm stingy, so I didn't want to spend $25 on one, and he won't let me borrow his (long story). So I decided to make my own power meter of a sort.

Materials
1) a three-prong extension cord. I picked a one-foot one up from Fry's for $2.99
2) a .100 Ohm, 5W resistor. I picked up a 2-pack from Fry's for $0.89

Total cost: $4.20 including tax

I cut through the outer insulation on the extension cord to expose the three wires inside. Sorry, I was so excited, I didn't take pictures. The green one is ground, and the black one is 'hot'. Leave those two alone. Cut the white wire., and splice in the .1 Ohm resistor. Wrap everything back together with electrical tape, but leave the two leads on the resistor exposed. Here's what it looks like when you're done:


To measure the power something is using, plug it into this extension cord, and plug the extension cord into the wall. Now measure the voltage (in AC) across the resistor. Take the number of millivolts, and multiply by 1.2. That will give you the number of watts that device is using. So my computer, folding at 100% 24/7, gives me 99mV across the resistor. Multiply that by 1.2 to get roughly 120 watts drawn by the computer and the UPS it's attached to.

Notes: Why the white wire? Because if something that is conducting current is going to be exposed, you want it to be the neutral wire, which the white one is. If it shorts out against anything, nothing nasty will happen because (unless your house wiring is faulty), the voltage at that point will already be at (or very close to) zero. Using the ground wire is no good, since the ground wire is a safety measure, and under normal circumstances shouldn't be conducting current anyway, no matter what the load is.
 

BrainEater

Gawd
Joined
Jul 21, 2004
Messages
1,017
Nice work. :D

I do however prefer a 10$ analog AC current meter....I have a LAN 'power center' that I use for powering our lans....it's got a meter on each circuit......

I also made a 'portable' version :



That one cost me 12 bux.
 

awdark

[H]ard|Gawd
Joined
Mar 22, 2003
Messages
1,630
Oh neat.
But why not use the ammeter part of a multimeter?
(I have read about it, but never tried because I have a tendency to almost kill myself unless I know its all good)

So that ammeter is about $10? Homedepot or electronics store?
 

BrainEater

Gawd
Joined
Jul 21, 2004
Messages
1,017
Well thats the gist of Mohonri's dealeo.....

My POS multimeter won't do pure amps , and , well , I'm lazy so.... :p

The bottom line , is amps......while it's nice to see watts , it ain't required.....your AC breaker box is rated in amps , not watts......when you are wiring for a lan or whatever , you need to know amps/circuit etc.....

Analog meters won't be found at radio shack anymore........But your basic 15 Amp AC meter isn't expensive at a decent electronics store.

:D
 

agent420

[H]ard|Gawd
Joined
Sep 6, 2001
Messages
1,388
I wonder if the power factor value comes into play here. Often times AC power 'wattage' is not simply V*A; especially with inductive or reactive loads (like a switching power supply). I know many utility wattmeters have some type of circuitry to correct this. This is also why specs for UPS systems can be so confusing when they are related to VA (volt-amps), which is not the same as watts.

The other obscure aspect is that wall power is spec'd at an RMS value... That means the peak voltage is around 165v ! Depending how your meter measures ac voltage, this could effect your calculations. Some meters do have an rms function, but many don't; in which case you'd have to multiply your measurements by 1.4.

While I think the idea of the project is cool, I really think for safety two changes should be considered. 1] Any connections to a mains supply should absolutely be within an enclosure of some sort and 2] I think the shunt should be placed on the hot (black) line because the common (white) is sometimes part of the ground or safety circuit. You will note that every other appliance or device always switches the hot lead, for good reason. I understand why you chose the method you did, but anyone else thinking of doing something similar should bear these facts in mind.

BrainEater said:
The bottom line , is amps......while it's nice to see watts , it ain't required.....your AC breaker box is rated in amps , not watts......when you are wiring for a lan or whatever , you need to know amps/circuit etc.....
Depends on what you want to know... If you want to know how much power something is using or generating, wattage is a more appropriate measurement. Many ac calculations are not as straightforward as their dc counterparts. Breaker boxes and most other things rated in amps usually reflect a limitation value; like don't exceed this much current.
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
agent420 said:
I wonder if the power factor value comes into play here....
That's a good point. My 'meter' doesn't account for PF
The other obscure aspect is that wall power is spec'd at an RMS value... That means the peak voltage is around 165v ! Depending how your meter measures ac voltage, this could effect your calculations.
Another good point. My multimeter does RMS, so we're in good shape.

I think the shunt should be placed on the hot (black) line because the common (white) is sometimes part of the ground or safety circuit.
When a device is operating normally, all the 'return' current is going through the neutral wire. Which is grounded at the breaker box. The Ground wire is the safety circuit. Putting it in the neutral wire is actually pretty safe. Putting it in the hot wire, on the other hand, is not. See, your body is a (weak) ground. If that resistor is on the hot wire, and you touch one of them, you're going to get a nasty shock. However, with it in the neutral wire, you can touch it all day long and never feel a thing.

@awdark: The reason I went for this approach instead of using my DMM as an ammeter is this: With this, I can have a good, solid circuit to the device that's being powered, and I don't have to interrupt the circuit to test it. I *could* uses the ammeter, but then I would have to sit there and hold the DMM probes against the wires (not dangerous, but certainly disconcerting), and if I slipped, the probes would come off the wires, and the load would shut down. It's purely an ease-of-use thing.
 

awdark

[H]ard|Gawd
Joined
Mar 22, 2003
Messages
1,630
Ah I see, I like the logic then.

Might be a stupid question, but I have seen those huge resistors (sandbars?) in power supplies could I take one of those for this purpose? If so, how does the calculation change?
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
Given any parts in the world, I would have gotten a .12 Ohm resistor. Then the number of milliamps = number of watts.

First of all, you want something small. As in, well under 1 Ohm. I personally wouldn't go above a 0.27 Ohm resistor. (If you have a 1Ohm resistor, and you have a 120W device, that resistor will already be dissipating 1W). My resistor, with a 120W load, dissipates 0.1 W. Which means that I can measure up to about 840W before I hit the power dissipation rating of my resistor. On the other hand, I wouldn't go much smaller than 0.1Ohm as well. If you go much smaller, it gets hard to measure how much voltage is actually being dropped across it.

Secondly, you want to make sure that the resistor is capable of handling the power it will be dissipating. Mine's a 5W, which is comfortably higher than anything I'll encounter under normal circumstances.
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
By no means did I ever intend this to be a full-grown replacement for a real Kill-A-Watt. For example, mine is nearly useless for intermittent loads like a refrigerator, and it doesn't count up how much total energy is used. It just gives a nice, easy way to measure power consumption for things that are running contantly. Like a computer.
 

plot

Supreme [H]ardness
Joined
Apr 3, 2002
Messages
4,794
I have one of those kill-a-watt things (i was smart and asked for one for xmas instead of buying it myself... hehe). thing's pretty nifty except i never look at it cause it's in a corner somewhere with stuff plugged into it. the advantage it has over yours (besides being digital) is that it keeps a running total of how much power is being consumed. I have my minifridge plugged becuase i know it cycles on and off all day just to see what it does, but i've been lazy and havnt been checking it so I dont have any results on it yet :(


outside of that, nice job, can't beat DIY :D

edit: you really think your computer uses a constant amount of power? ;)
 

ChingChang

Supreme [H]ardness
Joined
Mar 27, 2003
Messages
6,505
Mohonri said:
By no means did I ever intend this to be a full-grown replacement for a real Kill-A-Watt. For example, mine is nearly useless for intermittent loads like a refrigerator, and it doesn't count up how much total energy is used. It just gives a nice, easy way to measure power consumption for things that are running contantly. Like a computer.
yeah I understand. It would be good for things that draw a constant amount of power, such as a computer (test power consumption at load/idle) as you said. But it does require more work to calculate it, while KAW has that nifty display.

Right now I'm using my KAW to keep track of how much power my window AC unit uses in my room. 33.4 KWH in about 5 days right now.. ~450w when it is on, and about 40w for just the fan.
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
plot said:
edit: you really think your computer uses a constant amount of power? ;)
More or less. It's folding 24/7 (well...minus when I'm playing games), so the CPU usage is always pegged at 100%.
 

BrainEater

Gawd
Joined
Jul 21, 2004
Messages
1,017
agent420 said:
Depends on what you want to know... If you want to know how much power something is using or generating, wattage is a more appropriate measurement. Many ac calculations are not as straightforward as their dc counterparts. Breaker boxes and most other things rated in amps usually reflect a limitation value; like don't exceed this much current.

um...yea.The defined unit of power IS watts , so if you want to know the power you'll be using watts.That's a given.

However , power is a calculated value , and , one way or another , you need current to calculate it....( both of the meters in this post are current shunts)

Newayz.....srry for argueing semantics...... :D If ya got one , you can get the other.

P.S. AC calculations are straightforward..... :p

---------------------------------------

As far as the power factor goes : While a switching power supply is a nonlinear load , this is a result of harmonics , not straight Inductive reactance.....Calculating this is a long boring process that really isn't required.

The same goes for RMS values.....why complicate things ?

I do agree with the point about using a grounded enclosure.Safety first !
 

MD_Willington

2[H]4U
Joined
Jul 15, 2004
Messages
2,233
Unless your electrical power company charges you for Apparent power and Reactive power along with Real power I wouldn't worry about Power Factor and all that crap... The loading is minimal in the average household as compared to an Industrial load.
 

Ockie

*** Self Proclaimed Storage King ***
Joined
Mar 2, 2005
Messages
17,991
BrainEater said:
Nice work. :D

I do however prefer a 10$ analog AC current meter....I have a LAN 'power center' that I use for powering our lans....it's got a meter on each circuit......

I also made a 'portable' version :



That one cost me 12 bux.


Can you send me pictures of this "power center" that you so fondly speak off? I'm curious to see what you are up to?
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
Ockie said:
Can you send me pictures of this "power center" that you so fondly speak off? I'm curious to see what you are up to?
It's something along the lines of this :p
 

BrainEater

Gawd
Joined
Jul 21, 2004
Messages
1,017
Mohonri said:
It's something along the lines of this :p

Hah ! man I wish..

Sure Ockie....I'll just post a couple here....It's nothing special really.It's an 8 breaker 'sub-panel' with some dryer/stove plugs on it..so I can leech power relatively easily , with some meters.

It's at my 'work yard'.I should be there saturdayish so I'll snap a couple pics. :D


----------------------------------------------------

mikeblas said:
Does it measure true RMS? Power Factor?

nope. :p

Allow me to re-iterate this :

We're talking Cheap methods of monitoring power/current.Under 25$.

I know of no measuring device under 25$ that does power factor....RMS values are easier , but most cheapo meters dun do that even .

You don't need RMS values.Period.As far as power factor goes : The difference in 'Real power' V.S. 'Reactive power ' is probably within the tolerances of the cheap meters anyways ( lets say 10%)....

Bottom line : If you want cheep metering , you will sacrifice accuracy.
----------
 

ChingChang

Supreme [H]ardness
Joined
Mar 27, 2003
Messages
6,505
eyedol said:
Wish my computer consumed 120 watts. At idle it consumes about 280 watts. :D
wow. Are you serious?? Mine is around 280 under load, that is with overclocked processor running at 1.5v. And overclocked GPU.
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
Yep, the key here is cheap. Now, it is entirely possible, with a bit of work, to make something that'll measure actual power. You just need an opamp and a cheap dsp or a microcontroller with a ADC onboard. Amplify the voltage across this resistor, sample it as fast as the ucontroller can, and do the math onboard. Choose your method for output, etc.
 

mikeblas

[H]ard|DCer of the Month - May 2006
Joined
Jun 26, 2004
Messages
12,775
BrainEater said:
I know of no measuring device under 25$ that does power factor....

The Kill-A-Watt does, and it's not hard to find under $20. The difference PF causes depends on the load.
 

agent420

[H]ard|Gawd
Joined
Sep 6, 2001
Messages
1,388
fwiw here's a good Dan's Data page on pf and pc's.

I think the OP shunt project is a cheap clever method to get some rough estimates, which is no doubt what it was intended to do. I just wondered about PF and such because I'm the curious type and had seen this page:
The most recently notorious is the switching power supply in a PC. These power supplies start with a bridge rectifier feeding a capacitor, and so, particularly at part load, draw their current in little peaks, when the instantaneous line voltage is above the capacitor voltage, forward biasing the rectifier. Another notorious non-sinusoidal current draw is the popular phase controlled light dimmer, which uses a TRIAC or SCR to reduce the RMS voltage to the load by turning on partway through the half cycle. Not only is the current waveform highly non-sinusoidal, but it is also out of phase with the voltage supply. Hence, these loads have a non-unity power factor, and draw reactive power.
Now I don't know how much that may impact things, but that's why I asked ;)

I see those Kill-A-Watt things could be had for around $20, that's a pretty good deal.

BrainEater said:
P.S. AC calculations are straightforward..... :p
<snip>
The same goes for RMS values.....why complicate things ?
RMS is pretty straightforward, easy to accommodate and can have a significant effect on the results. Even if the meter doesn't read true rms, the math is simple enough.

As for AC calculations, if my man Dan says "Complex AC loads are not this simple.", (or, if I may paraphrase, "AC calculations are not straightforward"), I'm likely to believe him :p

One day I'd like to have a good working knowledge of analog and ac analysis; while I've played around with electronics for a long time, I admit I'm no pro in that area - I tend to do more digital and ucontroller type projects. However, I have at one point or another sat down and studied the subject a bit enough to know that unless you are calculating loads for a light bulb or radiant heater, there certainly is some complexity involved in ac analysis and some circuits can be very complex. The need to go to that depth may not always be required for all solutions, but that doesn't mean the proper calculations are any easier. Hardly anything ac is technically as simple as straight 3 value Ohms Law V=IR calculations.

For example, if you are designing something as simple as a bridge rectifer for a power supply, how to you determine the proper value filter caps to use? What effect do those caps have on transformer heating? If you add an inductor for noise filtering, how does that effect the current and power draw? I admit that more often than not I just grab the biggest cap I have in my parts bin, but just because it works doen't make it technically correct. In fact, many times a large value cap can be detrimental to the operation or efficiency of a bridge filter.
 

fat-tony

[H]ard|Gawd
Joined
Apr 15, 2003
Messages
1,205
The big thing about measuring power factor is that you have to simultaneously measure the voltage across the hot and neutral, and the current. After that, you have to look at the phase difference between the two waves.

Not something that is easy to do with a standard meter, unless it happens to have 3 probes. It *is* pretty straightforward to look at with a scope though, or using the "two-wattmeter" method.
 

qubesquare

n00b
Joined
Jun 2, 2008
Messages
7
2) a .100 Ohm, 5W resistor. I picked up a 2-pack from Fry's for $0.89

Can someone explain to me how a resistor that is rated at 5W was able to measure a wattage of 120 watts?

If I wanted to measure the wattage of a few light bulbs( at about 400 to 600 watts total) what value resistor and wattage rating would i require? I don't need accuracy, just a ball park reading.

:confused:

Help plz.
 

agent420

[H]ard|Gawd
Joined
Sep 6, 2001
Messages
1,388
Blast from the past :cool:

The answer is mentioned in post #8...

Given any parts in the world, I would have gotten a .12 Ohm resistor. Then the number of milliamps = number of watts.

First of all, you want something small. As in, well under 1 Ohm. I personally wouldn't go above a 0.27 Ohm resistor. (If you have a 1Ohm resistor, and you have a 120W device, that resistor will already be dissipating 1W). My resistor, with a 120W load, dissipates 0.1 W. Which means that I can measure up to about 840W before I hit the power dissipation rating of my resistor. On the other hand, I wouldn't go much smaller than 0.1Ohm as well. If you go much smaller, it gets hard to measure how much voltage is actually being dropped across it.

Secondly, you want to make sure that the resistor is capable of handling the power it will be dissipating. Mine's a 5W, which is comfortably higher than anything I'll encounter under normal circumstances.

The resistor rating doesn't reflect the entire circuit load, only what it is actually dissapating itself. At such a low value, most of the current flows right through. It's only a small percentage that is resisted (and thus turned into heat).
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
Can someone explain to me how a resistor that is rated at 5W was able to measure a wattage of 120 watts?

If I wanted to measure the wattage of a few light bulbs( at about 400 to 600 watts total) what value resistor and wattage rating would i require? I don't need accuracy, just a ball park reading.
Since all the current that goes through the load (in your case, the lights) also passes through the resistor, you can easily calculate the current. For example, let's say I measure the voltage across this resistor, and it's .25V. From Ohm's law (V=IR), we can calculate that the current is I=V/R = .25/.100 = 2.5A. Since you know that the total voltage coming from the wall is 120V, you can calculate the power drawn (including the power dissipated by the resistor, but that turns out to be negligible) by using P = IV = 2.5 * 120 = 300W.
 

qubesquare

n00b
Joined
Jun 2, 2008
Messages
7
Thank you both agent420 and Mohonri. Now I understand. :)


Now to more of a challenge. :D

I'm looking to pass this mV reading to an ADC. Are any of you familiar with scaling to the ADC voltage range (0v - 5v)? From my research it appears an opamp circuit is in order. More specifically a differential opamp circuit. I haven't had too much experience with opamp circuits. Any ideas or suggestions? :confused:

My end goal:
I want my 8-bit ADC to tell if 1,2,3,4,or 5 100watt light bulb are plugged into a power strip. So, as you can tell, I don't need much resolution or accuracy in my readings. Any help, guidance, or suggestions would be greatly appreciated. :)
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
Well, now, that's a bit more complicated. Yes, you'd want to put in a buffer before putting that voltage into an ADC. Fortunately, you can get single-chip buffer amplifiers so you don't have to do lots of calculations. As for scaling, I guess you could use an opamp instead of a plain buffer in order to scale the voltage up, but I don't know that it's strictly necessary--a lot of ADCs can themselves be scaled by the addition of a few resistors. A careful reading of a datasheet for your ADC may well turn up a "typical application" along with instructions on how to scale the input of the ADC appropriately.

Once it gets past the buffer amp, however, it's still an AC signal. If you want something more like a DC signal, I'd suggest taking that opamp and using it in an integrating application, and sticking a rectifier on the input.

I'm also interested in knowing what you plan to do with the output of the ADC.
 

qubesquare

n00b
Joined
Jun 2, 2008
Messages
7
I completely forgot that I would be able to set the ADC to work a range other than 0v-5v. Now I just have to worry about the AC to DC part of it, like you said. A million thank yous, Mohonri!!!

I'm also interested in knowing what you plan to do with the output of the ADC.

My goal is to use a microcontroller to determine how many lights are plugged into a power strip. Since I know that the bulbs are all 100Watts, I figured that if I found the total wattage of the lights that I would just be able to divide by 100watts to figure out the number of bulbs plugged in. Its a bit crude, but I'm open to other suggestions if you have any. :) I guess in essence its a not-so-accurate wattmeter.
 

Frank4d

Gawd
Joined
Oct 29, 2005
Messages
715
If you want to know how many 100 watt lights are turned on (without caring about actual watts) you could use a part like LM3914. You would need a circuit that rectifies AC to DC and possibly amplifies/divides it so the DC iutput to the LM3914 drives one output per 100 watt lamp.
 

qubesquare

n00b
Joined
Jun 2, 2008
Messages
7
Thank you Frank4d for that great suggestion. I wish I would have checked your post before I embarked on my day of discovery. I will get that IC part tomorrow and experiment with that as well.



Well this is what I built today in my lab. I managed to rectify the AC signal and smooth it out with a capacitor. Here are my results. Note: The bulbs are 100 Watts.

[RESULTS: Multimeter set to read AC mVolts, straight from .1 Ohm resistor (no rectifier circuit)]
5 bulbs: 420 mV​
4 bulbs: 337 mV​
3 bulbs: 253 mV​
2 bulbs: 170 mV​
1 bulbs: 85 mV​
0 bulbs: 0 mV​

[RESULTS: Multimeter set to read DC mVolts, passed through the circuit above.]
5 bulbs: 246 mV​
4 bulbs: 198 mV​
3 bulbs: 161 mV​
2 bulbs: 131 mV​
1 bulbs: 109 mV​
0 bulbs: 97 mV​

So this may be a stupid question… but if I wanted to bring the value of the voltage drop that is present on the load resistor to an ADC, do I assume the ‘+’ side is my signal and the ‘–‘ side is my ground? :confused:
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
Yes. However, there's another problem you'll run into: the bridge rectifier will soak up all your voltage drop, and you won't get any signal at all. You'll need to amplify the signal before rectifying it.
 

qubesquare

n00b
Joined
Jun 2, 2008
Messages
7
Yes. However, there's another problem you'll run into: the bridge rectifier will soak up all your voltage drop, and you won't get any signal at all. You'll need to amplify the signal before rectifying it.

Argh! :mad: Well, I just got back from the part store. I picked up a LM3914 to toy with. But it appears I'm still stuck where I was in the beginning and that is signal amplification. Time to do some more research. Thank you Mohonri for pointing that out to me.
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,751
The signal amplification really isn't too difficult. Here's what you do:

Power the opamp from a single (12V is nice, but you have plenty of options) power supply. Use a resistor divider to supply the positive terminal of the opamp with 6V (or half of whatever voltage supply you end up using). Now, connect the two sides of the .1Ohm resistor to the + and - pins of the opamp using, oh, let's say 1kOhm resistors. At this point, three resistors should be connected to the positive pin--one going to 12V, one going to DC GND, and one going to one side of the resistor. The negative input should have only one resistor at this point.

Now, connect a new resistor (10kOhm works well for this application) between the negative input pin and the output pin. Congratulations, you've just constructed a negative feedback amplifier with a gain of 10. For every 100mV AC on the input, you'll get 1V change on the output.

Now, run a wire from the output to one side of your bridge rectifier, and another from the positive input pin (yes, there's a lot connected to it) to the other side of the bridge rectifier. From there, continue according to the diagram you drew earlier.
 

qubesquare

n00b
Joined
Jun 2, 2008
Messages
7
So here is my progress for today. Many thanks to you, Mohonri. Your opamp circuit worked extremely well. :)



I wired up this bad boy today. With a load of five 100watt light bulbs (my max condition) I got a DC value of about 2.30V :D :D :D. I just wired up my ADC to work with this voltage range and I am in business. :D

The readings are somewhat stable. They dance a little bit but thats just a matter of averaging for a time period on the microcontroller firmware. I am extremely pleased with the results.

A million thanks to everyone that helped me arrive at this final circuit. I'll keep you guys posted of any future developments.
 

mikeblas

[H]ard|DCer of the Month - May 2006
Joined
Jun 26, 2004
Messages
12,775
Is this circuit safe? What happens when something goes wrong and the load becomes a dead short?
 
Top