Differentiate between Inverter output and Mains

Discussion in 'Embedded Systems and Microcontrollers' started by keyboardcowboy, Sep 11, 2013.

  1. keyboardcowboy

    Thread Starter New Member

    Dec 31, 2012
    25
    0
    greetings all

    is there anyway to differentiate between the 220v mains and the 220v provided by an inverter (modified sine wave type) using a microcontroller or any other circuit which can be connected to a controller later. i want to switch a relay when the inverter is providing power instead of mains
     
    Last edited: Sep 11, 2013
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I guess it can be done. By say looking for high frequency content. Also if you have a scope. Try looking at and compare the output then using a small 50/60 transformer. Just thinking out loud here.
     
  3. keyboardcowboy

    Thread Starter New Member

    Dec 31, 2012
    25
    0
    I was hoping for some way easier.:confused:
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    Just look for zero crossings, where the signal goes a bit above zero and a bit below zero.
    Two comparators tripping on something like when the signal goes above a few volts (5 or 10). This will prevent false tripping.

    Make these separate comparators and compare the time between the signal going to zero (comparator one) and going from zero to negative (comparator 2), and you can do the reverse just to be sure.

    With a sine wave these times will be close to zero.

    With a modified sine wave these times will be much larger.

    Or you could do it with an A2D converter by taking a bunch of samples and doing about the same.
     
  5. praondevou

    AAC Fanatic!

    Jul 9, 2011
    2,936
    488
    You could measure inverter input (DC) or output (AC) current or tap into the control signal to the static switch.
     
  6. keyboardcowboy

    Thread Starter New Member

    Dec 31, 2012
    25
    0
    I have decided to take the microcontroller route and i have managed to get zero crossing detection working using atmega8, now how should i measure the duration from the zero crossing to say 4v positive?
     
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    Google "window comparator."
     
  8. keyboardcowboy

    Thread Starter New Member

    Dec 31, 2012
    25
    0
    But a window comparator is used to check if a voltage is within a specific voltage window, how can it be used to measure the duration?:confused:
     
  9. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Correct, you need a standard "comparator" or "zero-cross detector" as ErnieM said earlier.
     
  10. Ramussons

    Active Member

    May 3, 2013
    557
    92
    Use a tuned filter @ 150 / 180 Hz to detect the 3rd harmonic. The Inverter output will have a much higher value.

    Ramesh
     
Loading...