I am using a HX711 and a load cell to obtain a weight value between 0-2000grams. I am able to get an accurate reading, but am experiencing random interference causing spikes in the weight value reading. I am looking for some advice regulating these spikes and maintaining a steady accurate weight value.
Hi Leo, The Arduino is powered with 5v through a Pololu Dual MC33926 Motor Driver Shield that is connected to 12v. The HX711 is powered from the Arduino.
This may afterall, depending on the size of these "spikes" may be down to simple limitations of both the sensor and the ADC giving some fair reliability issue.
Wawa:
Do you also get these spikes when the Arduino is powered from USB.
And you don't power the motor shield.
Leo..
Still spikes connected via usb
Johnny010:
Got some data to look at?
This may afterall, depending on the size of these "spikes" may be down to simple limitations of both the sensor and the ADC giving some fair reliability issue.
Its setup to display the value on an lcd right now. The spikes are random usually going from 0 to 2000 back to 0 within a second and occasionally will make a quick jump by about 50 grams.
Im thinking there should be a way to ignore these spikes with some code, just not sure the best method to use for this.
The datasheet says it is either 10SPS (10 signals per second) or 80SPS depending on a setting you choose. The difference between setting I can only assume is to do with accuracy (maybe sub-sampling?) or resolution.
So if you are querying that ADC anywhere more than 10 times a second, then it will run in to issues.
You should use the running Median and use an array size of 7 (my guess)
It automatically throws away the outliers and returns the middlest measurement which is a real measurement. (average is always affected by outliers, because to determine the outliers one need to calculate the average, circular dependency)
ink44:
Hi Leo, The Arduino is powered with 5v through a Pololu Dual MC33926 Motor Driver Shield that is connected to 12v. The HX711 is powered from the Arduino.
Motor driver shields can have problems , do you have an oscilloscope available to monitor the voltage outputs
Thanks for the responses. This is currently how I have this wired:
Load cell -> HX711 -> 6ft USB cable -> (+ -)direct to 5v power supply, (sda, slc) to arduino
Even without the usb(scale) connected I am getting large spikes.
I am going to try to use decoupling capacitors to see if that will solve the issue. I'm wondering where in the circuit I should place the caps. I also have 6 of these load cells connected to the arduino, so would I need to use a cap for each load cell?
Boardburner2:
Probably not.
Any digital device will put spikes on the power rail.
You need individual decoupling caps close to the pins of each digital ic.
Post ix and circuit diadrams if you can.
24 bit convertors need careful design
My ic's are not connected and am still getting spikes.
I have my arduino in a project box, and have a female usb cable connected to the pins that the HX711 will use(A03,A04,5v,gnd), the HX711 is not even connected yet and I am getting spikes. I am not using any capacitors yet, so I am wondering where I need to put them, should I just put a 1uf capacitor between 5v and gnd at the point where my usb cable meets the pins of the arduino.