Piezo Input ADC and Digital IN

Hello,

I've created an electronic drum set using a Teensy, which is similar to Arduino. I am a programmer and do not have a huge background in electronics, so I was looking to get some insight on feasibility and some general advice on how to proceed on my project. I've searched on this particular topic, but all I can find is people suggesting to use ADC inputs and searching for the solution. :frowning:

My project works pretty well as of right now, but I am going back and improving things at this point. I want to start looking into pressure sensitivity and making it more efficient. There is sometimes a very small latency, and I am fairly certain it's attributed to how I am currently reading the ADC channels. There is a lot of waste.

The inefficiency I am looking at right now is how I am handling the element triggering. What it comes down to is I am looping through each ADC channel and reading to determine if a drum has been hit, along with a global interrupt in the mix. It works, but it could be better. The problem is that I need more sample data for sensitivity. Switching the multiplexer and getting the ADC value takes too long (but still can be measured in microseconds).

What I would like to do is still signal with ADC with piezo output and use some kind of op-amp circuit to turn on a digital input. Basically I want to poll the digital inputs and not the ADC channels directly, then I can keep a queue of channels that need read - That way I only need to analog read the channels that need paying attention to. Mostly looking for circuit suggestions. One thing that came to mind is if I use an op-amp, would that essentially kill any voltage left for the ADC to read? Any suggestions on an op-amp to use, or maybe a component that I could use that I don't know about? Any help would be awesome. :slight_smile:

Psychopete:
One thing that came to mind is if I use an op-amp, would that essentially kill any voltage left for the ADC to read?

I guess that depends on the input impedance of the op amp you use. Since they tend to be high impedance, I'm not sure what the overall effect would be.

If the goal is to just increase the signal's voltage in order to pass the high threshold of the digital inputs, is an op-amp necessary? Couldn't you just use a simpler transistor?

One thing that came to mind is if I use an op-amp, would that essentially kill any voltage left for the ADC to read?

No it would not.

Basically you want to use the op amp as a comparator to trigger a digital input so you know what channel to read. How many of these signals have you got? If you have a lot then you might want to look at a 8-line to 3-line priority encoder 74LS148 to signal to you what sensor needs reading. You can cascade these to have more input lines.

However, whether this will actually solve your root problems is another matter.

Right now just using 5 channels, using real cymbals that are duct taped for the time being.

If I could use a transistor, that'd be great, or op-amp even. I am a visual kind of person, I saw an example of signaling a digital input where it looked like they had connected the pin to negative to signal low - is that how it's done? What I am not picturing is how that could be accomplished using the components as the output would be close to vcc voltage. If I can tie the digital pin to the output of the op-amp or transistor, then I think that would get me a lot closer. Any thoughts on using a schmitt trigger?

Thanks,
Pete

Right now just using 5 channels,

I would have thought that only having 5 channels should give you no very great latency, certainly not enough for you to see an appreciably difference when you implement the digital trigger so you only read the sensor being struck at the time.

If I can tie the digital pin to the output of the op-amp

Yes you can. Especially if the op amp is running off just the 5V rail.

where it looked like they had connected the pin to negative to signal low - is that how it's done?

You can. An op amp amplifies the difference in voltage between the + and the - inputs. You can put the signal into any one you like and fix the other at the threshold voltage with either fixed resistors or a pot. Without any feedback resistors the output is high if the + input is greater than the - input and low if it is the other way round.

Any thoughts on using a schmitt trigger?

In effect this is the same thing but with a fixed threshold voltage and a bit of hysteresis. You can add hysteresis to the system described above with a positive feedback resistor going to the fixed threshold voltage.

Look at the Comparators and detectors section of this link:-