Research and Design of Weighing Counting Electronic Scale Based on CS5530

Abstract: CS5530 is a 24-bit A/D chip of SPI bus introduced by American Semiconductor Company. It has built-in programmable amplifier, high integration and excellent cost performance. It has broad application prospects in electronic scales and other instrumentation industries, and has replaced the original. There are trends in amplifier + A / D chip circuits in the electronic scale and instrumentation industry. The hardware circuit, internal structure and software programming of the CS5530 chip are introduced from the application in the electronic scale.

This article refers to the address: http://

Key words: CS5530; A/D; amplifier; electronic scale

The electronic scale is the product of the development of modern electronics. Because of its advantages of simple operation, convenience, high precision, etc., it is widely used in various fields of industry and daily life. From the function point of view, it can be divided into a single weighing scale, a weighing scale, a weight counting scale. And so on. Among them, the single weighing scale is the most common in daily life, and the weighing scale is widely used in shopping malls and markets. The weighing scale is mainly used in industrial fields, such as bagging of electronic components, bagging of small parts, etc. Because these components and parts are small in size, light in weight, and large in number per bag, they used to be artificial numbers, which requires a lot of labor and is prone to errors. In order to solve these problems, a high-precision weighing can also be based on the calculation of a single-counting number of electronic scales. This is the weight-counting electronic scale to be introduced in this paper.

1 overall plan

1.1 System block diagram design

The hardware structure of the electronic scale is mainly composed of the following parts, the weighing sensor, the amplifying circuit, the A/D conversion circuit, the CPU, the input and output circuit, etc. The working principle is that the weighing sensor converts the gravity into the mV level of 4-20 mV. The voltage is then amplified by the amplifier to the V-level voltage required for A/D conversion, converted into a digital quantity by A/D, and converted into a corresponding weight value, display or output by the CPU calculation process. The hardware structure of the weighing and counting electronic scale is the same as that of the ordinary electronic scale. The difference is that the precision is high and the software function is increased. The range and precision of the electronic scale are determined by A/D. The CS5530 introduced in this paper is a serial A. The /D chip, because of its large number of bits and low price, has great advantages in high-precision electronic scales and is widely used. The block diagram of the electronic scale is shown in Figure 1.

Research and Design of Weighing Counting Electronic Scale Based on CS5530

1.2 A / D conversion chip selection

The A/D conversion circuit is a key component of the electronic scale. Here, a 3 kg/0.1 g electronic scale is taken as an example to introduce the selection of the A/D chip. Now there are many types of A/D chips on the market. There are parallel and serial, from the conversion speed to super speed, high speed, low speed, from the precision point of view several to dozens of multiple models, the general parallel price is relatively expensive, the higher the speed, the more expensive, the more digits The more expensive, the price ranges from a few yuan to several hundred yuan, and the high even exceeds 10,000 yuan. The electronic scales are not fast in speed, but according to different ranges and precision requirements, there are certain requirements for the number of digits. The cost of electronic products is The key, so the choice of low-cost serial A / D is the first choice, the following describes how to determine the number of bits to choose A / D by range and accuracy. The accuracy of the electron is divided into external and internal. The external precision is the display precision. This is also the accuracy of the electronic scale we generally talk about. To achieve the external stable display weight, the internal precision must be higher, which is 10 times the external precision. . The internal accuracy is directly determined by the number of A/D chip bits.

The external accuracy of the 3 kg/0.1 g electronic scale is: 3 000 g / 0.1 g = 30 000; so the internal accuracy should be greater than or equal to: 30 000 x 10 = 300 000. Let the number of digits of A/D be n, then the square of 2 should be greater than 300 000, so n should be greater than 18. The A/D of more than 18 bits mainly has 20 bits, 24 bits, 32 bits, etc., so it is generally suitable to select 20 or 24 bits. Now the electronic scale of the electronic scale precision generally chooses the 20-bit CS5513, and the CS5513 itself has no amplification circuit. It needs to be equipped with a dual op amp circuit. The commonly used one is OP2277. The price of the former is about 20 yuan, and the price of OP2277 is about 15 yuan. Therefore, the total cost of the op amp and A/D is 35 yuan. The other is the 24-bit A/D chip CS5530, which includes a programmable amplifier circuit. The number of amplification bits is 1 to 64 bits, and the cost is about 22 yuan. Therefore, it is better to choose CS5530 from the perspective of cost performance.

1.2.1 CS5530 Features

The CS5530 is a mid-range A/D chip with a 24-bit SPI bus. The main features are as follows:

1) Internal 1 to 64 times amplifier;

2) The linear distortion is less than 0.0015%, and the accurate resolution is more than 19;

3) Three-wire serial interface;

4) Contains power management, amplification, configuration registers;

5) The conversion speed is adjustable from 6.25 to 3 840 Hz;

6) A variety of power supply options are available;

1.2.2 CS5530 pin and function description

1) Pin diagram, as shown in Figure 2.

Research and Design of Weighing Counting Electronic Scale Based on CS5530

2) Related registers

1 configuration register description

Research and Design of Weighing Counting Electronic Scale Based on CS5530
Research and Design of Weighing Counting Electronic Scale Based on CS5530
Research and Design of Weighing Counting Electronic Scale Based on CS5530

2 gain register description

Research and Design of Weighing Counting Electronic Scale Based on CS5530

Function setting magnification, from 0 to 64-2-24, D24 is 1 after power-on, other bits are 0

3 offset register description

Research and Design of Weighing Counting Electronic Scale Based on CS5530

4 data conversion output format

Research and Design of Weighing Counting Electronic Scale Based on CS5530

D31-D8 is 24-bit data, D2 is overflow flag, 1 overflow, data error, other bits are 0

2 CS5530 hardware circuit design

The peripheral schematic of the CS5530 is shown in Figure 7.

Research and Design of Weighing Counting Electronic Scale Based on CS5530

J2 is connected to the load cell, 1-4 is the power ground, power supply positive, signal negative, signal positive, VREF-ground, VREF+ is connected to 2.5 V through the precision resistor to the power supply, SCLK, SDO, SDI are connected to the single-chip P12, P11, P10, CS are grounded.

3 programming

3.1 initialization function

Initialize the CS5530 internal registers, set the relevant working mode, amplification, conversion speed and other work.

The specific procedures are as follows:

Research and Design of Weighing Counting Electronic Scale Based on CS5530

3.2 Write Host Function

Write data to the CS5530 three registers, the specific procedures are as follows:

Research and Design of Weighing Counting Electronic Scale Based on CS5530
Research and Design of Weighing Counting Electronic Scale Based on CS5530

3.3 Read the data function, read the AD conversion result

The specific procedures are as follows:

Research and Design of Weighing Counting Electronic Scale Based on CS5530
Research and Design of Weighing Counting Electronic Scale Based on CS5530

4 Conclusion

The development speed of electronic products is fast, the production volume is large, and the high integration chip can improve the stability and reduce the production cost. This paper adopts the electronic scale designed by CS5530, which has good stability, low production cost and broad application prospects.

Car Charger & Cigarette Lighter Plug

Car Charger & Cigarette Lighter Plug

Car Charger Plug, Cigarette Lighter Plug, car charger

Ningbo HanCheng(HC) Electronic Co.,Ltd , https://www.hcwires.com