There are two main implementation circuits for analog-to-digital conversion circuits in electronic scales: an integration circuit composed of discrete components and a single analog-to-digital conversion (ADC) chip. The system composed of an integration circuit has complex peripheral circuits, high requirements for individual components, and has the disadvantages of high power consumption, low reliability, and poor temperature performance; while the system composed of a single ADC chip has the characteristics of high precision, low power consumption, high stability, and a simple peripheral circuit that is easy to produce and maintain. Therefore, most electronic scale manufacturers now prefer to use a single ADC solution.
With the development of technology, production and application require simpler, more accurate, lower cost and lower power consumption solutions, and electronic scale circuits are constantly moving towards higher integration. CSU1221 is a CMOS single-chip MCU with integrated high-precision ADC independently developed by Xinhai Technology Company. It is the first SoC chip in China used in commercial electronic scales.
CSU1221 chip technical features
CSU1221 is an 8-bit CMOS single-chip MCU with built-in 4K×16-bit one-time programmable (OTP) ROM, 256B data memory (RAM), 17 bidirectional I/O ports, Σ-Δ ADC with 2-channel 24-bit fully differential input or 4-channel 24-bit single-ended input, operating voltage of 2.4V~3.6V, and operating current of less than 3mA.
As shown in Figure 1, CSU1221 has an internal integrated voltage regulator that can be configured to output four different voltage values to power the sensor. The output of the voltage regulator can be turned on or off by operating the internal register. This voltage also serves as the reference voltage for the ADC inside CSU1221. CSU1221 has a built-in 1MHz clock oscillator and an 8-bit timer. The CPU cycle can reach up to 500KHz at the fastest. It also has a built-in buzzer driver. CSU1221 has four interrupt sources: 1 ADC interrupt, 2 external interrupts, and 1 timing interrupt.
Figure 1: CSU1221 chip functional structure diagram.
The output rate of the built-in ADC of CSU1221 can be configured to 3.8~488Hz, and the low-noise programmable gain amplifier (PGA) at the front end of the ADC can be configured to four different gain ratios: 1, 64, 128, and 256, to meet various signal conditions. When the PGA is 128, the effective accuracy of the ADC reaches 17.5 bits.
CSU1221 has built-in ADC and MCU, so the communication between MCU and ADC is completed inside the chip, avoiding the influence of the external environment on ADC. The reliability is higher than that of the application system based on a single ADC chip, and the high integration brings obvious cost-effective advantages; CSU1221 has an internal integrated voltage regulator, which is convenient for sensor power supply. The power consumption of electronic price scales designed with CSU1221 is lower than that of the current mainstream single ADC solution, which improves the battery life. [page]
Electronic scale system design
Figure 2 is a block diagram of the electronic price-calculating scale based on CSU1221. It can be seen from the figure that this system mainly includes power supply circuit, main control chip, analog signal input, storage circuit, voltage measurement circuit, and key scanning. The design of these circuits will be analyzed below.
Figure 2: Schematic diagram of the CSU1221 used in electronic price computing scales.
In the power supply system of CSU1221, the digital circuit and the analog circuit are powered separately. In order to simplify the power supply circuit, the two power supplies are still provided by a voltage regulator circuit. The two power supplies are separated by a filter inductor to reduce the impact of the clutter interference generated by the digital circuit in the digital power supply on the analog circuit.
The analog differential signal output by the analog signal input sensor is filtered out by two LC filters to remove the high-frequency interference signal in the input analog signal, and then input to the AIN0 and AIN1 pins of CSU1221 respectively. The voltage at the sensor excitation end is provided by the internal LDO output of CSU1221, with a load capacity of up to 15mA. There are four output voltages to choose from. The LDO switch and output voltage value (2.2V, 2.5V, 2.8V, 3V) can be controlled by controlling the internal register of CSU1221, which is convenient for sensor power supply control.
Since CSU1221 does not have an internal E2PROM, an external E2PROM with a serial interface must be used, such as 24C02 with an I2C bus structure. If PT3[3] and PT3[4] are used as I2C communication interfaces, the PT3 pin has an optional pull-up resistor, so the communication line does not need an external pull-up resistor.
Figure 3: Circuit diagram of CSU1221 applied to electronic price computing scale.
Voltage measurement In various battery-powered devices, it is desirable to monitor the battery voltage so that the battery can be charged or replaced in time. CSU1221 has five analog input terminals, which are connected to the ADC through a multiplexer. The battery voltage value can be measured by using the spare analog input terminals in a time-sharing manner. The specific connection method is: use a resistor network to divide the battery voltage, and connect AIN3 and AIN4 as voltage input terminals to the two ends of the sampling resistor. By measuring the voltage across the resistor, the battery voltage value is calculated based on the ratio of the sampling resistor value to the resistor network. There are two times to measure the voltage: one is to measure the voltage just after the power is turned on; the other is to measure the voltage after the power is turned on, and the weight is stabilized for a period of time. Each measurement must switch the ADC channel, PGA = 1, and the AD rate uses the 125Hz gear. In this way, when measuring the voltage, the AD value is relatively stable and takes a short time. After the test is completed, the previous ADC settings must be restored, and 3 AD values must be discarded after restoration. [page]
Figure 4: Button array diagram.
Assume that the key scan array is 4×6, PT1[5], PT1[6], PT1[7], PT2[0], PT2[1], PT2[2] are retrace lines, PT2[3], PT26], PT3[5], PT3[6] are drive lines. The key array is arranged as shown in Figure 4. In this example, in order to save components, no isolation components are connected in series in the drive line. If the keys are pressed simultaneously,
If two buttons are connected to the same scan line (input port), two output terminals will be short-circuited through two related drive lines. The following method can be used to avoid this: during initialization, all pull-up resistors are turned on, and all I/O ports connected to the buttons are set as input ports. When a button scan is required, only the I/O port that needs to be driven is set as an output port and outputs a low level. After the scan is returned, the I/O port is immediately restored to an input port. This is repeated, that is, only one line is an output port at the same time, and no fault will occur.
Design points and precautions
CSU1221 has an internal integrated 1MHz clock. The CPU clock cycle can be selected as: 62.5K, 125K, 250K, 500KHZ. Select 500KHz to shorten the running time of each large cycle.
The ADC integrated in CSU1221 has a rate selection range of 3.8 to 488Hz. 125Hz is used when measuring voltage; 15HZ is used when measuring sensors. The cycle of each AD value is about 67ms, ensuring that the program's large cycle has ended before the AD value is updated (it can be adjusted appropriately according to the different running time of the program's large cycle). In order to obtain a more stable weight, the AD value is first arithmetic averaged twice, and then a sliding average is performed 8 times. After the voltage measurement is completed, the time to discard 3 AD values is 200ms. When the weight is stable, no jumping or slow response phenomenon can be detected.
In order to improve the linearity of the electronic scale, the bias current of the ADC internal op amp can be increased, and the best increase is 100%. When using CSU1221 to directly drive a passive buzzer, a 100-ohm resistor must be connected in series to avoid the AD value from fluctuating when the key is pressed quickly. After each large cycle, the HALT instruction can be used to suspend the CPU until a new interrupt (such as an AD interrupt) is generated, which can reduce the power consumption of CSU1221.
Since analog signals are extremely susceptible to external electromagnetic interference, the following details should be noted in the actual design: 1) When laying out the PCB, the distance from the interface sensor input to AIN0 and AIN1 should be as short as possible, and the ground terminal of the filter capacitor should be directly connected to the ground copper foil; 2) The two leads of the analog signal are wired in parallel with the ferrite, and the filter capacitors are arranged closely in parallel.
Since the clock frequency of I2C is relatively high, in order to avoid interfering with the built-in ADC, it needs to be kept away from the analog I/O pins. The analog ground AGND of CSU1221 should be separated from the digital DGND and returned to the ground of the voltage regulator chip (HT7130), while the ground of HT7130 is connected to the ground of the battery. In addition, the ground of other components, such as E2PROM (HT24C02) and LCD driver chip (HT1621), does not have to be connected to DGND. If the ground of these components is close to the ground of the battery, these grounds can be directly connected to the ground of the battery. The ground connection should follow the following principles: The ground of non-CSU1221 analog ground cannot be connected to the analog ground of CSU1221 to avoid interference signals generated by other components flowing through the analog ground of CSU1221 and affecting stability.
When initializing CSU1221 after power-on, it is recommended to adopt the following sequence to improve software reliability: a. After power-on, delay 30ms; b. Initialize the digital part of CSU1221; c. After delaying 30ms, initialize the analog part of CSU1221; d. After delaying 60ms, initialize all RAM.
Conclusion
CSU1221 is a high-precision, low-power, high-reliability single-chip MCU with built-in ADC. The peripheral circuit is very simple and easy to use. It is very suitable for high-precision, small signal measurement products, such as high-precision electronic scales, barometers, sphygmomanometers, etc. This product has been mass-applied in several weighing instruments and other industries.
Previous article:Interrupt Control Method of Touch Screen in ARM Embedded System
Next article:The Principle and Application of ADT75 Digital Temperature Sensor
Recommended ReadingLatest update time:2024-11-17 02:35
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- [Project Source Code] Six Golden Rules for Naming Verilog Code Based on FPGA
- Display bit variable icon--LCD display
- EEWORLD University Hall--Keysight World 2019 Automotive Forum Review
- C51 demonstration program for nrf905 with number hopping, frequency hopping and address hopping
- A programmer was writing code on the subway and was criticized by passers-by: What's so great about that!
- It was revealed online that an interviewer at Bilibili belittled the enrollment of Beijing University of Posts and Telecommunications. The relevant person in charge responded that the statement was untrue.
- RT-Thread device framework learning RTC device
- Orcad learning notes (three) class and sub class in PCB
- [Hua Diao Experience] 17 Beetle ESP32C3 and WS2812 screen music visualization rhythm light
- SMS Humor