I have been designing a board which will monitor vibration activity of a machine using MEMS accelerometers. So far, I have connected the unadulterated signal from the accelerometer to the ADC however, I was considering the fact that if there is very little vibration, if I removed the dc bias, amplified the signal and then re-added the bias, I could make better use of the ADC resolution. The bias is 1.65V and the sensitivity is 300mV/g so under normal conditions with no vibration, the output is 1.95V.

From what I have googled, I think I can use a differential amplifier to remove the bias and to amplify the signal followed by a summing amplifier to replace the bias. So I have created the following circuit where V1 is 1.95V and V2 is the accelerometer output. However, I have no idea of what value resistors to use and how to calculate gain. I would like to either use a digi-pot or a MUX to change resistance and control gain from unity, 2X, 4X, 8X, 16X and 32X

Can somebody give me a heads up please? What sort of values should I use, what voltage should I supply to the op amps - is \$\pm 5\text{ V}\$ sufficient for an accelerometer output of 3.3V maximum? Which resistor should be variable and how do I calculate the values to give me the gain I want?


  • \$\begingroup\$ Specifying gain alone is insufficient. MEMs output ranges between 1.65 - 1.95v, but what's its output impedance? What peak amplitude is your expected signal? And what does the ADC expect for full-scale input signal range? Unipolar? Bipolar? Differential, with or without bias? \$\endgroup\$
    – glen_geek
    Jan 27, 2017 at 16:38
  • \$\begingroup\$ The ADXL335 data sheet does not tell you its impedance. it is -3/+3g's @ 300mV/g so the peak amplitude can be 1.65+0.9 = 2.55V The expected range for the ADC is 0-3V3, it is unipolar and the bias needs to be added back in and removed digitally pre FFT. I also realise I have drawn the differential amp wrong, the inverting and non inverting inputs should be the other way round. I'm wondering if I should use a third op amp after the differential amp to do the actual amplification, use the same values for R1-R4 (above) so the output is just the difference X 1 \$\endgroup\$
    – BaartCM
    Jan 27, 2017 at 17:15
  • \$\begingroup\$ This looks like an application for an instrumentation amplifier. If you use one, you won't have to worry about the output impedance of the accelerometer. Also, an in amp's gain is often set by only one resistor whereas the diff amp you show would need two resistors changed in order to adjust the gain. If you want to adjust the gain from unity to 32x, set the in amp to unity gain and follow it with a programmable gain amplifier. \$\endgroup\$
    – Null
    Jan 27, 2017 at 17:19
  • \$\begingroup\$ An in amp also has a reference pin which you could set to the bias voltage (you wouldn't need a summing amplifier to add it back in). \$\endgroup\$
    – Null
    Jan 27, 2017 at 17:21
  • \$\begingroup\$ @Null Thanks for the help. Not sure why I wouldn't need to add the bias back in. My thoughts are 1, convert from unipolar to bipolar (remove the bias) 2, amplify the signal, 3, convert back to unipolat by adding in the bias. If I use a unity gain instrumentation amp then a PGA to amplify, surely I still need to add the bias back. Any suggestions as to which PGA to use? \$\endgroup\$
    – BaartCM
    Jan 27, 2017 at 17:33

1 Answer 1


What sort of values [for the differential amplifier resistors] should I use?

A rule of thumb is that the input impedance of the differential amplifier should be at least ten times the output impedance of the accelerometer in order to avoid signal loss (the differential amplifier would ideally have infinite input impedance). The block diagram of the ADXL335 datasheet suggests that the output impedance is about \$32\text{k}\Omega\$, so you'd need high valued resistors.

The gain of the differential amplifier is set by the ratio of resistors (an example derivation is here). You need to set the resistors in your schematic to $$\frac{R_2}{R_1} = \frac{R_4}{R_3} = \text{desired gain}$$

The problem with this is that you need to adjust two resistors to adjust the gain.

You can solve both of these problems with an instrumentation amplifier. Conceptually, it's a difference amplifier with a pair of op amp buffers on each input:

enter image description here

The op amp buffers give you much higher input impedance than the difference amplifier alone, and the architecture allows the gain to be set by changing only one resistor. You can construct an in amp out of discrete op amps, but an IC in amp will have less gain error because ICs have better matching of the resistors. IC manufacturers offer a wide variety of instrumentation amplifiers so you should be able to find one which meets your needs.

As a bonus, IC in amps provide a reference pin which you can use to provide an offset to your output (e.g. by the bias voltage). In the above in amp schematic, the reference pin replaces the ground connection to \$R_3\$. An explanation for how to use this pin can usually be found in the in amp's datasheet; for example, the AD8221 datasheet says:

As shown in Figure 43, the reference terminal, REF, is at one end of a 10 kΩ resistor. The output of the instrumentation amplifier is referenced to the voltage on the REF terminal; this is useful when the output signal needs to be offset to a precise midsupply level. For example, a voltage source can be tied to the REF pin to level-shift the output so that the AD8221 can interface with an ADC. The allowable reference voltage range is a function of the gain, input, and supply voltage. The REF pin should not exceed either +VS or –VS by more than 0.5 V.

For best performance, source impedance to the REF terminal should be kept low, because parasitic resistance can adversely affect CMRR and gain accuracy.

You'd probably need to add a simple op amp buffer to the bias voltage so that the source impedance on the REF terminal is low enough.

what voltage should I supply to the op amps - is \$\pm 5\text{ V}\$ sufficient for an accelerometer output of 3.3V maximum?

It might be. It depends on the amplifier you choose. You need to make sure that the amplifier can operate on \$\pm 5\text{ V}\$, that its inputs will stay within its input common mode range, and that its output can swing close enough to its supply voltages. Consult its datasheet.

To handle the gain requirement of 1 to 32 in binary steps, I'd suggest using a programmable gain amplifier with binary weighted gains. For example, the PGA205 is a programmable gain instrumentation amplifier (both the in amp and programmable gain combined) with a gain selection of 1, 2, 4, or 8. Add another programmable gain operational amplifier with binary weighted gains (e.g. the LTC6910-2 to the output of the first one to achieve an overall gain of 1 to 32).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.