Thursday, April 4, 2019

HX711 load cell amplifier library for AVR ATmega


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.


Code

Notes
  • read risk disclaimer
  • excuse my bad english

6 comments:

  1. hello the schematics and the picture of the connection is different

    ReplyDelete
  2. Replies
    1. Hello, yes you can add it. Just use an LCD driver and code a little the sample file to show it on LCD.

      Delete
  3. Pls did use USB to ttl to interface with pc and pls what app did u use on the PC and how did u do it

    ReplyDelete
    Replies
    1. Hello, you have to implement your own protocol over UART, and use a USB to TTL adapter like the CP210x based one.

      Delete