peak detector for piezo drum pad

Thread Starter

seayaker

Joined Jan 27, 2009
54
I need to build a peak detectors for a drum pad assembly, I tried a simple diode, capacitor circuit but the diode cuts to much of the signal. The piezos are connected to a micro controller that can't exceed 3.3v. If I use an opp amp will it increase the voltage going into the board? Any advice on weather this circuit will work of if there is a better way to get the piezos to trigger faster and more accurately? I need to fit 24 of these circuits in a small area so I'd like to keep it as simple as possible.Peak_D2.png
 

danadak

Joined Mar 10, 2018
3,578
A scanning SAR A/D with a mux ?

upload_2018-6-6_5-0-19.png

If you use this approach use pointers in ISR to minimize stack thrashing, or better
yet use DMA and a HW comparator to detect peak. All this is onchip. You can do
up to 64 channels with SAR.

Sample rate is 62K SPS/channel. Actually this is just a small part of this devices capability.
Like digital filter, 20 bit delsig, DACs, DMA, State Machine, COM, PWM, Class D front end, I2S......

What are you doing with the detected peak ? Using that to trigger wavegen ?
You might be able to squeeze a LUT implementation of sine for each channel,
but timing of all this would have to be examined. Plus it only has 4 DACs, unless
you digitally mixed a number of channels together and sent that to DAC.

Regards, Dana.
 
Last edited:

Thread Starter

seayaker

Joined Jan 27, 2009
54
A scanning SAR A/D with a mux ?

View attachment 153763

If you use this approach use pointers in ISR to minimize stack thrashing, or better
yet use DMA and a HW comparator to detect peak. All this is onchip. You can do
up to 64 channels with SAR.

Sample rate is 62K SPS/channel. Actually this is just a small part of this devices capability.
Like digital filter, 20 bit delsig, DACs, DMA, State Machine, COM, PWM, Class D front end, I2S......

What are you doing with the detected peak ? Using that to trigger wavegen ?
You might be able to squeeze a LUT implementation of sine for each channel,
but timing of all this would have to be examined. Plus it only has 4 DACs, unless
you digitally mixed a number of channels together and sent that to DAC.

Regards, Dana.
A scanning SAR A/D with a mux ?

View attachment 153763

If you use this approach use pointers in ISR to minimize stack thrashing, or better
yet use DMA and a HW comparator to detect peak. All this is onchip. You can do
up to 64 channels with SAR.

Sample rate is 62K SPS/channel. Actually this is just a small part of this devices capability.
Like digital filter, 20 bit delsig, DACs, DMA, State Machine, COM, PWM, Class D front end, I2S......

What are you doing with the detected peak ? Using that to trigger wavegen ?
You might be able to squeeze a LUT implementation of sine for each channel,
but timing of all this would have to be examined. Plus it only has 4 DACs, unless
you digitally mixed a number of channels together and sent that to DAC.

Regards, Dana.
Thanks for responding, I'm using a teensy 3.6 board, the piezos are all connected to analog pins and are velocity secretive. I'm not familiar with a SAR, does this output a digital signal? Please understand I'm not very knowledgeable about electronics. 9324f74ab3b000e9a1e6278471200736_original.png
 
Last edited by a moderator:

danadak

Joined Mar 10, 2018
3,578
If you are new to the field I would not recommend you get involved at
this level with PSOC. It requires code writing, and debug/development,
general knowledge of IDEs, microprocessors.

I also note there is no space on that board to add a chip.

To answer the question, output can be a digital value of peak voltage for that
specific channel, a voltage corresponding to the peak, or simply a logic level
signal to trigger the drum wave generation.

Regards, Dana.
 
Last edited:

Hymie

Joined Mar 30, 2018
708
I need to build a peak detectors for a drum pad assembly, I tried a simple diode, capacitor circuit but the diode cuts to much of the signal. The piezos are connected to a micro controller that can't exceed 3.3v. If I use an opp amp will it increase the voltage going into the board? Any advice on weather this circuit will work of if there is a better way to get the piezos to trigger faster and more accurately? I need to fit 24 of these circuits in a small area so I'd like to keep it as simple as possible.View attachment 153740
14 pin ICs are available containing 4 op-amps (quad op-amps) – you would only need 6 of these for your circuit.

You could modify your circuit such that besides detecting the peak voltage, it provided the required amount of gain (amplification).
 
Top