Hello,
I have an Arduino Leonardo and I want to build a force sensor. The problem is that the force has to be documented very detailed (high frequency) to calculate what I want (the force that is there at any point in time of the measurement).
For this, I use an HX711 together with a 1kg load cell and I have to measure at 80hz. I use the library "HX711_ADC" that is available in the library manager and I have set the smoothing to minimum. My problem is, whatever I do, I can't measure at 80hz, I can measure at 10hz with no problem but 80hz isn't possible. I connected pin 15 of the HX711 directly and via a pullup resistor (4,7kOhm and some lower values) to 5V (which is the voltage I use for the HX711).
When I do it directly the Leonardo shuts down (I believe because of to high current cunsumption), when I connect it via a resistor it does nothing. On 3.3V it changes nothing whether I connect it or not (regardless of whether I use a pullup or not).
In the attachment you can see that the loop function runs several times (and puts out the same weight more than one time) without getting the more current weight.
My code is as following. For now it's a simple scale:
#include <HX711_ADC.h>
HX711_ADC cell(2,3);
void setup() {
delay (2000);
cell.begin();
cell.start(2000);
cell.setCalFactor(292318.00/174);
Serial.begin(38400);
}
void loop() {
cell.update();
Serial.println(cell.getData());
delay (12);
}
I would appreciate if you could help me.
Bastian
Oh and by the way: Sorry for the bad English, I come from Germany and sorry for sounding stupid, I'm new to Arduinos.