# DIY Kill-A-Watt

#### Mohonri

##### Supreme [H]ardness
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

##### [H]ard|Gawd
Nice work.

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
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

##### [H]ard|Gawd
Well thats the gist of Mohonri's dealeo.....

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

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.

#### agent420

##### [H]ard|Gawd
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
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
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
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.

#### ChingChang

##### Supreme [H]ardness
nice, but "Kill-A-Watt" can do more.. shows lots of info and tracks KWH

#### Mohonri

##### Supreme [H]ardness
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
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

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

#### ChingChang

##### Supreme [H]ardness
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
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

##### [H]ard|Gawd
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...... If ya got one , you can get the other.

P.S. AC calculations are straightforward.....

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

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
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.

#### mikeblas

##### [H]ard|DCer of the Month - May 2006
BrainEater said:
That one cost me 12 bux.
Does it measure true RMS? Power Factor?

#### Ockie

##### *** Self Proclaimed Storage King ***
BrainEater said:
Nice work.

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
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

#### eyedol

##### Gawd
Wish my computer consumed 120 watts. At idle it consumes about 280 watts.

#### BrainEater

##### [H]ard|Gawd
Mohonri said:
It's something along the lines of this

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.

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

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

nope.

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
eyedol said:
Wish my computer consumed 120 watts. At idle it consumes about 280 watts.
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
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
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
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.....
<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

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
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
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.

Help plz.

#### agent420

##### [H]ard|Gawd
Blast from the past

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
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
Thank you both agent420 and Mohonri. Now I understand.

Now to more of a challenge.

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?

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
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
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
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.

#### Mohonri

##### Supreme [H]ardness
Frank4d is thinking exactly the same thing I'm thinking.

#### qubesquare

##### n00b
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?

#### Mohonri

##### Supreme [H]ardness
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
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! 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
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
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 . I just wired up my ADC to work with this voltage range and I am in business.

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.

#### Mohonri

##### Supreme [H]ardness
Awesome. Glad to hear I didn't tell you anything wrong.

#### mikeblas

##### [H]ard|DCer of the Month - May 2006
Is this circuit safe? What happens when something goes wrong and the load becomes a dead short?