I try to build a digital scale using a 5 kg load bar and a HX711 module.
I have the load bar secured on a support and connected to a HX711 module (I tried with both the green ones and the red ones -this has a shield- from eBay) and I managed to have them work partially.
So far I use an Arduino Mega 2560 and the test program from GitHub - bogde/HX711: An Arduino library to interface the Avia Semiconductor HX711 24-Bit Analog-to-Digital Converter (ADC) for Weight Scales. .
I have two issues with them:
they (both red and green modules) start after calibration at relative 0, but in short time start going either up or down from 0 (without load) like 0 , 0.1, 0.2 , 0.3 … or 0, -0.1,-0.2, -0.3 … Some times, the variation is smaller, and some times is higher. If I put a known load (50g) it will see the correct weight like in the sequence: 3.3, 3.4, 3.5, 3.6 - add weight - 53.7, 53.8, 53.9 – remove weight - 4.0, 4.1 …
Does the calibration needs to be done until 0 is stable? or until it starts with 0?
For calibration I found a value of ~ 209.f for port A (64 gain)
I let the balance run for few hours (from the code I removed the sleeping code
// put the ADC in sleep mode
) and I read the balance once a second.
In this setup the balance works and read values as described above.
After few hours of continuous work, without touching it or changing the code, I found the port A dead (return only 0.00) on both green or red sensors.
What do you think is wrong? Is this module not supposed to run all the time? does is need the sleep cycle?
Both sensors worked initially and port A died after few hours on continuous run. Port B is still running, but I would like to know if I did something wrong.
Any help or ideas on both issues is welcomed.