The HX711 is a load cell sensor that contains a 24-bit Analog to Digital converter. A converter of this resolution is going to be extremely sensitive to changes in the system level environment including the chip itself and breakout module that it may be mounted upon. The environmental factors that have to be considered include:
- Chip temperature
- Ambient or case temperature
- Supply voltage stability
- Reference voltage stability
If you expect the HX711 to be prepared to give a stable and repeatable reading every time you access the device then the device itself must be in a stable condition. Any variation of parameters, including those I have listed above, will affect the stability of the A/D output.
Since you mention seeing a stabilization time of some 30 to 40 seconds this is indicative of mostly a temperature settling time. When the device is OFF the chip has established itself at a temperature close to the nearby ambient. When you turn it on the chip has to startup and begin operating. In this process the internal circuitry will heat the chip to its operating temperature.
The HX711 data sheet shows that the chip consumes a rather small current via its analogue and digital power pins. With the small power dissipated by the part it can take longer for the overall temperature to stabilize than if there was more power being consumed.
Things to think about to deal with this problem...
- Plan for a system usage scenario that does not expect an OFF to ON transition for the part every time a measurement needs to be taken. Instead have an initial turn-on delay and then keep it active through time that readings are taken.
- Consider the possibility to provide a closed loop temperature control of the A/D subsystem that keeps the temperature constant at a level above ambient. This also needs to raise the temperature of the part a bit above where it would operate normally on its own without the forced controlled heating. (Note that this method, with enough power being applied, may still be able to operate in an OFF / ON mode if the elevated temperature stabilization time is fast enough compared to what you are seeing now).