Hi, I have a 5kg straight bar load cell connected to a QWIIC scale. Communicating with the scale device over I2C seems to work fine, but I just get a stream of reading between about 300 and 700 regardless of how much I push or pull. Since it’s a 5kg cell, I should be able to easily apply enough force with my hands to generate changes in the readings, but I can’t.
I’ve attached some photos. One shows how the load cell is set up, bolted between two pieces of plywood. I didn’t show the end of the bar, but it’s positioned with the arrow pointing down. The intention is to suspend the load from the eyelet on the bottom of the lower (smaller) piece of plywood. The other just shows the QWIIC scale, connected to the particle.io Photon I’m using to control the system. Ignore the motor driver, resistors and extraneous wires; those are part of the rest of the system, but not currently connected or being tested.
Here’s the scale initialization code, called from setup()
void initScale() {
initWire();
if (!scale.begin()) {
reportError("Scale not responding");
} else {
Serial.println("Scale initialized");
}
}
And here’s the code that reads the scale, called from loop(), 200 ms between polls:
if (scale.available()) {
Serial.println(String("Weight: ") + scale.getReading());
}
And ideas? Maybe the load cell I have is defective?