introduction
A car driving simulator is a simulation system that can accurately simulate the driving operation of a car and obtain the feeling of driving a real car. The current car driving simulator integrates a variety of advanced technologies such as sensors, computer three-dimensional real-time animation, computer interface, artificial intelligence, data communication, network, multimedia, etc. It is mainly used for driver training, and can also simulate micro-traffic and study the control characteristics of the car [1]. Car driving simulators have the characteristics of high safety and good reproducibility. Using driving simulators for research and training can easily simulate various road environments and weather conditions, analyze the technical performance indicators of the car, thereby saving a lot of natural resources and having high economic value [2].
In the car driving simulator, the performance of the sensor control system directly affects the interactivity and real-time performance of the entire car driving simulation system, and is an important indicator for measuring the practical performance of the car driving simulator. The sensor control system is mainly composed of various sensors, data acquisition and processing systems, and interface circuits. Among them, the data acquisition and processing system is the core of the entire sensor control system. At present, many car driving simulators use data acquisition cards to realize the acquisition of control data. The cost of this data acquisition and processing system based on data acquisition cards is relatively high, and the acquisition of analog quantities is not very stable. Special algorithms must be used in the simulation program to process the analog quantities. At the same time, the number of interfaces is also limited, which brings some difficulties to subsequent development. Although the development cycle of the data acquisition system based on the single-chip microcomputer is long, the cost is relatively low, and the interface has good scalability. At the same time, the preprocessing of analog quantities and switch quantities can also be completed by the single-chip microcomputer, which can fully meet the interactivity and real-time requirements of the simulator system. The following introduces the design ideas of the single-chip microcomputer system of the car driving simulator.
1 How the system works
When simulating the movement of the car, the sensor collects the driver's operation data, amplifies and filters these signals through the interface circuit, and performs A/D conversion on the analog signals. Finally, the single-chip microcomputer system transmits the control signal to the main control computer through the RS-232 interface. In the simulation program, the computer controls the visual system, audio system, instrument system, and evaluation system based on the control signal, the movement state of the car, and the driving operation rules. Using the corresponding function in the single-chip microcomputer system driver, the signal collected by the single-chip microcomputer system can be converted into parameters for controlling the movement state and position of the car. When the driver performs simulated driving, the data collected by the single-chip microcomputer system will change in real time according to the driver's driving operation, thereby realizing the control of the movement state and position of the car in the driving simulator vision system. The accuracy of the control system is guaranteed by the algorithm inside the simulation program.
Figure 1 System workflow
The basic control components of the car driving process are the steering wheel, accelerator, clutch, brake and gear, and there are also auxiliary control components such as the ignition switch and turn signal. Similar to real car driving, the coordinated work of these control components can control the car model in the virtual vision, and the changes between the driver and the vision are real-time and interactive. After the driver's operation of the control components is sensed by the system through sensors, the system obtains the control parameters of the car model through processing and calculation, and finally controls the rendering output of the vision system according to these parameters. The driver can observe the operation of the vehicle in real time in the virtual vision. The system workflow is shown in Figure 1. [page]
2 Design of MCU System
2.1 Sensor Selection
The main control signals of the vehicle driving simulator are shown in Table 1.
The car driving simulator mainly needs to collect signals from the steering wheel, clutch, brake, accelerator, 6 gears, handbrake, etc. The sensors used include switch sensors, displacement sensors, and angular displacement sensors [3]. The steering wheel uses an angular displacement sensor; the clutch, brake, and accelerator use displacement sensors; the ignition, handbrake, and gear shift use switch sensors.
After comprehensive investigation and comparison, TWZ DC displacement sensor, QXJ-BZ-V angular displacement sensor, and ITR8102 photoelectric switch were selected as linear displacement, angular displacement, and switch sensors, respectively. Among them, the resolution of TWZ DC displacement sensor is 10μm, the resolution of QXJ-BZ-V angular displacement sensor is 0.01o, and the response time of ITR8102 photoelectric switch is 20μs. Practice has proved that the selected sensors fully meet the control requirements of the car driving simulator and have achieved good results.
2.2 Hardware Circuit Design
The sensor control system of the automobile driving simulator needs to complete the acquisition and processing of switch and analog quantities, the display control of indicator lights and instruments, and the data transmission between the main control computer and other functions. According to the above requirements, the main control chip is AT89C52 produced by Atmel. AT89C52 is a low-voltage, high-performance CMOS 8-bit microcontroller that is fully compatible with the pins and instruction systems of standard MCS-51 products [4].
The AT89C52 chip contains 8K Flash Programmable Erasable Read-Only Memory (FPEROM) and 256B internal random access memory (RAM), which can meet the needs of system programming, so there is no need to expand the external program memory and data memory.
Since there are many switching quantities and analog quantities that need to be processed in this system, 8255 is selected to expand the input and output interfaces. The P1 port of AT89C52 is used as the A/D and D/A conversion interface for analog quantity input and output. The A/D and D/A conversion chips are ADC0809 and DAC0832 respectively, and the chip select signal is provided by the high address line P2 port. The expansion interface of 8255 is used as the input and output of switching quantities. The port selection and chip select signal of 8255 are provided by the low address line after being latched by 74LS373.
In addition, AT89C52 also provides a full-duplex serial interface with multi-level communication function, which can be used for communication with the host computer. Since the RS-232 serial communication port is a standard interface of PC, and the wiring of RS-232 is very simple when used for two-way data communication, RS-232 is selected as the communication interface [4]. However, the output signal of RS-232 has not only positive voltage but also negative voltage, so the RS-232 interface chip MAX232 from a semiconductor company is selected to realize signal conversion. Figure 2 is a schematic diagram of the hardware circuit of the single-chip microcomputer system of the automobile driving simulator.
Figure 2 System hardware circuit diagram
[page]
2.3 Software System Design
The car driving simulator microcontroller software system needs to complete the functions of analog and switch quantity acquisition and processing, serial data transmission and reception, control signal output and display, fault monitoring and protection, etc. The software adopts modular design concept and is compiled in assembly language. It mainly consists of main program, timer interrupt service program, serial port interrupt service program, data acquisition and processing program, signal output and display program, etc.
Figure 3 Software system program flow chart
The main program mainly completes the system initialization work; the timer interrupt service program mainly completes the watchdog function, which can reset the program in time when the microcontroller has an abnormal situation, ensuring that the microcontroller system can work normally; the serial port interrupt service program mainly realizes the communication between the microcontroller and the main control computer; the data acquisition and processing program mainly completes the acquisition of analog and switch quantities, and obtains the driver's control data; the signal output and display program transmits the control information of the main control computer to the microcontroller, which is used to control the display output of the indicator light and the instrument. Figure 3 is the program flow chart of the microcontroller software system of the automobile driving simulator.
3 Conclusion
The cost of the data acquisition system based on the single-chip microcomputer is relatively low, and the interface has good scalability. At the same time, the preprocessing of analog and switch quantities can also be completed by the single-chip microcomputer. The system can fully meet the interactivity and real-time requirements of the car driving simulator, and has been applied in the developed car driving simulator with good results.
Previous article:Design of electronic throttle detection system based on PC and single chip microcomputer
Next article:Hardware design of power battery management system based on single chip microcomputer
- Popular Resources
- Popular amplifiers
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
- Moto 360 Wireless Charging Base Disassembly
- What is MU-MIMO and why is it important for Wi-Fi 6 and 6E?
- 【Lazy Self-Care Fish Tank Control System】Work Submission
- [Summer benefits to celebrate the Dragon Boat Festival] A large number of technical information is waiting for you to claim, and there are also gifts to help
- Xiaozhi Science Popularization丨How to Correctly Understand Power Supply Ripple and Noise
- Find the maximum voltage stress of the diode when it is working
- About QQ Chat at Work
- Naming method of TMS320 chip
- 【GD32L233C-START Review】Touch screen control LED based on serial communication
- I am a newbie, please give me detailed answers