Design and Error Processing of the Electronic Counting Scale Based on Least Square Method
The production of electronic products requires a large variety of materials,and manual counting reduces the production efficiency.The electronic counting scale is designed to directly display the number by measuring the materials,and it is beneficial to improve the production efficiency.The electronic counting scale based on STM32 and HX711 module and parallel beam strain weighing sensor has problems such as sensor resolution limitations,measurement and conversion errors,and noise,which will cause measurement deviation.Aiming at the problems,this paper firstly filters the sampled binary value to improve the data stability,then uses the mean filter algorithm to further reduce noise and minimize the impact of noise.It uses the least square method to establish a linear model of the linear function to realize the conversion of sampled value and weight.Through experimental verification,the weight error is controlled within±1 g,and the number deviation is 1%,which can meet the needs of production.