endail / hx711-pico-c

Implementation of single and multiple HX711 use via RP2040's state machine
https://endail.github.io/hx711-pico-c/
MIT License
35 stars 7 forks source link

[novice question] Not getting values using hx711_get_value; how should I debug my setup? #54

Closed jangid closed 1 year ago

jangid commented 1 year ago

I am not getting value using hx711_get_value or any of its variants. This method blocks and waits endlessly. I am using this amplifier for the first time. So it could be an issue with my setup. I want to know how do I make sure that I have connect the right pins.

I am on Linux host and using CLI to copy files and checking using minicom. I am printing statements and reading via USB.

endail commented 1 year ago

Hi,

Please describe which pins on the Pico are connected to the HX711 pins, including how you are powering the HX711.

A photo would be ideal.

jangid commented 1 year ago

image

Pin 19 & 20 are connected to hx711 clock and data respectively. And I am powering hx711 using VSYS of Pico.

jangid commented 1 year ago

Just now I tried to switch to external 5v power supply for hx711 amplifier. Now hx711_get_value methods are returning -1.

endail commented 1 year ago

Do you have a load cell connected to the left side of the HX711? I can't see from the photo. Another photo of the load cell and how it is connected to the HX711 would be greatly appreciated.

Have you tested this HX711 and load cell with any other board (ie. regular Raspberry Pi, Arduino, etc...) and can confirm it works as expected?

Can you please reply with a full copy of the code you're using.

jangid commented 1 year ago

Thanks for leading me to the right direction. I was doing a mistake. I was powering both sides of hx711 amplifier using different power supplies. Once I removed the input side power supply, the code has started giving expected values. Thanks for all your work on this library.