HX711 scale fluctuations

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Asco
Normal user
Posts: 15
Joined: 24 Jun 2018, 17:48

HX711 scale fluctuations

#1 Post by Asco » 24 Jun 2018, 18:19

Hello,
I'm discovering ESPEasy which is fantastic!! Thanks to all the developers!

I' have some troubles to use a HX711 to make a scale with the ESP_Easy_mega-20180624_test_ESP8266_4096.bin
I' have tried several bin but I always have the same troubles.

My ESP8266+HX711 works well if I use an arduino sketch with the lib <HX711.h> ; I get stable readings.

If I use ESPEasy, without touching the scale, I get:

Code: Select all

3552: WIFI : Connected! AP: NETGEAR94 (9C:3D:CF:2A:98:E6) Ch: 8 Duration: 2905 ms
10649: HX711: Value: -319.969 = 3502217.500
20649: HX711: Value: -344.875 = 3737986.500
30649: HX711: Value: -363.437 = 3913704.000
30654: WD : Uptime 1 ConnectFailures 0 FreeMem 20656
34537: WIFI : DHCP IP: 192.168.1.20 (ESP-Easy-2) GW: 192.168.1.1 SN: 255.255.255.0
34540: Webserver: start
40649: HX711: Value: -337.625 = 3669356.000
51161: HX711: Value: -329.406 = 3591555.500
60654: WD : Uptime 1 ConnectFailures 0 FreeMem 17848
61161: HX711: Value: -342.594 = 3716391.500
71161: HX711: Value: -346.719 = 3755440.000
81161: HX711: Value: -315.625 = 3461098.500
90654: WD : Uptime 2 ConnectFailures 0 FreeMem 17824
91161: HX711: Value: -288.687 = 3206101.500
101161: HX711: Value: -330.187 = 3598951.000
111161: HX711: Value: -329.437 = 3591851.000
120654: WD : Uptime 2 ConnectFailures 0 FreeMem 17848
121161: HX711: Value: -334.812 = 3642732.500
131161: HX711: Value: -338.562 = 3678230.500
141161: HX711: Value: -342.187 = 3712546.000
Who can help me to find what is wrong with this?

Thank you in advance!
Chris

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HX711 scale fluctuations

#2 Post by TD-er » 24 Jun 2018, 19:33

The power supply of the ESP may become noisy, due to its power demands.
I can imagine the ESP will be doing a lot less work when using a sketch that only does this reading. ESPeasy does do a lot more in the background.
How is the HX711 powered?

Asco
Normal user
Posts: 15
Joined: 24 Jun 2018, 17:48

Re: HX711 scale fluctuations

#3 Post by Asco » 24 Jun 2018, 20:09

Hi Td-er,
Thank you for your help!

The HX711 is powered by a 3.3V pin of the ESP8266...I think you re right.
I'll try to do another way.

Thanks!
Chris

osoon
Normal user
Posts: 15
Joined: 22 Mar 2018, 21:07

Re: HX711 scale fluctuations

#4 Post by osoon » 25 Aug 2018, 11:34

Asco wrote: 24 Jun 2018, 20:09 Hi Td-er,
Thank you for your help!

The HX711 is powered by a 3.3V pin of the ESP8266...I think you re right.
I'll try to do another way.

Thanks!
Chris
any luck of getting stable readings?

Asco
Normal user
Posts: 15
Joined: 24 Jun 2018, 17:48

Re: HX711 scale fluctuations

#5 Post by Asco » 23 Sep 2018, 17:55

Hello Osoon,
now it works perfectly, it was because I was using a too small USB powersupply (not enought current).

Thanks

chunter1
Normal user
Posts: 82
Joined: 22 Jan 2016, 22:40

Re: HX711 scale fluctuations

#6 Post by chunter1 » 14 Nov 2018, 22:41

How stable is "stable"?
I get these readings when using two 50kg weight-cells on channel A (gain 128, no oversampling):

Code: Select all

727944: HX711: GPIO: SCL=13 DOUT=14
728119: HX711: Value: 144.000
729119: HX711: Value: -7.000
730119: HX711: Value: 51.000
731119: HX711: Value: 53.000
732119: HX711: Value: -36.000
733119: HX711: Value: 27.000
734119: HX711: Value: 55.000
735119: HX711: Value: -16.000
736119: HX711: Value: 32.000
737119: HX711: Value: 33.000
738119: HX711: Value: -13.000
739119: HX711: Value: 16.000
740119: HX711: Value: -31.000
741119: HX711: Value: -80.000
742119: HX711: Value: -47.000
743119: HX711: Value: -42.000
744119: HX711: Value: -34.000
745119: HX711: Value: -59.000
746119: HX711: Value: 26.000
747119: HX711: Value: 16.000
748119: HX711: Value: 60.000
749119: HX711: Value: -38.000
750126: HX711: Value: -48.000
751119: HX711: Value: -61.000
I even observe a drift over time although the sensors are not moving or stressed in any way.

chunter1
Normal user
Posts: 82
Joined: 22 Jan 2016, 22:40

Re: HX711 scale fluctuations

#7 Post by chunter1 » 15 Nov 2018, 19:28

I recorded several hours of sensor data.
The setup did not move and the temperature changed not significantly aswell.
So...I don't know what's going wrong here.
Attachments
hx711.jpg
hx711.jpg (79.98 KiB) Viewed 10808 times

chunter1
Normal user
Posts: 82
Joined: 22 Jan 2016, 22:40

Re: HX711 scale fluctuations

#8 Post by chunter1 » 16 Nov 2018, 13:24

Looking at the schematic and checking the PCB i found two design flaws (besides the generally totally inadequate design for a 24 bit ADC):

1.) AGND is not connected to the GND pin!! You need to make your own connection otherwise it is undefined and only connected through some body diodes!

2.) The HX711 datasheet says, that AVDD should be at least 100 mV lower than DVDD.
The resistive divider on the board however is only dimensioned for 5V supply resulting in 4.3 V.
By replacing the 8k2 resistor with a 15k the LDO now sits at 2.9 V for AVDD which is fine when using it with a 3.3 V supply.

It's funny that these crapy GREEN chinese HX711 PCBs are sold all over the places and only a view people seem to care :)
Next time i'll try something slightly better looking like this shielded and at least symetrically filtered one:
Attachments
hx711_shielded.jpg
hx711_shielded.jpg (27.72 KiB) Viewed 10795 times

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 24 guests