1

I'm really a newcomer to arduino and I'm trying to build a scale with four SEN-10245 load cells and a HX711. My issue is that I can't get constant readings in the serial monitor and I'm not sure if my coding is right or if I did the right setup. I made the following setup, based on some examples I found online:

setup on the board setup hx711 and protoboard

The code I'm using is as follows:

    #include <hx711.h>
    Hx711 scale(A1, A0);
    void setup() {
    Serial.begin(9600);
    }
     void loop() {
     Serial.println(scale.averageValue());
     delay(200);
    }

link for the library github: https://github.com/aguegu/ardulibs/tree/master/hx711

Please help me, i'm a total beginner.

5
  • What is your power supply?
    – SDsolar
    Jun 19, 2017 at 22:57
  • 1
    What are the readings you get? How much do they vary?
    – Delta_G
    Jun 19, 2017 at 23:13
  • by now my only power supply is my computer.
    – Miguel
    Jun 20, 2017 at 0:47
  • 1
    @Miguel can you clarify what you mean by "constant readings"? Is it moving from 100 to 1200 or form 395 to 396?
    – frarugi87
    Jun 20, 2017 at 8:56
  • Ihave the same problem can you help me Jun 27, 2019 at 11:17

1 Answer 1

2

Assuming everything is hooked up correctly, your issue is likely related to electromagnetic noise (aka electromagnetic interference, EMI). Load cells output very small voltages, which is why you need the HX711 amplifier. Your long wires are essentially acting as antennas, picking up the electromagnetic noise in the room. One easy way to reduce the noise is to twist the wires together. You can also shield the wires by wrapping them with aluminum foil and attaching the foil to ground.

Making the wires much shorter would likely also help. That would be a good test to see if it helps.

The power supply could also be creating noise. I have found that the 5v line coming from a computer is often quite noisy. This is harder to fix, but an easy way to test if this is the issue is to power the Arduino with a 9V battery. Just make sure you plug it into the Vin pin, not the 5V pin, because the 9V needs to be regulated down to 5V.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.