Design of Single-Chip Microcomputer System for Automobile Driving Simulator

Publisher:sedsedqLatest update time:2011-11-22 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

System workflow

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.

Main control signals of vehicle driving simulator

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.

System hardware circuit diagram


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.

Software system program flow chart

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.

Reference address:Design of Single-Chip Microcomputer System for Automobile Driving Simulator

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

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号