hi guys, i'm fairly new with Arduino. i love working with the board specially Wemos d1 mini, since i can use it for IOT. i know this issue has been addressed before and i'm sorry for asking the same thing again, but after reading most of the topics and testing the suggested solutions, nothing seems to work for me. I'm trying to get a stable and noise free readings from hx711 nodule. no success what so ever.
Here are what I'm using:
1- Arduino Wemos D1 mini (for testing purposes)
2- xfw-hx711 module
3- Load Cell - 3kg, Straight Bar
4- a typical 5v adapter
#include "HX711.h"
HX711 scale;
void setup() {
Serial.begin(38400);
Serial.println("Initializing the scale");
// parameter "gain" is ommited; the default value 128 is used by the library
// HX711.DOUT - pin #D2
// HX711.PD_SCK - pin #D3
scale.begin(4, 0);
scale.set_scale(696.0f);
scale.tare();
}
void loop() {
Serial.print("average:\t");
Serial.println(scale.get_units(10), 2);
delay(200);
}
fairly simple.
and i attached the result.
the things that i have tried:
1- tested the hx711 module and load-cell and i know they work fine and have no problem. they actually return very stable readings when used in my AVR program.
2- built an isolation chamber connected to ground so to test if there is an external noise source influencing the readings.
3- used an external power source (5v adapter) so to test if the problem is with the pc usb noise.
4- tried different hx711 libraries and all had the same problem.
i have i've seen videos of people getting very stable readings with the same code using Arduino. so what's the problem? what have i done wrong?
any help is highly appreciated. thanks in advance.
Are you using a HX711 module with separate analogue (5volt) and digital (3.3volt) supplies.
Most HX711 modules are not meant to be used with 3.3volt processors (some are).
Leo..
'm trying to get a stable and noise free readings from hx711 nodule. no success what so ever.
"Noise free" is utterly impossible. All sensors have noise.
I disagree that you are having "no success what so ever". There may be more noise in your measurement than you are happy with, but the plot you posted looks normal to me.
Of course it is possible for bad circuit design to lead to excess noise that can be reduced by improving the layout, shielding, connections, grounding, etc. Until you post the details of your circuit, we would all be just guessing.
DaveEvans:
Does that mean you get stable readings if you use an Arduino (which one?) instead of your Wemos?
Also, how are you powering your HX711 when you get the unstable readings with the Wemos?
I have stable readings using custom board with atmega16 and AVR code written in AVR studio.
Wawa:
Are you using a HX711 module with separate analogue (5volt) and digital (3.3volt) supplies.
Most HX711 modules are not meant to be used with 3.3volt processors (some are).
Leo..
i tried both. nothing changed. take a look at attachments.
jremington:
"Noise free" is utterly impossible. All sensors have noise.
I disagree that you are having "no success what so ever". There may be more noise in your measurement than you are happy with, but the plot you posted looks normal to me.
Of course it is possible for bad circuit design to lead to excess noise that can be reduced by improving the layout, shielding, connections, grounding, etc. Until you post the details of your circuit, we would all be just guessing.
i know , but the reading fluctuation jumps around too much. when nothing is loaded, it goes from -1 to 1. 2 unit jumps is a little bit too much, no? specially when the accuracy is suppose to be up to 2 to 3 decimal readings.
bdsafa:
i tried both. nothing changed. take a look at attachments.
I think you missed my point. See this page.
Probably nothing to do with your problem, but it doesn't seem right to shove 5volt logic into the ESP8266 inputs.
Leo..
bdsafa:
i have i've seen videos of people getting very stable readings with the same code using Arduino. so what's the problem? what have i done wrong?
Not done enough low-pass filtering? - you need to do this to discard all the high frequency noise.
ok guys, figured it out. thank you @Wawa for guiding me into the right direction, after disconnecting E+ and E- from HX711 and connecting it directly to 5v adapter, everything seems to be ok. Thank you guys.
bdsafa:
disconnecting E+ and E- from HX711 and connecting it directly to 5v adapter, everything seems to be ok.
But that's not the answer.
E+ is connected to a regulated 4.2volt supply, made by the HX711 chip and an external transistor.
That excitation voltage is extra regulated for a stable weight readout.
Leave the load cell connected to E+ E-
You must power the HX711 with 5volt (or at least the ~4.6volt the WeMos provides on the 5volt pin).
The digital power pin (pin16) of the chip should be cut free, and that pin should be powered by 3.3volt.
If noise on the power supply is your problem (after this mod), then cure with bypass capacitors.
Leo..
Wawa:
But that's not the answer.
E+ is connected to a regulated 4.2volt supply, made by the HX711 chip and an external transistor.
That excitation voltage is extra regulated for a stable weight readout.
Leave the load cell connected to E+ E-
You must power the HX711 with 5volt (or at least the ~4.6volt the WeMos provides on the 5volt pin).
The digital power pin (pin16) of the chip should be cut free, and that pin should be powered by 3.3volt.
If noise on the power supply is your problem (after this mod), then cure with bypass capacitors.
Leo..