Vehicle light sensor circuit with automatic compensation function
The automotive light sensor circuit composed of a photosensor, a digital potentiometer, and a PTC thermistor achieves automatic compensation and temperature compensation, solves the inconsistency problem of the light sensor, meets the needs of automatic headlight control, and reduces costs and errors.
Patent Information
- Application Number
- CN202422811907.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2034-11-18
AI Technical Summary
Existing automotive light sensors have inconsistent light detection values due to production differences in photosensors and changes in ambient temperature, affecting the consistency of headlight switching. Existing compensation methods increase costs or introduce human errors.
The circuit consists of a photosensitive element, a digital potentiometer, a PTC thermistor and a microcontroller. The consistency of the light detection value is achieved through automatic compensation and temperature compensation. The digital potentiometer is used to automatically adjust the photocurrent, the PTC thermistor adjusts the temperature effect, and the microcontroller performs automatic compensation instructions.
The consistency of light sensor parameters is achieved, meeting the requirements of automatic opening and closing of vehicle headlights, reducing production costs and reducing human errors.
Smart Images

Figure CN223485307U_ABST
Abstract
Description
Technical Field
[0001] This utility model belongs to the field of automotive sensors, and specifically relates to a vehicle light sensor circuit with automatic compensation function. Background Technology
[0002] Currently, the photocurrent BIN (spectral density) values of the internal photosensitive elements in light sensors used to control automatic headlights cannot be completely consistent. There is always a range of BIN values, primarily due to differences in the semiconductor materials purchased before the photosensitive elements are manufactured, and errors also occur during the production process. Therefore, it is impossible to guarantee the consistency of each light sensor, and consequently, the consistency of headlight operation on and off in each vehicle. To address this issue, some researchers have tried adding multiple photosensitive elements within the sensor to reduce error, but this increases costs and does not completely eliminate errors. Others have added adjustable resistors for manual compensation, but this increases production costs and the risk of human error. Furthermore, neither of these methods considers errors caused by ambient temperature. Utility Model Content
[0003] The present invention aims to provide a vehicle light sensor circuit with automatic compensation function to solve the technical problem of inconsistent light detection values of each light sensor.
[0004] The technical solution is as follows:
[0005] A vehicle-mounted light sensor circuit with automatic compensation function includes a photosensitive element, a digital potentiometer, a PTC thermistor, and a microcontroller. The photosensitive element, the potentiometer of the digital potentiometer, and the PTC thermistor are connected in series between a power supply and ground to form a photoelectric path. A first terminal of the photosensitive element is connected to the power supply. The microcontroller includes an ADC pin, a first communication interface, and a second communication interface. The ADC pin of the microcontroller is connected to a second terminal of the photosensitive element. The first communication interface is used for communication with external devices, and the second communication interface is used for communication with the digital potentiometer.
[0006] Furthermore, the photosensitive element is a phototransistor.
[0007] Furthermore, the first communication interface is a CAN bus interface.
[0008] Furthermore, the second communication interface is an SPI interface.
[0009] Furthermore, the sliding end and high-voltage end of the digital potentiometer are connected to the second end of the photosensitive element, and the low-voltage end of the digital potentiometer is connected to the first end of the PTC thermistor.
[0010] Furthermore, both the digital potentiometer and the microcontroller are powered by a 5V power supply.
[0011] Technical effects:
[0012] This invention achieves consistency in the parameters of each light sensor product through automatic compensation and temperature compensation, thus meeting the vehicle manufacturer's requirement for automatic headlight switching on and off on each vehicle. Attached Figure Description
[0013] Figure 1 This is the circuit schematic diagram of this utility model. Detailed Implementation
[0014] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention and are mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. Components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0015] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0016] This utility model provides a vehicle light sensor circuit with automatic compensation function, which consists of MCU (microcontroller) U1, phototransistor Q1, digital potentiometer VR1, PTC thermistor TR1, etc.
[0017] In this embodiment, the digital potentiometer VR1 is powered by 5V, and pins 1, 7, and 8 are the sliding terminal, high voltage terminal, and low voltage terminal of the digital potentiometer, respectively; its control port adopts the SPI interface, and pins 5, 4, and 6 are the SDI pin, SCK pin, and CS pin, respectively.
[0018] Pin 1 (collector) of phototransistor Q1 is connected to a 5V power supply. Pin 2 (emitter) of phototransistor Q1 is connected to pin 1 (slider) and pin 8 (high voltage terminal) of digital potentiometer VR1. Pin 7 (low voltage terminal) of digital potentiometer VR1 is connected to pin 1 of PTC thermistor RT1. Pin 2 of PTC thermistor RT1 is connected to GND, forming a light detection circuit. When light shines on phototransistor Q1, current flows through the light detection circuit, and the voltage value at node VT between pin 2 of phototransistor Q1 and GND (hereinafter referred to as VT voltage value) changes. Different light intensities correspond to different VT voltage values. In specific applications, pins 1 and 7 of digital potentiometer VR1 can also be connected instead of node VT. Phototransistor is the preferred solution due to its small size and high sensitivity. In specific applications, the photosensitive element can also be a photoresistor, photodiode, etc.
[0019] In this embodiment, MCU U1 is powered by 5V and is equipped with an ADC pin, an SPI interface, and a CAN bus interface. MCU U1 acquires the VT voltage value through the ADC pin. After internally determining the light intensity, MCU U1 issues a command to turn the headlights on or off via the CAN bus interface. The SPI interface includes an SDI pin, an SCK pin, and a CS pin, which are connected to the SPI interface of the digital potentiometer VR1.
[0020] The automotive light sensor circuit uses a digital potentiometer VR1 to automatically compensate for the photocurrent (BIN) value of the product's photosensitive element. In a constant temperature and humidity environment, with a fixed light source, the VT voltage value of the sample is calibrated. During mass production, the host computer sends an automatic compensation command to the MCU U1 via the CAN bus. The MCU U1 then adjusts the resistance value of the digital potentiometer according to the VT voltage value, thereby adjusting the photocurrent in the path until the VT voltage value detected by the MCU U1 matches the VT voltage value of the sample. After automatic compensation is completed, the MCU U1 issues an automatic compensation completion command via the CAN bus.
[0021] SPI is a synchronous serial communication protocol characterized by high communication speed, simple protocol, and support for full-duplex communication. Using the SPI interface can simplify the programming and control of digital potentiometers by the MCU.
[0022] In practical applications, the vehicle control bus is not limited to the CAN bus, and the communication interface between the vehicle light sensor and the host computer is also not limited to the CAN bus.
[0023] The vehicle's light sensor circuit also uses a PTC thermistor RT1 to achieve automatic temperature compensation. Under the same light source, as the temperature rises, the photocurrent of the photosensitive element also increases. By adding a PTC thermistor RT1 in the photocurrent path, the resistance of the PTC thermistor will increase when the temperature rises, thereby reducing the current value in the path and achieving the effect of balancing the increase in photocurrent of the photosensitive element due to temperature rise.
[0024] This invention achieves consistency in the parameters of each light sensor product through automatic compensation and temperature compensation, thus meeting the vehicle manufacturer's requirement for automatic headlight switching on and off on each vehicle.
[0025] Although the present invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the present invention without departing from the spirit and scope of the present invention as defined in the appended claims, and all such changes shall be within the scope of protection of the present invention.
Claims
1. A vehicle light sensor circuit with automatic compensation function, characterized in that: The device includes a photosensitive element, a digital potentiometer, a PTC thermistor, and a microcontroller. The photosensitive element, the potentiometer of the digital potentiometer, and the PTC thermistor are connected in series between a power supply and ground to form a photoelectric path. The first end of the photosensitive element is connected to the power supply. The microcontroller includes an ADC pin, a first communication interface, and a second communication interface. The ADC pin of the microcontroller is connected to the second end of the photosensitive element. The first communication interface is used for communication with external devices, and the second communication interface is used for communication with the digital potentiometer.
2. The automotive light sensor circuit with automatic compensation function as described in claim 1, characterized in that: The photosensitive element is a phototransistor.
3. The automotive light sensor circuit with automatic compensation function as described in claim 1, characterized in that: The first communication interface is a CAN bus interface.
4. The automotive light sensor circuit with automatic compensation function as described in claim 1, characterized in that: The second communication interface is an SPI interface.
5. The automotive light sensor circuit with automatic compensation function as described in claim 1, characterized in that: The sliding end and high voltage end of the digital potentiometer are connected to the second end of the photosensitive element, and the low voltage end of the digital potentiometer is connected to the first end of the PTC thermistor.
6. The automotive light sensor circuit with automatic compensation function as described in claim 1, characterized in that: Both the digital potentiometer and the microcontroller are powered by a 5V power supply.