In celebration of the 50th anniversary of Apollo 11's Moon Walk, we are offering $50 off our SparkFun Inventor's Kit for RedBot and the Arduino Engineering Kit while supplies last! Use promo code APOLLO11 at checkout until 11:59 p.m. MT to get yours today!

Member #123207

Member Since: March 3, 2010

Country: United States

  • I have seen similar "jitter" in my readings; big jumps for brief periods of time. I'm assuming it's a noise issue with ADC not helped by my un-shielded wiring. I also believe some the erroneous values are made worse by possible overflow/underflow in the averaging routine in the HX711 library. One thing that helped me was to modify the firmware to read (10) raw samples, scale them individually before summing/averaging, discard the lowest and highest individual readings, and then summing and averaging the remaining (8) scaled samples (see rudimentary code below):

    long i, j, min, max; long rawReading[10];

    // Take 10 readings w/ scale factor
      rawReading[i] = scale.read(); // Take a single reading from the ADC
      rawReading[i] /= 8870;        // Scaling (hard-coded scale factor)
    // Find lowest and highest reading
      if(rawReading[i] > max)
        max = rawReading[i];
      if(rawReading[i] < min)
        min = rawReading[i];
    // Sum and remove lowest and highest and average readings
      j += rawReading[i];
    j -= min;    
    j -= max;    
    j/=8;   // Final value

No public wish lists :(