Go Down

Topic: Measuring Mains Voltage (Read 3 times) previous topic - next topic

draythomp

That's it Jack, you nailed it.  If I hook directly to the mains for my circuit, it will be fine until I turn the plug over.  Now, the hot side is in a different place and can cause some real problems. 

That's exactly what I was looking for and no one ever mentions.  Sure I could put a polarized plug with a ground pin on it to keep myself out of trouble, but if someone copied my circuit and didn't.....boom.  It isn't that its unsafe to do this, it's like you said, someone else won't take the care that I (hopefully) did in setting it up or modifying it.  There are ways of avoiding the problems you pointed out (excepting lawyers), but it's hard to make something foolproof; fools are too resourceful. 

Thank you.  I guess I'll go look for a really small power transformer that I can use to sample voltage and leverage it as a power supply for the rest of the circuitry.  The hall effect device will still be in the mains circuit, but it's optoisolated, doesn't care which leg it's in and UL rated to 3KV.
Trying to keep my house under control http://www.desert-home.com/

Jack Christensen

#11
May 25, 2011, 05:08 am Last Edit: May 25, 2011, 05:14 am by Jack Christensen Reason: 1
Good deal! No mysteries, just basic EE stuff. Interesting project you have there BTW. I'm curious, once all the proper sensing circuitry is in place, what's the technique for actually calculating the power consumption? You mentioned sampling at 3KHz, I assume not only voltage but current as well? Then just basically integrate over time? Can power factor be calculated as well? Not an area I've delved into, but I might be interested in trying it sometime.

The Atmel application note (link from KE7GKP) is interesting and is at least somewhat similar to your original thoughts in that it simply uses 1M? resistors for mains isolation. Also note in the text that while it allows for voltages up to 1000V, it also says it is not a sufficient design to handle larger surges. So the circuit in the AN is probably fine for experimentation, but more protection is needed in a permanent installation. Finally there was a comment on the input pin capacitance introducing a small phase shift, not sure if this would even be significant for your application.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

ElectricWater


I have split phase 220 which means I have 110 at the plug for the freezer.  Why the heck can't I use a voltage divider?

Something like:  Hot wire -> 1M resistor -> some other value resistor ->1M resistor -> neutral wire.  I would measure the voltage across the middle resistor at the arduino and tailor the value to keep it in the 1-2 volt range.

I must add one thing to this conversation: If you connected the Arduino in this fashion the voltage seen by the Arduino may indeed be in the 1-2 volt range, but the voltage on the Arduino measured against the neutral wire and earth ground would be at about 55 VAC. Not exactly a safe scenario unless the Arduino were contained within an enclosure that completely insulated from its surroundings.
Inconveniencing electrons one drop at a time

justjed


Something like:  Hot wire -> 1M resistor -> some other value resistor ->1M resistor -> neutral wire.  I would measure the voltage across the middle resistor at the arduino and tailor the value to keep it in the 1-2 volt range.


Maybe I'm missing something, but that sounds like: (obviously, I should have put a load on the far right line)



So the voltage is always going to be nominally 110VAC. So that doesn't tell you anything about how much current your freezer is drawing when it's running. Don't you need something more like a clamp-on ammeter?
... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

draythomp

Just a quick (hopefully) note on the other things that came out of this discussion:

Lefty you're right (pun totally intended) I have seen young people on this forum and others that I wouldn't recommend messing around with a 5V supply, much less something that can overcome skin resistance.  My problem was only with preaching that it was unsafe without an example or instance or anything.  That's what I ran into when I was reading a thousand or so posts on this kind of thing around the web.  Just, "Don't do it, it'll put your eye out" kind of statements.  I guess the "kid with the BB gun" in me can't accept that.

Your example of having to share a ground with the AC neutral is a good one as was Jack's of a hot chassis.  These are both problems that can be overcome relatively simply, but if one is going to ever share such a thing....beware of the uninformed.  The floating (voltage wise) arduino is another concern because someone will probably grab the arduino and the faucet at the same time; especially in a stainless steel, grounded refrigerator.  Sigh.

So, as I mentioned before, I'll bite the bullet and get a transformer, darn it.

In answer to some of the other questions.  Yes, you sample the instantaneous voltages over a power cycle as well as the current (going to use a hall device this time) and then integrate to get the various values.  You can measure the power factor and frequency of the incoming power to see what happens when you turn on the plasma cutter to cut a kink out of the tractor's fender.  I already do this for both phases of my home power using 200A current transformers wrapped around the mains input inside the circuit box (see, I'm not afraid of the voltage).  The calculations sound complex, but actually aren't bad at all.  My reading on an instantaneous basis rival the power company's expensive meters.  Yes, they've been out here explaining how they measure the power and comparing their results to mine.    Over time, their temperature compensation is better and my sums (of the readings) drifts from the KWH they record and I pay for, but not by enough to worry about. 

I've had county inspectors looking at it, people from the power company looking at how I did it and even energy conservation experts from a swimming pool company comment on it.  It was a really fun project that is ongoing (forever) and now I want to start applying it to smaller appliances.  For example, I have separate refrigerator and freezer.  Individually, they don't use much power and represent a minor expense, however with demand metering, if they both kick on at the same time, it drives demand usage up and I pay a ton for the small fraction of time that they operate together.  Hence, this project.  I describe this in horrifying detail on my web site at draythomp.blogspot.com.  I also have the various schematics and code that is running most of the devices I've incorporated into this project.  So, if you want to do something similar, grab anything you want and go for it.  Around my house, the current power usage is as easy to find as the time of day.
Trying to keep my house under control http://www.desert-home.com/

Go Up