Measure 330V ac with microcontroller - Page 1
Forum section: electronics / beginners

author: A2
author_rank: Contributor
timestamp: July 20, 2014, 11:14:41 am
content: I have to measure 300V ac max. I took 330Vrms ac (467V peak) to be on safer. Have to remove opamp for cost reduction which could act as buffer & adder.Directly put that pin to MCU for measurement by level shifting the signal.1. Divided the ac voltage by two resistors to 2.5V peak or 5V peak to peak.2. planning to level shift this ac signal to 2.5V. So that at MCU adc pin, signal appears as moving from 0-5V. (ac)3. I have attached the circuit. (zoom in to see it)4. But problem is circuit now is on dc bias of 1.455V dc. If we do analysis by superposition, I can find out this.But I want to level shift the signal so that it stays on 2.5V dc bias & also appears as low impdence source to analog pin of MCU i.e less than 10K.What resistor values i should choose

author: German_EE
author_rank: Super Contributor
timestamp: July 20, 2014, 11:39:14 am
content: Please do not use this design as it is not safe.1) Dropping 467V down to 5V across one resistor means that you have a single point of failure, if that resistor shorts out then the full voltage will be applied to your circuit. It is better to use a chain of resistors (all of them high voltage rated).2) You need a HRC fuse on the input. again in case of failure.3) There is no protection on the input of your microcontroller and if the input rises above 5V then your chip is dead. Consider fitting a 5V zener diode and a series fuse.4) You need an indicator that the circuit is live.When building this circuit you must use large gaps between the circuit traces on your PCB and you must mount the board inside an earthed metal enclosure. If your microcontroller requires controls then you must ensure that the shafts of these controls are grounded to the enclosure.Please consider abandoning this approach and use a circuit with an analog opto isolator such as the HCNR200, this will be much safer.

author: Psi
author_rank: Super Contributor
timestamp: July 20, 2014, 12:14:21 pm
content: Quote from: A2 on July 20, 2014, 11:14:41 amYou don't need to have 10k impedance unless you plan to run the MCU ADC at full sample rate.If you just want to measure a voltage for display purposes or any slow logic you can drive the ADC from as high as 100K. If you set the ADC clock nice and slow there will be plenty of time to charge up the ADC's internal sample capacitor.Quote from: German_EE on July 20, 2014, 11:39:14 amAs above, or at the very least add a capacitor to decouple the mains from the 5V side.Optoisolater is the better approach though.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: July 20, 2014, 01:00:22 pm
content: QuoteJust want to question this.You probably don't need a HRC fuse unless you don't have any upstream circuit breakers that will break on the current that a non HRC fuse can handle. Such as CAT IV.Otherwise youmaybe able to use a glass fuse, even an M205 fuse can handle about 30A,but you need to check the specs.So if for instance, this device will only be used on circuits that have a 30A circuit breaker upstream, you would be ok with an M205 fuse.In short the fuse needs to be able break the maximum fault current of where it could be situated. Not necessarily a HRC fuse.If anyone disagrees with me, please speak.

author: German_EE
author_rank: Super Contributor
timestamp: July 20, 2014, 04:37:42 pm
content: When I suggested an HRC fuse I was thinking of two things:1) The input protection circuits of all those Fluke meters that we've seen on teardowns (thanks Dave). It's wise to copy these techniques as the boys and girls at Fluke seem to know what they're doing.2) The way that an HRC fuse ruptures when subjected to an overload, it does not arc internally and the break in current is clean and quick.After posting I had a thought, would a capacitive divider be safer than one based on resistors?

author: SeanB
author_rank: Super Contributor
timestamp: July 20, 2014, 06:59:47 pm
content: No safer, you can just as easily exceed the voltage ratings on a capacitor, and a resistor can have a very high voltage rating in a relatively small size, along with the possibility of you using multiple units in series to reduce the voltage stress per unit.

author: electronics man
author_rank: Frequent Contributor
timestamp: July 21, 2014, 10:33:33 am
content: Maybe use a neon tube or a MOV on the input to keep the voltage within range

author: ConKbot
author_rank: Super Contributor
timestamp: July 21, 2014, 05:23:44 pm
content: Quote from: German_EE on July 20, 2014, 04:37:42 pm1)The flukes have HRC fuses on the current shunts for when you brain fart, and put the probes across the bus in home load center with it in current mode it doesnt explode in your hands. The voltage inputs have MOV's and PTCs for input protection. Check out a teardown of the meters without current measuring (I think one of the fluke datalogging wireless ones was like that?)2) It does arc internally, its just obscured and then suppressed by the fiber jacket and sand filling. Any standard/fast blow fuse should be clean and quick. Nothing else in your house will have HRC fuses, as the breaker/load center provides the 15/30/whatever-is-relevant-in-your-area KA load breaking capacity.If this whole widget is floating at mains, then dont bother with isolation, as it is obviously irrelevant. If it isnt then obviously isolation would be a good thing. depending on cost/space, the analog optocoupler may work well, or an isolation amplifier, or put an ADC on the hot side and run the digital signals back over a digital isolator. Or if this is a one off, get a small transformer and calibrate that and use it as a potential transformer.http://www.digikey.com/product-detail/en/3FD-212/MT2101-ND/98294at $5.25 each, its about the same price as an analog opto, iso amp, or dac/digital isolator. If your item is mains powered and you have an onboard transformer, monitor that instead, but mind your grounds as there is sure to be a diode in the path somewhere.

author: German_EE
author_rank: Super Contributor
timestamp: July 21, 2014, 08:22:09 pm
content: Well, we have all had a brain fart once in a while, my last one came when I put a meter switched to the ohms range across some 220V terminals. The meter survived and my only clue that something was wrong was that the meter display kept fading out as I applied the probes.This is why cheap multimeters are a very bad investment.

author: A2
author_rank: Contributor
timestamp: July 23, 2014, 07:13:57 am
content: Hi I have made some circuit & did some simulation. Only place I am stuck now is selection of capacitor which would actas low pass filter as system will be bit noisy. (as on page 6 of attached pdf)I have attached my simulation results in a pdf file. (Move right clockwise the pdf once)Originally mu circuit will have 330V ac rms & 50Hz. But for simualion I taken 1Hz.1. First page: It is the actual circuit which I will be used. It will divide the 330V ac & used 5V for dc offsetting by reistor divider.2. Second page: I have applied superposition theorem. I have removed 5V dc source i.e ground it.Equivalent voltage comes out to 1.774V ac rms i.e circuit forms a voltage divider of 1850K: 10K3. Third page: I have applied superposition theorem. I have removed 330 ac source i.e ground it.Equivalent voltage comes out to 2.487 dc i.e circuit forms a voltage divider of 20K: 19.79K4. Fourth page: TO measurement thevenin resistance at adc pin, I have grounded all other voltage sources. & checked thevenin resistancecomes out to be 9.946K or 10K approx.5. Fifth page: Shows the equivalent circuit diagram when 330V ac rms is applied.Divided ac signal is riding over dc voltage with thevenin resistance.6. Sixth page: Now since circuit will be bit noisy. so I want to place a small capacitor so that it act as low pass filter.So that ripple from dc source is grounded.But i don't know how it will react. What phase shift it will introduce?Will it affect the ac waveform shape?Don't know if its correct to place capacitor here or not?