# Measuring 3- Wire Strain Gauge

Hi I have bought a scale and am having a lot of trouble repurposing the strain gauge sensors to measure the voltage changes. I have been searching alot and have found that I need to use a bridge and an amplifier. I have the same scale and sensors that this person was mentioning in his topic http://arduino.cc/forum/index.php/topic,20941.0.html I am just not sure how to connect the gauge into the bridge. It has 3 wires, Black White Red The resistance between them are as follows: white and red = 1k Black - red = 1k white - black = 2k

I was going to use a wheatstone bridge but and unsure which resistors to use for the 3 other resistors. (I only want you use one strain gauge in the bridge). And also which 2 wires to connect the strain gauge into the bridge.

Thanks!

Hi mike930,

You need to search for "quarter-bridge setup" in wheatstone bridge type. In your case, if you don't want to use other three strain gages, assuming r1 is your active resistor, you should replace r2, r3, and r4 in your bridge with dummy resistors. Since they will be passive it doesn't matter what type of resistor you are going to use. But to be coherent in the entire bridge keep all of the resistors as 1k ohm.

A regular strain gage should be excited with Vc so that you can measure voltage output Vo. Usually, red wire is connected to positive pole of power supply and one of the black/white pair is connected to negative pole of power supply. Depending on your circuit, the other wire of black/white pair should be connected an analog pin since it is a continuous analog signal. The voltage you are going to read will be about 0-1 mV based on your excitation voltage.

Conditioning the signal is a whole different animal. Probably, you need amplifiers maybe capacitors to have noisless data.

++addition it is really hard to measure small signal output with arduino, so i guess you don't have a choice other than using amplifier. Remember it is analog quantization is 5V/1024

That sensor is probably meant to be used as half a wheatstone bridge, not a quarter. I would connect black to gnd, white to +5v, and then red is one of the outputs from the bridge. Connect it to the non-inverting input of an op-amp. For the other side of the bridge, connect two 1k resistors in series between +5v and gnd, then the junction between them is the other output from the bridge. Connect that to the inverting input of the op-amp. Also connect a resistor from the op-amp output to the inverting input, say 10K to give a gain of about 20. Also connect the output of the op-amp to your Arduino analog input pin.

dc42: That sensor is probably meant to be used as half a wheatstone bridge, not a quarter. I would connect black to gnd, white to +5v, and then red is one of the outputs from the bridge. Connect it to the non-inverting input of an op-amp. For the other side of the bridge, connect two 1k resistors in series between +5v and gnd, then the junction between them is the other output from the bridge. Connect that to the inverting input of the op-amp. Also connect a resistor from the op-amp output to the inverting input, say 10K to give a gain of about 20. Also connect the output of the op-amp to your Arduino analog input pin.

What would be the 4th resistance in the half bridge? Do you think i should use 2 strain gauges?

The first 2 resistors in the bridge are the strain gauge, and the 3rd and 4th resistors are the two 1K resistors connected to Vcc and Gnd.

Okay i finally got it working, thanks guys! Now theres a problem programming it with the arduino to convert the voltage into a weight. I know the analog pin reads a voltage from 0 - 5 and converts it into steps from 0 - 1023. However the analog pin seems to be very random giving a reading between 0 and1023 steps without me putting any weight on the scale. My multimeter shows a constant 2.08V so the voltage is not changing too much. Stepping on the scale produces a .55 change in the voltage, yet the analog sensors readings do not even seem to be affected, however this could also be because they are constantly changing from 0 - 1023 constantly and randomly. Any idea why this could be happening?

What circuit are you using? Are you certain that your sketch is reading from the correct pin? If the mcu is in a socket, check that the pin concerned hasn't got bent under the chip instead of going into the socket.

Any idea why this could be happening?

Perhaps if we could see your code and a wiring drawing.

I tinkered with it and now the reading seems to be kind of stable. However at rest it stays around 434 - 437 which is fine and it goes up with weight, however it always randomly goes up and down anywhere from 1 - 3 steps and it messes up with the weight. When i put 10 lbs on the scale it reads 10 pounds but it may change to any value from 12.00 to 8.00. Is there any way to stabilize these readings? With a capacitor maybe? My circuit and code is below. Thanks for all your help so far guys!

``````/* ------------------------------------------------------------------------------- */

#include <LiquidCrystal.h>
int sensorPin = A3; //designated the pin the sensor is connected to. In this case Analog 5(A5) for digital pins you just have to write the pin number e.g. sensorPin =13;
int sensorValue = 0; //declares sensorvalue variable
int active = 0; //declares active flag

/*---- LCD INIT
LCD LEGEND:
Pins    Function       Arduino Pin
1       VSS            GND
2       VCC            5V
3       VEE            GND (or POT, or PIN on Arduino to control Brightness)
4       RS             8
6       Enable         6
7       Data0          NONE
8       Data1          NONE
9       Data2          NONE
10      Data3          NONE
11      Data4          5
12      Data5          4
13      Data6          3
14      Data7          2
15      LED+           5V
16      LED-           GND
*/

LiquidCrystal lcd(2, 3, 4, 5, 6, 7, 8); // initializes LCD with the pins we are using

// Arduino as load cell amplifier
// by Christian Liljedahl
// christian.liljedahl.dk

// Load cells are linear. So once you have established two data pairs, you can interpolate the rest.

// You need two loads of well know weight. In this example A = 10 kg. B = 30 kg
// read the analog value showing (this is analogvalA)
// read the analog value B

// Enter you own analog values here
float loadA = 10; // kg

float loadB = 30; // kg

float analogValueAverage = 0;

// How often do we do readings?
long time = 0; //
int timeBetweenReadings = 200; // We want a reading every 200 ms;

void setup() {
Serial.begin(9600);
}

void loop() {
int Number = (analogValue * 5.0) / 1024.0;
analogValueAverage = 0.99*analogValueAverage + 0.01*Number;
float weight = (analogValue - 433) * 1.2;
// Is it time to print?
//  float weight =
Serial.print("analogValue: ");Serial.println(analogValueAverage);
time = millis();
lcd.begin(8,2);  //LCD init for 8x2 display
lcd.clear(); //Clears lcd
lcd.setCursor(0,0); //starts writing the first 8 characters on the lcd
lcd.print(weight);
//lcd.setCursor(0,1); //starts writing the last 8 characters on the lcd
}
}

// using a custom map-function, because the standard arduino map function only uses int
}

float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

//lcd.print(sensorValue); //used it to print the value of the motion detector while testing

/* ------------------------------------------------------------------------------- */
``````

For Rg I used a 1k resistor 200k + 5/1k = 205 Gain
Rs are the 4 strain gauges i used in the full bridge.

Or is there a way to take a reading every half second for 3 seconds for example and display the average of that and loop that? so it doesnt seem to jump as much?

mike390: Or is there a way to take a reading every half second for 3 seconds for example and display the average of that and loop that? so it doesnt seem to jump as much?

That is what I would do.

I have a few questions about the circuit:

1. Are you really using a separate battery to power the strain gauge, or is the battery meant to represent Vcc and Gnd?
2. What is the type number of the chip are you using to amplify the strain gauge output?
3. Which of the 4 resistors marked Rs is/are the strain gauge?

dc42: That is what I would do.

I have a few questions about the circuit:

1. Are you really using a separate battery to power the strain gauge, or is the battery meant to represent Vcc and Gnd?
2. What is the type number of the chip are you using to amplify the strain gauge output?
3. Which of the 4 resistors marked Rs is/are the strain gauge?

Sure, 1. I meant it to represent the +5 and GND, the circuit and arduino are powered by the same power rails 2. The chip is a INA122P Datasheet here ->http://www.datasheetcatalog.com/datasheets_pdf/I/N/A/1/INA122P.shtml 3. All 4 resistors in the bridge are strain gauges, the scale has one gauge on each of its feet.

I am not too sure how i would write the code to average it out

mike390: 3. All 4 resistors in the bridge are strain gauges, the scale has one gauge on each of its feet.

That will only give you good readings if two of the strain gauges on opposite corners of the bridge increase their resistance when subject to weight, and the two in the other opposite corners decrease their resistance. If (for example) all 4 increase their resistance, then if the scale is loaded perfectly evenly, the bridge remains balanced and you will get no output from it.

If they are 3-terminal strain gauges, it is likely that one of the two elements in each one will increase its resistance when loaded and the other will decrease its resistance.

Hmm thats true.. I will try that tonight

I tried hooking it up like you said and the resolution is even worse now, its only varying about 20 steps from 140lbs. Should the 3rd left over wires from the gauges go to ground or stay unplugged? i tried both and it gave no improvement. The thing about this method is if i apply a weight evenly in the middle of the scale all the sensors get even pressure and cancel eachother out making the circuit keep the same voltage.

If the strain gauges are of the sort where one element increases its resistance and the other decreases, then to use all 4 I would connect them like this. Let the 3 terminals of each one be called C (common), I (increase) and D (decrease). Connect them in a ring using the I pins and D pins so that each I pin is connected to another I pin and each D pin is connected to another D pin. Then use the four C pins as the bridge inputs and outputs.

What this gives you is a bridge in which one of the resistors is made up of two I elements in series, its two neigbours are each made up of two D elements in series, and the diagonally opposite resistor is also made up of two I elements in series.

Hi,

We are working on the same problem for a mechanical engineering project. Unfortunately, we can't seem to get it working properly.

Using a LM358 amp we have wired the wheatstone bridge, arduino and the amp properly, as instructed in the post. When hooking the arduino up to to our pc we get a steady stream of 2.5V.

However, when applying pressure on the strain gauges, no difference in voltage is noticed. We have already varied the resistors to get different gains (x100, x1000) in the hope to notice a difference but that seemed not to change anything.

Is anybody willing to help us, any help would be much appreciated! Any response is welcome or you can contact us at: maurits@sterlingframeworks.com

Many thanks.