I knew the noise was bad but because the values coming out of the ADC are unit-less I could not quantify how bad it was. I implemented conversion from counts to volts and a process for taring and calibrating the scale with a known weight. Now I can see force, and noise, in grams. Results for noise (max force - min force over 1000 measurements):
- BTT Octopus on board 5V supply: ~125g
- Dedicated Meanwell 5V supply: ~5g
So that was really bad! +/-2.5g is still pretty terrible vs a scale with a battery, but for our application I think its going to be fine. A power filter would certainly improve things. That’s a big downside of the boards I have seen, no input filtering at all.
I also pulled in numpy and computed the standard deviation, as etotheipi suggested, and 5x that as the “trigger weight”:
22:20:05 $ READ_LOAD_CELL
22:20:07 // Load Cell reading: raw average: 732, weight: -0.040570g,
min: 1.897409g, max: -1.898573g, noise: +/-1.897991g,
standard deviation: 0.644459530242g, trigger weight: 3.22229765121g,
samples: 1000
Shaking the frame of the printer causes more than 3g of disturbance. I’m gonna guess that 50g trigger force is going to work out fine on this setup.