Published: 2014-11-18 | Categories: [»] Tutorials, [»] Engineeringand[»] Electricity & Electronics.

I am often talking about using the response of pressure sensors for applications like [»] flow sensors or [»] flow control but I have never given much detailed information on how I interface the physical sensor to get a valid analog signal from it. Concerning that, a friend of mine asked me a few questions lately for a load cell to record the impulse of a rocket engine he was trying to fix and I thought it would be a good time to give some details on the topic.

In this post I will mainly focus on pressure sensors but the technique remains the same for most bridge sensors such as load cells. Bridge sensors are built from resistors dividers, just as potentiometers and so you get an output voltage that varies between the two excitations voltage. The only difference with straight dividers like potentiometer is that bridges have two outputs: one that increases its voltage with the physical excitation signal and the second one that decreases its voltage. By taking the difference between the two outputs, we get an electric reading. Technically speaking, one can also use capacitors instead of resistors but it changes the design a little bit so we will stick with the resistor version here.

In the case of a load cell, you have a metallic frame which deforms depending on the force applied to a specific location on its end. Two small wires are glued on the frame such that one gets longer when the frame deforms and the other one gets smaller. This effect is minute but it is there. By using these small wires as part of the bridge, one output will increase as force is being applied while the other will decrease because the resistivity of a wire depends on its length and its transversal section. The difference between the two will be proportional to the deformation of the frame which is, through careful design, proportional of the force applied.

The only problem is that the effect is usually extremely small, typically 0.05% change in resistivity value at full load. With an excitation of 10 Volts, this results in a (maximum) 10 mV deviation of the bridge. Because most technologies that we cover (such as [»] our oscilloscope) prefer larger voltages, we will have to amplify the reading. But we cannot directly amplify from 10 mV to, say, 5 Volts because of three factors:

1/ Amplifiers have finite gain-bandwidth values which means that amplify has some kind of low-pass effect on the data. The effect depends on the chip you are using but as a rule of thumb, values of 1 MHz are classical for cheap amplifier. That means we have to limit the gain to 100 if we want to have a 10 kHz bandwidth for the signal. Hopefully, gain-bandwidth effect can be overcome by using two successive gain stages. For example, if you need a 625 gain amplification, simply put two stages with gain equal to 25.

2/ Bridge elements have tolerances such that they cannot guarantee all the resistors have the exact same value under no load conditions. As a result, there will be an offset error added to the signal. Sometimes, the offset signal is larger than the response signal and we may get outside of the DC excitations voltages. Imagine a 10 mV signal added to a 100 mV offset. If we use a gain of 500, we get a signal of 5 Volts added to an offset of 50 Volts which is way beyond the excitations rails and everything will then be trimmed to a meaningless value. In real case scenario, we have to take care that the overall signal never exceeds the excitations rails.

3/ Added to the two previous factors is the tolerance of the response itself. In the case of a force sensor, for instance, no vendor is going to deliver chip that have precisely 1 mV for, say, 1 kg. Instead, they will give upper and lower bounds or a tolerance % value. As a consequence, our 1 kg will output something like (still hypothetical) 10 mV±10% (something between 9 mV and 11 mV). We always have to take care of the best-case and worst-case scenarios when design a bridge amplifier.

There are a lot of variant on how to amplify bridge sensor but the circuit I use always works the same: a first gain followed by an offset trim and a second tuneable gain. Some people apply a tuneable gain directly but I don’t recommend it because it will change your offset voltage too and you will have a lot of trouble to adjust the gain and the offset trim. The circuit is given on Figure 1 and displays a first gain stage (fixed gain) which includes an offset trim thanks to the instrumentation amplifier chip used (the AD620 which cost about $5 a piece). The signal is then amplified further with a tuneable gain to set the overall gain for a specific chip sensitivity. If your application requires it, you can filter the output to reduce the signal bandwidth. This is generally a good idea when the overall gain is high because of EMF noise.

Figure 1 - General Schematic of the amplifier.

The first thing to get right is the excitation voltage. Most sensors can work up to 12 Volts and can cope with smaller voltages. But if the datasheet of your sensor recommend a particular voltage, you should stick to it. In the case of the pressure sensor I am using, they recommend using a 10 Volts excitation to have known characteristics. Using other voltages will work but the sensor may not heat the same way and settle with a slightly different behaviour. Also, it is very important to have a precise and stable source so it would be a very bad idea to directly use the main power supply. Batteries voltage change with discharge and transformers have ripple that can impact analysis at frequencies above 1 Hz. In my circuit, I build a 5 Volts reference from a 4.7 Volts zener diode and an amplifier with a gain tuneable from 1 to 1.21 to take into account the tolerance of the zener diode (±10% usually). The stability is ensured by the 100 nF capacitor which low-pass any ripple in the power supply. Then, I use a voltage inverter to get a -5 Volts reference from it. With a good voltmeter, you can get a 10±0.01 Volts source from this. With TL084 op amps ($1 a piece, 4 OA per chip) I have found that it was possible to draw up to 20 mA from the source so always pay attention to the sensor impedance which should not be lower than ~1 kΩ. The +5 Volts and -5 Volts reference voltages are also quite useful for offset trimming. By the way, you may want to read my post on [»] split power supply to learn how to get a ±9 Volts supply from a single 9 Volts battery.

If you don’t have access to instrumentation amplifiers, you can replace them by the circuit of Figure 2. Be sure to use super-matched resistors to avoid distortion in the signal. You don’t have to buy expensive resistors for that purpose, just use a good ohm-meter and select resistors from a large batch such that they all display the same figures. It does not matter if it is 10.02 kΩ or 9.96 kΩ as long as they have all the same value. The gain will be 1+(20 kΩ/R1) but may change slightly due to your components exact value (you can update the formula with twice the exact resistor value you are using).

Figure 2 - Alternative to instrumentation amplifiers.

I will now show how to select the proper gain and offset trim stages. To get things straight, I will use an example that is based on the PCCFA6G pressure sensor from Honeywell. A snapshot of the datasheet is given on Figure 3. The datasheet further lists an output voltage span (at 10 Volts) of 165-285 mV at full load (15 psi, about 1 bar).

Figure 3 - Honeywell PCCFA6G datasheet.

The meaningful information is the voltage span at full load, the offset voltage and how the sensor response to environmental changes such as temperature. We can also see that the linearity is better than 1% of the span so we have a confidence of 0.15 psi on any reading. Obviously, the sensor is not suitable for the analysis of signals smaller than 1 psi. Always check the linearity when inferring physicals values from a sensor reading. This is a common mistake when using sensor because people tend to apply the gain that suits their needs without considering the real span the sensor was designed for. A good example for this is to use a bathroom scale sensor (designed for loads between 0 and 150 kg) and to use it to monitor rocket impulses from 0 to 100 grams. You would get a reading but no guarantee that the response is linear or reproducible! So always use the sensor that best fits your application target.

Ideally, we would like the output to go from zero (atmospheric pressure) to 5V at 15 psi. From the span, we know that we have to amplify from 17.54 (5 Volts / 0.285 Volts) to 30.30 (5 Volts / 0.165 Volts) depending on the chip you have on hand. So we know that the first gain stage should be about 17.54 which would require a resistor of R1=2.99 kΩ (as per the AD620 datasheet). The closest value we can get is a R1=3.3 kΩ which gives a gain of 15.97. When selecting a resistor value, always take one which gives a gain lower than the theoretical gain required if you cannot get its exact value and always pay attention to the real value of the resistor using an ohm-meter or by keeping track of the tolerance. In our case, because of the 1% tolerance, the exact gain is between 15.81 and 16.13. Both values are below 17.54 so it is okay.

When selecting the first gain, we have to check what the maximum offset error might be at that point. From the datasheet, we know that the offset error is maximum 30 mV times 16.13 (worst-case) which is about 484 mV. The overall signal (max load + worst offset) would then be 16.13 times 285 mV plus 30 mV which is below 5.1 Volts. As our amplifier rails are about ±7 Volts (as a rule of thumb with these operational amplifiers, remove 2 Volts from the power supply values), we are safe. To trim the offset voltage, we have to choose resistors such as the offset span between ±500 mV. Using larger span is not necessary because we have calculated our offset to be of maximum 484 mV. Even worse, if you use a larger offset span you will lose resolution in your potentiometer track and will not be able to finely tune the zero. When turning the potentiometer knob, there is a finite resolution so don’t expect to tune for 0.1 mV if the whole span is ±500 mV. For a ±500 mV span you can use a 10 kΩ potentiometer with two 47 kΩ (R4) which will give an actual span of ±490 mV which matches perfectly the expected span from the datasheet. As usual, special care should be taken on tolerance of the selected components. If you are not confident about the tolerance of your components, use 39 kΩ resistors to get some margin.

To be complete we now have to apply the final gain stage such that the overall gain can be tuned up to 30.30. Because we know that the first stage have a worst-case amplification of 15.81, we have to build a gain that can be tuned between 1 and 1.92. With the tolerance of potentiometer, I would recommend using a 10 kΩ 10% potentiometer to be safe such that the final gain will be tuneable from 1 to 2 (actually, somewhere between 1.9 and 2.1). And that’s all!

All you now have to do is to plug the sensor, adjust the offset trim until the reading outputs zero and then calibrate the sensor to 5 Volts with a precise 15 psi source. In my case, because I lacked a calibration source, I used a big syringe and a manometer to calibrate the output such that it will give 500 mV for 200 mbar which is quite close to 5 Volts for 15 psi.

Before concluding, I would like to get your attention to some case that you may meet with some sensors. If you check the PCEFA6G datasheet (0.5 psi pressure sensor) you will see that the output span from 24 mV to 46 mV for an offset voltage of maximum ±30 mV. If we apply our recipe, we get a first gain of 108.70 followed by a second gain tuneable from 1 to 1.92 to make the overall gain tuneable from 108 of 210. The problem is that the offset voltage after the first gain can be as high as 3.2 Volts with an overall output up to 8.2 Volts which is above the excitations rails. The only solution is to do a smaller gain first such that the output does not exceed ±7 Volts. This can be met with a gain of 92. As a consequence, we have to apply a second gain that ranges from 1.17 (108/92) to 2.29 (210/92). To avoid losing resolution with the potentiometer track, you can add a resistor in series (R2) with the potentiometer such that the second gain ranges from 1.17 to 2.29.

In conclusion, the recipe is easy. Just take the circuit of Figure 1 and:

1/ Calculate the first gain from the datasheet largest output at full load to get R1.

2/ Check if the gain found does not exceed the excitation rails when taking into account the maximum offset error.

3/ Find the resistor value R4 that allows you to build a good error trim span.

4/ Calculate the second gain from the smallest output at full load to get R3 (and R2 when necessary).

Finally, you may get a bridge sensor with no datasheet. You should always want to avoid that kind of situations because one should always not the reaction to temperature change and storage but also the maximum excitations figures (both electrical and physical) before damage occurs. Anyway, if you are in such a situation, try to tell which are the excitations leads and apply a 10 Volts through it (hoping it will not burn). Then measure the output between the two other leads using a Voltmeter at no load and at full load conditions. The former reading should give you the exact offset voltage. The latter will give you the offset plus the exact span output. Then, assume a ±5% or ±10% tolerance on these values and use that to apply the recipe.

[⇈] Top of Page

You may also like:

[»] A Trick to Double ADC Resolution

[»] 1 Amp Power LED driver with Modulation Input

[»] DIY Flow Sensors

[»] Sine Wave Oscillator with Fewer Op-Amp

[»] DIY Conductometry