Barcode technology was first developed in the turbulent 1920s in the laboratory of Westinghouse. At that time, every idea about the application of electronic technology was very novel. His idea was to put a barcode mark on the envelope. The information in the barcode was the address of the recipient, just like today's postal code. For this reason, Kermode invented the earliest barcode logo. The design was very simple, that is, one "bar" represented the number "1", two "bars" represented the number "2", and so on. Then, he invented a barcode reading device composed of basic components: a scanner (capable of emitting light and receiving reflected light); a method for measuring the reflected signal bars and spaces, that is, the edge positioning coil; and a method for using the measurement results, that is, the decoder.
The barcode positioning technology based on ARM single chip has the advantages of objective reading, fast measurement speed and high accuracy. It can overcome the shortcomings of traditional visual reading, such as cumbersome reading process, long reading time, large human error and low automation. This technology has a wide range of applications. It is suitable for various photoelectric absolute displacement encoders with short-distance and high-precision positioning requirements; it is also suitable for geodetic height measurement with large-range measurement distance and large-range requirements, dam subsidence observation, road surface flatness measurement, etc. This paper proposes a measurement system solution based on ST Semiconductor's 32-bit high-performance processor STR912FW44X6.
System Structure
The system consists of the following parts: barcode ruler, optical system, CMOS image acquisition module, STR912 main control board, keyboard and LCD display module, power supply module and computer test system. The hardware structure diagram is shown in Figure 1.
The working principle of the system is as follows: the barcode image with precise position information passes through the optical system and is imaged on the photosensitive surface of the CMOS image sensor. After the STR912FW44X6 processor performs automatic exposure control on the SVI company's LIS-1024 image sensor, it collects image information and obtains the position information of the barcode through algorithm processing.
When the system performs high-speed image acquisition, the STR912FW44X6 processor sends the acquired signal to the computer measurement system through the Ethernet interface for final data processing.
Hardware Design
Image acquisition module
The image acquisition module is mainly composed of a linear array CMOS image sensor (LIS-1024) and an operational amplifier (TLV2221IDBVR). The video signal is amplified by the operational amplifier and then transmitted to the STR912FW44X6 main processor for A/D conversion and converted into a digital image signal.
The STR912FW44X6 main processor directly controls the image acquisition timing. The image acquisition module itself does not have an automatic exposure function. The main chip needs to analyze the acquired image signal for changes in ambient light intensity, and then control the image sensor to achieve the function of adaptive ambient light intensity. [page]
Motherboard Module
The main chip of the system is a high-performance embedded chip STR912FW44X6 based on the ARM966E-S core, with a computing speed of 96MIPS and supports single-cycle DSP instructions. The system periphery of the chip includes clock, reset, power management, vector interrupt controller (VIC), internal PLL, RTC, timer, 9 programmable DMA channels and up to 80 GPIOs. There are also 8-channel 10-bit ADC, 3-phase motor controller, PWM output and multiple communication interfaces.
The chip has built-in dual-group Flash, and can use any communication port on the chip to realize in-system programming. The main chip is connected to a 64MB memory (chip ST-M25P64) to expand the storage space.
Motherboard peripheral interface
The main interfaces include CMOS image sensor interface, RS-232 interface, I2C interface and 10/100M Ethernet interface.
The interface of the CMOS image sensor mainly realizes the automatic exposure control and image acquisition of the image sensor; the RS-232 interface (chip SP3222) realizes program download, communication with the host computer, and accepts the host computer command control; the I2C interface realizes the communication between the main chip and the keyboard and LCD display module; the 10/100M Ethernet interface (chip STE100P) cooperates with computer software to realize high-speed image acquisition. ARM Development Forum
Keyboard and LCD display module
The keyboard module uses the ATMega48 chip to realize keyboard control and I2C communication, as well as the LCD screen module I2C communication.
Software Design
The system software flow is shown in Figure 2.
Software Features
The main function of the software is the barcode positioning algorithm of the image, including the following:
Barcode detection: Extract various characteristic parameters from the barcode signal, usually including the detection of the edge position, center, width of each barcode, and codeword division.
Determine the object-image ratio based on the known parameters of the ruler, and at the same time find the viewing distance, calculate the relative distance between the reference position and the target code position, and enlarge it to the actual size d2 (accuracy result) according to the object-image ratio.
. Decoding: It is equivalent to the inverse process of source coding, and calculates the codeword position d1 (rough reading result) of the target codeword. The final scale reading ds is the sum of the rough reading and the intensive reading results: ds=d1+d2. [page]
This system uses an equally spaced periodic displacement barcode, and uses the barcode's equally spaced structure to calculate the object-image ratio by extracting the characteristic spectral lines corresponding to the barcode's equally spaced spacing, and then obtains the barcode's equivalent width sequence, and finally achieves decoding based on the barcode's periodicity.
Software Architecture
The entire software uses the embedded operating system mCOS-II as the main carrier. The software is mainly divided into five threads. After the system is powered on, the five threads work in parallel. The five threads are: serial port control, I2C interface control, Ethernet interface control, system menu control, data acquisition and decoding.
Test Results
In order to examine the performance of the system, a comparison experiment with a screw micrometer with an accuracy of 0.004mm was designed. The screw micrometer was used to measure the actual movement of the barcode ruler. Each time the barcode ruler moved 0.500mm, a total of 11 data were measured, and the barcode values at 11 different positions were obtained. The difference was calculated for comparison. The measurement results are shown in Table 1.
From the measurement data, we can see that the deviation of the system measurement data is within ±0.0185mm, which means that the system measurement has achieved a certain accuracy.
A preliminary test of the system resolution was conducted. The relative position of the barcode and the measurement system was kept unchanged, and the data were measured 10 times in succession, as shown in Table 2.
The average value of the measured data is 130.5049mm, and the system measurement arithmetic deviation is within ±0.3mm, that is, the resolution of the existing system is about 0.3mm. After adopting measures such as system error calibration and software algorithm improvement, it is expected that the measurement accuracy of the system will be further improved.
Conclusion
This system is an ARM-based precision visual measurement platform that realizes the precision measurement function of barcodes. Further development on this platform can form a system that can be applied to the precision measurement of one-dimensional and two-dimensional lengths, and has a relatively broad application prospect.
Previous article:Application of Ethernet in Surge Test
Next article:Virtual Remote Temperature Control System Based on Common Data Acquisition Card
- Popular Resources
- Popular amplifiers
- 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!
- 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
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Ten important facts and trends in motor control
- Surge protection for MOSFET DC switches
- #The best content of the "Interview with famous teachers" in the electronic competition#The first issue - Professor Hu Renjie of Southeast University
- BlueNRG-LP uses RNG function in static protocol stack and cannot broadcast
- Power Supply Ripple Measurement Setup (Oscilloscope)
- c8051F060 program download problem
- 1
- Thermistor, hysteresis resistor, gas resistor, varistor, photoresistor application circuit collection
- Can a bandpass filter be powered from a single supply?
- Discussion on Graphical Programming Method of Single Chip Microcomputer