eclipse / upm

UPM is a high level repository that provides software drivers for a wide variety of commonly used sensors and actuators. These software drivers interact with the underlying hardware platform through calls to MRAA APIs.
MIT License
661 stars 410 forks source link

problem using hx711 library #488

Open deeoak7434 opened 7 years ago

deeoak7434 commented 7 years ago

i am using hx711 library with an edison board.I am using getUnits() function in the library to get values.I am getting surprisingly high values which i cant relate to any unit.

Can anyone tell me the unit of the return value of getUnits() function in hx711 library?

Propanu commented 7 years ago

Hi @deeoak7434. The getUnits(uint8_t times) function returns a scaled voltage, averaged over times number of reads. For Channel A with a scale of 1, this is either 20 mV or 40 mV per unit based on whether the gain is set to 128 or 64 respectively. You will have to find and adjust the scale based on your load cell and some known reference weight. Once the scale is set, subsequent calls will give you the weight.

There are some Arduino versions of this library that explain the calibration process in more detail, thus for further reading see here and here.