Hi people, I’m new to the forum and I wanted to ask you about the typical digital balance project with arduino uno, load cell and the HX711 transmitter.
My query is about the possibility of measuring a dynamic weight in the shortest time possible, since the balance does so by means of a static weight. I mean for example to measure the maximum force of a blow, which would occur in a period less than 1 second.
Example measure the impact of the fall of a coin or other weight.
I have seen on the internet a site where they market a similar system also armed with a load cell. If someone can help me to orientate me a little. I will thank them.
I enclose the link of the video that I mention and the typical code of the digital scale to know if it can be implemented with this code making any modification or use another system.
Of course I thank you infinitely.
sketch - balance
#include “HX711.h”
#define DOUT A1 #define CLK A0
HX711 balance (DOUT, CLK);
void setup () {
Serial.begin (9600);
Serial.print (“Reading the value of the ADC:”);
Serial.println (balance.read ());
Serial.println (“Do not put any object on the scale”);
Serial.println (“Stretching …”);
balance.set_scale (); // The default scale is 1
balance.tare (20); // The current weight is considered Tara.
Serial.println (“Place a known weight:”);
Thank you very much for your answer bdaouas. I have very little experience and your comment has helped me a lot, I will try to get the Load Cell / Wheatstone Amplifier Shield and I will tell you how I continue
Thank you !
Happy to help
Load Cell Amplifier / Wheatstone Shield has an on-board low-pass 2nd order Bessel filter at 1000 Hz. Therefore, it would be only limited by the ADC rate of the Arduino : for a 16MHz Arduino (like an Arduino UNO), the ADC clock is set to 16MHz/128 = 125 KHz. A conversion in AVR takes 13 ADC clocks, therefore the Arduino ADC rate would be 125KHz/13 = 9615Hz. So inherently, a Load Cell shield with an Arduino Uno would have a maximum of 1000Hz of sampling rate.
But I can not get to calibrate the values to 0 to start testing as in the video shown.
Obviously there is something that I am not doing correctly or I need to take into account.
I will appreciate the possibility to guide me with the final calibration.
Thank you and sorry for the inconvenience, for my lack of knowledge
Regards
The values you are reading are probably ADC RAW values from the shield. You will need to perform a linear calibration (with two know loads). For this, you can read the analog RAW value with no load on your load cell, then read the the analog RAW value with a known load on your load cell (for example a 500Kg load). Then, you can use these values in the map() function in your Arduino code.
You can also take a look at the Wheatstone_Bridge_Interface_to_Serial example code. A linear calibration for Strain 1 input is done in line #26
Can you please detail how you change the rate of data capture on the HX711 from 10 to 80Hz? I have read datasheet but am not an electronics person so have limited understanding. If you could be so kind as to detail the steps on how to achieve this shift, it will be held in high regard.
Welcome to the RobotShop Community
Could you provide a link to the HX711 Breakout Board you are using ?
For the HX711 IC, if the RATE pin is connected to GND, the rate is 10Hz, if the pin is pulled-up to VCC, the rate is 80Hz (increases noise per read).
Usually, breakout boards for the HX711 comes with an on-board jumper which is closed by default (RATE pin connected to GND : 10Hz), therefore, to change the rate to 80Hz, all you have to do would be to remove the jumper or cut the jumper’s middle trace (if it’s a solder jumper like for the SparkFun Load Cell Amplifier - HX711)
Thanks I have worked it out. It works, but I have a lot of noise, I presume there is not much you can do about this with the HX711? I am thinking of switching to the ADS1256. What are your thoughts on this matter? Is a switch worth it? I need low noise and accurate outcomes.
Looking at the HX711 datasheet, with a Gain = 128 and a rate of 80Hz, the input noise is 90nV(rms)
On the other hand, the page 12 and 13 of the ADS1256 datasheet shows what to expect as input noise depending on the gain, the rate and whether the input buffer is On or Off:
With the buffer On, a gain = 64 and a rate of 100Hz, the input noise is 169nV(rms)
With the buffer Off, a gain = 64 and a rate of 100Hz, the input noise is 122nV(rms)
So, in both these configurations, the noise rating seems higher than the HX711. However, the noise could be lower at lower rates, for example:
With the buffer On, a gain = 64 and a rate of 15Hz, the input noise is 73nV(rms)
Again, this is only theoretical (directly from the datasheet), further real life tests could be required to be sure of those results.
Btw, we also offer this Load Cell / Wheatstone Amplifier Shield (2ch) that might interest you. It outputs 2x analog values for 2 separate load cell channels, to be used with an Arduino board.