tatobari / hx711py

HX711 Python Library for Raspberry Pi.
Apache License 2.0
206 stars 154 forks source link

Reference unit and settings #21

Closed cbkn76 closed 5 years ago

cbkn76 commented 5 years ago

Hello, and I appreciate any help I can get. I am using 4 degraw 50kg sensors. Using Standard example.py, I have only changed the reference unit, and commented read long and uncommented get weight. Also tried playing with uncommenting hx.tare().

As I’m completely new to python I am pretty sure I am doing something wrong and need clarification.

  1. Should hx.tare be commented or uncommented, or changed after calibrating? I only ask because comments on SparkFun page said they had to uncomment to get it to work.

  2. Should calibration be done using read long or get weight?

Using get weight I get readings of around 32,000 with no weight, and that does not change when I add weight. Changing reference unit can bring that number down, but will still not read weight.

Again I appreciate any help or clarification for my troubleshooting. Been trying to figure this out for two days but some information on other sites has confused me.

tatobari commented 5 years ago

Hey! Please post a picture of your wiring or your current schematics. Also, could you share the Sparkfun link where you read about this? Finally, which HX711 breakout board are you using? A good picture would be useful.

cbkn76 commented 5 years ago

Sorry, wasnt sparkfun. here is the link https://tutorials-raspberrypi.com/digital-raspberry-pi-scale-weight-sensor-hx711/

schematic i used is this image

trying to get pictures up from my phone. i believe i saw that you use the same hx711 in another post. i have soldered it

cbkn76 commented 5 years ago

IMG_2529 IMG_2528

cbkn76 commented 5 years ago

IMG_2526

cbkn76 commented 5 years ago

IMG_2523

tatobari commented 5 years ago

Please, post a picture of the wires on the Raspberry.

By the way, hx.tare() is a function that should be used to tare the scale you've built. The function will produce an offset value which is self.OFFSET. This means that the scale shouldn't have any weight until that function has run.

example.py is a very dumb concept. You should have a push button or something else that let's you run hx.tare() when needed.

cbkn76 commented 5 years ago

40B5A101-F6A1-487D-8562-DEFB3A5DA2F5

tatobari commented 5 years ago

Looks good. Could you post the values you're getting?

cbkn76 commented 5 years ago

Best picture I have as I am traveling at the moment, I appreciate the help. So do I get the reference unit when using get weight or read long? This troubleshooting is driving me nuts.

tatobari commented 5 years ago
cbkn76 commented 5 years ago

I’ll have to get back to you on Wednesday, I have tried so many combinations my mind is jumbled. The main problem is the readings not changing when I apply weight. Or not adjusting when I change the reference unit.

It is possible one or more of the sensors is bad, so I think I am going to order another kit. Only reason I think one may be bad is because it doesn’t seem like this should be that hard.

tatobari commented 5 years ago

I'd probably check the sensors too. Good luck.

slabula commented 5 years ago

Try making a wheatstone bridge: https://en.wikipedia.org/wiki/Wheatstone_bridge And connecting that to your Raspberry Pi/HX711 board. That you can verify that your boards work.

tatobari commented 5 years ago

Closing this issue as it isn't due a problem with the library itself.