1 System Design
According to the information provided by Shanghai Port Machinery Yard, there are two types of containers: 20 feet and 40 feet. There are three possible target positions for trucks (front vehicle, middle vehicle, and rear vehicle), so the system has installed position detection devices at the corresponding positions. The bridge crane driver can use the wireless remote control keyboard to select the target position where the current vehicle is to stop, while the detection devices at other positions are in sleep mode to reduce power consumption and extend the service life of the system.
In order to enable the driver to stop quickly and accurately and improve the operation efficiency of the entire port, the system sends out the first and second warning signals at 6 meters and 1 meter before each target position, respectively, to tell the driver that the target position is gradually approaching. If the container truck exceeds the fixed position, a corresponding prompt (traffic light) will be given, requiring the driver to reverse appropriately until it reaches the correct position.
The system block diagram is shown in Figure 1, which consists of a processing system, a wireless transmission module and a display system. The system uses infrared detection in the first notice area. If the infrared light is reflected back, it means that a truck may enter, the red light is turned on, and the detection device in the second notice area is started. The device uses laser detection. If the photosensitive detection tube detects the signal reflected from the special reflector on the truck (the mirror can make the laser in any emission direction return along the original path), it means that a truck has indeed entered (the light reflected back by other objects is very weak and does not interfere with the system. Even if it is a plane mirror, the probability of returning along the original path is very small and it is difficult to cause false triggering). The yellow light is turned on to remind the driver that there is still 1m away from the target position. At the same time, the target position positioning device is started. If the reflected signal is not detected within a certain period of time, it means that the truck entering the first notice area is not a truck, and the system automatically resets. The positioning of the target position is also achieved by laser. If the truck passes the target position once, the red light is turned on once (200ms). If the truck stops at the target position, the red light is always on. The driver can judge whether the target position has been reached by the brightness of the red light. When the truck is loaded and unloaded, the system automatically resets.
2 Hardware Design
This system uses ATmega8L to realize the modulation and demodulation of low-power laser and infrared. Compared with the dedicated codec chip (5026, 5027, PT2262, PT2272, etc.), the former has better flexibility and faster speed. For example, PT2262 and PT2272 have fixed codes for 0 and 1, and the length of each code is 1.31ms. 12 codes are grouped together, and two groups of codes are sent repeatedly each time (PT2272 will recognize it only when it receives it correctly twice), with an interval of about 5ms. In this way, each group of codes lasts for nearly 40ms. If the width of the reflector is 5cm, in order to ensure correct reception, the maximum speed of the vehicle is 0.05m/0.08s=0.625m/s. In this way, for cars traveling at a speed greater than 1m/s, the missed rate is very high, so it is necessary to shorten the coding time and reduce the number of coding bits.
This system uses two ATmega8 microcontrollers for software encoding and decoding. The encoding and decoding can be customized according to requirements (see the software section for details). It not only improves efficiency, but also greatly reduces peripheral devices. The whole system is simple and functional. The hardware block diagram is shown in Figure 2. [page]
2.1 Infrared detection unit
The infrared transmitting tube adopts the commonly used transmitting tube, and the receiving module adopts the extremely common infrared receiving module on the market (only three pins), which is simple and easy to adjust and can directly demodulate the 40kHz modulated signal. The circuit diagram is shown in Figure 3.
2.2 Laser detection unit
There is no ready-made module for visible light reception. This system uses 2CU as a photosensitive receiving tube and CX20106 as a preamplifier chip. It can complete the preamplification, limiting amplification, bandpass filtering, peak detection and waveform shaping of the remote control signal. Its circuit diagram is shown in Figure 4.
2.3 Wireless Transmitter and Receiver Unit
The transmitting part uses imported SAW resonator to stabilize the frequency, with very good frequency consistency and high stability, and the operating frequency is 315MHz. The receiving part adopts super regenerative receiving mode, which has the advantages of simple circuit and low cost, so it is widely used. [page]
3 Software Design
The software architecture of the whole system is divided into two modules, sending and receiving, which are controlled by two ATmega8 chips respectively. The sending microcontroller is mainly used to send modulated infrared coded information, while the receiving microcontroller is mainly used to demodulate the infrared coded signal reflected by the reflective medium and control the whole system according to the information received from the wireless receiving module, determine whether there is an object entering the infrared pre-inspection area, the second pre-inspection area and the third pre-inspection area, and make corresponding indications on the display unit according to the current state of the object. The detailed software flow is shown in Figures 5 and 6.
3.1 Encoding Format
The counter 1 generates a 40kHz PWM wave. The duty cycle can be changed by setting the PWM comparison value. In this system, the duty cycle is set to 1:4, which can reduce the system power consumption and extend the life of the laser tube and infrared tube. The encoding format is shown in Figure 7.
Two codes and one stop code form a frame. One frame is sent each time, and there is a 1ms interval between frames. Therefore, the length of the code sent once is nearly 2ms, which is much shorter than the length of the hardware PT2262 code. The code is sent after being modulated by a 40kHz square wave.
3.2 Decoding Method
The received signal is the inverse code of the transmitted signal. First, check whether the information is received. If it is, check whether the length of the high level is 1ms before starting decoding. The length of each code is about 400μs. Each code starts from a low level, then goes to a high level, then to a low level, and then back to a high level. Starting from a high level of 1ms, when the falling edge is detected, it delays 300μs to read the received status. If it is a high level, it is an O code. Otherwise, it is an I code.
3.3 Sleeping patterns
The sending MCU uses the power-down mode, and the receiving MCU triggers the external interrupt of the sending MCU to wake up the sending MCU. The receiving MCU uses the idle mode to sleep and is woken up by the internal timing interrupt. It detects whether there is a vehicle passing by the outside. If not, it continues to sleep and controls the sleep and wake-up of the sending MCU at the same time.
3.4 Wireless remote control reception
PT2262 demodulates the signal received by the wireless receiving module, sends an interrupt to trigger the receiving microcontroller, and the receiving microcontroller switches the analog switch channel.
This system has been debugged on site at a port in Shanghai, and no problems have been found so far. Neither the remote control nor the 200w incandescent lamp has any interference to this system, and the response speed is extremely fast.
Previous article:Are AVR microcontrollers obsolete?
Next article:Portable anti-theft password input device based on single chip microcomputer design
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!
- 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
- Tesla Coil 2 "Low Power Discharge + Detailed Pictures" Welcome to guide
- Problems with the multi-function Bluetooth remote control
- EEWORLD University - Comprehensive understanding of DFT technology
- Definition and difference between passive and active signals of sensors
- Processing flow of CPU card programming
- Ding~~The latest week's evaluation information has been delivered!
- [National Technology N32G430] 1. Unboxing
- CircuitPython 5.0.0 Beta 0 released
- MicroPython Newsletter Issue 8
- Contact information of forum administrator during the May Day holiday in 2021!