SergeyPiskunov/micropython-hx711

hx711 connections

Closed this issue · 9 comments

Hello,
I am new to programming and trying to build a weighing machine using hx711 and esp8266 (programmed in micro-python).
your code seems to be useful but i am confused about the connections between the two how to use these files. Will you please help in the issue.
thank you

Hello. Sure. The hx711.py contains the HX711 class which is HX711's driver itself. It provides you with low-level methods for reading/writing data from the HX711. I want to mention that the HX711 is the Analog to Digital Converter and building weigh scales is just one of it's possible use-cases. This particular use-case is described in my example micropython-hx711/examples/scales.py You may find there a high-level implementation of weigh scales built on top of HX711. Also I want to mention that the micropython-hx711 is available via "pip install". However, you may just manually copy the hx711.py to your ESP8266 and use it.
As for the wiring, try these sources:
https://www.dfrobot.com/blog-1303.html
https://wifi-iot.com/static/content/62d20c91a64680a.png
https://github.com/d4niele/maia

Hello, i am getting random value. sometimes + or - values. what i have to do to get actual weight?
Thanks for this driver codes.

Hello! If the wiring is correct and power supply gives stable power and you still get random values - there may be an issue with the board itself. However, as far as I understand, the weight sensors are very sensitive to external conditions (this is the main reason of using four sensors connected via bridge) and you may get some inaccurate values sometimes. In that case, I suggest you to make a sequence of measurements and to compute an average value programmatically.

Ok thanks

Hello Sergey,
tested your code with Pico (RP2040): works fine (4 load cells with HX711) , thank you !

Hello Sergey, tested your code with Pico (RP2040): works fine (4 load cells with HX711) , thank you !

You're welcome! I'm glad you've found it useful.

Hi.. I am getting random values too. Please can you help me in this regard? I used your "hx711.py" and "scales.py" and ran the code. The values are randomly changing. Sometimes positive, sometimes negative and by large change. My setup seems fine, because it works well with c++ code.

Am i supposed to change anything in your hx711 code? The init instance is not calling all the instance.

Please can you help me? I need to work this with my esp32

I am also getting "divide by zero" error.

Please find the ss in this google drive link https://drive.google.com/file/d/1hM2IPYIXRd8zTa_HQvX1hsxNN7FRtyEE/view?usp=sharing

Hi! Sure, I'll try to help you. Could you please share with me your entire code snippet?