In this paper, a hybrid integrated chip solution based on Freescale S12ZVL is proposed for the control of the car headlight follow-up steering system. This paper describes in detail the hardware and software design block diagram of the car headlight follow-up steering system, and introduces the LIN communication implementation of the controller based on Freescale's LIN driver package.
This article refers to the address: http://
Car headlights are an important safety component in cars. At present, the illumination angle of most car headlights is fixed. When the car is driving on a curve, the illumination field cannot meet the driving requirements because the beam cannot be deflected. Therefore, when driving at night, there will be a certain "blind zone" due to the driving angle problem, which will affect the safety of the driving to a certain extent. In the case of fixed illumination, this blind zone is inevitable, so the "AFS Light Follow-up Steering System" came into being. It can automatically adjust the direction of the headlight beam according to the car's steering signal and vehicle speed signal, ensuring that the vehicle will turn into the driver's field of view without delay when turning, providing the driver with the best lighting effect and ensuring nighttime. The safety of turning the car improves the active safety of the car.
As shown in Fig. 1, the AFS system uses the steering wheel angle of the vehicle during turning and the instantaneous vehicle speed as the control parameter input. According to the designed control algorithm, the headlight angle corresponding to the vehicle speed and the steering wheel angle is obtained, and the target angle is used as the target angle. Follow-up adjustment of the headlights of the car. At the same time, by calculating the sensor signals of the front and rear axles of the vehicle body, the height position of the headlights is automatically adjusted to meet the lighting requirements of different road gradients. This paper proposes an AFS execution controller design based on S12ZVL, which realizes LIN communication with the AFS main control module and drives the stepper motor to rotate the HID lamp.
Figure 1 AFS system effect Figure 1 S12ZVL features
The S12ZVL family is part of the S12 MagniV mixed-signal microcontroller portfolio, providing intelligent, optimized integrated high-voltage components. Based on LL18UHV technology, this new series combines highly reliable 180nm non-volatile memory and high-voltage analog components on a single chip that withstand the rigors of automotive environments during load dumps. The S12ZVL product system integrates a LIN physical layer, an ESD-protected 12V input pin (capable of ADC measurements), and an automotive regulator operating between 3.5V and 40V (on-chip and slice for Hall or RGB LEDs) The external function provides a stable power supply). The S12ZVL family includes expandable and pin-compatible MCUs with a wide range of memory and package options. It re-uses the latest S12Z core, IP and tools to easily migrate from existing S12 16-bit products. In addition, the S12ZVL MCU integrates key features including ECC functionality on all memory (flash, EEPROM and RAM) and an on-chip oscillator accurate to 1.3%, which eliminates the need for external crystal oscillators or resonators for LIN communication. Its structural block diagram is shown in Figure 2.
At the same time, the S12ZVL series includes the first 16-bit MCUs belonging to the Freescale Safe Assure Functional Safety Assurance Program, designed to meet the functional safety standards required by ISO 26262 (ASIL A).
Figure 2 S12ZVL series structure block diagram 2 AFS execution controller design
The AFS actuator consists of a series of motors and optical mechanisms. Generally, there are projection headlights, an adjustment motor that adjusts the vertical angle of the headlights, a rotating electric machine that adjusts the horizontal angle of the headlights, a movable grating that adjusts the basic light type, and some additional lamps. Such as corner lights and so on.
As shown in Fig. 3, the electronic control unit LCM obtains accurate information of the steering wheel rotation angle, the vehicle body speed and the vehicle body inclination from the steering wheel angle, the vehicle speed, and the vehicle body height displacement sensor through the CAN bus. The angle and speed information are accurately calculated by the LCM module to generate an output signal, and the left and right actuators are separately controlled by the LIN bus communication to control the rotating motor to perform horizontal rotation of the headlight, and the tilt information is controlled to increase the headlight of the motor. Rotate vertically.
Figure 3 AFS system structure
2.1 Hardware Design
The execution controller adopts S12ZVL to realize LIN communication and control the stepping motor to adjust the up and down movement of the lamp, and realize some auxiliary functions. Since the S12ZVL integrates the LDO, LIN physical layer, etc., it can simplify the circuit design and reduce the size of the PCB. S12ZVL configures the motor control parameters of two NCV70522 through SPI interface, such as stepping motor control subdivision number, running current, etc., while S12ZVL generates different frequency pulses through Timer module to control the speed of stepping motor. The hardware structure is shown in Fig. 4. Shown.
Figure 4 AFS actuator hardware structure diagram 2.2 software design
The programming and debugging of S12ZVL can use Freescale's Code Warrior 10.6 environment, and the interface is more user-friendly. The AFS execution controller program includes the main program, the LIN driver, the control program for the stepper motor chip, and the calibration program. The main program flow chart is shown in Figure 5. The LIN driver can use Freescale's LIN software package. Its initialization can be realized by the interface function provided by the LIN software package. The initialization of the stepper motor driver IC is mainly realized by SPI communication. It can be configured with parameters such as the operating current of the motor drive IC and the number of subdivisions of the stepper motor. In the main loop, the function is jumped by using the state machine to implement LIN message reception.
In addition to the main program, there is also a timer interrupt service program. The interrupt service program can control the operation and stop of two stepping motors, realize the acceleration and deceleration motion of the stepping motor, and also realize the actions of some LIN message commands. Such as self-calibration motion, stop command, reset command, etc.
Figure 5 main program flow chart
3 LIN communication implementation
For the S08, S12 and S12 Magniv series, Freescale offers software packages that are compliant with LIN2.1, LIN2.0 and SAE2602 specifications, making it easy and quick for developers to develop LIN communication programs. Figure 6 shows the structure of Freescale's LIN driver. LIN2.1 Core API and J2602 Core API can realize the initialization of LIN and the signal transfer between the application layer and the core layer. The LIN2.1 TL layer can be given to the tester. Send diagnostic requests, Low Level layer handlers and hardware signal transfer functions, such as byte transmission, receive response, and Break detection.
Figure 6 LIN package structure block diagram In addition to the driver, this package provides a graphical configuration tool NCF GUI for developers to use, which can automatically generate node configuration based on LIN configuration description file LCF and node description file NCF. The .c and .h files, compiled with the LIN code configuration file, the LIN driver, and the user application software, can generate executable programs that implement LIN communication, as shown in Figure 7. This makes it easier for developers to spend more time on application development.
Figure 7 LIN configuration process
This article details the application of Freescale's S12ZVL hybrid integrated chip in AFS, including the characteristics of the S12ZVL chip, the structure of the AFS control system, and the Freescale LIN communication software package. With Freescale's S12ZVL mixed-signal integrated chip and Freescale's LIN communication software package, developers can quickly implement LIN communication functions while reducing product size and speeding up the development of AFS executive controllers.
Makeup Display Unit,Cosmetic Display Unit,Makeup Display Cabinet,Cosmetic Display Cabinet
TOM SPA BEAUTY SALON EQUIPMENT CO.,LTD , https://www.tomspabeauty.com