1 Introduction
Combination weigher is also called selection combination weighing instrument. It is composed of multiple independent weighing units with feeding and discharging structures. The computer uses the principle of arrangement combination to automatically optimize the combination of the load of the weighing units and calculate the best weight combination that is closest to the target weight value for packaging. The sorting scale is a packaging industry equipment that detects whether the weight of a single product is consistent with the set target, and the sorting device automatically removes substandard products. From a practical point of view, a system-level microcontroller MSC1210 with a 24-bit ∑-△ type A/D converter is used in combination with a low-cost power supply solution, CAN controller SJA1000 and CAN bus transceiver 82C250 to design a 24-bit weighing data acquisition system with a CAN bus interface, which can be applied to combination weighing equipment and sorting equipment.
2 System Hardware Design
Figure 1 is the system hardware structure diagram. The system hardware uses the system-level single-chip microcomputer MSC1210 to directly collect sensor signals. The voltage input signal generated by the weighing sensor adopts a differential input method, and is directly connected to AIN0 and AIN1 of MSC1210 by the filter circuit. The data is collected through the internal A/D conversion of MSC1210, and then the collected data is converted into CAN protocol data and transmitted to the CAN bus network, and then processed by the touch screen. MSC1210 has a built-in temperature sensor to facilitate later data correction and collect and measure ambient temperature.
2.1 Supply voltage
The size of A/D conversion data depends only on the size of input voltage V0, and the accuracy of A/D conversion depends on the stability of reference voltage V0. V0 and VREF must be powered by the same power supply, and power supply fluctuations cancel each other out, which has no effect on A/D conversion. The minimum excitation voltage of the weighing sensor is 5 V, and the minimum excitation current is 25 mA. The internal reference voltage provided by MSC1210 is not enough to drive the sensor, so the external input reference voltage is selected, and the internal reference voltage is turned off to reduce noise interference and power loss.
Based on the above reasons and comprehensive cost considerations, the low-dropout linear regulator LP2591 is selected to provide 5 V to excite the sensor, which is divided into 2.5 V by a high-precision resistor network to supply MSC1210 as the reference power supply for A/D conversion.
LP2951 is a precision low-dropout linear regulator with an initial accuracy of 0.5%, a voltage regulation rate and a load regulation rate of up to 0.05%, and features such as low quiescent current (≤8 mA), low voltage drop, and low temperature coefficient (20×10-6/℃). The voltage drop is 50 mV when lightly loaded, and 380 mV when the load is 100 mA. The maximum output current is 100 mA.
The integrated resistors have the same parameters, performance, and environmental influences. External interference (such as power supply changes and temperature changes) can offset each other in the voltage divider ratio. The voltage divider circuit using parallel resistors helps reduce temperature drift and improve stability.
2.2 A/D Converter
The core of high-precision data acquisition lies in the parameter indicators of the A/D converter, namely the range, effective resolution and conversion time.
MSC1210 changes the range through programmable gain amplifier (PGA) and offset D/A converter (ODAC) to increase the dynamic range of the input signal. MSC1210 changes the range by changing its own PGA to adapt to different sensor input voltages. If AIN0 is used as the in-phase differential input channel, any other channel can be used as the inverting differential input channel. Here, AIN0 and AIN1 are selected as the forward channels for the input sensor input voltage. The analog input of the PGA is biased to half of the input range at most through the ODAC. Since the ODAC introduces analog offset rather than digital quantity to the PGA, the use of ODAC will not reduce the performance of the A/D converter.
The system requires the dynamic range of the input signal to be 0 to 4 000 g, the minimum input resolution to be 0.1 g, and according to the linear input and output characteristics of the A/D converter, the ratio of the full-scale voltage of the A/D converter to the minimum voltage to be resolved is equal to the corresponding weight output ratio. The system must ensure that the final measurement result has 16-bit accuracy. Considering other factors such as system power supply voltage drift and temperature drift, the A/D conversion is required to achieve at least 18-bit actual conversion accuracy. Therefore, MSC1210 can meet the system design requirements.
2.3 Temperature measurement
The MSC1210 has a built-in temperature sensor to facilitate later data correction and collect the temperature of the measurement environment. Since its internal diode provides temperature sensing function, when all bits of the input multiplexer setting register are 1, the diode is connected to the input of the A/D converter and all channels are turned on.
2.4 CAN bus data communication
AD0~AD7 of SJA1000 are connected to the P0 port of MSC1210, and CS is connected to the pin P2_7 of MSC1210. When the P2_7 pin is 0, the CPU off-chip memory address selects SJA1000, and the CPU performs corresponding read/write operations on SJA1000 through these addresses. The RD, WR, and ALE of SJA1000 are connected to the corresponding pins of MSC1210 respectively, and the INT pin is connected to the INT0 of MSC1210. MSC1210 can access SJA1000 through interrupt mode.
To enhance the anti-interference capability of the CAN bus nodes, TX0 and RX0 of SJA1000 are connected to 82C250 through high-speed optocoupler 6N137, thus achieving electrical isolation between the CAN nodes on the bus. The two power supplies of the optocoupler part are completely isolated by using the low-power power isolation module B05-05S. The stability and safety of the node are improved through isolation, as shown in Figure 2.
The sensor voltage output signal is directly connected to AIN0 and AIN1 of MSC1210 after filtering; the reference voltage of the A/D conversion inside MSC1210 is LP2951, and the output voltage is obtained by voltage division through a precision resistor network, as shown in Figure 3.
3 System Software Design
The microcontroller collects the A/D converted data and sends it to the CAN network through the CAN protocol to transmit the data. The software system is compiled on the touch screen to receive and store the collected voltage data output by the weighing sensor. The focus of the software work includes data calibration and data acquisition.
3.1 Data calibration
To reduce the offset error and gain error of the device and system, a calibration method is required. The offset and gain errors of the MSC1210 or the entire system can be reduced by correction.
The calibration function ADCCON1 register (SFR DDH) CAL2~0 bits control each calibration process, which takes 7 tDATA cycles. Therefore, it takes 14 rDATA cycles to complete the offset and gain calibration. After the calibration is completed, when the interrupt is enabled, an A/D conversion interrupt will be generated. After the calibration is completed, the A/D converter interrupt position is 1, indicating that the calibration is completed and valid data can be read. The relevant program code is as follows:
ADCON1=0X01; //Initialize gain and offset self-calibration
while(!(AISTAT&0X20)); //Wait for interrupt trigger
3.2 Data Collection
The Delta DOP human-machine interface software ScreenEditor development platform is used to compile a data acquisition and storage system, and the CAN network protocol is used to communicate with the lower computer to collect weighing data in real time. It is specifically used in the weighing system acquisition test system. The data acquisition interface is shown in Figure 5.
3.3 Other measures to improve accuracy
In order to ensure a high-precision test system, in addition to using a high-precision A/D converter, the design of other modules in the system also has a great impact on the accuracy of the entire system.
(1) The sensor is the core of the entire system. To obtain a reliable data source, attention should be paid to the installation method of the resistive strain sensor. The base mounting surface of the sensor should be flat and clean, without any oil film, adhesive film, etc. The mounting base should have a higher strength and stiffness than the sensor itself. The mounting surface of the mounting base should be adjusted to a level using a spirit level. Ordinary flat washers cannot be used during installation, and spring washers should be used. When loading the sensor, load it in the direction of the sensor loading force to avoid lateral or additional torque.
(2) The digital devices and analog devices are powered independently, the power supply is stabilized, and a filtering circuit is added to prevent the power supply noise from affecting the system. To prevent conducted high-frequency electromagnetic interference, shielding beads are added to the sensor signal output terminal and power line. When wiring the PCB, the digital part and the analog part should be isolated as much as possible, and the digital ground should be isolated from the analog ground.
The system can run stably, the measurement results meet the accuracy requirements, the display resolution is 1/40 000, and the data stabilization time is less than 1 s.
4 Conclusion
The weighing data acquisition solution of the CAN bus is suitable for the collection and storage of weighing sensor signals in the environment of combined weighing or selective weighing. The practical test in the factory environment proves that the system can run stably for a long time and has good application prospects. It can also be used in vehicle weighing systems.
Previous article:Quad output D/A converter DAC8420 and its application
Next article:Design of vehicle weighing and collecting system based on AD7891
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Switching Power Supply Simulation and Design - Based on SPICE (Second Edition)
- Microcomputer Principles and Interface Technology 3rd Edition (Zhou Mingde, Zhang Xiaoxia, Lan Fangpeng)
- Power Engineering Design Manual 26 Engineering Surveying and Mapping
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- 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
- MSP340F149 card number reading reference routine
- Summary of comprehensive test lists in various regions
- Use CCS to connect to a running C2000 chip
- The full metal touch solution is here, take a look if you like it!
- Answer questions to win prizes | TI Industrial Essentials selection, exquisite content, worth reading!
- A request for help from a newbie
- Wind speed and light irradiance synchronous tester based on MSP430
- Convert gerber file to ad format pcb
- USB Development Encyclopedia (4th Edition)
- 76 Rules for China's Artificial Intelligence