Logic circuit problem (may have easy answer)

Discussion in 'The Projects Forum' started by daviddeakin, Jun 4, 2010.

  1. daviddeakin

    Thread Starter Active Member

    Aug 6, 2009
    207
    27
    I need a solution for a logic circuit, and have a feeling it may have an obvious answer, if I only knew a little more about logic devices!

    It's a bit tricky to explain, so see diagram.

    I am making a synth effect for guitar, and I want a series of pulses whose edge coincides with the peak of the audio waveform. My comparator systme works very well at the moment, but some notes have a strong parasitic harmonic that causes an unwanted double pulse, as shown.

    What I thought was to also generate a signal att eh zero-crossings, and use that as an 'enable' clock. Whenever the enable goes low (or high, whatever) the circuit will wait for a pulse, but then ignore any further pulses during that period, until the next enable cycle. Basically override the spurious extra pulses from the comparator, that I don't want.Hopefully the diagram makes this clear.

    Is there such a device that will do this? One which will not do anything until its input changes, at which point it will latch, and stay that way until the next enable cycle?

    Thanks for any help, I feel like a doofus!
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You might use a S-R flip flop's output to enable/disable the comparator output.

    When the zero crossing is detected, set the flip-flop so that the comparator output is enabled.
    When the comparator has completed outputting the pulse, have it re-set the flip-flop to wait for the next zero crossing.
     
  3. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Use an RS latch, use the comparator to set it and then use the zero cross detector to reset it.
     
  4. ELECTRONERD

    Senior Member

    May 26, 2009
    1,146
    16
    I think noise is getting into your comparator and causing it to switch, adding that extra double pulse. Can you show a schematic of your comparator circuit? You might be able to change the point at which your comparator switches, or try and filter out that noise.
     
  5. daviddeakin

    Thread Starter Active Member

    Aug 6, 2009
    207
    27
    Thanks for the suggestions!

    Electronerd, it is definitely not noise; the audio and resulting pulses are easily viewed on a scope, which is how I came to discover the problem. Thanks for your input though!

    EDIT: The SR latch idea works perfectly in SIM!
    I just wish you could get 3 CMOS latches in one package, as I now have only one spare latch (4013) to divide the frequency by 2 (one octave down), whereas originally I used both latches to divide, and so got 2 octaves down...

    (Ok the 4042 has four D-latches, but it has a shared clock and no S/R pins!)
     
    Last edited: Jun 4, 2010
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Look at the 4043 or 4044. Quad R/S latches. Just what you're looking for.

    Examine the truth tables to see which would be most useful to you.
     
  7. daviddeakin

    Thread Starter Active Member

    Aug 6, 2009
    207
    27
    Can you divide frequency with ordinary SR latches? I thought that required a D latch (the 4013 dual D-latch includes S/R pins)
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Yes, you would need a D-type F/F, clocked by your input signal with the Q\ out wired to the D in, or some type of counter clocked by your signal.
     
  9. rogs

    Active Member

    Aug 28, 2009
    279
    37
    In theory,what you are trying to do is simple.
    In practice, it's almost impossible to obtain reliable results, using this approach.

    ARP tried in the 1970's with their 'AVATAR' guitar synth - http://en.wikipedia.org/wiki/ARP_Avatar
    Cost them $4million in development, and essentially broke the company!

    More recently, people like Roland have taken a much more modern approach, with MIDI interface synths like their GR20 : http://www.youtube.com/watch?v=CXSHs6f_5TU

    But as you might be able to see on that video, the secret is a sophisticated special pick up fitted to the guitar.

    Trying to use the original guitar output, and hoping to isolate fundamentals from such a harmonically rich - and variable - source is notoriously difficult to do.

    Maybe you can think 'outside the box', and think of a slightly new and different approach?


    It is possible to get reasonably good results for a simpler 'trigger' type approach, like those used in octave divider pedals for example. Some of the schematics for those devices might give you some ideas.

    Like this one perhaps: http://files.effectsdatabase.com/schematics/eh_microsynth.pdf

    Or perhaps this one of the Boss OC2, http://www.schematicx.com/schematic/boss-oc-2-octave-pedal-schematic/ which is simpler, and shows the low pass filter, and the variable hysterisis generators more clearly. All helps to overcome the false trigger problem!
    Looking at those schematics again brings back some memories........ahhhhh the long hours spent trying to get clean triggering!
     
    Last edited: Jun 6, 2010
Loading...