42 February 2016
found one that I use all the time because it has pretty
good specs, runs off the +5V single supply from an
Arduino, and comes in an eight-pin DIP. Best of all, it only
costs $0.29. As a bonus, it comes with two independent
op-amps in one package for this low price.
I use the LM358 op-amp — manufactured by TI and
available from Jameco and other distributors. It’s not the
highest performance op-amp, but at this price, is a great
general-purpose version and is incredibly easy to use.
In the application of the TMP36 temperature sensor,
the nominal output signal level is about 0.75V at room
temperature. I wanted to increase this signal level so it is
higher, but still below the 3.3V of the Vref. I chose to use
a gain of about three, resulting in a nominal voltage level
out of the op-amp of about 2.25V. I used resistors of 22K
ohms and 9.8K ohms, resulting in a gain factor of (1 +
22K/9.8K) = 3.245.
The original sensitivity of the TMP36 sensor was
100°C/V. With a resolution of 0.0032V, this is a
temperature resolution of 0.32°C.
With a gain of 3.245, the output sensitivity of
the pre-amp is 100/3.245 = 30. 8°C/V. The voltage
resolution of the 10-bit ADC is still 0.00323V, but
this is now equivalent to 30. 8 x 0.00323 = 0.1°C.
This helps solve problem #1. Figure 6 shows
the recording of the raw output from the TMP36
sensor into A0 of the Arduino’s ADC, and the
output of the LM358 with the gain of 3.245 into
A1. I converted the ADU values from A1 into
Temp[degC] = (ADU/1023*Vref/Gain_opAmp) x 100 — 50
An Analog Front End Essential
Element: the Instrumentation
We still have problem #2. The voltage out of
the pre-amp is about 2.5V. We want to see small
changes on top of this large DC value. We really
would like to subtract off a DC value and amplify
what is left. This is the perfect job for an
An instrumentation amplifier is very similar to
an op-amp. Its output voltage is related to the
difference voltage between its two inputs by:
Voutput = G x (V+ — V-)
However, the gain in an instrumentation
amplifier is typically adjustable from only 1 to
Instrumentation amplifiers are most commonly used
to amplify small differential signals such as in
electrocardiogram monitoring or in resistance based
sensors. They are at the heart of a Wheatstone bridge.
For our temperature sensor application, we can use
the instrumentation amplifier to subtract off the DC
voltage we provide at the V- pin and amplify what is left.
There are hundreds of different instrumentation
amplifier options to choose from — each with slightly
different specs and price points. The instrumentation
amplifier I use the most with an Arduino is the AD623
manufactured by Analog Devices and available from
It runs off the single +5V from the Arduino, comes in
an eight-pin DIP package, is really easy to set up, and
costs less than $5. The gain is selectable with a single
resistor, Rg, from 1 to 1,000 using:
FIGURE 5. Circuit diagram of the non-inverting amplifiers using an
op-amp, taken from Walter Jung’s Op-Amp Applications Handbook.
FIGURE 6. Measured temperatures of the same TMP36 using the scaled
value directly from the sensor and after a gain of 3.245 in a pre-amp.
Note the resolution improvement from 0.3° to 0.1°.