| With the development of economy,auto industry has developed rapidly in China.At the same time,traffic security has become a very serious problem.The lighting system has become the focus of attention as one of the three main active safety parts of automobile.It is very significant to develop a headlamps lighting system which can change the working mode automatically in term of the weather,road conditions and traffic information to eliminate the vision dark space when turning roads or driving at night because of the traditional lighting system cannot meet the demand for light under various and complex driving conditions.First,the working principle of the lighting system:Adaptive Front lighting System(AFS)is mainly consist of sensor unit,control unit and execution unit.The sensor unit acquires driving information real-timely,and then transmits to the control unit by CAN bus,the CPU determines driving state,road conditions and the change of light intensity based on the obtained information and the preset program.According to these changes,system adjusts the lighting mode in time to cope with the complicated driving conditions.Second,mathematical model:it is the precondition to a precise mathematical model for an accurate and stable system.This headlamp system has the function of vertical deflection,horizontal deflection,far and near light switch and automatic switch.According to input variation and geometrical relationship,this paper deduces the headlamps deflection angle when the car is turning and other mathematical model.As a result,the possibility of system design is verified in theory implementation.Third,system hardware:in the aspect of hardware,this system uses S9S12HY64 integrated chip as the processor,chooses the appropriate sensor module,power supply module,drive module.System adopts CAN bus as transport channel.Meanwhile,this paper introduces the principle and function of CAN bus,and then designs the circuit.In the aspect of the execution unit design,the system adopts DRV8823 integrated chip produced by TI Company to control the stepper motor of the lights.Finally,system software and test:the system software is developed on the software platform of Code Warrior.This IDE(integrated development environment)supports all kinds of MCUs of Freescale Company.In this paper,the main program flow chart of each function module is designed,and the property of system is tested with referring to the performance indicators of similar products at home and abroad.The result of the experiment shows that the testing parameters conform to the requirements of the project. |