Ne5532 op amp peak detector

Discussion in 'Analog & Mixed-Signal Design' started by seayaker, Jul 9, 2018.

  1. seayaker

    Thread Starter Active Member

    Jan 27, 2009
    36
    0
    I need to build a peak detector circuit for a piezo drum pad. I've tried a dozen or so of these schematics and can't get any to work. The piezo puts out about 2 volts max, I just need to amplify the signal enough to compensate for the diode loss. 1.png
     
  2. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,181
    1,651
    That's the classical circuit. Just make sure C is low leakage and temperature stable.
     
  3. crutschow

    Expert

    Mar 14, 2008
    20,011
    5,629
    You need a bleed resistor across the capacitor, otherwise the output will stay indefinitely at the peak voltage or drift to one of the rails.
    How long do you want the circuit to hold the peak value?
     
    Last edited: Jul 9, 2018
  4. seayaker

    Thread Starter Active Member

    Jan 27, 2009
    36
    0
    I don't want it to hold the value at all. This is for a midi drum pad, so I need a circuit that will detect the peaks very quickly.
     
  5. seayaker

    Thread Starter Active Member

    Jan 27, 2009
    36
    0
    can you tell me what I'm doing wrong? I have 5 volts connected to the vcc terminals and the piezo connected to v in and gnd. but I get nothing when I hit the piezo
     
  6. crutschow

    Expert

    Mar 14, 2008
    20,011
    5,629
    If you don't want to hold the peaks then you don't want a peak detector, since that's what they do.

    So what do you want the circuit to do with the peaks once it "detects" them? :confused:
     
  7. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,181
    1,651
    I suspect a problem with the common-mode input voltage range.
    upload_2018-7-9_19-53-19.png
    upload_2018-7-9_19-53-37.png

    With a supply voltage of 5V, the opamp isn't guaranteed to work. With a typical device, the sweet spot for the input would be between 2 and 3V. If you can't use a higher (and bipolar) supply, you need a different opamp.

    The circuit you're using is only good for holding the peak voltage.
     
  8. crutschow

    Expert

    Mar 14, 2008
    20,011
    5,629
    And only with a DC path to ground for the hold capacitor, as I previously noted.
     
  9. seayaker

    Thread Starter Active Member

    Jan 27, 2009
    36
    0
  10. seayaker

    Thread Starter Active Member

    Jan 27, 2009
    36
    0
     
  11. Sensacell

    Moderator

    Jun 19, 2012
    1,974
    611
    There is no DC bias path at the opamp input either.

    A piezo looks like a capacitor, you need at least a high value resistor from input to ground to bias the input stage.
     
    Kjeldgaard likes this.
  12. seayaker

    Thread Starter Active Member

    Jan 27, 2009
    36
    0
    Thanks, but could you draw the circuit? I'm not experienced with this
     
  13. crutschow

    Expert

    Mar 14, 2008
    20,011
    5,629
    That peak hold circuit has a reset switch for the capacitor, which is necessary if you don't have a resistor, and which you don't have in your circuit.

    How do you expect a circuit to work if you don't build it the same as the circuit in your referenced article? :confused:
     
  14. Sensacell

    Moderator

    Jun 19, 2012
    1,974
    611
    I would be happy to, but you have not defined exactly what the circuit function is.

    I get that it's a drum trigger, but beyond that... you need to explain the big picture.
     
  15. seayaker

    Thread Starter Active Member

    Jan 27, 2009
    36
    0
    download.png

    design_filtered_piezo.png
     
  16. crutschow

    Expert

    Mar 14, 2008
    20,011
    5,629
    Something like this?
    You can change the value of the R3C1 time-constant to get the filter decay time you want.

    Note: To use the NE5532 with this circuit you need a dual plus and minus supply voltage.

    upload_2018-7-10_17-9-29.png
     
    Last edited: Jul 10, 2018
  17. seayaker

    Thread Starter Active Member

    Jan 27, 2009
    36
    0
    Can I use the ne5532 op amp instead of the lm324? I don't completely understand how this works, I never used op amps before. I thought I could use this simple circuit Peak-detector-circuit.png but it made the piezo signal to weak so I was trying amplify the signal with an op amp. The drum pads are velocity sensitive so the AD converter has to have a definite peak. I wanted to keep it as simple as possible because I have 24 pads and need to build a circuit for each pad.
    Thanks for your help and I'm glad to hear the boys are safe.
     
  18. crutschow

    Expert

    Mar 14, 2008
    20,011
    5,629
    Yes, but as I noted, that will require a dual supply, whereas the LM324 is designed for single supply operation so only needs one supply.

    What supply voltage(s) do you have?

    What is the impedance of the circuit that this signal feeds into?
    If it's high enough you may be able to get by with just one op amp per channel instead of two.
     
    Last edited: Jul 10, 2018
  19. MrAl

    AAC Fanatic!

    Jun 17, 2014
    5,247
    1,132
    Hi,

    I would also have to ask what the accuracy requirement is. How accurate does this have to be. Sometimes a diode and cap work, and calibration can come in different ways. It also depends what loads the output.
    The frequency is also important, what frequency it has to operate at. Audio would be different than RF for example.
     
  20. seayaker

    Thread Starter Active Member

    Jan 27, 2009
    36
    0
    I have either 5 or 3.3v, I don't know how to measure the impedance, all I have is a multi meter. I would like to use just one of the ne5532s op amps per channel since I already have them. I have enough to use 2 if needed. if you could put a schematic of the circuit up with any known values I'd really appreciate it.
    DSCN045.JPG
     
    Last edited: Jul 11, 2018
Loading...