HX711 icon indicating copy to clipboard operation
HX711 copied to clipboard

How to reduce noise when using 80Hz mode?

Open LukeDaniel16 opened this issue 5 years ago • 0 comments

I have 4 hx711 and each one reads 1 cell, i was using the 10hz mode, however, this was making my application very slow, as I needed to take 5 readings and take the average of these, when I put the 15 RATE in 1, it is having a lot of noise, despite having speeded up the reading of the weights, sometimes the variation is up to 3 digits at the end. See the code for reading the modules where I already show the weights in Kg:

` n=6; for(int x=0;x<n;x++){

v1[x] = CELL1.read();

v2[x] = CELL2.read();

v3[x] = CELL3.read();

v4[x] = CELL4.read();

} v1m=0; v2m=0; v3m=0; v4m=0;

for(int x=1;x<n;x++){ // sum of array v1m=v1m+v1[x]; v2m=v2m+v2[x]; v3m=v3m+v3[x]; v4m=v4m+v4[x]; }
//mean array v1m=v1m/(n-1);
v2m=v2m/(n-1); v3m=v3m/(n-1); v4m=v4m/(n-1);

p1=p; p=((v1m-v10)/(M[1]) +(v2m-v20)/(M[2]) +(v3m-v30)/(M[3]) +(v4m-v40)/(M[4]))/2.5; // show the weight in Kg p=p*.7+p1*.3; // convert to kg // ... i print the p (weight in Kg) now... `

LukeDaniel16 avatar Mar 30 '20 14:03 LukeDaniel16