Fast signal negative peak detection

Discussion in 'General Electronics Chat' started by jaxon86, Sep 19, 2011.

  1. jaxon86

    Thread Starter New Member

    Sep 16, 2011
    6
    0
    Hi everyone, I'm Giacomo from Bologna, Italy,
    I'm trying to set up a negative peak detector for a signal that is only 5 us long, so very high frequency and a minimum of -100 mV height (the attachment can clarify the shape of the signal). I followed this thread about the negative peak detection: http://forum.allaboutcircuits.com/showthread.php?t=30770 , and I'm asking myself if the circuit proposed by Audioguru can work (adjusting properly C and R in the circuit) with such fast signals. So if it can work what are the best values for resistances and capacitors to acquire that signal? ( I'm actually using max4477 as op-amps). My final objective is to keep the peak value for about 1 ms and read it with an arduino analog input. Thank you in advance for helping me!
    Giacomo.
     
  2. colinb

    Active Member

    Jun 15, 2011
    351
    35
  3. jaxon86

    Thread Starter New Member

    Sep 16, 2011
    6
    0
    colinb thank you for fast reply, I've taken a look to the link you have sent me. It seems really interesting, but it is so long :p. I've only a question, the heights of my signals are variable as they ranges from -100mV to -500 mV and I need to acquire the precise value of the peak. Once I set the threshold comparator to for example -50 mV can I still acquire the precise value of the peak following the instruction you have sent me? (thank you again , I'm a little bit noob :))
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    You can build your own peak detect with an opamp, diode and capacitor, and reset circuitry. Or you can use the PKD01 peak detect circuit.
     
  5. colinb

    Active Member

    Jun 15, 2011
    351
    35
    Oh, I forgot you were measuring the peak voltage, not just the time that the peak occurred. You would want to use a hardware peak hold circuit in that case. It would still be optimal to use the timer capture function of the Arduino to provide the best time precision, but you might be able to get away with a polling approach.
     
  6. jaxon86

    Thread Starter New Member

    Sep 16, 2011
    6
    0
    Thank you for reply!
    ok I think that I will buy a peak detect circuit... Mrchip perhaps do you know if are there newer models of the pkd01? Because in many websites I visited it is marked as obsolete... thank you in advance
     
  7. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    I guess you are correct. The Analog Devices PKD01 is obsolete.
    It would help if you provided some information of the origin of the signal. Some kind of micro-channel detector, or solid state detector?

    Here is a circuit which should provide you with some ideas. I am not looking for correctness, just something for you to work with. All parts and values subject to change.

    [​IMG]
     
  8. jaxon86

    Thread Starter New Member

    Sep 16, 2011
    6
    0
    Thank you very much mrchip!
    Sorry for late in replying but I was quite busy in this days :p. Yes, the signal comes from a solid state detector and it triggers about every ms. As soon as possible I will try your solution as actually I'm away from lab.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, MrChips' schematic won't work as-is, because the diode D1 will never get forward biased. -100mV inverted becomes 100mV, and you'd need around 500mV or more to forward bias a diode; more to charge up the cap.

    Might try for an inverting gain of 9 for U1; change R1 to 3k, R2 to 27k. That's asking a lot from an opamp at these speeds, though. Even the diode used will be very particular.

    But, taking U2's feedback from the right side of D1 instead of the left will take care of the forward bias problem. I think it's still going to need some amplification though.
     
    Last edited: Sep 22, 2011
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Attached is MrChips' circuit using the MAX4477 dual opamps you said that you are using. I downloaded the MAX4477 macromodel from Maxim's website, here:
    http://www.maxim-ic.com/datasheet/index.mvp/id/3085/t/do#Software/Models

    Don't let the DIP representation of the opamps confuse you; I needed to do it that way because of how the macromodel was constructed.

    Note the supply voltages; you need to keep the difference from +V to -V to 5.5v or less. I don't show mandatory 100nF bypass caps from the IC's +V and -V to ground, but they are needed.

    In, the green trace, is an approximation of your signal. It starts at 0v, and in 2nS falls to -100mV, stays there for 1nS, then in another 2nS rises to 0v, and stays there.

    The R1/R2 combination gives channel 1 of U1 a gain of 9.

    D1 is a BAT54; these are tiny SMT Schottky diodes. You will have a hard time finding another diode that will work. 1N4148/1N914 diodes are too slow for this; or at least in the simulation they won't work.

    The voltage on C2 stays high enough to trigger the output low for ~5.5mS maximum.

    As in MrChips' schematic, U2 channel 1 is used as a voltage follower. Since you specified MAX4477's, I used channel 2 instead of a comparator. Since it's a compensated opamp running open-loop, the opamp is going to be much slower than a comparator; but it may be OK since your uC is fairly slow.
     
    Last edited: Sep 22, 2011
  11. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    Yes, SgtWookie is right, as usual. As I said, this is just some ideas to show how you can create your own peak detect. I just pulled this circuit from one of my past projects. Yes, you will need in increase your gain to suit. What I did not show is the input trans-impedance amplifier because I did not know what kind of detector you were using. You can also adjust the comparator threshold.
     
    SgtWookie likes this.
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    And thanks for that, as it saved me some time. ;) It just needed a few little tweaks here and there...
     
  13. jaxon86

    Thread Starter New Member

    Sep 16, 2011
    6
    0
    thank you for the schematics... I will try as soon as possible, one last question... the signal in output is someway proportional to the amplitude of the input signal?
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    No, not really. As you can see in the simulation, V(c2) decays over time. The R3/C1 lowpass filter will also affect the reading.

    If you're wanting to measure the absolute peak voltage of a signal whos' peak is only about 1uS wide, that is quite difficult. I don't know what the impedance of your input signal is.

    Right now, the input impedance of the circuit is ~30k Ohms. If that doesn't match the impedance of your input, you will have reflections (oscillations, "ringing") due to the mismatch.
     
    Last edited: Sep 24, 2011
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Here's another shot at it.

    The input impedance is now very close to 50 Ohms.

    The gain of the 1st channel is now -1 instead of -9.

    I've removed the RC lowpass filter between R2 and the channel 2 noninverting input; which may need to be added back in depending on what you see on the test bench. If the rise/fall times are very short, you'll need a filter there.

    I increased C2 to 10nF in an attempt to reduce the voltage decay. If it's increased much more, the opamp overshoots the desired voltage significantly.

    As you can see from the plot, the voltage on C2 drops about 10% in 1mS. This is mainly due to ~100nA leakage current through the BAT54 Schottky diode, and partially due to capacitance & leakage in the 2N7002 (~300nA at first, dropping to ~10nA by ~6uS after the input voltage drops).

    I'm also seeing a spike of about -22nA in the reverse current of D1 after the event. I can only attribute that to the D1 junction capacitance coupling the falling output of channel 2 after the event trap. Due to the way the feedback works, once the input IN2+ drops to 0v, OUT2 drops to the negative rail trying to correct the feedback from IN2-. The actual leakage from D1 will likely be much less than this, but I don't have any means of testing it.
     
  16. Eric007

    Senior Member

    Aug 5, 2011
    1,044
    33
    Hahahahah...you can say that again!! He's more than brilliant in my opinion...
     
  17. jaxon86

    Thread Starter New Member

    Sep 16, 2011
    6
    0
    Whoa impressive!... It seems that in this configuration it may work nice :)... so... will it work also with a negative peak I imagine right?
    And when I send a pulse to the reset, the voltage in C2 will drop down fast right? Thank you again :)

    edit: Another difference in my circuit is that I have 0V in the Vss of my op amps... does it change something?
     
    Last edited: Sep 24, 2011
Loading...