Go Down

Topic: monitoring 120/240 vac (Read 2899 times) previous topic - next topic

2660

I know this is an ongoing topic but I have a question.

I am looking to monitor a generators output 120/208v  &  120/240v A wall wart is not an option.  PCB mounted transformers are, but I am having problems finding the ones I want. 

The question:
Other that the voltage, what is wrong with rectifying the AC to DC and then using a voltage divider to feed the analog pin a proper value. 


retrolefty

#1
Aug 17, 2011, 12:33 am Last Edit: Aug 17, 2011, 12:35 am by retrolefty Reason: 1
Quote
The question:
Other that the voltage, what is wrong with rectifying the AC to DC and then using a voltage divider to feed the analog pin a proper value.


Nothing wrong in concept. You would probably want to add filtering caps after the rectifying (use full wave bridge). You should then end up with a DC voltage that is proportional to the AC voltage. Depending on the transformer secondary voltage you use, you most likely will need to use a voltage divider to scale the voltage to the Arduino's 0-5vdc measurement limit. You may have to come up with a initial 'calibration' constant to factor in with a map() command so you end up with a decent variable reading of the AC voltage. Remember that the accuracy of the arduino analog input conversion is directly proportional to the Vcc voltage of the AVR chip, so if you change from arduino external power to USB power the +5vdc is sure to be slightly different and thus your AC scaled voltage reading will also change proportionally.

Something like this transformer? http://www.allelectronics.com/make-a-store/item/PCTX-816/PC-MOUNT-TRANSFORMER-16VCT-0.35A-OR-8V-0.70A/1.html

Lefty

robtillaart

You can connect a lamp to the output and monitor its brightness with an LDR .... sort of optocoupler :)
definitely needs some calibration

Or a voltage dependant fan combined with an RPM counter :)

"There are many ways to Rome"
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

2660

My goal is not to use isolating transformers if it will work. 


Techone

Quote
My goal is not to use isolating transformers if it will work.


Can you tell us why you CAN NOT use a isolation transformer ( a cheap take-apart AC Wall adapter ) And why you want a DIRECT way ?   So what is the "issue" here ?  My opinion is : Risk to damage the Arduino <--- BIG TIME !!!

But IF you REALLY have to ( a NO choice condition here ) use a resistors network.  A few Delta /_\ ....--> like this : /_\-/_\-/_\. So the atteniation ( reduction )  is very high. And don't forget to use power resistors ( high wattage type ). And seal the network. A solution. 

jackrae

Your main problem of using a simple resistor divider network is that your circuit will be either at near ground or near mains voltage, depending upon the "polarity" of your input wiring.  Hook it up wrong and your whole arduino circuit is potentially lethal. 

2660

#6
Aug 18, 2011, 12:18 am Last Edit: Aug 18, 2011, 12:32 am by 2660 Reason: 1
Ok more info, first off I make my living with "high voltage" (120, 208, 240, 277,480v ) and am aware of what can go wrong. I am looking for advice on factors that affect how accurate and reliable the use are, not if it can kill you.  8)

The project is monitoring (internet) of backup generators.

Quote

Can you tell us why you CAN NOT use a isolation transformer ( a cheap take-apart AC Wall adapter ) And why you want a DIRECT way ?   So what is the "issue" here ?  My opinion is : Risk to damage the Arduino <--- BIG TIME !!!


I never said I "CAN NOT", I said I would prefer not to use them.  When finished this project will be a potted PCB in an aluminum enclosure, so the smaller I can keep the components the better.  It would also require six transformers to monitor each unit so the size of even "small" transformers adds up fast.  Transformers also add thermal load.

Quote

Why is a PC transformer an option but a wall wart isn't?

The finished product will be a one piece unit that is hardwired into the transfer switch.  

Quote

Are you trying to sense supply anomalies (interruptions, brownouts, spikes, RFI, etc.)?

For this part only voltage.

Quote

Your main problem of using a simple resistor divider network is that your circuit will be either at near ground or near mains voltage, depending upon the "polarity" of your input wiring.  Hook it up wrong and your whole arduino circuit is potentially lethal.

Yep. if it is connected wrong bad things will happen

retrolefty

#7
Aug 18, 2011, 12:37 am Last Edit: Aug 18, 2011, 12:46 am by retrolefty Reason: 1
Quote
How about this, it is the same regardless of input.


Those values of resistors (megohms) are much too high to meet the 10k ohm (or less) source impedance that the arduino analog input requires, readings will be very noisy and drifty. Use a small 120/240 input / small AC secondary voltage, PC mounted transformer like I linked to below. That way you are dealing with much lower AC secondary voltage and also you would then not have to make any wired connection from the arduino ground reference to the AC neutral. Heck, size the transformer correctly and it could even also power the arduino board with a added rectifier/filter/positive voltage regulator.

Just take the secondary winding voltage and rectify, filter, and voltage divide to equate a 0-150 ACV = 0-5vdc, or a 0-250 ACV = 0-5vdc. All you need is a representative proportional sampling of the raw AC voltage, which is then scaled in your arduino software to the original voltage units.

Lefty

Bill_Kerr


n.

I am looking to monitor a generators output 120/208v  &  120/240v



Hi 02660

Have you considered also monitoring the current.  Not my area of expertise but I suspect there would be large switches inline to switch from mains to generator.  Monitoring current would ensure you are seeing a load on the generator.

Regards   Bill
Don't you just hate ONE D 10 T problems?

dc42

#9
Aug 18, 2011, 07:05 pm Last Edit: Aug 18, 2011, 07:09 pm by dc42 Reason: 1
Hi 02660,

If you are certain that you can live with the Arduino GND being connected to one side of the 120v or 240v supply, then you can use a potential divider. For example, connect 20K between the analog input and the Ardiono GND pin, 20K in parallel with 1.5M between the input pin and the +5v pin or the AREF pin, and 1.5M from the pin to the other side of the 120v or 240v supply. This will give you a reading around 0 at -375v, 512 at 0v and 1023 at +375v. Since the peak voltage of a 240v RMS AC signal is about 340v this give you some margin. This provides a source resistance of just less than 10K to the ADC in the Arduino, which is low enough for the ADC to function reliably.

Be sure that the 1.5M resistor has an adequate voltage rating, or make it up from several smaller resistor in series.

Unless you run the Arduino from batteries, you will need to provide a dedicated power supply to it (because Arduino GND will be referenced to one side of the AC supply).

You will need to use optical isolation between the Arduino and whatever it sends the data to, to overcome the problem that Arduino GND is connected to one side of the generator output.

If you just want to check whether the generator is running (and perhaps measure the frequency) rather than measure the voltage, then I suggest you monitor its output via an opto isolator instead. Drive the opto isolator from the AC voltage being monitored via a series resistor, and connect a diode in parallel with it to prevent it being reversed biased during the other half of the cycle.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

2660

dc42 you just answered the why can it be done question!  8)


You will need to use optical isolation between the Arduino and whatever it sends the data to, to overcome the problem that Arduino GND is connected to one side of the generator output.

This is a problem...
The interface will be wired Ethernet.  The power supply ground and neutral is not an issue since the power supply technically has no grounded conductor it can share the neutral.  But the ground on the Ethernet need to be an equipment ground.  This answers the question of why I cant use a voltage divider only.  I could go wireless, but that add more potential problems. (people change things).

Go Up