Connect with us

Analog Period Detector

Discussion in 'Electronic Design' started by D from BC, May 8, 2007.

Scroll to continue with content
  1. D from BC

    D from BC Guest

    I have a repeating analog waveform and I'd like to make a circuit that
    gives me an OK light if it indeed it's repeating without change.
    The circuit just checks if a V point is repeating with the same time

    For example:
    If the frequency changes... no ok light.
    If there is no signal ok light.
    If the signal locks high ok light..
    If the signal is ok light
    If the signal is repeating just right...ok light..

    So far I've roughly come up with this:
    A window comparator output supplies D input to a D flip flop which is
    clocked by a 555 as a monostable which triggers at some voltage point.

    I'm interested if somebody used a different circuit for a similar
    Maybe there's an IC that does this already??
    D from BC
  2. Can the OK frequency vary over a very wide range?

    If the range of OK frequency is fairly narrow, a phase
    locked loop, like a CD4046 with a very slow error filter
    might have just about everything you need. Its in lock
    logic output may be able to drive the indicator, directly.

    You get to define hoe fast a frequency change is too fast by
    how fast the error filter can change the tracking VCO.
  3. LM567 comes to mind.

    Best regards,
    Spehro Pefhany
  4. Tim Wescott

    Tim Wescott Guest

    You beat me to it. That's what I'd consider first, assuming that the
    problem fit the part.


    Tim Wescott
    Wescott Design Services

    Posting from Google? See

    Do you need to implement control loops in software?
    "Applied Control Theory for Embedded Systems" gives you just what it says.
    See details at
  5. If distortion is a real issue as well as frequency, you will probably need
    to make a simple distortion analyzer. Is it a sine wave, triangle, or more
    complex? If frequency is low, you could use a PIC to trigger off the zero
    crossing or other known point, and take several measurements over the time
    period. For higher frequency, you may need to generate a reference waveform
    phase locked to the signal you are checking, and measure the difference. A
    DSP might be able to perform an FFT.

  6. A PIC, of course.

    Many thanks,

    Don Lancaster voice phone: (928)428-4073
    Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
    rss: email:

    Please visit my GURU's LAIR web site at
  7. D from BC

    D from BC Guest

    Opps I should have mentioned the average signal frequency..
    It's 120Hz... I don't think high speed electronics are required.
    The tolerable f error is high...I'm guessing 10%..
    For example..
    A signal repeating at 120Hz+/-12Hz should give the ok light.

    I remember playing with the 4046 years ago.. I like the idea and I'll
    check it out..
    D from BC
  8. Guest

    You can set the voltage controlled oscillator so that its total range
    is the range you want the signal to be tracked, successfully. Are you
    really concerned if the frequency changes above some rate within that

    John Popelish
  9. D from BC

    D from BC Guest

    At first glance on:
    it looks like it'll do the job...
    I'll stare at the data sheets for awhile... :)


    D from BC
  10. Jamie

    Jamie Guest

    you didn't say if the signal is sine,square etc..
    so I assume you're looking for a nulling effect.
    How about an OP-Amp utilizing both - and + inputs ?
    as soon as either signal shifts in difference, the output
    will change.
    In other words, applying the exact signal to both inputs
    (common mode) or no signal at all to both inputs should
    yield a constant state on the output. This state being
    0 volts for Dual +/- circuits or 50% of your supply rail
    for single supplies.

    just a thought..
  11. D from BC

    D from BC Guest

    The repeating signal is around 120Hz.. This should be a piece of cake
    for PIC speed.
    It's been 2 years since I did PIC programming... I'm a little afraid
    of how much time it take me to recall everything..
    I don't know if it's a bicycle thing :)
    That's why I'm gravitating toward a mixed mode circuit or dedicated

    Maybe I might bite the bullet someday and blow the dust off the PIC
    programmer and get back into it.
    D from BC
  12. Jamie

    Jamie Guest

    Now it depends on how much control you want ? using the LM 567
    works how ever, I find that in some circuits if your reference
    spans double or more that 120 hz it can cause issues.
    how about a active bandpass filter?
    with that, you can determine the phase shift of which direction it's
    going for control
  13. Guest

    A 4046 will run that slowly. But if you want to track a funny waveform
    you might run your VCO say 64 times faster, and compare 64 successive
    digitised samples of your waveform with a stored digitised reference
    version - even a PIC should be able to work out the sum of the squares
    of the deviations between sample and reference at 64x120Hz (7.68kHz or
    130usec per sample). A DSP chip could do the arithmetic a lot faster
    and support many more samples per cycle.
  14. MooseFET

    MooseFET Guest

    How about this:

    A multiplying PLL makes, lets say 8 times the frequency.

    A 4051 constructs something like a sine wave that is fed to one pin on
    a window comparitor.

    The other pin of the comparitor is run from the signal.

    A cd4017 is reset if the window comparitor indicates an out of bounds
    signal. The clock of the 4017 runs from the divided VCO output and it
    is disabled if it hits state 10.
  15. D from BC

    D from BC Guest

    Ok...I understand that the 4046 "lock" range can be set..
    (IIRC 4046 terminology..I haven't reviewed the data sheet yet..I'm
    getting to it..)
    I think I understand your question..
    I think your asking what happens if the signal gets a little squirrely
    in the "lock" range..
    I don't know yet... I think that's ok for now..
    I'll still working on the design..

    If the input signal keeps landing periodically within a v range, then
    the green light lights.

    It's not a picky circuit but it is a PICky circuit.. Somebody put that
    in the PUN post...!! :)

    D from BC
  16. D from BC

    D from BC Guest

    Ooops ..there's another detail I should have put in my OP.

    The circuit has to work on a bridge rectified sine wave signal.
    I understand the off phase detect method. However, I think that's best
    for sine waves.
    D from BC
  17. The edge triggered phase detector in the 4046 can work with
    any wave shape or duty cycle as long as it passes through
    the reference voltage of the chip. That reference is
    roughly half of the supply voltage for the chip. You could
    capacitor couple the full wave rectified wave to the phase
    detector and it will work fine, as long as the rectifier is
    loaded with enough resistance to follow the wave to zero
    twice per cycle. If the unrectified wave is 120 Hz, the VCO
    will have to be designed to have its center frequency around
    240 Hz.
  18. D from BC

    D from BC Guest

    Wow....That's like comparing a signature with a signature..

    Using a PIC or DSP are great hardcore solutions.. Arrrff! Arrfff! :)
    Sometimes I think I should force myself to use micros more often and
    learn DSP programming just be skilled in those areas..

    If I keep using the old stuff like the 4046, I don't think I'm getting
    the best experience..I just stay dum with the dum stuff...
    I'll have the 4046 working wayy before the time it'll take me to learn
    DSP programming. :)

    D from BC
  19. D from BC

    D from BC Guest

    Yeah..I know..sorry about that..
    It's a full wave rectified sine waveform at about 120Hz+/-12Hz.
    The sine has some harmonic distortion but I can't say how much..

    A signal reference and a differential amplifier solution..
    If the op amp output is 0V then the signals are identical..Green
    If a resultant signal exists, then the signals are different and no
    green light.
    If I create the reference waveform by analog methods I'll need to full
    wave rectify a sine oscillator...
    (The source signal is like that..)
    It'll need to synch up too.
    Or I could use a DAC and RAM but if I'm going to go that far I'll drop
    that and start programming a PIC.

    D from BC
  20. D from BC

    D from BC Guest

    I wrote that in response to using an active bandpass filter for phase
    detection. That's best with sine waves.

    But besides...
    It's good to know the 4046 can work on any wave shape..I last used it
    10 years ago..Forgot everything about it..

    Thanks for the tips.
    D from BC
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day