Piezo conditioning circuit voltage mode vs charge mode - Page 1
Forum section: electronics / beginners

author: EnzoF
author_rank: Contributor
timestamp: June 30, 2021, 03:19:10 pm
content: -

author: Saimoun
author_rank: Frequent Contributor
timestamp: June 30, 2021, 04:25:31 pm
content: Hi EnzoIf you want your voltage to swing around Vcc/2 you need a coupling cap (in series) right after the piezo.You also need to clip your input voltage with diodes before going into the opamp and definitely before going into the MCU - check the max and min input voltage on the MCU's datasheet. Common values are -0.3V and Vcc+0.3V.I actually just made a similar circuit with a piezo (also a drum pad) going into an MCU, and I did not bother with an opamp:* I reduced the range using an internal pull-down resistor and the high output impedance of the piezo (like you did but actually directly inside the MCU), so the range -25 to +25V actually goes -4 to +4V** You can use an external pull-down resistor instead** You can also increase the series resistor R1 or increase the capacitor C1 (in parallel) to reduce the signal even more* Then I clipped the signal so it stays within 0V to 3.3V (ish)You can check out the circuit here:https://www.eevblog.com/forum/beginners/scale-down-a-25v-analog-signal-but-with-only-5v-power/msg3594281/#msg3594281(R3 is internal, and "out" is basically my ADC input)

author: Saimoun
author_rank: Frequent Contributor
timestamp: June 30, 2021, 09:25:18 pm
content: If you need that kind of speed, then yes you are right an opamp is necessaryI just thought in practical terms: to read a drum pad you only need to know (1) when a hit has happened and (2) how hard the hit was. With a high impedance you can configure to ADC to get the sample slowly (like 0.5ms), that will work and 0.5ms latency will not be noticeable by a human (a good musician will start noticing from about 15-20ms latency).Regarding the capacitor I did not see your piezo has one end attached to the reference voltage, then yes your piezo will swing around that frequency. Another way to do this would be to attach the piezo to GND and then move the signal to your reference voltage using a coupling cap.I was looking at the first circuitAnd yes you are right, with an opamp in front of the MCU the opamp will take the hit if the voltage is too high, which will actually protect your MCU (meaning the opamp will blow if the voltage is too high, not the MCU).About your C1 capacitor, values are usually in the 10-100pF range. But check if you need it firstOscillations will only happen if you have a capacitive load on your opamp, for example if the opamp output is connected to a jack, and you plug a very long cable on the Jack.But in your case, even with C2 (not sure why you need it actually), after R5 it is fine I doubt it will oscillate.

author: Saimoun
author_rank: Frequent Contributor
timestamp: July 01, 2021, 07:43:45 am
content: It sounds like a really interesting project! Very innovativeI would love to talk to you about it, over the phone maybe? I'll send you a private message.

author: Zero999
author_rank: Super Contributor
timestamp: July 01, 2021, 02:06:25 pm
content: I don't have much to add, other than here's another thread, which you might find helpful.https://www.eevblog.com/forum/beginners/scale-down-a-25v-analog-signal-but-with-only-5v-power/

author: Renate
author_rank: Super Contributor
timestamp: July 01, 2021, 02:52:31 pm
content: Why not a more normal charge amplifier?https://en.wikipedia.org/wiki/Charge_amplifierMaybe followed by a log amplifier to get a wide dynamic range?

author: Zero999
author_rank: Super Contributor
timestamp: July 03, 2021, 09:28:45 am
content: Quote from: EnzoF on June 30, 2021, 03:19:10 pmWhy delete the original post?Mental note to remember to always quote the first post, especially if it's someone with only one or two posts.

author: Simon
author_rank: Unknown
timestamp: July 03, 2021, 09:32:36 am
content: The next time he does it, he get's banned.