- Home >> News >> Blog articles >> Appliances & Tools
Electronic scale microcontroller program development
The electronic scale is mainly a new type of quality measurement equipment formed by integrating sensor technology, information processing technology and electronic technology. Compared with the traditional mechanical city, the electronic scale is small in quality, easy to move and low in price. , Simple structure, easy maintenance. It is more practical in production and life. Electronic scales are widely used in scientific research, industrial and agricultural production, domestic and foreign trade and other fields. It has become an indispensable quality measurement tool in life. The development of electronic scales has gone through a process from simple to complex, from rough to precise, and from single function to multi-function. Especially in the past few years, the on-site weighing in the process, the quantification of ingredients, and the monitoring of product quality are all inseparable from electronic scales. Therefore, the design of intelligent electronic scales will directly affect the modern development level of various industries and further improve the economic benefits of society.
1. Electronic scale hardware circuit design
The system hardware mainly takes single-chip microcomputer as the core, and is composed of controller, sensor, data display, keyboard and circuit power supply. The working principle of the electronic scale is: use the load cell to detect the pressure signal, after receiving the weak electrical signal, process the circuit, and transmit the processed signal to the A/D converter in the single chip microcomputer, and convert the analog quantity Converted into digital quantities, the controller will receive the digital quantities, and through calculations, convert the digital signals into physical weight signals for display on the screen.
1.1 Controller design
The electronic scale controller is mainly designed with a single-chip microcomputer, through which the measurement technology and computer technology can be closely integrated to form a new software program, which can replace the traditional control system. Since the system requirements are not very high, the A/D converter single-chip microcomputer is selected. This kind of intelligent instrument can display diversified data processing during measurement, and the application program can be directly stored in the memory chip without additional installation and expansion. The memory greatly simplifies the circuit design.
1.2 Sensor design
The function of the sensor mainly lies in the collection of data and the processing of the circuit. In the design of the electronic weighing system, the sensor is an important component in the flight. The selection of the sensor must pay attention to the parameters and range, and the difficulty of circuit design and cost performance cannot be ignored. It is necessary to comprehensively select the measuring range of the sensor according to the maximum weighing value of the electronic scale, the number of sensors and the self-weight of the weighing body. For the accuracy of the weighing results of the electronic scale, in actual work, it is necessary to ensure that the effective range of the sensor is between 20% and 80%, and the error of weighing should be controlled within 0.01Kg. According to the comprehensive requirements, the SP20C-G501 resistance strain sensor is selected this time. The sensor is composed of an S-shaped beam structure and a metal foil strain gauge, which will not be affected by temperature. Relatively speaking, the measurement accuracy of this sensor is relatively high and stable. Sex is superior. It can be used in electronic scale instruments of various structures.
1.3 Power circuit design
Each functional module of the electronic system is powered by 5V voltage, and the stability of the power supply is ensured by an independent power supply. This design uses a 9V high-energy battery, which has a long service life and a large storage capacity. The LM7805 voltage regulator is used to ensure the output voltage is 5V. Install LED indicators on the interface of the power supply, and determine the stability of the power supply through the working status of the indicators. When the LED indicator light is on, it means that the power supply is working normally, and when the indicator light is off, it means the work is unstable.
1.4 LCD module design
The liquid crystal display module mainly displays the weighing data. In the single-chip microcomputer intelligent weighing system, the LCD1602 liquid crystal display module is selected. This module operates stably and has low power consumption. The display capacity is 16×2 characters, the voltage is between 4.5-5.5V, and the working current is controlled at 2.0MA. LCD1602 is more convenient to use and adjust the brightness of the character display through the potentiometer.
1.5 Keyboard circuit design
The system keyboard part is composed of S1-S16 in the form of a 4×4 matrix. Its functions represent the numbers between 0-9 in turn, time display buttons, minute setting buttons, switch buttons, tare, reset, calculation buttons, etc. . Through these buttons, the weight of the object can be weighed and the price of the item can be calculated.
2. Electronic scale program design
The software system based on single-chip electronic scale designed in this paper adopts a modular structure. The software system is composed of a main program and a subroutine. The system subroutine includes a millisecond delay subroutine, a software filter subroutine and an LED display subroutine. After the microcontroller is powered on, the system will automatically initialize. When the system is running, various functions will be called, standard definition and zero adjustment of the system will be performed, and the address of data transmission will be displayed through the LCD sub-function.
In the software system, the pressure sensor is relatively easily affected by external factors, and many external conditions will affect its measurement accuracy. It is necessary to avoid the cause of the error during design, and the collected data are superimposed in units of 10 to calculate The average value replaces the existing data with the data obtained each time, recalculates the average value, and finally displays the real value.
3. Electronic scale test
The test link is an important link in system development and design, which can prove the stability of the system operation. When testing electronic scales based on single-chip microcomputers, a set of standard weights is required as a reference, and the weights are increased in turn to ensure that the center of gravity of the weights is at the center of the test area. After the displayed value on the screen stabilizes, record the displayed value. After several times of measuring and recording the values, the weight increases continuously from light to heavy. In order to avoid causing errors to the sensor, it is necessary to ensure that the horizontal direction of the electronic scale must be firm.
Summarize
The electronic scale designed by sensor technology and single-chip microcomputer technology has the advantages of light weight, small size and simple structure. After testing the system, the quality measurement equipment has high reliability and strong anti-interference ability. It can be used in the laboratory , trade market and home use, the actual promotion value is relatively high.
The above is the development example of the electronic scale control board introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have electronic scale solution development needs, you can trust us. We represent a variety of single-chip microcomputers, voice chips, dual-mode Bluetooth ICs, and wifi chips. Brands include Songhan MCU, Yingguang MCU, Jerry Bluetooth, Ankai Bluetooth, Allwinner, and Realtek. Our technical services include: PCB design, MCU development, Bluetooth solution, software and hardware custom development, APP development, small program development, WeChat official account development, etc. It can also undertake the design of intelligent electronic products, the development of living appliances, the research and development of beauty equipment, the application of Internet of things platform, the smart home control system, the development of TWS earphones, Bluetooth earphone speakers, the development of children's educational toys, the design of electronic education products, etc.
Proposal recommendation
- TOP