hx711py icon indicating copy to clipboard operation
hx711py copied to clipboard

Random Values on the raspberry pi

Open programmeddeath1 opened this issue 2 years ago • 3 comments

Im trying to implement this code with the Raspberry pi 4b, on python3. It is giving random values, I tried switching between MSB/LSB, I tried all combinations of the load cell wires to check if there is a difference between the supported formats of hx711 and the load cell that I have. I am not able to debug from the code because the binary values array function doesnt exist. Can you help me understand what mistakes I might be making. hx711issue4 hx711issue3 hx711issue2 hx711issue1

From the sensor I have taken the red and black to E+ and E-, The green and white as A+ and A-.

Please help me im stuck on this for quite a while I need to figure out a solution for delivery as soon as possible. Any help would be appreciated!

programmeddeath1 avatar Jan 07 '23 03:01 programmeddeath1

This isn't my repo, but you should first check all your wiring matches the GPIO pins you have set. You should have the clock/sck pin and GPIO input pin wired to the HX711, and then the 5v power and ground. Make sure you've configured your GPIO properly as well.

Over on my similar repo, I have a raw GPIO test you can use to see exactly how the GPIO is interacting with the hx711.

https://github.com/Morrious/hx711-multi/blob/prod/tests/raw_gpio.py

james-e-morris avatar Jan 07 '23 04:01 james-e-morris

Hey yes I have assigned data and sck to gpio 5 nd 6 as mentioned in the repo demo. I have checked the GPIO configuration is set as per the two tutorials mentioning this repu, not the connections towards the sensor side I am not sure if the pin connections to the given sensors and hx711 are proper. The sensor has 4 cables of red,white,black and green. I have attached the red and black to excitiation(E+,E-) and green and white to A+ and A-(tried both) I am still getting random values from the hx711. I tried with another weight sensor and still the resut is the same. Is it a fault with the code, is it sending data differentl to the rpi than what the code in the repo ismeant to handle?

Thank you for your code, Ill test and check the raw GPIO values from your code once and see if theres some pattern there.

programmeddeath1 avatar Jan 07 '23 05:01 programmeddeath1

Here's a wiring diagram I have of the HX711s I use. image

james-e-morris avatar Jan 07 '23 05:01 james-e-morris