HX711 readout
Posted: Mon Jan 24, 2022 2:14 pm
Hey, we are currently using an HX711 weight sensor using a 2kg load cell with a raspberry pi Pico in Micropython.
Currently, any values obtained from the load cell are all extremely erratic, either the same number 8388607 or 0, regardless of any weight used. Would anyone have any suggestions? This is our current code:
from hx711 import HX711
import utime
from machine import Pin
pin_OUT = Pin(20, Pin.IN, pull=Pin.PULL_DOWN)
pin_SCK = Pin(21, Pin.OUT)
hx711 = HX711(pin_SCK, pin_OUT)
while True:
value = hx711.read()
print(value)
utime.sleep(.5)
We have changed the hardware, but is there a possibility it could be broken? Or is it maybe the library or this code? Is this because we have not yet calibrated it?
Please send any suggestions.
Thanks.
Currently, any values obtained from the load cell are all extremely erratic, either the same number 8388607 or 0, regardless of any weight used. Would anyone have any suggestions? This is our current code:
from hx711 import HX711
import utime
from machine import Pin
pin_OUT = Pin(20, Pin.IN, pull=Pin.PULL_DOWN)
pin_SCK = Pin(21, Pin.OUT)
hx711 = HX711(pin_SCK, pin_OUT)
while True:
value = hx711.read()
print(value)
utime.sleep(.5)
We have changed the hardware, but is there a possibility it could be broken? Or is it maybe the library or this code? Is this because we have not yet calibrated it?
Please send any suggestions.
Thanks.