A method of real-time dynamic measurement of object weight using CCD sensor is studied. While discussing the principle of using CCD to measure object weight, the hardware implementation based on DSP is also given, and finally the data processing process and algorithm are given.
Keywords: Charge coupled device, dynamic measurement, DSP
1 Introduction
At present, the weight of an object is measured mainly based on two basic principles. One is to use the lever balance principle in mechanics, and the other is to use various sensors to convert the weight information of the object into an electrical signal, and then analyze and process the electrical signal to extract the weight information of the object. The former has a wide range of applications and a large measurement range. It is an economical method, but the measurement accuracy is limited and needs to be completed manually. Therefore, this method cannot achieve real-time dynamic measurement. The latter uses sensors, which is conducive to using electronic devices to analyze, calculate, and display the weight information. However, many sensors are limited by the dynamic range. This article uses CCD sensing from the perspective of optical technology combined with mechanical principles to achieve dynamic real-time measurement of objects.
2 Measurement principle
The principle of CCD measuring an object is shown in Figure 1. The rotation fulcrum of the plane mirror is O, and the perpendicular OW intersects the lens axis at point W. Point W is between f′ (focal length) and 2f′. When there is no object to be measured, the intersection angle between the plane mirror and the laser beam is θ. The CCD is placed on the right side of the lens, and its distance from the center of the lens is f′, which makes it easy to calculate y′. The following analyzes its principle and derives the measurement formula.
The object to be measured deforms on the spring. Assume that the weight of the object is G, the elastic coefficient of the spring is k, and the deformation is x. According to Hooke's law,
G = kx. (1)
The spring deformation is reflected as the angle change θ of the plane mirror.
The continuous parallel laser emitted by the semiconductor laser is incident on the plane reflector, and different positions of the plane mirror correspond to different reflected light. The reflected light is focused on the CCD, as shown in Figure 1. Using the secondary optical axis drawing method, it is not difficult to derive the relationship shown in formula (2):
where y′ represents the distance from the light spot on the CCD to the optical axis. f′ represents the focal length of the lens, and θ represents the rotation angle of the plane reflector. It can be seen that if y′ can be obtained quickly and accurately through CCD, then θ can be obtained by inverting the function.
The formula for measuring the weight G of the object is derived below, that is, the relationship between G and y′ is derived.
In Figure 1, l is the original length of the spring, h is the height of the plane mirror fixed point from the horizontal position, φ is the angle between the plane mirror and the vertical direction when it is in the equilibrium position, and s is the horizontal distance from the spring to the plane mirror fixed point O. As shown in Figure 1,
Substituting
formula (7) into formula (1) yields
[page]3 System Design
Figure 2 shows the working principle of this system: The CCD image sensor converts the optical signal into an electrical signal. In the A/D converter, the electrical signal generated by the CCD is converted into a digital signal and transmitted to the image storage unit. The DSP processes the digital signal and finally outputs the result.
The deformation of the spring caused by the object rotates the plane mirror by an angle through the transmission device. The laser generated by the laser irradiates different positions on the plane mirror to produce different reflected light, which is focused on the CCD through the lens. The electrical signal generated by the CCD is a video signal, which needs to be pre-processed. Since the signal is relatively small, it must be amplified first, and then anti-aliasing filtering is required.
After the signal is pre-processed, it cannot be received by the DSP. The signal needs to be converted into A/D data. The A/D conversion uses the A/D chip TLC5510 from TI, which is a high-speed A/D converter. The A/D conversion is performed under the control of the DSP.
The working characteristics of TLC5510 are: when the sampling clock is high, the A/D converter is in the tracking state; when the clock falls, the input signal is held, the A/D converter enters the conversion state, and the conversion data is delayed by 2.5 clock cycles and output on the rising edge of the clock. In this way, for A/D sampling, there will be sampled data output when each clock arrives. Therefore, in addition to the data line, TLC5510 also contains an output enable
interface signal.
The key to the data sampling system is the address generation circuit and the sampling clock generation circuit. Traditional sampling mostly uses logic chips to implement these two circuits separately. Here, the concept of software sampling is introduced, that is, the clock pulse and address signal required for A/D sampling are generated separately by software programming. The instructions for controlling sampling are as follows:
LD starting address, A
RPT number of sampling points per row
WRITA Smem
This system uses a data processing system with TMS320C5409 as the core. TMS320C5409 is a 16-bit fixed-point DSP. It uses an improved Harvard structure, a CPU with dedicated hardware logic, on-chip memory, on-chip peripherals, and a highly specialized instruction set. During the operation, DSP reads the A/D sampling results in an interrupt mode. The entire system is a three-stage pipeline structure of CCD sensor light sampling, A/D data acquisition, and DSP data processing. CCD is serial output, and DSP uses data in groups, so a data buffer must be set to store AD sampling data. Two buffers should be allocated in the data storage for data sampling and processing respectively. The switching of buffers is realized by software, that is, when one of the buffers is performing AD sampling, the other buffer is simultaneously processing the AD conversion data of the previous moment.
4 Data Processing
In data processing, the CCD image sensor outputs electrical signals in odd and even fields. First, the unprocessed electrical signals are stored in the first-in first-out (FIFO) buffer. When the DSP takes the digital signal from the FIFO, real-time data processing can be realized. A target usually covers pixels on several consecutive rows, and the intensity values of each target at the starting position and several consecutive pixels on the covered row are already stored in the FIFO. The real-time algorithm only needs two consecutive rows of target signals in the FIFO each time, and compares the starting position and ending position of the target on the current row and the previous row to determine whether the formation of a target is just beginning, continuing or completed, until all rows of data are processed. In this way, the coordinates of all target image points are calculated. The algorithm flow chart is shown in Figure 3. Their centroid coordinate formula is as follows:
Where Xc and Yc are two-dimensional centroid coordinates, Xi and Yi are the serial numbers of the i-th pixel, and Vi is the signal amplitude corresponding to the i-th pixel.
When the DSP uses the centroid algorithm to calculate the target position y′, AD sampling uses an 8-bit AD chip, and the system detection accuracy can reach less than 1μm. It can be seen that the system error is very small and the measurement is very accurate.
5 Conclusion
This system has simple hardware, powerful functions and convenient interface. The sampling rate of the high-speed A/D converter is also easy to control by software. The DSP system has high running speed, flexible programming, good stability, good repeatability and convenient integration. In particular, the center of gravity algorithm used has the advantages of simple algorithm and fast operation speed. This system can not only be used to measure the load of bridges, but also can be used to measure whether moving objects (coal cars, trains, etc.) are overweight, with high measurement accuracy and real-time performance.
Previous article:How to avoid noise and EMI problems in DSP systems
Next article:Research on real-time dynamic monitoring of object weight based on DSP
Recommended ReadingLatest update time:2024-11-16 17:45
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- AD9144-FMC-EBZ ADI data transfer board four-channel digital-to-analog converter evaluation board module conversion
- A40i Platform Application Notes - Huawei - ME909S-4G Module Porting Application
- The news about the Agilex M series has been released for some time, but I haven’t seen any information about the specific pin packaging, etc.?
- PIC16F1824
- EEWORLD University ---- Webinar - How to quickly design power rails for Xilinx FPGA and SoC
- EEWORLD University----simulink video tutorial
- Interleaved CCM Totem Pole Bridgeless Power Factor Correction (PFC) Reference Design
- Openmv3 photography
- [2022 Digi-Key Innovation Design Competition] Distributed Temperature and Humidity Acquisition System-STM32H745I-DISCO Basic Learning
- Start at 2pm: TI MSP430 development training, online hands-on demo + analysis by frontline experts