Measuring AC voltages using MCU

Discussion in 'The Projects Forum' started by Jonesy, Mar 13, 2011.

  1. Jonesy

    Thread Starter New Member

    Jul 7, 2010
    20
    0
    hi, I am doing a project involving an avr mcu and I'm supposed to measure ac voltage, current. The current is measured using a C.T which should be safe, while my problem is measuring the AC voltage.

    1. How should I isolate it? (I stepped down the 240V to around 2.4V)

    2. Does AVR mcu adc measure AC voltage/current(stepped down) efficiently? 0-5VAC 0-200mA How accurate is it? or should I use an external ADC?
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    What do you mean by "efficiently"? What kind of precision do you need in the measurement?

    As to doing AC, rectify and filter the waveform into DC first.
     
  3. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    You have to clamp the AC signal at 0 volt DC level because the stepped down 2.4VAC swings,you have to take care of the negative part.You could use clampers i.e.. DC restorers.

    And yes the 2.4 VAC is in rms I think ,its should be 2.4/0.707 = 3.3946 Volt

    Always clip your signal to protect your ADC module,for that use clipper circuits...
     
    Last edited: Mar 13, 2011
  4. Jonesy

    Thread Starter New Member

    Jul 7, 2010
    20
    0
    A voltage divider would step down the voltage from 240V to 2.4V then the mcu to sense it. I do not want to share the neutral wire which would means I need to isolate it.

    For the current transformer, i have not yet found any which could sense from 0-10A at 60 Hz. Usually above 1A any nothing before that.
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    You need to use a step down transformer for safety.
     
  6. Jonesy

    Thread Starter New Member

    Jul 7, 2010
    20
    0
    yeap, but using a transformer produces more cost and size. And a simple voltage divider would give much more accuracy rite?

    Or how about a voltage divider with an instrumentation amplifier?
     
  7. Jonesy

    Thread Starter New Member

    Jul 7, 2010
    20
    0
    How to use the instrumentation amplifier? Is it a voltage follower? Can it be used for isolation?
     
  8. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    No to both. The stepdown ratio of any transformer will not vary, so an exact ratio between the line voltage and the secondary voltage can be established. Using any circuitry that is connected directly to the line is always a lethal shock hazard. An IA is no protection at all.

    What is your life worth?
     
  9. Jonesy

    Thread Starter New Member

    Jul 7, 2010
    20
    0
    Okay, so after the transformer, I will use the voltage divider then only to MCU?

    What about the clampers and clippers?
     
  10. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    With respect to the stepped down voltage and the CT output, both will have to be rectified, as most microprocessors can only accept positive voltages.

    Having done so, filtering the voltages to DC relieves you of the job of tracking peaks and trying to convert at that instant. Taking the average of several conversions reduces the effect of residual ripple.
     
  11. Jonesy

    Thread Starter New Member

    Jul 7, 2010
    20
    0
    How to clip the adc to a voltage 0-6V ? A diode and ?
    Will it distortions to my measurements?
     
  12. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Where did the 6 volts come from? Your manual for the microprocessor will tell you what the range of voltage is that the ADC will work on.

    What sort of precision do you need?
     
  13. Jonesy

    Thread Starter New Member

    Jul 7, 2010
    20
    0
    I used a clipper circuit with a zener diode and a schottky diode. Once I added schottky, the voltage drops, any idea why? The schottky diode clamps any negative voltages hence it should be cathode heading up.

    A last observation, I used a 1 ohm power resistor to measure 0.1A. But the voltage output (measured from my voltmeter does not correspond). And the dc setting and ac setting for my voltmeter give different values. I should use AC as the ac current through the resistor gives AC voltage. Am I correct?
     
  14. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    I do not think anyone can follow that without an accurate schematic.
     
  15. Jonesy

    Thread Starter New Member

    Jul 7, 2010
    20
    0
    Anyone heard of a current transformer able to measure below 1A? I've been searching for 0-10A range but only manage to find 1-10A, nothing below that.
     
Loading...