Go Down

Topic: HX711 weighing scale glitchy prototype: How best to locate wiring problems? (Read 209 times) previous topic - next topic


We've constructed a set of weighing scales for our animals such as goats, sheep, from Arduino with the HX711 and 4 x 50kg load cells. Right now the prototype is running on the 3v pro mini, I will be changing it over to a Nano in the remake.

Finally the program is all good, it's been runing for hours on and off, proving perfect weights every time, but I've got wiring problems like you wouldn't believe (actually you probably would LOL). I've never seen anything like it in any other project even in radio Eg LoRa projects.

I haven't posted code, because I'm sure the problem is all in wiring ... if you'd prefer I post it anyway let me know.

All I'm looking for some guidelines on where and how I should be looking to debug my wiring ... for instance, are there known sensitivities to signal noise on particular pins (Eg SCK?) of the HX711?

Any tips on locating wiring problems in general?

It's the prototype version wiring at fault, I've got KF2510 plugs coming in the post to redo all the 'dodgy connections'. I mean, the faults I know that only happen if you move something. Other problems abound though!
I seem to have major noise issues like wires are just inducing to each other more than normal and every tiny wiggle stops it working and it's making it virtually impossible to be sure that I can fix all the problems with good connections.

Is it normal to have such problems? I've never had such extreme unreliability with the breadboard connections, even in other projects involving LoRa etc. Is the HX711 very, very sensitive? Is the Pro Mini prone to signal induction? Could it be because I have really long (well insulated) cables to the load cells and a big metal platform next to them ... (I don't think so because all the problems seem to be within the little box that holds all my electronic modules, and the whole scale unit works spot on and is more accurate than my kitchen scales, when all the wires hold right).

I've already got 2 push buttons with Coaxial-protected wires because they typically analogRead 950 and 650 respectively when inactive (out of 1023 over 3.3v).
I had them parallel with other jumper wires, so I changed to running them separate with coaxial shielding on the push button wires - that resulted in analogReadings of 550 and 150, which both jump to 950 when the button is pressed. I set the level at 750 with stable results, providing I pressed all the breadborad junctions together firmly, for a while.

I just (last night) redid the most major 'dodgy breadboard junction' which needed all the bits pushing back together every minute or so in use ... stripped, twisted, strip connectors instead to join them all. I only had Should be better, but it's all changed.

Firstly, I had to adjust my analog read levels for the buttons ... they mysteriously lost a little power, scraping just under my programmed switch level, now when activated they read only 700 ... changed 750 to 650 and proceeded to the next problem.

Every time on startup, the scales 'tare' ... it should read 0.0kg ... instead it read 61.9 kg on first start most times. But only on setup ... in loop, the Tare button (same code copied) worked normally, and it returned to 0.0, and showed me that a 25kg feed sack weighed 25kg, which was nice (pats herself on back).

On investigation, after investigating which wires reacted and how it started working if I held my hand between some sets of wires (!!!) I discovered most reliably that if I held both the breadboard plugs at the arduino end of the DOUT and SCK pins feeding the HX711 scale module firmly onto the arduino pins it tared correctly on setup loop.

I put the project away for the night satisfied I could weigh a newborn goat this morning, and that the KF2510 plugs coming are the permanent fix for the odd glitchy behaviour.

Unfortunately this morning, after taring up at -0.2kg first (??), and retaring to 0.0, (:-)), it firmly declared that the goat weighs nothing at all. (!!!)
It then declared that I weigh nothing at all either. That's obviously not true.

I can't seem to get anything to work now ... pressing and wiggling all connections hasn't seemed to help so we're up for a major recheck.

But I'm a bit crippled until the KF2510 plugs arrive to redo all the connections with ... and I'm now concerned I may have to coax virtually everything when I do ... which I really must decide before starting physically with the new hardware plugs or wires when they do come.

Is it possible for me to identify from the symptoms whether the problems are on DOUT or SCK, or somewhere else?
Is it possible for me to identify from the symptoms if the problems are partially signal noise, cross induction on wires etc, or just wiggly plugs changing resistance?


The serial interface wiring between Arduino and HX711 needs to be very short, a few inches ideally, as its
high speed logic signals and cannot survive long cable runs without crosstalk, reflections and glitches /
multiple clocking.  Such a clocked serial logic interface is nothing like a serial connection from a UART,
since its clocked and even the shortest glitch on the clock will break things.

You need to provide a photo or two of how its all connected up I think to gain more insight.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Go Up