Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

smart toys

Tracking and patrolling smart car solution


Smart cars have achieved great development in recent years. In addition to the special Freescale Smart Car Competition, smart cars are often used as exam questions in the National Undergraduate Electronic Design Competition. The development of smart car line inspection technology makes smart cars have A stronger "intelligence".


1. The overall structure of the smart car


The smart car can be divided into three parts - the sensor part, the controller part, and the actuator part. That is, signal capture, control, and drive.


The sensor converts external light, electricity, sound, electromagnetic waves and other signals into electrical signals and sends them to the superior. The sensors on the smart car have several forms such as voltage output, pulse output, and digital bus output.

Traditional controllers include program counters, instruction registers, instruction decoders, timing generators, and operation controllers, etc., to realize the operation of the entire microcomputer system. In the smart car system, the controller is responsible for analyzing and processing the information collected by various sensors, and transmitting instructions to the actuators. The actuator part is responsible for executing various instructions conveyed by the controller, and then adjusting the working status of each module so that they can cooperate to complete various operations of the smart car.


2. What is intelligent vehicle line inspection technology


To put it simply, the smart car line inspection technology is to obtain a suitable image through the smart car, and analyze some information that can be used to control the car body.


In the process of intelligent vehicle line inspection, it is a basic goal of intelligent vehicle line inspection technology to make the intelligent vehicle approach the predetermined driving track under the guidance information. The pros and cons of line technology. Under the same line inspection technology, the use of different sensors will also have an impact on the accuracy of the line inspection of the smart car.

深圳循迹智能小车方案设计


3. Black line tracking method


There are many tracking methods widely used at present, including black line tracking, infrared tube tracking, camera tracking, laser tube tracking, laser tube tracking, electromagnetic tracking, etc. Compared with several other tracking methods, the circuit design of black line tracking is relatively simple, and the detection information speed is fast and the cost is low.


The infrared detection method is mainly used in the black line tracking, relying on the photoelectric sensor to realize the identification of the road. The infrared rays of a certain wavelength are emitted by the emission tube of the photoelectric sensor. When the infrared rays irradiate on different object surfaces, they have different reflection intensities. Utilizing the strong absorption rate of black to visible light, when the smart car drives to the predetermined black line track, the black line with low reflectivity forms a strong contrast with other high reflectivity areas. In the internal coding of the intelligent car line inspection technology, this feature is used for path recognition.


When the smart car is driving, if we want to extract the black line information we want from the track, the first thing we need to do is to extract the complete track outline. There will inevitably be various corners, intersections, etc. on the track. From the perspective of the machine, the track information is just a bunch of points. In order to help smart cars run better, a good path recognition method is needed. Path recognition is mainly for the identification of ordinary curves, small S-shaped curves, large S-shaped curves, and cross roads.


Ordinary curves are the easiest to identify for smart cars, and can be identified based on offset, curvature, etc. Recognition based on curvature is a method that is widely used at present. The greatest significance of curvature is that it can contain both speed and steering information. There is a definite method in advanced mathematics to find the curvature. In addition, we can use the characteristics of the circle to approximate the curvature.


According to the obtained curvature, the curve condition can be judged. Of course, before judging the curvature, it is first necessary to set a threshold for the path recognition program of the smart car. When the calculated curvature is greater than the set threshold, it can be judged as a curve. Depending on the required accuracy, an appropriate threshold can be selected. The smart car will perform acceleration and deceleration control according to the current road conditions.


4. Speed control strategy in line patrol


Compared with microcomputer system electronic equipment such as smart cars, the impact of inertia in the process of acceleration and deceleration is not great, but in order to make smart cars reach the intended destination more efficiently without deviating from the original driving track, it is necessary to Control the speed of the car during driving.


In the process of straight road driving, the impact of body vibration on the photoelectric sensor is small, so a larger speed control scheme can be appropriately adopted when driving in straight road. When approaching the curve, the speed is set in advance to the maximum speed that can be controlled, and acceleration control must be performed after leaving the curve.


The speed control during the curve driving process is the key point in the driving process of the smart car. In the process of entering the corner, the sharp change of road conditions increases the recognition pressure of the photoelectric sensor. For the sake of stability, proper deceleration should be done to avoid deviating from the track. At the same time, the speed should be set as a linear function of the curvature of the curve, and when the curvature increases sharply, the speed should be reduced to an appropriate critical value. If the speed does not drop to the critical value for entering the curve, in addition to the possible deviation from the track during the process of entering the curve, when the vehicle exits the curve and enters the straight track, the vehicle body will also appear in an S-shaped trajectory due to untimely control.


In the process of realizing the speed control of the smart car, in addition to realizing the above speed control process through software design, a reasonable motor current sampling scheme must be designed in terms of hardware, including the use of commonly used Hall current sensors and sampling resistors.


5. Design scheme of infrared tracking smart car

Unmanned driving technology is the trend of intelligent development in the automobile industry. It is a complex comprehensive system integrating sensing detection, Internet of Things technology, communication technology, intelligent navigation and automatic control. Drive automatically according to the pre-set program, while effectively avoiding obstacles. This paper studies the infrared tracking technology to understand the different responses of the smart car on different road conditions, and then popularizes the infrared tracking technology to solve some problems encountered in production practice.


The system is composed of single-chip microcomputer module, trace detection module, liquid crystal display module, motor drive module and so on. Among them, the tracking detection module uses the infrared emission tube and the photosensitive receiving tube TCRT5000; the single-chip microcomputer selects the AT89S52 chip, and finally completes the motor control through the single-chip microcomputer to realize the infrared tracking function.


5.1 Infrared tracing circuit design


(1) Motor drive module scheme design: The smart car uses front-wheel drive, and the purpose of controlling the movement of the car is achieved by controlling the steering of the two motors through AT89S52. Four infrared sensors are installed at the front end of the chassis of the car body, and the car performs corresponding actions according to the conditions detected by the sensors. Since the signal power output by the single-chip microcomputer is very weak, it cannot directly drive the motor, so a motor driver chip is needed to increase the power. This system uses the L298N driver chip, the maximum output voltage can be as high as 50V, and the chip integrates two complete H-bridge circuits, which can just control two motors.


(2) Tracking detection circuit design: the road surface of the smart car is simulated as white, and the tracking is carried out according to the black line. According to the principle that the reflection coefficients of the two colors of black and white are different to the light, the infrared emitting tube is used to continuously emit to the ground. Infrared rays, the strength of the reflected light received by the photosensitive receiving tube can be used for tracking judgment. When the receiving tube receives a weak signal or no signal, it can be judged to encounter a black line. This design selects TCRT5000 type infrared sensor, uses LM339 as a comparator to collect high and low levels, so as to realize signal detection.


5.2 Technical realization of infrared detection


(1) The technical implementation of the road surface detection module: the infrared receiving circuit uses the infrared receiving head 1838T, which processes the received signal and sends it to the single-chip microcomputer for decoding. The output terminal of the infrared sensor TCRT5000 is connected with the input terminal of the voltage comparator LM339, and the other input terminal of the LM339 is connected with a reference voltage. When the infrared receiving end detects no signal, or the signal is very weak, the phototransistor is in the off state, and the detection circuit outputs a high level; when the infrared light is reflected back, the phototransistor is in a conduction state, and the detection circuit outputs a low level. The single-chip microcomputer controls the rotation of the motor according to the difference in the received high and low levels, thereby realizing the tracking function of the car. The road test module shares four infrared photoelectric sensors to realize combined direction control detection.


By setting a cycle program to continuously detect the current position of the car, and according to the feedback of the state table, the single-chip microcomputer controls the motor to realize the car's left turn, right turn, and straight line movement.


(2) Realization of PWM motor control: PWM (Pulse Width Modulation) is a common method for motor speed regulation. The pulse cycle remains unchanged, and only changing the conduction time of the thyristor can change the pulse width for DC speed regulation of the motor. That is to keep the frequency of the pulse voltage applied to the motor unchanged, and adjust its pulse width, so as to realize the function of motor speed regulation. The method of using software in this design uses a single-chip microcomputer to generate a PWM signal, which is respectively connected to the two enabling terminals of the motor drive chip L298N, ENA and ENB, and controls the driving speed of the motor by controlling the on-off time of the enabling terminal, thereby realizing control Car movement. The PWM signal software realizes controlling the duration of the high and low levels by changing the value of the variable in the f0r statement.


5.3 Intelligent patrol car test


According to the module design method, the system test can carry out functional tests on each module of the circuit step by step. Use Keil to write and compile the program, then import the program to Proteus for simulation, and then debug in the actual circuit after the simulation is passed. Motor drive module debugging can debug the motor speed through the PWM signal generated by the program. The road detection module debugs 4 effective signals. When the infrared sensors are placed on the white road, the signal level received by the microcontroller is about 0.27V. When one or two infrared tubes on the right enter the range of the black line, the corresponding I/0 mouth level becomes high, the voltage is about 4.32V.


Summarize


In the complete smart car design, in addition to the line patrol control, there should be other control methods to assist the smart car to complete the driving target. The perfect speed optimization algorithm and precise sensor equipment can help the smart car to complete the required tasks more smoothly and efficiently. Work. The study of smart cars is the test and extension of the application and practice of the ever-developing electronic technology. Smart cars are no longer limited to short-distance information control methods such as Bluetooth and infrared rays, nor are they limited to a few single functions. With the rapid development of IOT, the application fields of smart cars continue to expand, and more and more achievements can be seen in the future.


The infrared tracking technology researched in the article is applied to the car model, which can automatically drive along the set track; the tracking function and the infrared remote control function are realized. In the research process, there are still the following problems that need to be improved and perfected: the car turns by the steering of the two motors of the front wheels, and the tracking detection signal controls the specific steering of the motor when turning, because there will be many different detection signals in the actual detection , it will take a long time for the car to pass the arc at the turn; to solve this problem, it can be improved by changing the corresponding parameters of the program.


The above are the details of the IoT solution introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have the development and design needs of the Internet of Things, you can trust us. We have rich experience in custom development of electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, Bluetooth IC and module, wifi module. Our development capabilities cover PCB design, single-chip microcomputer development, Bluetooth technology development, software customization development, APP customization development, WeChat official account development and other hardware and software design. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.

  • TOP