Measuring strain with 2 straingauges, 3296W variable resistor, HX711, Arduino

Hi, I'm new to this. Please help me, I have a task to measure the change in tension in a ruler when it is bent using 2 strain gauges, 1 variable resistor, 1 fixed resistor. There are several things that confuse me

  1. For the sequence as follows, please correct if there are errors. Sorry if it's confusing, this is the best I could draw.


  1. How do you install this 3296W variable resistor into the Wheatstone bridge circuit? there are 3 pins and I don't know where to put them.

  2. For the program library, I use the HX711 library made by Bogdan Necula and the program code made by ChatGPT as follows, but the results are always like in the following picture:

#include "HX711.h"

// Pin configuration
const int LOADCELL_DOUT_PIN = 3; // Data pin connected to D3
const int LOADCELL_SCK_PIN = 2;  // Clock pin connected to D2

// HX711 instance
HX711 scale;

void setup() {
  Serial.begin(9600); // Start serial communication
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);

  // Set the scale to a known reference unit for calibration purposes
  scale.set_scale(); // Set the scale to 1 for now
  scale.tare(); // Reset the scale to 0
}

void loop() {
  // Read raw data from the HX711
  long reading = scale.read();

  // HX711 is a 24-bit ADC, maximum value is 2^24 - 1
  const float ADC_MAX = 16777215.0;

  // Reference voltage for the HX711
  const float V_REF = 4.3; // Typically between 4.1V and 4.3V

  // Calculate the voltage in millivolts
  float voltage_mv = (reading / ADC_MAX) * V_REF * 1000;

  // Print the result
  Serial.print("Voltage: ");
  Serial.print(voltage_mv, 3); // Print the voltage with 3 decimal places
  Serial.println(" mV");

  delay(1000); // Wait for 1 second before the next reading
}

Screenshot 2024-06-11 145821

I don't understand what part is wrong, please help because the deadline is coming up :') thank you very much!

Well maybe since this is school work you could ask ChatGPT what's wrong? Do you understand strain gauges and strain gauge bridges? The variable resistor is likely there to zero the bridge. I am guessing 120 Ohm strain gauges. This is what you have less the pot.

I suggest you read up on and understand strain gauges.

Why do you have E+ and E- configured as you do? The E is bridge excitation. Find drawings using the HX711 and get your wiring correct. That's just for starters.

Ron

1 Like

The Wheatstone bride should only be powered from E+ E-
So remove the red/yellow wires at the left of the second diagram.

Make sure the bridge is balanced, with less than ~20mV between A+ A-
Leo..

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.