Reading Strain Gauge Scales with Arduino
One of the smaller projects that I took to Maker Faire last month was a strain gauge reading circuit for Arduino. While the Arduino in the demo setup was actually redundant (the voltage input from the scales was output to a 5V dial gauge directly) there was also a circuit diagram setup to show how to use an instrumentation amplifier to boost the voltage output from the strain gauges in a set of supermarket weighing scales to a value great enough that the Arduino could read it as an analogue input.
One of the reasons I took this to Maker Faire UK was because I couldn't find a guide to connecting strain gauges to Arduino that said "here's the amplifier that you need, here's how to connect it and here's how to take readings".
As I don't have lots of experiences with OpAmp circuits I took the INA125P instrumentation amplifier, the same one as used in the Arduino Wifi body scale from Open Electronics. This is a 3 OpAmp amplifier as a single chip that gives high gain and low noise output that is designed to be used with measuring equiptment such as strain gauges. While you can roll-your-own instrumentation amplifier, using a complete circuit-on-a-chip simplified development while also giving a nice bonus of the on-board voltage regulator.
Strain gauges are variable resistors where the resistance changes when they are streched or compressed along their length. When bonded to a piece of metal, the resistance will change proportionally to the strain of the metal, depending on the force applied to deform it. Strain gauges are commonly used in a set of 4, bonded to the top and bottom of a cantilever beam so that they form a pair of voltage dividers, one rising and the other falling in response to applied load called a Wheatstone Bridge.
While it is possible to read the voltage change of the bridge directly, it is normally impractical without an amplifier. The maximum voltage change output from a 4 wire strain gauge is typically in the order of 10mV per Volt across the bridge and therefore is too small for the digital to analogue converter in an Arduino to register. The signal is been boosted by the instrumentation amplifier to bring it to a readable range, depending on the value of the resistor that controls gain.
From the datasheet, the gain can set be from ×5 to ×10,000 with a resistor values from 60kΩ to 6Ω respectively, where the size of the gain determines the maximum range of the signal being sent on to the Arduino. The aim then is to set the gain to give output readings in the range of 0V-5V for the range of weights that you want to measure, so as to use the full range of the analogue to digital converter in the Arduino.
Some example code on reading the InstAmp output is available on github, along with the breadboard diagram. While the output from the InstAmp can be read on an analog pin on the Arduino, it's also possible to use an external analog reference from the INA125P to ensure maximum range for readings.
More next time on using the scales in a project at DoES Liverpool to measure the level of coffee in the coffee machine…
The INA125P sets the bridge voltage by joining either pins 14, 15 (or 16) to the V+in pin. Pin 14 is 2.5V, so should definitely use the external analog reference. Pin 15 is 5V and can be used from either internal or external analog reference. Pin 16 is 10V, and should not be connected as it can exceed the maximum 5V input to any analog pin. If using the 5V (Pin 15) to drive the bridge, power the INA125P from the Vin rail of the arduino, using a power source at 7-20V. If powered by 5V, the 5V output from the INA125P will be lower than the input voltage.