Thursday, April 4, 2019

HX711 load cell amplifier library for AVR ATmega

Update to v02


HX711 is a precision 24bit ADC IC designed for weigh scales and industrial control applications to interface directly with a bridge sensor.

A load cell is a transducer that is used to create an electrical signal whose magnitude is directly proportional to the force being measured.

The library you can find here is usefull to implement a weigh scale using the HX711.


References used to implement this library are
This HX711 Arduino library, https://github.com/bogde/HX711
And that other library here https://github.com/getsiddd/HX711

Methods to get raw values and unit values from the HX711 are provided.
Also you can find function to calibrate the IC.

Before using this IC you have to calibrate it against the load cell used.
The calibration task is split in 2 steps:
1) The tare raw value offset needs to be obtained, To perform this task you have to run the calibrate step 1 function without any weight on the load cell.
2) Using the tare raw value and a know weight put on the scale you can capute the scale value that is used to obtain the weighted value.
For this reason is important that the reference weight has a well know value.


Once you have obtained the scale value, you can use it to get weight, and you can also perform a new tare without having to calibrate the scale again.

The sample provieded contains all the step needed to calibrate the sensor and obtain raw and unit values.

This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 1Mhz.


Changelog
  • v02: fixed a bug in read function, clean code
  • v01: first version

Code

Notes
  • read risk disclaimer
  • excuse my bad english