Help with piezo op amp circuit - Page 1
Forum section: electronics / beginners

author: alexander_
author_rank: Newbie
timestamp: January 31, 2025, 04:25:14 pm
content: Hello,I am trying to read voltages off of a piezo cylinder in order to generate an FFT. Ultimately, this circuit will be for a low-powered hydrophone with a raspberry pi PICO as the main board. While I'm testing the circuit, I'm hooking the sensor up to a raspberry pi 4 since it is easier to visualize the FFT produced by the sensor using matplotlib. The components I'm using are:Raspberry Pi 4Op amp:https://www.digikey.com/en/products/detail/rohm-semiconductor/LMR1001YF-CE2/21679178MCP3008Piezo cylinder from StemincI have some python code to generate the FFT and I'm confident that the code works since it accurately creates an FFT when use a MAX4466 electret microphone as the sensor (expose the microphone to a 400Hz tone and I get a FFT with a 400Hz spike). However, I've had NO success with the piezo however and I think the problem comes down to either my circuit or my choice of op amp.The circuit: I've tried to make a simple voltage follower circuit. I have a 1M resistor in parallel to one of the piezo inputs for impedance matching. This input goes to the op amp's Vpos. The Vneg of the op amp provides feedback to the output. I'm new to electronics, but as I understand it, that setup ought to give at least some sort of signal to the ADC. But in fact, I observe no change to the FFT when I expose the piezo to a loud tone or even when I physically touch it. I also tried doubling R1 to 2M and tried adding an R2 between the Vneg and output but there is no change in the FFT.The op amp: I went with a Rohm LMR1001YF-CE2 op amp simply because it appears to meet the requirements of my circuit which are: (1) rail-to-rail and (2) works at 3.3V. I'm not confident that this is the best op amp. I've read that op amps can be either a good or bad fit given the impedance of the sensor but I'm not sure where to look at op amp data sheets to judge the suitability of the LMR1001YF-CE2 for this circuit.Is there something obvious I'm overlooking?

author: TimFox
author_rank: Super Contributor
timestamp: January 31, 2025, 04:51:43 pm
content: You didn’t post a circuit, but it sounds like you are running both op amp inputs at nominal 0 V with a single power supply. The output voltage will not be able to swing properly.The usual way to fix this, when a single supply is necessary, is to generate a “virtual ground” DC voltage at half the supply voltage and connect your 1 or 2 M\$\Omega\$ resistor to that node instead of ground. The output should swing positive and negative with respect to that voltage.That voltage supplies almost zero current, so a simple two-resistor divider with bypass capacitor usually suffices.

author: Marco
author_rank: Super Contributor
timestamp: January 31, 2025, 05:16:12 pm
content: You don't impedance match a microphone, you might want to equalize it through loading, but you don't impedance match.Calling the Piezo connections "inputs" is confusing.You should use a charge amplifier.https://www.allaboutcircuits.com/technical-articles/understanding-and-implementing-charge-amplifiers-for-piezoelectric-sensor-s/

author: alexander_
author_rank: Newbie
timestamp: February 03, 2025, 02:38:31 pm
content: Thanks for the update and I fixed the missing circuit by adding the attachment to the OP.I took your advice and tried tying the positive piezo lead to a voltage divider from 3.3V. I can see my raw voltage values of the samples are coming in around a mean of ~1.52 V but, I'm sorry to say, that this has not made any change in the FFT. This is what my circuit looks like now along with what the FFT looks like - no spikes:Once again, I've tried adjusting R1 and R2 with no luck. Can someone please critique my design and tell me if I've made some mistake?

author: Kleinstein
author_rank: Super Contributor
timestamp: February 03, 2025, 05:20:37 pm
content: The new resistors R3 R4 are replacing the 1 M resistor to ground. In principle a good idea, but likely higher resistance (e.g. 1 M) needed. How much resistance is needed depends on the sensor capacity and frequency range of interest.Depending on the sensor and signal level expected one may want additional gain at the amplifier. This may have to be for the AC part only. The expected amplitude may be going down towards higher frequency.For lowest noise one may want some form of AA filter to limit the BW seen by the ADC. This may not be an issue without gain.R2 may not be needed.

author: TimFox
author_rank: Super Contributor
timestamp: February 03, 2025, 06:03:05 pm
content: The piezo sensor is equivalent to a voltage generator (your desired signal) in series with the device’s capacitance. That capacitanceCand the high-resistance loadRform a high-pass filter that attenuates frequencies belowfc= 1 / (2 piR C)per the usual filter response, which is why you want a large value ofR, including the amplifier and bias resistor.What is your piezo’s capacitance and your lowest frequency of interest?

author: alexander_
author_rank: Newbie
timestamp: February 03, 2025, 07:39:16 pm
content: Quote from: TimFox on February 03, 2025, 06:03:05 pmThanks Tim. Here is the datasheet for the piezo:Piezo Material: SM111Dimensions: Ext. Diam. 26 x Int Diam 22 x Height 13mmResonant frequency fr: 42 KHz±1.0 KHzElectromechanical coupling coefficient Keff: 36 %Dielectric Loss tg δ: 0.42%Resonant impedance Zm: ≤4.6ΩStatic capacitance Cs: 6600pF±20%@1kHzTest Condition: 23±3 °C 40~70% R.H.fr, Zm, Kr => Hoop mode vibration applicationCs tanδ => LCR meter at 1KHz 1VrmsBased on the math you provided, the low cutoff for this transducer with a 1M resistor is 24Hz which is a much lower freq than the sounds I've been using to troubleshoot the circuit. The lowest freqency I would be looking for would be right around 100 Hz. If it helps, here is a link to the instructables project which I am modeling mine after:https://www.instructables.com/Lets-Build-Some-World-Class-Hydrophones/Quote from: Kleinstein on February 03, 2025, 05:20:37 pmYou're absolutely right in that my schematic replaces R1 with R3 and R4. I didn't mean to draw the schematic that way. Instead, it ought to look like this:If I'm correct, this circuit ought to work. The voltage divider ought to create a virtual ground halfway between 0 and 3.3V. The 1M resistor ought to drive the piezo. Also in this circuit, I have added a feedback circuit, R2 and R5. I've tried many different ratios of R2/R5 as I understand this is how to create gain. None of this has allowed me to read the transducer. :/

author: TimFox
author_rank: Super Contributor
timestamp: February 03, 2025, 08:21:03 pm
content: That placement of R1 is wrong: you have it in series with the deviceCs, driving a very low resistance of R4 and R3 in parallel = 500 ohms.

author: Xena E
author_rank: Frequent Contributor
timestamp: February 04, 2025, 01:39:52 am
content: Quote from: alexander_ on February 03, 2025, 07:39:16 pmI'm not going to comment on the overall project because I'm TL;DR.In the conjunction you wish to have a 1M input impedance to the non inverting input just create the divider R3 R4 from two 2M resistors.Quote from: alexander_ on February 03, 2025, 07:39:16 pmIt's not going to.The way to do the feedback scaling how you're intending there is to have a resistor from output to inverting input then the other from there to ground, to produce a potential divider.However, as you're trying to run this circuit from a single supply that will not only affect gain but also the DC output level.You could try a divider at the inverting input as you did for the non inverting, ie., doubling the resistor to ground value and again placing the two in series between the supply, then calculating gain from half the divider resistor value and the feedback resistor value from the output... but there are more elegant ways to do this.It really depends on what you require on the input of the MCP3008?... do you want the amplified signal to swing around the half supply rail point?The most useful thing for you to do as you seem a bit lost on this, is to learn a few opamp basics, watch a tutorial and apply what you actually need.A good beginner book is "BP88 How to use opamps" by E A Parr.That can be downloaded free from World Radio History site, direct from a Gurgle search.X