Looking for feedback for my piezo amplifier design - Page 1
Forum section: electronics / beginners

author: JohannesS
author_rank: Newbie
timestamp: March 01, 2023, 08:53:28 pm
content: Hi everyone, first time posting here.I've been self-studying electronics engineering and now - for the first time - I'm trying to design a circuit that contains some analog parts, everything before was just digital.I'm looking for some feedback and opinions on my two designs. Partly because I don't want to release any costly magic smoke, but mostly because I find it quite difficult to improve my skills when I have no one in "real life" who I can ask about this stuff.The goal: I want to build a mattress sensor, similar to the "Withings Sleep". The sensor should be able to measure the heart rate, breathing rate and general movements of the sleeping person, even when placed under a mattress. I thought I'd use a piezo sensor/pickup/disc (https://www.digikey.de/de/products/detail/murata-electronics/7BB-27-4L0/4358154) to measure force (I already tried force sensing resistors, but they have way too much noise).Requirements:- The fastest signal I'm interested in is the heart rate, so I want to play it safe and sample the signal maybe at 100 Hz- the voltage from the pickups easily goes up to 10 V when pressing on them with some force. Hitting them would likely create much higher spikes, which mustn't destroy my frontend- the signal from my heart frequency is around 10mV amplitude (see example below), so I think <1 mV resolution is necessary, probably even 0.1 mV when there is a mattress between the person and the sensor- 6 piezo pickups, because the ADC chip I want to use has 6 24-bit inputs (MAX11254) and I can place them at different points under the mattress- I want the readings to be around zero when the force is constant (and not changing), so I thought I'll place a resistor of around 50-200 MOhms across the piezos, to discharge their ~20 nF capacitance.- the piezos will be connected to the frontend with around 1 m of wire, so maybe 50 Hz pickup from powerlines will be a problem? At least my preliminary measurement has quite some noise in it, as you can see- absolute accuracy, linearity, voltage offsets or phase shifts are not important, the goal is to extract the rough ~1Hz signal from the heart and ~0.1Hz signal from breathingThe first attached image shows a measurement I made with a Keithley 2000. I placed a piezo pickup under a pillow under my butt while sitting perfectly still in a chair. Red arrows indicate breathing patterns with different depths of inspiration, green arrows indicate my heartbeat. The y-axis is in volts, x-Axis is time, roughly 10 measurements per second I think. A 50 MOhm resistor was connected across the terminals. So it looks like this is definitely possible.My first schematic uses an instrumentation amplifier and analog multiplexers so I can read 6 piezos with just one InAmp (because money). Only one of the six piezos and filter networks is shown. Here are some of my thoughts (from left to right):- Resistors to limit current- Capacitors which filter out high frequency noise (with 1nF wayyy above 100 Hz, but I don't know to calculate the cutoff frequency exactly in this case)- TVS Diode to limit the voltage to around 10V for everything that follows, clipping the voltage like that isn't an issue as I'm not recording audio- 100 MOhm resistor to slowly discharge the piezo if the force doesn't change (should take only a few seconds), so if constant pressure is applied the reading will be near 0 V.- 100 MOhm resistors to provide a ground return path for the InAmp. The values must be high enough as to not discharge the piezo too quickly. However, the input bias current of the LT1168 is 250 pA max., which would lead to 25 mV across the resistors, which could lead to quite some voltage offset if the currents aren't equal right? But I guess I can calibrate that away in software. Also the input bias current will discharge the piezo, but with 22 nF and 250 pA this is in the order of one minute, which really doesn't matter when the resistor discharges the piezo in a few seconds.- the InAmp should provide decent common mode rejection, so 50 Hz pickup might be less of an issue. Currently it is configured for unity gain, but that can easily be changed with a single resistor if the 100 MOhm discharge resistor reduces the voltage too much- resistor divider to reduce the output swing from the InAmp from +-12V to around +-1.5V, which the ADC can stomach- the last 1 nF cap is as per the datasheet of the MAX11254 ADCThe second schematic follows pretty much the same principles, except I use OpAmps for every piezo ('cause they are cheaper)- One side of the piezo is held at 0 V, the other side can change freely. It's voltage is buffered (or can be amplified) by U1A- as long as U1A's input bias current and the leakage through the TVS diode is <1 nA, the time it takes to discharge the piezo is negligible compared to the effects of R3- I used some active grounding, kind of like in an ECG ("driven right leg circuit"). My reasoning behind that was, that whacking the piezo wouldn't disturb the ground potential and I read somewhere that this (in an ECG) reduces noise pickup. But to be fair, I really don't know what I'm doing here. Does this make sense? Or should I just connect that side of the piezo straight to ground?Which of the two designs is the more sensible choice? Or are they both terrible?Any feedback, criticism and comments are welcome! I'm trying to learn more and improve myself constantly, hence why I finally decided to ask some questions online!Kind regards,Johannes

author: Terry Bites
author_rank: Super Contributor
timestamp: March 02, 2023, 11:52:40 pm
content: My first concern would be the settling time and transients arising in the circuit- muxing amps is often tricky.In your circuit the DC conditions at the Inst amp inputs are not defined until a channel selected by the MUX.To prevent this, R20 R21 need to be located at the input side of the MUX.R20 R21 and R6 R18 form voltage dividers. If not accurately matched they will degrade the CMRR. R26 adds to the problemDo you really need 100Meg? Input bias current will create an offset voltage at the inst amp output. Vos=Ib*Rin*Av.With a 100Meg and an LT1168 this is 25mV*Av. Ouch!If correctly chosen, the series resistors R6 R18 are adequate to allow the built in mux/ opamp/ inst amp input protection diodes to be used.This may well make the TVS redundant.Ideally you (almost certainly) want to buffer/ amplify the sensors before the MUX. Avoid running signal pairs through separate MUXes.ie Avoid 8:1, use 4:2 or 8:2 MUXes. Read up on "charge injection". It will ruin your day in a high Z capacitive circuit. You want to make the mux i/o low impedanceI doubt your ADC will be happy (or survive) an amplifier overload or fault that puts 12V on its input.You will need protection. Better still, stay safe by running the mux and amps from the ADCs supply rail. See attached single supply ideas.I don’t understand the thinking behind circuit 2. It has no inherent CMRR.You need to extract and apply the common mode voltage to the "driven right leg". To apply this CMRR technique you need to use an inst amp to extract the CMV.See attached.The CMV appears at the junction of R2 R3.Consider the use of a charge sensitive amplifier.www.analog.com/en/technical-articles/amplifier-provides-signal-conditioning-for-piezofilm-sensor.htmlYou'd put the MUX between the input amps and R7 R8.Rant End.

author: JohannesS
author_rank: Newbie
timestamp: March 04, 2023, 06:12:55 pm
content: Thank you, that was very helpful, and led to some more questions!1. Why are the InAmp inputs not defined? They are connected to ground via R20/R21 before a mux channel is selected, right?2. Can you/someone point me in a direction where I can learn to calculate the CMRR degradation through the resistors before the input? All I can find is articles mentioning that trimming of the internal resistors in a 3-OpAmp configuration is really important.I think I'm gonna go with the charge amplifier, that seems like the way to do it with piezos, hadn't heard of it before!1. Are charge amplifiers less susceptible to 50Hz noise pickup through long wires, because the only measure charge / integrated current?2. Is twisting the wires to the piezo (1 meter) going to help a lot?3. Is there a difference between my two new attached schematics when it comes to common mode effects and noise pickup?4. Are resistors (or voltage dividers) inline with the inputs going to do harm with respect to CMRR in this case?