Last Updated on March 16, 2024
Electronic weighing machine uses load cell to measure the load or pressure produced by the load, here most load cells are follows the method of strain gauge, Which converts the pressure (force) into an electrical signal, these load cells have four strain gauges that are hooked up in a Wheatstone bridge formation.
When we apply load the strain gauge resistance will change and hence the output voltage from the load cell get changes by the way we can measure the load value.
Wheatstone bridge formation of Load Cell
HX711 (24 bit Analog to Digital Converter)
HX 711 is a precision 24-bit analog to digital converter (ADC) specially designed for Weigh scales and industrial control applications to interface directly with a bridge sensor.
Source : https://www.sparkfun.com/products/13230
Pinout of HX711
Arduino Hookup
Simply connect Load cell wires to the HX711 module based on their color, then connect DAT (Data) pin to Arduino Analog pin A1 and connect CLK (Clock) pin to Arduin0 Analog pin A0, Put Vcc and Gnd supply from Arduino power source pins.
Arduino Code
// Hx711.DAT - pin #A1 // Hx711.CLK - pin #A0 #include "hx711.h" Hx711 scale(A1, A0); void setup() { Serial.begin(9600); } void loop() { Serial.print(scale.getGram(), 1); Serial.println(" g"); delay(200); }
This simple code brings output at serial port terminal of Arduino IDE.
Before compiling this code put HX711 Library into the Arduino IDE.
where is the function getgram() in hx711.h. I did not found any. plz reply which library you have used.
You may use this library https://github.com/bogde/HX711 and check the connecting wires between Arduino and load cell before Measuring.
Yeah its late Reply but every Questions to be Answered 🙂
To answer the first comment. getgram() does not exist. Try getGram();