Measuring mains voltage - isolation requirement - Page 1
Forum section: electronics / projects

author: splin
author_rank: Frequent Contributor
timestamp: December 01, 2014, 12:11:32 am
content: I need to measure the mains voltage in a piece of equipment which will have an accessible communications port and was wondering if I could get away without having to have a seperate isolated power supply for the ADC doing the measurement.If the ADC is on the low voltage side of the mains isolation barrier, could a voltage divider of sufficiently high resistance be connected to the live mains? What would be the minimum resistance need to be and still meet safety standards? Assume that multiple resistors would be used to maintain safety with one or even two resistors failing short circuit and the voltage ratings of the resistors, and creepage and clearance are adequate.This wouldn't be practical if the value is so high that errors due to leakage, parasitic capacitance etc and ADC input (or buffer amp) would be excessive.Having had a brief look at some of the safety standards I came across a figure for a maximum leagage current of .5mA rms, when a test finger grounded via a 2K resistance is probed around the circuit, but that seems rather high to me implying only 480K of leakage impedance across the isolation barrier when the equipment has a working voltage of 240V AC.Is that .5mA value not applicable or would the required test voltage be rather higher than the working voltage to allow for an overvoltage on the mains (which although temporary could be sustained for some time)? Or much higher voltages (AKA those used in hi-pot testing) which could occur transiently such as lightning/ load dumps etc.Obviously careful study of the standards is required but it would be helpful for any heads-ups as standards are rarely the easiest of documents to get to grips with.TIA, Tony

author: RJFreeman
author_rank: Regular Contributor
timestamp: December 01, 2014, 01:45:59 am
content: depending on your why you want to do it, and what results you are after, a cheap mains transformer will give you an output voltage proportional to mains voltage.If your low voltage/output circuitry is grounded then you could get away with a voltage divider directly from mains, but again advisability of doing this could depend on your application.

author: IanB
author_rank: Super Contributor
timestamp: December 01, 2014, 01:53:12 am
content: It would be silly to isolate the thing doing the measurement. Since the thing doing the measurement has to touch the mains to measure it, isolating it would defeat the purpose.The thing that needs isolating is the output that conveys the result to the outside world, the part the punches through the insulation barrier of the mains circuit. You can do this with a transformer or an opto-isolator. Put the isolation in the signal path, not the mains sensing path.

author: splin
author_rank: Frequent Contributor
timestamp: December 01, 2014, 02:36:25 am
content: Quote from: RJFreeman on December 01, 2014, 01:45:59 amCost and space - resistors are much cheaper and smaller than transformers. And close tolerance resistors are cheap enough to avoid calibration unlike the latter. And using the cheapest solution that uses the least resources is the right thing to do anyway - so long as you can meet the safety, reliability etc. requirements.QuoteUmm. That doesn't seem right; why would grounding make it safer? If the unsafe voltage that someone is potentially exposed to, eg. via an accessible port, can source a dangerous current then surely that can pass through the victim and return via an earth path external to the equipment or perhaps even more easily through the earth connected to the same equipment - which they happen to be touching at the time?

author: splin
author_rank: Frequent Contributor
timestamp: December 01, 2014, 03:04:44 am
content: Quote from: IanB on December 01, 2014, 01:53:12 amApologies - I didn't make it clear. Yes of course; realistically, unless you use a transformer to connect the mains signal to the ADC input, the ADC has to be connected to the mains via a resistive divider. The obvious way to make this safe is to provide an isolated power supply to the ADC and an isolator (such as an opto-isolator) between the ADC's output and the rest of the circuit. Both of these cost money, hence the question of how high would the voltage divider's resistance need to be to make it sufficiently safe without additional isolation.I don't think anyone would argue that a tera-ohm would be unsafe whereas 100 kilo-ohms probably would be. So what value would it need to be to meet safety standards?

author: IanB
author_rank: Super Contributor
timestamp: December 01, 2014, 03:35:06 am
content: Quote from: splin on December 01, 2014, 03:04:44 amThis is not obvious at all, and in fact seems to be where you are running into trouble. Only one point of isolation is needed, which is where the signal crosses the insulation barrier between the "inside" and the "outside" of the apparatus. Anything "inside" needs no isolation. There is absolutely no need to provide an isolated power supply to the ADC. Why do you think this is needed?

author: splin
author_rank: Frequent Contributor
timestamp: December 01, 2014, 03:35:54 am
content: Quote from: evb149 on December 01, 2014, 02:43:14 amThank you for your comprehensive answer; I think I see what you mean. Although a sufficiently high value resistor across the isolation barrier should be safe in theory, it would be expensive to prove that the actual components used would be safe and continue to be safe. Eg. that the resistors could be guaranteed not to fail in a low impedance state, due to electromigration or dendritic growth or whatever. Manufacturers of transformers, opto-isolators etc. have invested large sums to demonstrate that they are safe and remain so over long periods operating in varied climatic conditions. Myself on the other hand saying it must be safe because if one one of the 5 series resistors goes short circuit then the remainder keep it safe, might not be convincing.I'm not sure that's actually true in reallity as at some point there has to be a judgement made. Just using approved components doesn't mean that some unexpected interaction or unusual configuration can't render the product unsafe. I guess to some extent it's a question of luck for small companies - just look at the number of serious failures in the aircraft industry, including wiring insulation failures, despite the vast sums the industry spends on safety.

author: splin
author_rank: Frequent Contributor
timestamp: December 01, 2014, 03:49:41 am
content: Quote from: IanB on December 01, 2014, 03:35:06 amYou're absolutely right - it isn't and I never actually believed it is required - just a temporary abberation due to having to apply considerably more concentration on trying to post a non-gibberish reply on a tablet than thinking about the problem properly!Another cost that I didn't mention though is that the ADC will require it's own voltage reference at additional cost, and possibly calibration, as it can't (cheaply) share the one already available on the other side of the isolation barrier.

author: RJFreeman
author_rank: Regular Contributor
timestamp: December 01, 2014, 12:11:22 pm
content: QuoteBecause grounding the measurement circuitry provides (at least) multiple paths to ground in the event of failure;through the pre-amp/signal conditioning circuitry, the ADC, the microprocessor, the serial interface driver.especially if you add say a 100mA fuse in series with the AC input and a zener diode to clamp the input to the ADC (or low leakage diodes to supply and ground) past the input divider resistor, (which does need to handle the required ac voltage etc).sure you may end up with a smoking wreck but without grounding you have no way of adding any form of protection,But repeat above with double insulated power supply and you have no protection in the event of failure and an interface that will float at a higher voltage anyway, potentially damaging anything you connect to the interface as well.NB I am thinking you mean normal AC mains of 110V or 240V above that and you can enter a whole new set of complications

author: Seekonk
author_rank: Super Contributor
timestamp: December 01, 2014, 12:26:50 pm
content: If you are measuring mains voltage, I don't see why that would need to be accurate, within 5V would be sufficient. More likely you would want to detect a loss of power quickly. An opto isilator with a zener?resistor would fit the need.

author: HKJ
author_rank: Super Contributor
timestamp: December 01, 2014, 01:57:13 pm
content: It might be possible to do something with this type of optocoupler:http://www.avagotech.com/pages/en/optocouplers_plastic/plastic_high_linearity_analog_optocoupler/hcnr200/

author: Circuitous
author_rank: Unknown
timestamp: December 01, 2014, 02:04:51 pm
content: You might look at the ADE7913, it is designed for just your intended purpose.http://m.analog.com/mt/www.analog.com/en/analog-to-digital-converters/energy-measurement/ade7913/products/product.html

author: splin
author_rank: Frequent Contributor
timestamp: December 01, 2014, 05:17:21 pm
content: Quote from: RJFreeman on December 01, 2014, 12:11:22 pmBut you already have that path to ground via the neutral which is the circuit ground - otherwise it couldn't measure the live to neutral voltage.However I've just realised that this creates a serious hazzard in the event of the neutral becoming disconnected as the circuit ground would then have a low impedance connection to live via the power supply - or any external electrical equipment connected this side of the neutral break. Clearly the neutral must be isolated as well as the live and I find it hard to believe that I'd realised this some while ago and then forgotten it!Simply splitting the voltage divider with equal resistance in the live and neutral sides (and thus measuring across a resistor in the centre of the divider) wouldn't be a good idea as circuit ground would then float at half mains voltage!So it looks as though there's no way to avoid the cost of an isolator and probably a second supply (isolated or not) to power the live side of the circuit.QuoteWould that apply if I had to modify it for three phase 240V given the 415V phase to phase voltage?

author: splin
author_rank: Frequent Contributor
timestamp: December 01, 2014, 06:37:49 pm
content: Quote from: HKJ on December 01, 2014, 01:57:13 pmThat's an interesting device I've not seen before. Its a bit expensive at around $2 in 1K quantities though, plus the op-amps and would still require power on the monitoring side.Quote from: Circuitous on December 01, 2014, 02:04:51 pmYes that's a good solution but overkill for this and thus rather expensive at around $6, though it does include the isolated power supply. I'm beggining to think that a seperate low cost micro with an ADC and voltage reference, an opto-isolator and a resistive or capacitive power supply is perhaps the way to go.

author: HKJ
author_rank: Super Contributor
timestamp: December 01, 2014, 06:44:47 pm
content: Quote from: splin on December 01, 2014, 06:37:49 pmYou might be able to do the powering with a capacitor. I have not checked if you can get it cheaper from other brands.

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: December 01, 2014, 06:48:59 pm
content: check AMC1100 isolation amplifier

author: RJFreeman
author_rank: Regular Contributor
timestamp: December 02, 2014, 01:49:18 am
content: Quoteyes and you can't afford to presume that Neutral and Active are wired correctly and not swapped over, safety needs to be groundQuoteRun 2 dividers at (say) 20:1 one between Active and ground, the other between Neutral and ground.The Neutral divider will be at 0V* while the active divider will be at 11.5V AC (presuming 230V) now use a differential amplifier to take the difference of the two dividers and feed the result to your ADC.* Ok the catch here is presuming no noise on the Neutral, which can happen for various reasons, but should in most cases be insignificant in the scheme of things.QuoteOk, for 415V it is safer to presume the power input will cop a loss of neutral at some point, but again if measurements are referenced to Ground this should not be a major problem. If you are looking at 4 pin (no neutral, 3 phase) then that would also have to be considered.Although note that running dividers between mains and ground may or may not be permitted depending on your device, (i.e. you may get away with it for industrial use but not for domestic use) and safety rules in your country. So it really does depend on your application.