Vehicle speed signal acquisition system based on LPC2129 timer capture function

The car sensor is the input device of the car computer system. It converts various operating conditions information of the car, such as vehicle speed, temperature of various media, engine operating conditions, etc., into electrical signals and transmits them to the computer, so that the car operation is at its best Working status. Since the 1980s, the application of sensors in the automotive field has continued to expand. They are used in automotive electronic stability control systems (including wheel speed sensors, gyroscopes, and brake processors), lane departure warning systems, and blind spot detection systems (including radar , Infrared or optical sensors) have been applied in all aspects.

The vehicle speed sensor is the basic and important part of the car sensor. Vehicle speed is an important parameter in automobile road experiments. It is combined with parameters such as wheel force, pedal force, and wheel speed. It analyzes the dynamic performance of the vehicle, the performance of the braking system, and the development and operation of the ABS anti-lock brake system. The accuracy of the stability experiment has important significance and application value.

In order to obtain the vehicle speed parameters, the author of this paper designed the software and hardware for vehicle speed signal acquisition. The proposed vehicle speed acquisition method can take into account both the accuracy and real-time measurement of the measurement whether it is measured at low or high speed, and provides further research on the dynamic performance of the vehicle. Guarantee.

1 Signal acquisition hardware circuit

1.1 Vehicle speed signal processing hardware circuit

The vehicle speed sensor is installed on the output end casing of the transmission. The outer end of the rotating shaft is a worm, and the turbine of the transmission output shaft is meshed. When the turbine rotates, the rotor of the vehicle speed sensor is driven to rotate. The vehicle speed sensor is mainly used to measure the driving speed of the vehicle, and transmits the vehicle speed electrical signal to the ECU, which is used to control the dynamic performance of the entire vehicle. The hardware schematic diagram of the acquisition system is shown in Figure 1.

a.jpg

1.2 LPC2129 capture function introduction

LPC2129 microcontroller is one of NXP's 32-bit microcontrollers. Its internal basic structure includes: central processing unit (CPU), two 16C550 industry standard UARTs, high-speed I2C interface (400 kHz) and two SPI interfaces, 8 Channel input capture / output comparison timer, 8-channel pulse width modulation module and 46 independent digital I / O interfaces. It also has 256 KB of Fl-ash ROM and 16 KB of RAM. LPC2129 has 2 powerful timers, 32-bit programmable prescaler, 4 capture channels, 4 match registers, and 4 match output channels. The capture channel is shown in Figure 2.

b.jpg

1.3 Calculation method

There are three commonly used speed calculation methods: frequency method, periodic method, and multiple periodic method. The frequency method calculates the wheel speed by measuring the number of wheel speed pulse signals within a given time, and the periodic method calculates the vehicle speed by measuring the measured pulse width. The speed acquisition algorithm used in this article is similar to the periodic method. Set a time gate Ts, realized by PWM. The first channel of the CAP can record the current time of each interrupt in the time Ts and place it in the register CAP_DATA. The recorded value is the current value of internal timer 1. When the crystal frequency is 11.059 2 MHz, the content of timer 1 increases by 1 every 90 ns. The actual sampling time Td is the actual time of the last interrupt minus the real time of the first interrupt.

The formula for calculating the vehicle speed N using the periodic method:

c.jpg

In the formula: The unit of N is r / rain, n is the total number of pulses obtained within the sampling time, Td is the actual sampling time, and the unit is ms.

The formula for calculating vehicle speed used in this article:

d.jpg

In the formula: the unit of V is km / h, i is the main reduction ratio of 3.6, CR is the distance traveled per wheel revolution, the unit is km / h.

Best Gift for Kids: Surprised birthday gift for your baby, boy or girl. A nice holiday gift for kids teenager your friends,they absolutely love the led light.This 3D Led Christmas Motif Light, can be used at home, bedroom, baby-room,child-room, living room, bar,  Cafe, restaurant, party, etc
Give Baby or Kids a Quite Sleep:You can place it on the table as NURSERY in baby-room or kids bedroom.The 3D night light would be a best companion when your kids are sleeping. Have a good sleep without fear of the darkness.
Increase the Holiday Atmosphere: Very cute animal-shape, Decorate your room you home ,the 3D Led Christmas Motif Light, is a nice decoration for birthday ,Christmas,New Year, Valentine's Day, Thanksgiving Day,Halloween and other special festivals.

Metal Led Motif Light

Snowflake Christmas Lights,3D Led Christmas Motif Light,Led 3D Snowflake Motif Light,3D Led Motif Light

XINGYONG XMAS OPTICAL (DONGGUAN ) CO., LTD , https://www.xingyongxmas.com

Posted on