Piezo readings to ADC

Status
Not open for further replies.

prprog

Member
Hi:

What circuit will give me the first (highest) value of a Piezo disc read with an ADC (ADC0831)? When I hit the Piezo the ADC , which is connected to a Parallax Stamp, it reads at least 3 to 4 values ,for example ; 100 (first value), 47 , 5, 2..... I will like to include a circuit that will give me only the first value , or maybe an average of the set of values. Tell me the name of the circuit and I will "google" it.

The piezo is connected to the ADC with a Resistor (1M) and Capacitor (101) in parallel to ground. On the Positive side of the piezo I add a Diode with +5V. I notice better readings with the diode included in the input circuit.

I already try using a PAUSE command to the ADC readings ; that reduce the number of readings in the set; but slowdown to much the reading. This is for a MIDI Percussion controller; therefore by ear I know it is not correct.

Thanks,
PRPROG
 

Attachments

  • PiezoReadings.bmp
    380.3 KB · Views: 177
A "Peak detector" but you'll need to reset it after your reading so that it can measure the next peak. The diode and cap are a form of peak detector, with the 1Meg resistor discharging the cap.
 
Or just do it in software as Carl already suggested.....
Thanks Crutschow for the suggestion...but adding a coding solution might work in more faster microprocessors but not on the Stamp II. At least in this case the delay is perceptible when playing faster notes. A hardware solution is my other option. I and considering Moffy's suggestion on a peak detector. I will do some research on the web.

Thanks,
PRPROG
 
So what is the processor doing with the ADC words?
Once it initialze the ADC0831 and read the values it convert (divide by 2 or MAX to a value of 127) , construct a MIDI message and send to a MIDI out port to a sound module. Not too much, but as I add code the basic program (IF , Loops, etc) the latency increment and it does not work......"musically" speaking that is.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…