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
32 stars 7 forks source link

Sparkfun HX711 #59

Closed ghost closed 1 year ago

ghost commented 1 year ago

Will the SparkFun Load Cell Amplifier - HX711 work with the library? According to what I've read, the pico can only give 3.3V and not 5V to the HX711 board, making it impossible to attach a standard HX711 board to it. For which HX711 board is the library meant for? P.S. My wiring appears to be correct because I can use the Sparkfun HX711 and Load Cells on an Arduino, but I want to run it with a Pico.

The output I get after uploading the main to the pico looks like the following: ---- Opened the serial port COM17 ---- blocking value: 4167482 timeout value: -1 noblock value: -1 Closed communication with single HX711 chip hx711_multi_t chip 0: -1 hx711_multi_t chip 0: -1 hx711_multi_t chip 0: -1 Closed communication with multiple HX711 chips

endail commented 1 year ago

I also have the SparkFun HX711 board. I have the VDD and VCC pins connected to pin 36 (3v3 OUT) on the Pico. I can confirm it works.

Which pins on the Pico are you using to connect to the HX711's DAT and CLK pins?

Use this page to refer to pin numbers.

https://pico.pinout.xyz/

ghost commented 1 year ago

Okay, I'm glad to hear that. I'll verify my wiring to the pico again.

endail commented 1 year ago

I have had occurrences where the DAT or CLK lines were not connected properly because of a poor quality breadboard. Try to connect them as directly as possible and verify continuity between the pins with a multimeter if possible.

ghost commented 1 year ago

Okay I had DAT and CLK connected to GP 14 and 15 instead of pin 14, 15. Now my output looks as follows: blocking value: 0 timeout value: 0 noblock value: 0 Closed communication with single HX711 chip

I will check the breadboard connection. I've soldered DAT pin 15 and CLK pin 14 or respectively GPIO 11 and 10 Still no vlaues

endail commented 1 year ago

The test program uses GPIO 14 and 15 (which are pins 19 and 20 on the board) to connect to the HX711's CLK and DAT pins respectively.

If you've already soldered wires to different pins, it's probably easier to change the corresponding GPIO numbers in the program on lines 48 and 49.