How to filter noise on AD HX711 Load cell amp
IF ina == 0 ' is there data available hxraw := hx.readraw <# 10000 'avoid false number above 10000 IF hxraw > LoadcellLimit ' GoZeroClear ser.str(3, String("OverLoad Trip:")) KillMotor Repeat ' lock up beep2500 w(80_000_000)https://www.sparkfun.com/products/13879
I am only assuming the issue is noise. Originally I found that if you read too fast you get bad info, then I added the test for the data line == 0 which means data is ready.
The load cell shows a range when I press on it by hand of 0 to 4000 or so using read raw data. I want to set a threshold using LoadcellLimit to determine if a motor is overloaded. The problem is there are sporadic glitches that exceed 10000 even with no load. I will do some tests with a scope to see if I can see what is going on with the lines. Off the Prop the wire to the HX711 AD is unsheilded for a foot, then the wire to the load cell is sheilded for about 4-6' or so. For these tests the HX711 sparkfun BOB is not in a metal enclosure.
I tried putting in the limit max 10000 but the LoadCellLimit trip is set to 5000, so I still get the false trigger. What is the proper way to deal with this in terms of digital filtering, as I may or may not solve the line noises. Is a MEAN the right approach where you toss out anything beyond a potential viable number but you need several samples to establish an average?