Topic: Smart car direction
Team information: Wan Quan Zhen Lin Zebang Zhou Kaichen
Award information: Second Prize
This chapter mainly introduces the selection and overall design ideas of the overall scheme of the smart car system. In the following chapters, the entire system is divided into three parts: mechanical structure, control module, and control algorithm to provide an in-depth introduction and analysis of the smart car control system.
The main control board and electromagnetic identification module are drawn using Lichuang EDA , and the power module and motor drive module use off-the-shelf modules.
1.1**** Selection of the overall system plan
The electromagnetic group competition of this smart car competition has strict regulations on sensors. We decided to use an I-shaped inductor as the detection device for electromagnetic signals. This circuit has the advantages of simplicity, practicality, reliability and accuracy.
1.2****Design of overall system plan
In compliance with the rules of this competition, the smart car system uses STC microcontroller, and the model is limited to: STC8G2K64S4-36I-LQFP48 . Three pairs of I-shaped inductors sense the 20KHz alternating current signal in the electromagnetic guide wire laid in the middle of the track based on Faraday's law of electromagnetic induction, and return it to the microcontroller as the basis for steering control. The analog signal returned by the accelerometer is used as the signal of the current angle of the vehicle body, and the gyroscope collects the angular velocity of the vehicle body rotation. The main control output PWM wave controls the speed of the motor to maintain the balance of the body and lock the track.
According to the above system scheme design, the racing car includes six modules: main control module, sensor module, power module, motor drive module, speed detection module and auxiliary debugging module. The functions of each module are as follows:
The main control module, as the "brain" of the entire smart car, will process signals from sensors such as inductors, gyroscopes, accelerometers and Hall encoders, make control decisions based on the control algorithm, and drive two DC motors to complete the control of the smart car. control;
The sensor module is the "eyes" of the smart car. It can adjust a certain level of foresight, sense the track information ahead in advance, and provide the necessary basis and sufficient reaction time for the "brain" of the smart car to make decisions. It also uses a gyroscope. and accelerometers to calculate real-time angle information and angular velocity information during the movement of the car model to maintain stable movement of the car model;
Power module provides appropriate and stable power supply for the entire system;
The motor drive module drives the DC motor to realize the motor output of the smart car;
The speed detection module detects the rotation speed of smart car wheels and is used for closed-loop speed control;
The auxiliary debugging module is mainly used for functional debugging of smart car systems and racing status monitoring.
This chapter focuses on analyzing the selection of the overall solution for the smart car system, introduces the overall design and overall structure of the system, and briefly analyzes the role of each module of the system. In the following chapters, each module of the entire system will be introduced in detail.
Chapter 2 Mechanical Structure Adjustment and Optimization
The control of each system of smart cars is realized on the basis of mechanical structure. Therefore, before designing the entire software architecture and algorithm, you must have a comprehensive and clear understanding of the mechanical structure of the entire model car, and then establish a corresponding mathematical model, so as to Then the mechanical structure of the racing car is adjusted according to the specific design plan, and the structural stability is continuously improved and optimized during the actual debugging process. This chapter will mainly introduce the mechanical structure and adjustment plan of the E car model.
This competition uses a smart car competition-specific model car (E- type model car ) produced by Beijing Keyu Tongbo Technology Co., Ltd. , and the supporting motor model is RS-380SH . The control of the smart car adopts a dual rear-wheel drive solution. Due to limited time and resources, our car has not yet been able to stand upright. The car we displayed in the school competition used universal wheels to replace the original upright ability of the car. As shown below
The sensors in the car model include: speed sensor (encoder), car model attitude sensor (gyroscope, accelerometer) and inductive coil. Among them, we have now completed the installation of the inductor coil.
In order to lower the center of gravity of the vehicle, it is necessary to strictly control the weight of the inductor coil and the support frame, and at the same time, the length and angle of the forward look must be considered. We use carbon fiber tubes as the main mast for installing linear electromagnetic sensors, so as to obtain the maximum stiffness-to-mass ratio. The entire device has high positioning accuracy and stiffness, making the inductor coil more stable, thereby reducing data collection errors. As shown below.
In order to clearly monitor the operation of the speed and electromagnetic sensors, we specially installed an OLED display to display the reading parameters, and the parameter values can be remotely controlled through serial port debugging.
In order to lower the center of gravity of the car, we installed the battery behind the two wheels of the car. And by artificially drilling holes, fixed copper pillars were installed on the basis of the original car model to support the stability of the battery system.
In addition, there are many areas that can be improved in the mechanical structure of the model car, such as the wheels. Newly purchased wheels have less friction with the track and are still shiny, which will reduce the wheel's grip, so we have to pay attention to the surface of the wheel. Treated to maintain its stickiness and improve grip. At the same time, in order to facilitate heat dissipation, we use as little tape as possible and use more artificial drilling methods to fix the two layers staggeredly through different types of screws and copper pillars. Considering that the heat dissipation of the motor is large, the distance between the motor and the copper pillars and other modules is large, and the heat dissipation of the module is small, so the distance between modules is small.
We also carefully designed the board wiring and external wires: the wires should be wrapped with adjacent supporting equipment as much as possible to prevent accidents during high-speed operation.
The performance of a model car is closely related to its mechanical structure. A good mechanical structure is the key foundation for a model car to increase its speed. Under the same control environment, the quality of the mechanical mechanism has a significant impact on its speed. We attach great importance to the improvement of the mechanical structure of smart cars. Most of the mass of our cars is concentrated on the front and rear wheels as much as possible to reduce the center of gravity, thus improving the overall stability and reliability of the car.
Chapter 3 Hardware Circuit Design
The hardware circuit of this system adopts modular design. It mainly includes the microcontroller minimum system module, power module, path identification module, speed measurement module, serial communication module, display module and other parts.
We used the STC8A-64 core board, which is a core board based on Acer's new series STC8A8K64S4A12_LQFP48 microcontroller. This microcontroller is rich in resources and powerful. This microcontroller is STC's most powerful 8-bit microcontroller at present. The programming method is basically the same as that of 89C21, but its performance is very powerful.
The system board circuit module is shown in the figure below.
Since the rated operating voltage of the encoder and the system version we use is 5V, a power module that outputs 5V is used. The design principle of the circuit is shown in the figure below. The power module can output three voltages: 3.3V, 5V and 7.2V. We use power modules to power different modules. However, during the power supply process, we found that different wires have different abilities to transmit current. The transmission capacity of DuPont wire is very weak. If one or several DuPont wires are used to transmit the motor current, the rotor is likely to be blocked. To solve this problem, we used copper wires to carry the motor current, and applied aluminum wires to the core system board to save costs.
We tested the 7843CMOS driver module and the BTN module and found that both modules have their own advantages and disadvantages. Finally, based on the operating results, we adopted the 7843CMOS driver module. This module is responsive and precise in controlling the motor, so we use this module to drive the motor.
Chapter 4 Magnetic Field Information Processing
The underlying processing algorithm of the information collected by the smart car is the basis of the entire upper-layer control strategy. The stability of the inductive sensor collection, the processing method of the inductor coil return value, and the accuracy of path identification all determine whether the upper-layer control strategy can work. Only accurate Only by identifying the path information can the smart car achieve high-speed and stable driving.
This module uses an electromagnetic sensor with six 10mH inductors and 6.8nF capacitors to form a resonance. The collected signals can detect normal signals at a height of more than 2cm from the track, and are transmitted to the onboard LMV358 operational amplifier for amplification and rectification through the output signal interface. to the microcontroller ADC interface. You can see obvious continuous changes in the values collected by the microcontroller at 2-30cm from the center of the track (the actual measurement is more than this distance), and the values detected at the same position are basically stable. It is an ideal electromagnetic sensor for track signals.
Chapter 5 Theoretical Methods and Analysis
The power supply voltage is relatively high, about 7.2 V, which directly outputs voltage to the motor to drive the motor. Because the voltage is too high, in order to protect the circuit, power is supplied to the microcontroller (5V) through the power module. The microcontroller reads the data obtained from the electromagnetic sensor and uses these data to control the motor drive. This allows the car to track and follow the electromagnetic wires in a straight line or turn.
Below are some detailed pictures of the car assembly:
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet