monitoring 120/240 vac

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.

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

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

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

"There are many ways to Rome"

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

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.

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.

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.

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.

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.

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

For this part only voltage.

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

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

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

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.

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

dc42:
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).