Measure 330V ac with microcontroller

Discussion in 'General Electronics Chat' started by aamirali, Jul 20, 2014.

  1. aamirali

    Thread Starter Member

    Feb 2, 2012
    415
    1
    This thread is continuation of:
    http://forum.allaboutcircuits.com/showthread.php?t=99495

    I have changed the thread as specs are changed now.

    Now I have to measure 300V ac max. I took 330Vrms ac (467V peak) to be on safer. Have to remove opamp for cost reduction.
    Directly put that pin to MCU for measurement by level shifting the signal.

    1. What i had done is redice the 2M resistors as in previous thread to 10K each, to reduce the impedence on analog pin of MCU.
    & reduce 1M resistor to 5K (half of 10K)

    2. Divided the ac voltage by two resistors to 2.5V peak or 5V peak to peak.

    3. planning to level shift this ac signal to 2.5V. So that at MCU adc pin, signal appears as moving from 0-5V. (ac)

    4. I have attached the circuit. (zoom in to see it)

    5. 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
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,777
    1,103
    As per the attached should do it. R1 and R2 share the large voltage drop and should each be rated for at least 250V AC. But note, the whole circuit (micro included) is potentially LIVE and could be dangerous. Due safety precautions MUST be taken. It would be much safer to use a step-down transformer instead of R1/R2/R4.
    The moderators will decide if this thread contravenes the Terms of Service (transformerless supplies).
     
    Last edited: Jul 23, 2014
  3. aamirali

    Thread Starter Member

    Feb 2, 2012
    415
    1
    Hi,

    Thanks for your reply. I understand the risk while working with ac voltages. I will palce a small fuse in between for protection.


    Hi I have made some circuit & did some simulation. Only place I am stuck now is selection of capacitor which would act
    as 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: 10K

    3. 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.79K

    4. Fourth page: TO measurement thevenin resistance at adc pin, I have grounded all other voltage sources. & checked thevenin resistance
    comes 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?
     
  4. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    Why dont you reduce the voltage with a transformer first, then rectify it for the ADC?
     
  5. bertus

    Administrator

    Apr 5, 2008
    15,646
    2,344
    Hello,

    I would like you to advice to use a transformer or an isolation amplifier.
    I have attached the ISO122 datasheet for the needed information.

    Bertus
     
Loading...