Professional Documents
Culture Documents
8-15
The Design of FSAE Race Car Speed Display System Based on 51 Single Chip
Youying Hua, Yuanyuan Li #
College of Electrical and Electronic Engineering, Shanghai University of Engineering Science, Shanghai, China, 201620
#Email:
liyuanyuanedu@163.com
Abstract
Students Formula One racing speed display system is through the speed of acquisition, signal analysis and display output to achieve the speed display. The topics selected the Hall sensor to collect the vehicle wheel edge speed; 89C51 micro-controller and four digital cathode tube to simulate the real-time analysis and display output of the speed signal. In the subject of the implementation process, the signal from the Hall sensor is converted to the rising edge signal to input 89C51; MCU internal timer and counter counts the rising edge number; C language program to count the rising edge of signal and convert it into the speed signal. Finally use digital tube to display car speed. After testing, the system run well, has high reliability and can show the car speed clearly. Keywords: Car Speed Display; Hall Sensor; 89C51; C Language
INTRODUCTION
Auto industry has travelled 100 years of development. Car dashboard technology constantly developed and evolved. Speed is an important parameter in the process of driving. Now, types, specifications and grades of speedometers are various. There are traditional mechanical shaft speedometer, frequency conversion electronic speedometer and more advanced intelligent digital speedometer based on MCU.[1,2] Automobile speed display is an important part of the automotive performance analysis and automotive instrument display. As to the FSAE racing speed display system, by extracting the FSAE racing speed, after the software programming, through digital tube display to achieve. This paper selects the Hall sensor to acquire speed signals, 89C51 microcontroller for signal processing, through a four common cathode LED output speed.
phenomenon is because the carrier in energized semiconductor film forced by the Lorenz force generated from the magnetic field, respectively deflect and accumulate to the film lateral sides. Thus forming an electric field, is known as the Hall field. The electric field force generated by Hall electric field is contrary to Lorenz force which prevents the carrier accumulation until it is equal to the Lorenz force. At this time, the film both sides establish a stable voltage. This is the Hall voltage.
Wwidth of semiconductor chip (m), Llength of semiconductor chip (m), dthickness of semiconductor chip (m), BPerpendicular to the film surface magnetic field (T), Iconductor current (A), U H Hall voltage (V)
Although many years ago we know and understand this effect, but before the material technology has achieved significant progress, the sensor based on Hall effect was not practical. Until it appears high strength constant magnet and signal regulation circuit work in low voltage. According to the design and configuration, the Hall effect sensor can be used as a switch sensor or a linear sensor. [5]
rotation; High frequency response, the response frequency up to 20kHz, equal to the speed of the frequency of the detected signal when the 1000km/h; Strong ability of anti-electromagnetic interference; Hall sensors are not afraid of contamination or corrosion from dust, oil, water vapor and smoke.
2 51 Micro-controller
51 microcontroller is all compatible with the Intel 8031 instruction microcontroller collectively, is one of the most widely used 8-bit microcontroller, which is widely used in industrial measurement and control system. Now, many companies have compatible appliance for 51 series; 51 series will occupy a large market for a long period of time at present and even the future. 89C51 is a member in 51 family, its development of technology is mature and powerful. 89C51 pinout diagram as shown in Figure 3, it is a kind of low voltage, high performance CMOS 8 bytes microcontroller with 4K bytes of flash programmable and erasable read only memory. Microcontrollers EEPROM can be repeated 100 times and the device is compatible with the industry standard MCS-51s instruction set and pinout .[7-10] The main features of the 89C51:
(1) Compatible with the MCS-51. (2) 4K bytes programmable flash memory lifetime: 1000 write / erase cycles. (3) Data retention time: 10 years. (4) Fully static operation: 0Hz-24MHz. (5) Three program memory lock. (6) 128*8-bit internal RAM. (7) 32 programmable I/O lines, two 16-bit timer/counter. (8) 5 interrupt sources. (9) Programmable serial channel. (10) Low-power mode of idle and power-down. (11) On-chip oscillator and clock circuit.
This system design concept: Using Hall speed sensor and the signal acquisition tooth plate, which installed in car tire and has same speed with car tire, to collect car wheel rotational speed. And through the signal conversion circuit in Hall sensor convert the speed signal to the rising edge signal, then transmit to the microcontroller. After the program calculating, four common cathode LED display real-time vehicle speed. System block diagram in Figure 4.
This paper selects the Hall element HAL3144E to analog Hall sensor; using NdFeB magnet to analog signal acquisition gear disc. Then observe the influence of the output of Hall element to speed display system. Between the voltage and output terminals of the Hall element is in parallel with a 10k color ring resistance, which play a step-down effect. The input is connected with a 24V DC power supply, and the output is connected to the oscilloscope to observe the output waveform. After the circuit is well connected, the NdFeB magnet is rhythm to be near/far from Hall element, through the oscilloscope, waveform can be observed clearly. The waveform signal has the obvious upper/lower jump.
- 11 http://www.sj-ce.org
Based on 51 microcontroller peripheral circuits, 89C51 microcontroller as the core; RST connection reset circuit; X1,X2 connected to 12M external crystal oscillator; the P3.5 port connected to the input signal from the Hall sensor, P0 ports connected to four common cathode LED to display output. Speed display system peripheral circuit shown in Figure 6.
The program flow chart shown in Figure 7, wherein the part of the main program are as follows: void main(void) { Disbuf[0] = 0 // Boot, initialize the buffer 0000H Disbuf[1] = 0 Disbuf[2] = 0 Disbuf[3] = 0 init_timer() while(1) {
- 12 http://www.sj-ce.org
if(Flag_Fresh) { Flag_Fresh = 0 DisplayFresh() // Refresh the digital tube display } if(Flag_clac) { Flag_clac = 0 ClacSpeed() // Calculation speed, and the results into a digital tube buffer Tcounter = 0// Cycle timing reset TH1=TL1 = 0x00// Pulse counter reset } } } The main function is first defined digital tube buffer, initialization buffer 0000H. Next, initialize the timer, the timer initialization function will be detailed later. Then, perform while (1) infinite loop cycle, during the cycle, to judge the digital tube refresh flag. When the digital refresh flag is 1, refresh the digital tube, and the flag is set to 0. Finally, judge the computing flag. When it is 1, calculate the car speed, and put the calculated results into digital tube buffer, then reset cycle timing and pulse counter. Ready for the next round of the loop.
In the actual match, the scale factor 0.5886 in speed calculation formula of the system program should be obtained from calculation. The gear disc tooth number: 10 teeth; the FSAE racing tire radius: 0.26m. So the size of each tooth corresponding tire length is 0.1635m. Digital tube display speed is the unit of time the car driving distance. Therefore, in unit time (s), tire running distance is the car speed. Microcontroller counting gear disc unit time (s) turned tooth number, the racing distance traveled per unit time can be calculated. Through practical operation, by counting unit of time around the tooth number, calculate the actual speed. Calculation of actual speed: (n is the number of teeth per unit time), finally we can obtain the scale factor for speed formula is 0.5886. Because the theoretical calculation and the actual measured error, therefore, we set a calibration coefficient k. Through the experiment, repeated adjustment of calibration coefficients, we will obtain a calibration coefficient which was similar with the theory of frequency conversion for speed. This calibration coefficient k=1.71, which make calculation and the actual measured most similar. Table 1 is the
- 13 http://www.sj-ce.org
80
47.088
100
58.86
110
64.746
120
70.632
140
82.404
160
94.176
5 Conclusion
In the experimental testing and debugging process, we found that there is a certain deviation between the actual speed and the theoretical speed when enter the same frequency.
FIGURE 9 LINEAR FIT OF THE THEORETICAL SPEED AND THE ACTUAL SPEED
Through the test, we can get the relative error between the theoretical speed and the actual speed. The relative error formula: (actual speed theoretical speed)/actual speed*100%. Error fitting curve is shown in Figure 9. Through the analysis, we found that the experimental errors exist, but the errors are less than 3.5%. So it is little impact on the system, so FSAE racing speed display system based on 51 microcontroller enforceability.
REFERENCES
[1] Yang Zhongmin . Car Dashboard Development Status [J] Auto Electric, 2004, (4) :1-3 [2] Zhao Lijun, Luo Nianning, Cui shengmin. A Digital Speedometer Design [A]. 2007 China Automotive Engineering Society - 14 http://www.sj-ce.org
Annual Conference Proceedings [C]. Beijing: Mechanical Industry Press,2007.1007-1010 [3] Song Fuchang. Automotive Sensor Identification and Detection Graphic [M]. Beijing: Electronic Industry Press,2006:98-104 [4] Zhou Runjing, Hao Xiaoxia. Sensors and Detection Technology [M]. Beijing: Electronic Industry Press,2009.4:1-15 [5] Chen Yuzhong. Hall Sensor Speed Measurement System Design [J]. Science Technology and Engineering, 2010,10(30):7529-7532 [6] Zhao Yan. Sensor Principle and Application [M]. Beijing: Peking University Press,2010.2:155-179,217-252 [7] Anonymous. An Engine Speed Measurement Based on MCU [DB/OL]. Http://www.doc88.com/p-993594268631.html, 2011-11-07 [8] Dillipku.Das, Sandeep Sheetal. DATA ACQUISITION USING AT89c51 AND PCL-207[DB/0L]. http://ethesis.nitrkl.ac.in/1053/ [9] Yuan Guici, Ding Shoucheng. 89C51-based Digital Car Dashboard Hardware Circuit Design [J]. Science Technology and Engineering, 2008,8 (22) :6153 -6155 [10] Shamim Choudhury. Motor Speed Measurement Considerations When Using TMS320C24x DSPs[R],2001 [11] Hu Xianzhi. Optical Devices and Applications [M]. Beijing: Electronic Industry Press,2010.1:221-234 [12] Guo Yuesong. Photoelectric Switch Speed Measurement System [J]. Nanjing: Nanjing University of Information Science, 2011 [13] Liu Yuangui, Ma Cong, Gao Ge. Altium Designer Electronic Design & Application Tutorial [M]. Tsinghua University Press,2011:21-40 [14] Gao Feng. Single-chip Microcomputer Principle and Interface Technology (Second Edition) [M]. Science Press, 2011: 12-49, 137-253 [15] Liu Li, Wang Xiang. MCS-51 Microcontroller-based Speed Measurement System [J]. Machinery, 2007,3 (34) :58-60
- 15 http://www.sj-ce.org