SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Kinnishian
#196518
Hey folks. I've a Sparkfun HX711 connected to a Teensy 3.5. I've been struggling to get sensible readings and am hoping to get some help. There are so many assumptions in such a system, so bear with me, while I try to list out what I've done.

First, what problem I face:

Nominally, the numbers I get from the HX711 don't make sense, and seem similar to as if the ADC was being immediately saturated. But I have a 1.412mV/V load cell being excited by the ~4.3V of the HX711 board. That's <<the mininum range that the HX711 can be set to (which is +/- 20mV with the 128 PGA).

At no load I get ~8,360,716 when wired as per normal (99.96% of full range)
I get ~62139.00 when I swapped the GRN and WHT pins (0.74% of full range)
I expect -0.230mV*(10V/4.36V) when I have no load (corresponding to about 40,000 ADCbits.) 10V/4.36V because the 0.230mV reading is from a 10V excitation datasheet, and the HX711 is putting out 4.36V for excitation.


(1)I'm using the HX711 library listed on the sparkfun product page.
(2) I have a quality omega load cell. I believe the datasheet they come with and color coordination makes sense when I look up the wires
(3) After my first round of problems I changed all the doubles in the HX711 library to floats, because teensy 3.X uses real doubles and I didn't want to mess that up. Didn't fix anything.
(4) If the ADC was really at saturation at steady state /no load then I should see 20mV across A- and A+ --> I do not.
(5) If I short the A- and A+ pins without the load cell attached, I still get the near-full ADC reading from the library!!
(6) I purchased my first HX711 from a reseller on Amazon, but today I got in some purchased direct from sparkfun and have the same problems. Purchased them in case I had gotten a shady clone-selling-as-sparkfun off amazon.

To me, it seems that there's something wrong with how the HX711 library is putting together the bits from the sensor. But I cannot figure out what has gone wrong and don't know much about bit operations. I have not found other people who has used the Teensy line with the HX711 (though a thought just came to mind- I'll look for people using it with Due's that might operate similar), but maybe something is different in how the compiler works for the teensy compared to the avr line, or otherwise there's some difference in the notation.

>.< I'm confused! Been at this for many many hours... :( any help appreciated.
By Kinnishian
#196520
I found an UNO and soldered up one of my sparkfun HX711 boards, compiled my exact code minus one pin change (for DOUT and CLK, on an UNO.)

I now have the correct values, minus that I'm off somewhere by a factor of 10 in my Kg values at least 0kg, 2kg, and 5kg match up.


There is a difference between how UNO and Teensy deal with the HX711 code.. I will try to get to the bottom of this but this is soooo far from my domain. Learning experience I guess? I try to avoid bits...