APPLICATION NOTE 6346

How to Get Data Out of Your Favorite Sensors


Abstract: Sensors are everywhere today. Our smartphones and tablets are loaded with them. Our cars have temperature sensors, image sensors, and pressure sensors. Our home environments are getting more savvy.Sensors measure all sorts of different analog phenomena. After the sensor has output the analog value, the next step is to convert the signal into a usable format. What kind of signal conditioning and analog-to-digital conversion is best? This article looks at these questions.

Sensors seem to be everywhere today. Smartphones and tablets are loaded with them. Cars have temperature sensors, advanced driver assistance systems (ADAS), a mix of sensors and video, and many other kinds. Even home thermostats are becoming more savvy.

Sensors are measuring all sorts of different analog phenomena:

  • Proximity sensors on our phones turnf off the display.
  • Light sensors adjust backlighting.
  • Air, chemical, and water flow sensors exist throughout our city pipes to regulate our water supplies.
  • Chemical sensors at oil refineries monitor corrosion and erosion.
  • Temperature, level, and other environmental sensors at the local microbrewery ensure that you'll have your happy hour favorite.

Once the sensor has output the analog value, the next step is converting the signal into a usable format. How does that happen? What kind of signal conditioning and analog to digital conversion is best? This app note tackles these questions.

With all of the sensors mentioned above, analog signals can vary. Some sensors, such as pH/chemical sensors, provide high impedance outputs. Many others provide very small/low-level signals from which it is difficult to extract the real information over the noise. Others, such as thermocouples, produce nonlinear signals, which are different for each type of thermocouple. Let's consider each kind of sensor.

Low-Level Voltage Signals

Pressure is one of the more monitored signals in the world. Pressure sensors such as Wheatstone bridges are used for a number of industrial applications. For example, pressure sensors in grocery stores weigh lunch meat, but they can also be used by dynamic scales within a warehouse conveyer belt where high accuracy and wide dynamic range is more critical.

One example of a bridge sensor is shown in Figure 1, where an output voltage is created between +VOUT and -VOUT that is dependent on the excitation voltage difference (+Exc - -Exc) and the effects to the variable resistors. Bridge sensors typically output very small voltages, often on the order of a few millivolts. A typical compression range is 1000:1, where a 1V excitation voltage difference produces a 1mV maximum range between the two outputs. The excitation voltage can be increased, at the expense of burning more power.

Wheatstone bridges provide an output voltage (+VOUT - -VOUT) depending on the excitation voltage and physical changes to the compression and tension resistance. Figure 1. Wheatstone bridges provide an output voltage (+VOUT - -VOUT) depending on the excitation voltage and physical changes to the compression and tension resistance.

In the example above, a 1mV max range does not provide a very large dynamic range to obtain the signal of interest out of the noise floor, which is typically down in the microvolts or tens of microvolts.

Nearly all bridge sensors are followed by an amplifier with a gain stage, or a programmable gain amplifier (PGA). To get the analog signal into a digital word, the PGA is usually followed by an analog-to-digital converter. The majority of ADCs offer maximum input ranges of 3V or 5V, so amplifying the 1mV bridge sensor signal to something that uses all (or much more) of the ADC's available voltage range is the logical choice.

Some analog companies like Maxim Integrated, offer standalone amplifiers that can be configured with external resistors or digital potentiometers for amplifier gain. Many of these same companies also offer PGAs, which can be configured with a series of digital inputs, or an SPI interface.

Depending on the accuracy and effective number of bits (ENOB) needed, a sigma delta ADC with an integrated PGA can often be the best choice today. The number of sigma delta ADCs with integrated PGAs has grown considerably in the last 10 years. Many of these are 16-bit or 24-bit sigma delta ADCs. An integrated ADC plus PGA allows the circuitry to be optimized for the lowest noise possible.

Let's go back to the warehouse conveyer-belt scale. The faster these warehouses can move their freight, the higher their throughput and profit margins. Being able to dynamically measure the package weight at the same time it's moving from one station to the next is becoming increasingly common. With these warehouses shipping a range of goods (anything lightweight like a children's toy up to something heavy like a couch), a wide dynamic range and low-noise is needed from the amplifier and ADC. In this example, an ADC with a relatively fast sample rate is also needed.

The MAX11270 offers a good combination of sample rate (for weigh scales), wide dynamic range and low noise. The max sample rate is 64ksps. The PGA's noise level is 6.5nV/, which is a large reason the MAX11270 can achieve an effective number of bits of 21.0 at a 1ksps sample rate. This effectively means the MAX11270, with its PGA and ADC, can resolve 221 bits of range, which translates to any package zooming down the conveyer belt being quickly and accurately weighed.

High-Impedance Chemical Sensors

In an application such as process control, chemical sensors are vital for keeping the mix of ingredients at the right level. Microbreweries are easy for most people to imagine. In the brewing process, the mix of ingredients is a vital part toward a repeatable (and pleasing) taste for consumers.

Sensors that measure pH levels are commonly used in process control. These have high-impedance electrode signal outputs. Converting this impedance signal into something more easily measured is done with an amplifier with a very small input bias current. Multiplying the impedance of the sensor times the bias current of the amplifier gives us a large portion of the error budget. The larger the bias current, the larger the sensor error.

For a chemical sensor, input bias currents on the order of picoamps or even femtoamps are desired to reduce the total error. Here, it's necessary to dig into the data sheet and confirm the temperature range the application requires.

The MAX44242 is a low input-bias current op amp. Though its input bias current is not as low as other JFET amplifiers, it is lower than many other amplifiers by a few orders of magnitude. Figure 2 details the MAX44242's input-bias current specifications. With a specification like input-bias current, the application's temperature range is critical to know.

Going back to the microbrewery example, if the chemical reactions are typically going to happen at room temperature, a system designer can assume the max input-bias current is on the order of 0.5pA. If the chemicals are being mixed at high temperatures, the input-bias current increases to 10pA at 85°C and 50pA at 125°C.

MAX44242 Electrical characteristics for input-bias current shows increasing current with temperature. Figure 2. MAX44242 Electrical characteristics for input-bias current shows increasing current with temperature.

See Tutorial 717 for a more in-depth explanation of key amplifier specifications such as input-bias current, input-offset voltage, amplifier types, and temperature effects on all of these specs: Operational Amplifier Inputs.

Communications and Data Center Designs

Next, let's think of a complex printed circuit board designed into an application such as a base station or a data center. These boards have continued to draw higher power with each generation, while also trying to squeeze into a smaller space. High-speed processors, ASICs, and FPGAs are transmitting digital data at rates into the Gigahertz. The faster the data rates, the higher the power dissipation, which turns into heat.

Measuring temperature has gotten more important with each generation. There are many different ways base station and data-center designers are measuring temperature. Some of the ASICs or FPGAs include internal temperature sensors. Some include thermal diodes that output an analog signal. In other cases, board designers add their own external temperature sensors around these high-power digital ICs.

If a system designer wants to choose an external temperature sensor, there are a number of different options, including ICs with analog outputs, digital outputs or temperature switches.

The choice of package also offers another degree of flexibility. While the majority of temperature sensors are surface mount packages, such as SOIC or SOT23, there are also options for getting the temperature sensor off the board to get a more accurate representation of the air temperature.

Figures 3 and 4 include an example of an off-board temperature sensor. The DS18B20 uses a 3-lead TO-92 package. Why would you want an off-board temperature sensor? Because PCB enclosures are getting thinner, heat sinks impede air flow, and clamshells are getting smaller. Having a surface mount temperature sensor package next to a large processor, ASIC, or FPGA may cause the air flow to be impeded and the temperature result to vary widely from another point on the board. There are arguments both ways for knowing the board temperature right next to a high-power IC, though it’s possible the heat in the PCB layers can distort temperature readings.

Placing the DS18B20 off the board gives a more accurate air temperature reading. The leads can be clipped to the desired height. Many of these complex base station and data-center board designers place one DS18B20 at the input to measure the intake air and another one at the airflow output to know the exhaust air temperature. This gives board designers a good basis of knowing the temperature difference across a complex board that can have many different local hot spots.

Complex processor/ASIC board example uses temperature sensors with leads to measure the temperature difference between the intake air and exhaust air. Figure 3. Complex processor/ASIC board example uses temperature sensors with leads to measure the temperature difference between the intake air and exhaust air.

The DS18B20 temperature sensor uses power, ground, and a 1-wire interface to get the temperature data out. Figure 4. The DS18B20 temperature sensor uses power, ground, and a 1-wire interface to get the temperature data out.

Conclusion

Analog signals around us always live on, as the increase of available sensors have made things ubiquitous and easier for engineers. One challenge that remains is accurately reading these sensors and extracting their data. The goal is to get the "real" data out of noise, board parasitics, and physical barriers. Doing that requires a working knowledge of signal conditioning from filters, amplifiers and temperature sensors. Then you can add the ADC and get the data into the digital domain where the general public thinks all the magic happens.