1. Introduction
Light curtain is a kind of equipment that is widely used in electronic measurement system. It can measure a series of data such as height, length or width of objects on constant speed conveyor belt, so as to provide corresponding parameters for the subsequent electronic system. This paper presents a light curtain measurement method for measuring the height of objects using single chip microcomputer.
2 Basic principle of light curtain measuring the height of objects
Figure 1 shows a schematic diagram of the test principle structure of measuring the height of an object using an ordinary light curtain. In the figure, multiple infrared transmitting tubes are installed at equal intervals on one side of the light curtain, and the same number of infrared receiving tubes are arranged in the same manner on the other side. Each infrared transmitting tube corresponds to a corresponding infrared receiving tube, and they are installed on the same straight line. When there is no obstacle between the infrared transmitting tube and the infrared receiving tube on the same straight line, the modulated signal (light signal) emitted by the infrared transmitting tube can smoothly reach the infrared receiving tube. After the infrared receiving tube receives the modulated signal, the corresponding circuit outputs a low level. In the case of obstacles, the modulated signal (light signal) emitted by the infrared transmitting tube cannot smoothly reach the infrared receiving tube. At this time, the infrared receiving tube cannot receive the modulated signal, and the corresponding circuit outputs a high level. When no object passes through the light curtain, the modulated signals (light signals) emitted by all infrared transmitting tubes can smoothly reach the corresponding infrared receiving tube on the other side, so that all internal circuits output low levels. In this way, the height information of the object can be obtained by analyzing the internal circuit state. Since the upper and lower adjacent optical paths may interfere with each other, the emission angle of the selected infrared light-emitting tube should be less than 15°. In addition, considering that the light curtain must have a certain width, the signal emitted by the infrared emitting tube should also be modulated. However, in actual production, there is always interference between the upper and lower paths, making it difficult to improve the measurement accuracy. In order to completely and fundamentally solve the interference problem between the two adjacent paths, this paper presents a method of using C51 microcontrollers and related chips to achieve height measurement.
3 Structure and working process of the height measurement light curtain system
The system structure of the height measurement light curtain is shown in Figure 2. The maximum number of infrared transmission and receiving channels of the device can be 215 in theory. Considering the actual height of the light curtain and the spacing between the upper and lower channels, it will generally not exceed 64. For the convenience of introduction, this article takes 16 channels as an example, and marks them as 1 channel, 2 channels, and 3 channels in descending order according to the installation height. ... 16 channels. The multiplexer of the transmitting and receiving parts uses a common multiplexer (such as the 7LS15 series). The A0~A3 of the multiplexer at the transmitting end is connected to P1.0~P1.3 of the microcontroller, and the A0~A3 of the multiplexer at the receiving end is connected to P1.4~P1.7 of the microcontroller. The parallel-in serial-out module and the serial-in parallel-out module use 8-bit shift registers (such as 741LS165 and 74HC595). The loading signal Ld of the parallel-in serial-out module = P1.4·WR? The data read signal E of the serial-in parallel-out module = P1.5·RD. The shift control signal is connected to the TE synchronization signal. RAM is used to store data and can be connected to the P0 and P2 ports of the microcontroller. Its capacity depends on the amount of data to be processed. This article chooses 1kB. The synchronization signal TE and the shift clock CP can be generated by the timer of the microcontroller, or the CP clock divided by 8 can be used as the TE signal. The reading of the serial input and parallel output module and the writing of the parallel input and serial output module can be completed through the interrupt method. At the same time, the processed height data can be sent out through the serial port of the microcontroller. In the linear scanning mode, the working process of the device is as follows: First, after the falling edge of TE arrives, the microcontroller writes the data to be sent to the serial input and parallel output module (such as 01H), and sends the same path selection signal (that is, the first address signal) to the sending end and the receiving end at the same time. When the rising edge of TE arrives, under the control of the shift clock, data 01H begins to be sent to the infrared transmitting circuit of the first channel through the multi-way switch, and then is sent out in the form of optical signal after modulation. At the same time, the infrared receiving circuit starts receiving when the rising edge of TE arrives. Since the multi-way switch selection signals for sending and receiving are the same, in fact, only the one corresponding to the transmitting end (i.e. the first channel) is received. The demodulated data can generally be shifted into the serial input and output module under the action of the shift clock, and the reception is completed when the falling edge of TE arrives, and the interrupt processing program of the microcontroller is triggered at the same time, so that the data is read by the microcontroller. The microcontroller then compares the sent data with the received data. If they are different (Note: Here, only when there is an object blocking the path, the sending signal cannot be received, resulting in different data for sending and receiving), it indicates that an object has passed through the path. If they are the same, it means that there is no object blocking the path or the height of the object is lower than the installation height of the infrared transmitting tube of the path. Then scan the second channel. At the same time, after the falling edge of TE arrives, the single-chip microcomputer sends out the selection address of the second channel and sends out the data to be sent (02H is used in this article, but it can be different). Similarly, it starts to shift out when the rising edge of TE arrives, and passes through the second channel sending and receiving channel, and then is sent out in the form of optical signal after modulation. At the same time, the rising edge of TE starts the second channel receiving. After receiving, the single-chip microcomputer performs relevant processing. Then it is the third channel, the fourth channel, ... the fifteenth channel, and the sixteenth channel, thus completing a scan from the first channel to the sixteenth channel. If it is required to scan at a speed of 100 times/s, the frequency of TE should be 1.6kHz, and the frequency of the shift clock CP should be 12.8kHz. The timing of sending and receiving is shown in Figure 3. In the figure, RN is the serial data received, and TN is the data shifted out by the sending end. The waveform of the modulation and demodulation part is omitted in the figure.
In the linear scanning mode, the MCU sends the same path selection signal to the transmitter and receiver each time, that is, the first path sends and the first path receives, the second path sends and the second path receives, ... the fifteenth path sends and the fifteenth path receives, the sixteenth path sends and the sixteenth path receives. In the cross scanning mode, the MCU sends different path selection signals to the transmitter and receiver each time. That is, the first path sends and the second path receives, the second path sends and the first path receives, ... the fifteenth path sends and the sixteenth path receives, the sixteenth path sends and the fifteenth path receives. In comparison, the cross scanning mode is more accurate in measuring the height of objects, and the detection accuracy is highest at the center 1/3 of the detection area. The minimum detection height can be reduced to 2/3 of that in the linear scanning mode.
4 Analysis mode of height detection
There are many settings for the light curtain detection mode. From the above light curtain working process, it can be seen that the first and last light blocking mode and the first and last light transmission mode can be used. In the first and last light blocking mode, when the object enters the light curtain area, the light is blocked, and the single-chip microcomputer will identify the number of the first beam of light that is blocked. Then the total number of blocked light rays is calculated from bottom to top until the last blocked light, and finally the data is accumulated to obtain the size of the object in the measured direction. In the first and last light projection mode, when the object enters the light curtain area, the single-chip microcomputer will control the identification of the transmitted light, and calculate from the first beam of transmitted light, and then accumulate the values in sequence until the last transmitted light, and finally calculate the total number of transmitted light to obtain the size of the object in the measured direction.
5. Performance and results of height measurement light curtain devices
When making a light curtain, it is important to select high-brightness infrared emitting diodes and high-sensitivity infrared receiving tubes. In order to prevent the infrared receiving tube from saturation, an additional filter can be added to make it work in a micro-conduction state. In the linear scanning mode, when the optical axis spacing is 2.5 cm and the light curtain width is 5 m, the maximum resolution can reach 2.5 cm. When the belt speed (object movement speed) is 5 m/s, the scanning spacing is 1 cm. In fact, this method is also suitable for making high-precision measurement light curtains for use in grading equipment such as fruit and packages.
Previous article:Data acquisition and storage circuit based on C8051F320 USB interface
Next article:Design of digital inclination sensor based on SCA100t and C8051F microcontroller
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
- EEWORLD University Hall----Radiation Hardness Assurance (RHA) Process of TI Space Products
- 【NXP Rapid IoT Review】Environmental Quality Test
- [ATmega4809 Curiosity Nano Review] Installing MCC
- GD32E231C-START Unboxing
- X-NUCLEO-IKS01A3 sensor test based on STM32F401RE development board 5L
- Simulation failed with no results
- Principle of Dialogue Communication
- Voltage jump problem
- 【McQueen Trial】Main functions corresponding to driver pins
- ti dsp (tms320VC5502) + isp1581 usb2.0 high speed data acquisition solution