Torque Sensor 1: Mechanicals of Materials

Torque Sensor 2: Strain Gauge & Wheatstone Bridge

Torque Sensor 3: Instrumentation Amplifier

Torque Sensor 4: Torque Sensor Build Log 

Updated: 5/20/2016 – Initial Page Creation

 

On the last page we covered how the strain gauges work in a Wheatstone Bridge, and we calculated a sensitivity of somewhere around 2.6 mV/V with a full scale range of 140 Nm. My typical microcontroller of choice is the Teensy 3.2, which has a 13 bit analog input from 0 to 3.3V – this means the Teensy is capable of measuring down to \displaystyle \frac{{3.3V}}{{{{2}^{{13}}}}}=0.4mV . This is not nearly enough to measure any reasonable levels of torque, and that doesn’t even factor in the noise of measuring from a 13 bit ADC. Therefore, we need to amplify the signal coming out of the torque sensor. Without going into too many details about floating grounds and circuit protection etc., I will simply state we want to use an instrumentation amplifier.

 

There are a bunch of different companies that make very high quality instrumentation amplifiers for very cheap, including Texas Instruments and Analog Devices. But this page wouldn’t be very exciting if I just went out and bought an instrumentation amplifier, now would it? I am a long time junk printer connoisseur, I love taking old printers and other electronics apart and salvaging the components on the breadboards, as well as the motors and sensors etc. Somewhere on this website I even have a page about a piece of software I’m making in order to inventory my parts – this is a testament to the amount of junk I have collected over the years, that I need to develop software just to keep track of it.

Straight from Wikipedia:

“An instrumentation (or instrumentational) amplifier is a type of differential amplifier that has been outfitted with input buffer amplifiers, which eliminate the need for input impedance matching and thus make the amplifier particularly suitable for use in measurement and test equipment. Additional characteristics include very low DC offset, low drift, low noise, very high open-loop gain, very high common-mode rejection ratio, and very high input impedances.”

One of the reasons I want to build an instrumentation amplifier is because I once ordered some, and fried them – they are ridiculously easy to fry, and I know just enough about electronics to do some serious damage to the components without knowing why. Call this a learning opportunity. Anyways, the Instrumentation Amplifier I purchased was the Analog Devices AD623. I’ll post some quick specs on the AD623 below.

Pin Diagram of the AD623
Pin Diagram of the AD623

 

Function Block Diagram of the AD623
Function Block Diagram of the AD623
AD623 Input Protection Clamping Diodes
AD623 Input Protection Clamping Diodes
AD 623 Simplified Block Diagram
AD 623 Simplified Block Diagram

Looking at the above schematics, it should be relatively easy to make my own instrumentation amplifier. Going through the datasheet, there are some limits given by the following equations:

(1)   \begin{equation*}  \displaystyle A1\;\;Output = {V_{A1}} = {V_{CM}} + {{{V_{DIFF}}} \over 2} + 0.6V - {V_{DIFF}} \cdot {{{R_F}} \over {{R_G}}} = {V_{CM}} - 0.6V + {V_{DIFF}} \cdot {{Gain} \over 2} \end{equation*}

(2)   \begin{equation*}  \displaystyle A2\;\;Output = {V_{A2}} = {V_{CM}} + {{{V_{DIFF}}} \over 2} + 0.6V + {V_{DIFF}} \cdot {{{R_F}} \over {{R_G}}} = {V_{CM}} + 0.6V + {V_{DIFF}} \cdot {{Gain} \over 2} \end{equation*}

(3)   \begin{equation*}  \displaystyle - {V_S} + 10mV \le {V_A} \le {V_S} - 100mV \end{equation*}

Now this doesn’t mean much without talking about the common mode (CM) voltage and the differential voltage. Referring back to our picture of a Wheatstone Bridge:

The voltage at b and c is equal when all of the resistors (strain gauges) are equal ie. the strain gauges are under zero load. Therefore the output voltage G of the strain gauge is zero – but the actual voltage at nodes b and c is not zero when referenced to ground. This voltage is the Common Mode voltage, and is defined by equation (4).

(4)   \begin{equation*} \displaystyle {V_{CM}} = {{{V_a}} \over 2} \end{equation*}

If and only if all of the resistors are equal – otherwise it becomes a voltage divider. Now I don’t particularly like dealing with negative voltages and floating grounds; I like to use a positive 5V and GND as my supply voltages. It is easy, and readily available. Now that we know what Common Mode voltage is, what is differential voltage? This one is easy: the differential voltage is simply the output of the Wheatstone Bridge! It took me a lot longer that I would like to admit to understand how this works, so I will break this down for anyone else who is confused. Think of it this way, the voltage at junction b and c on the Wheatstone Bridge can be thought of as (remember, the sensitivity is the full difference between b and c, so the actual voltage change on each node is one half of the sensitivity):

(5)   \begin{equation*} \displaystyle {V_b},{V_c} = {V_{CM}} \pm {{{V_{DIFF}}} \over 2} \end{equation*}

And with our previously calculated sensitivity of 2.6mV/V and a supply voltage of 5V this equation simplifies to:

(6)   \begin{equation*} \displaystyle {V_b},{V_c} = 2.5V \pm \left( {{{2.6{{mV} \over V}} \over 2} \cdot 5V} \right) = 2.5V \pm 0.0065V \end{equation*}

Now in order to read this voltage with a microcontroller, we want to amplify the differential voltage, but NOT the Common Mode voltage. Fortunately, that is exactly the purpose of a differential amplifier – of which the instrumentation amplifier uses three. Now, I know I used 5V in the previous math, but the Teensy 3.2 runs on 3.3V. I won’t bother going back and changing the equations, but hopefully that will explain why I will be using 3.3V from now on. Anyways, in the AD623 datasheet there exists a nice little table for determining the gain you need, as well as an equation for determining the resistor size for choosing the gain.

(7)   \begin{equation*} \displaystyle Gain = {{100k\Omega } \over {{R_G}}} + 1 \end{equation*}

(8)   \begin{equation*} \displaystyle {R_G} = {{100k\Omega } \over {G - 1}} \end{equation*}

AD623 Gain Table
AD623 Gain Table

Based on this table, a Supply Voltage of 3V with a Vcm of 1.5V and a Vdiff of 10mV (it will actually be around 8mV, 2.6mV/V * 3V, but ah well) results in a Max Gain of 142, so a minimum RG of 715 \displaystyle \Omega

Torque Sensor 3: Instrumentation Amplifier
Tagged on:         

Leave a Reply