-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scale without tare #33
Comments
Hi
|
Hi, |
So, on ESP8266 if I do not use LoadCell.start (stabilizingtime); at start, values are added and go up to -370 kg. I also need to ensure that at start there is no tare and the weight is shown with a load, and not be reset to zero at the start of the system. |
If you want to be sure that tare is not executed at the start of the sketch, just leave out function LoadCell.start (stabilizingtime) in setup(). I don't quite understand what you mean by "values are added and go up to -370 kg"? |
negative is not a problem. Just changed the wires E +, E-. )))) `//------------------------------------------------------------------------------------- #include <HX711_ADC.h> //HX711 constructor (dout pin, sck pin): const int eepromAdress = 0; long t; void setup() { float calValue; // calibration value Serial.begin(9600); delay(10); LoadCell.begin(); long stabilisingtime = 2000; // tare preciscion can be improved by adding a few seconds of stabilising time if(LoadCell.getTareTimeoutFlag()) { void loop() { //get smoothed value from data set //receive from serial terminal //check if last tare operation is complete }` |
I took another new ESP8266, new HX711, and new 50 kg load cells. Connected on wires 5 cm to eliminate interference. The result is the same. |
Hi If you need to have the data correct from the very first call to getData() in loop() you must first fill up the data set with conversions so that the average value reflects the actual data from HX711.
|
no, it did not work. I even increased the request period. Data is filled in for 3 requests of 500ms. |
I forgot to include the update() function in the code snippet, that's why it didn't work. Updated and tested version below, put it at the bottom of the setup() part of your sketch.
The no-load value of 370 is probably because you didn't apply any tare offset. Similar; when I run your sketch (using my own calibration factor) on my 1kg loadcell without any mass, I get a no-load value of 12300gr. If I then send 't' in the terminal to perform tare offset, the no-load value is 0gr as it should be. If you don't want to use the library tare function, you will have to substract the zero value (370) in your sketch to get the actual mass. Or you can manipulate the library tare offset by using the functions described in post no. 2. To check if calibration is correct, just add a known mass to the loadcell and observe if the value is increased by the correct number. BTW; You probably know this, but the timing of 100ms (I assume this is what you changed to 500ms) in the example sketch does not affect the library data sampling at all, it's just the Serialprint interval. |
Thanks. But this does not always work. WatchDog on the ESP8266 sometimes turns on. |
Try to include yield(); or delay(1); at the end of the above while() loop. |
Building a dual weight with individual HX711 sensors, but need a function for re-calibrating bouth sensors individually within a sketch. |
Hi,
I'm building a scale, with load cells, HX711 as a signal amplifier and Esp 32 as a microcontroller.
I chose Esp 32 because with sleep mode I can save much energy and therefore feed the system with a photovoltaic panel and a small lead-acid battery (the scale is in a remote site).
The problem I would like to solve concerns the tare of the scale: I have to use the system continuously "sleeping down" (and "wakeing up") the controller every hour ... As you can imagine the system performs the tare at each wakeup so that already at the second weighing the object to be weighed is included in the tare and the weight shown on the display is zero.
Has anyone found themselves having to solve a similar problem?
Thank you for the answer...
The text was updated successfully, but these errors were encountered: