This paper mainly introduces the development process of vehicle headlamp controller. This paper focuses on the component module, technical tackling and problem solving of the headlamp controller. With the continuous improvement of living standards, people’s requirements for vehicles are also increasing. At the same time, lighting during night driving is an important part, especially the protection function of some lights. Headlamp controller is one of the important parts of motorcycle electrical appliances, which directly affects the night use requirements of motorcycles.
The headlamp controller introduced in this paper can program the single chip computer, control the motorcycle headlamp to switch between far and near light, and realize overtaking warning at the same time. Because the headlamp controller is designed to control the switching of far and near light and some protection functions, the product needs to test the actual situation of the headlamp, and make corresponding judgments according to the test results, and then control the working situation of the headlamp according to the judgment results. Based on the above considerations, this paper intends to use a combination of software and hardware to achieve product functions. Through hardware circuit sampling, the computer programmed the microcontroller, analyzed and judged the output according to the sampled data, and output signal controlled the corresponding circuit to work to meet the needs of the product.
Because the working voltage of the product is DC12V and the working voltage of single chip computer is DC5V, it is necessary to convert DC12V to DC5V by power conversion, which is convenient for sampling and working of PIC single chip computer.
In order to detect the working status of the far and near light lamp, this paper uses the method of detecting the working current to detect the status of each circuit. The specific implementation scheme is to detect the current size of the far and near light working circuit. By sampling resistance, the current signal is converted into a voltage signal. Because the voltage signal is a millivolt level signal, we amplify the voltage signal through the operational amplifier in the same phase. It meets the sampling requirement of single chip computer. The amplified voltage signal is input to the single chip computer, and the corresponding signal control output circuit is output through the software program to work, so as to achieve various functions. The product mainly includes: power conversion circuit, relay control circuit, voltage sampling and amplification circuit, signal input circuit, signal output circuit. Considering the realization of computer control signal and function, PIC16F676 is chosen as the main MCU of the product.
The MCU has 12 I/O pins with independent direction control function, thermostatic element analog-to-digital converter module, wide operating voltage range (down to page 171) (up to page 159). At the same time, LM258AP is selected in the operational amplifier circuit, which has good versatility, is easy to purchase in batches, and is easy to produce. Constantan wire resistor is used in the voltage sampling circuit, which has the characteristics of low voltage drop and high current passing. The headlamp controller is mainly composed of five parts: the first part is power conversion circuit, which mainly provides working voltage for single-chip computer; the second part is input signal control circuit, which mainly processes the input signal of external vehicle, converts the external signal into high and low level signal which can be received by single-chip computer; the third part is voltage amplification processing circuit, which mainly carries the voltage of small signal through transportation. The fourth part is the output signal control circuit, which mainly controls the relay according to the output signal of the single chip computer to work to meet the needs of various functions. In order to simplify the system structure, the controller consists of only the necessary voltage stabilizing circuit unit, voltage amplifying circuit unit (see Fig. 1), output signal control circuit unit (see Fig. 2), external signal input circuit unit (see Fig. 3) and single chip computer. The controller mainly controls the switching between far and near light and the realization of various protection functions through the program design of PIC single-chip computer.
Firstly, the external signal is converted to the high-low level signal by the external signal input circuit unit. The single chip computer determines whether it is in the far light or near light state by detecting the change of the high-low level. When the judgment is completed, the corresponding circuit is controlled by the output signal control circuit unit. At the same time, the absorption of the relay is realized to achieve the work of the far light or near light. Secondly, the voltage amplifier circuit unit detects that when the far light or near light is faulty, the single chip computer judges the input signal and makes corresponding processing to realize the protection function of breaking a lamp and overload protection.
Through the debugging and experiment of samples, it is found that the problem of excessive heating of sampling resistance often occurs in the durability test of products. When the sampling resistance is reduced, the MCU can not receive effective signals. Through repeated experiments and comparison, the appropriate material and resistance value are determined in the selection of sampling resistance, which can effectively reduce the product temperature and solve the sampling problem of MCU. Question. Vehicle headlamp controller is a new type of controller developed according to customer’s needs. It realizes various protection functions with remarkable technical advantages, novel and reasonable structure design. After user testing and testing, all functional indicators meet customer’s use requirements, and now a batch order has been formed.