Work with the Chinese chip ADC Hx711 (conclusion)

After some time, a second acquaintance with the initial article caused a feeling of incompleteness in the issue of using this ADC . Yes, certain studies of this product were carried out, weaknesses were found and ways to circumvent these weaknesses were suggested, but there was no question of EXPERIMENTAL, practical application.

The work of Andrei Gerasimenko (“ADC NH711 from 3.3V- do not believe the Chinese documentation and not only ...” (https // habr.com / ru / post / 438772)), did not require absolute consideration of the weight of the hive. The condition of relativity of the weighted hives eliminated the weighing error, because technical errors arising from changes in external conditions acted on all tracking objects and were automatically excluded from the analysis of the state of the hives. The situation is different with simple weighing.

The weaknesses of the transducer in the form of the distribution of the measurement error other than the random distribution and noted by me were also found by Nikopol_86 ("... do not believe the Chinese documentation" Nikopol_86 February 86, at 09:27), which were also theoretical studies.

My application of the moving average method to "calm" the trembling of the last bits of the 24-bit conversion has shown its effectiveness, but there was no ready-made measuring device, taking into account all the above findings.

For the final conclusion about the suitability of Hx711 for use in scales, a weighing program was developed based on the circuit diagram: The



circuit is powered from a conventional standard power supply with a constant 5 volts, 1 ampere.

When developing the program, all previously noted disadvantages of the ADC were taken into account. And now about the program embedded in the ATMega16 controller.

When the power is turned on, the indicator displays: the ADC value read from the load cell in the bottom line, the weight value obtained by normalizing the bottom line ADC values ​​is displayed in the top line. Usually this is: the top line is 1.015 and the bottom line is 1085. After placing the desired container on the platform, the readings are zeroed by pressing Key2 (packaging), which leads to 0,000 and 0 in the upper and lower lines of the indicator, respectively. After that, placing the weighed load on the platform, we read the weight from the top line.

It should be noted that the auto-zero function, that is, entering the tare weight into the read weight from the platform at the moment the scales are turned on, is not implemented. Values ​​of normalization coefficients are “sewn” into the program in advance (in the controller’s flash memory), which allows weighing immediately after taking into account the tare weight.

To change the normalization coefficients, a mode for calibrating the scales with a part of the weight (in this case 2 kg) is provided. To enter this mode, you need to free the platform, wait for stable readings and press Key12 and Key17 simultaneously.
The top line displays: “Cal: turn Key 12”, which indicates that the balance enters calibration mode with part of the weight. To continue, you must press Key12. The bottom line shows “Press Tare key”, which means that the balance is ready to “remember” the value of the container. To continue, press Key2 (Tara). The bottom line displays “Place 2kg key17”. Put a 2 kg weight on the platform, wait and press Key17. On the indicator in the upper line is 2,000 and in the lower line is 2130. The balance has switched to weighing mode. Remove the weight and continue weighing. It is important that the new normalization coefficients are recorded in the controller RAM and will be erased (disappear) after turning off the power to the balance.

A similar procedure is convenient, but in the process of work, a 2 kg weight is not always at hand. For this case, a calibration correction procedure is provided. To enter this procedure, it is necessary to turn off the balance, rearrange JP1, so that the output of the controller port is shorted to ground. Turn on the scale. The value of one of the normalization coefficients is added to the top line, for this case it is 5325. Zero the Key2 scales, put the weight we know on the platform and increase it with the Key12 keys, and decrease the value of the weight indicated by the scales with Key17. We achieve equality of the weight laid on the platform and the weight indicated by the scales. After equality is reached, JP1 opens the circuit. IMPORTANT: it is better to close the jumper when the balance is off. Opening only when the power is on.The value of the displayed normalization coefficient also changes during the adjustment process. The inverse relationship, the higher the coefficient, the lower the displayed weight and vice versa. The thing is that the new coefficient value is also written to the internal RAM of the controller. Well, that's all.

These scales were operated in the packaging workshop for 2 work shifts of 8 hours, continuously, ambient temperature 18-22 degrees Celsius. Already the first day of operation showed that changes in weight, due to external factors: heating of the equipment, jumps in the ambient temperature due to the doors being opened, are satisfactory. All fluctuations are in the range of 10-15 grams (average weight of the packaged product is 10 kg), which is acceptable for a given weight. So, the weighing errors allowed by metrology for scales with the largest weighing limit of 15 kg LEL are:



The entered calibration correction mode is convenient. But it was mainly used when weighing deviated by 5-10 grams per 5 kg of weight. The natural desire is to have precisely zero errors of the scales, but not more necessary, because the error is in the allowable range.

As a conclusion believe , that the Chinese ADC module based Nh711 chip showed themselves as workable and able to be used as a conventional balance schemes and middle class. The absence of weight correction from the ambient temperature in the microcircuit itself is the most vulnerable point of this module (microcircuit). My practice has shown that for devices operating in conditions with small fluctuations in ambient temperature, the measurement error does not exceed the errors allowed by the metrology. However, the question of using this module for scales operating, for example, on the market, when in summer the temperature is over +30, and in winter up to -15 degrees Celsius, remains open.

Unfortunately, I don’t have the opportunity to test the scales in a heat chamber and answer this question, so at the end of the article I am attaching a hex file (not for arduino), for the flash memory of the microcontroller. The diagram is shown above, the characteristics of the strain gauge are also given. If anyone is interested in this ADC module and there is a heat chamber, you can conduct the necessary tests yourself. It is advisable to share your results.

File: Scale16_11.hex. Link: cloud.mail.ru/public/4Edm/43fwpHEPU
All the best !

All Articles