mortenfyhn / coffee-scales

⚖️ Scales for brewing coffee ☕
GNU General Public License v3.0
22 stars 2 forks source link

Filtering is broken #24

Closed mortenfyhn closed 3 years ago

mortenfyhn commented 3 years ago

The weight reading is very unstable.

mortenfyhn commented 3 years ago

I printed the raw value going into the filter and the filtered value coming out, and they are the same:

-0.07 -0.07
0.28 0.28
1.18 1.18
1.56 1.56
1.53 1.56
1.13 1.13
2.10 2.10
2.95 2.95
1.96 1.96
1.11 1.11
mortenfyhn commented 3 years ago

Seems to be caused by the filter always reporting "not in steady state", in which case it just returns the most recent value. I think the raw signal from the load cell amplifier is noisier than it used to be, for whatever reason.

mortenfyhn commented 3 years ago

"Fixed" by using another HX711 breakout board. Maybe the bad one used 80 Hz higher noise sampling, and the good one 10 Hz, I think I read about that in the datasheet.