Method and system for controlling vehicle lamp, computer equipment and storage medium
By using the PWM signal of the target duty cycle determined in the LED control system of the vehicle lights, the open-circuit alarm problem caused by fluctuations in the output current and voltage of the LED driver chip is solved, and the stability and continuity of the light control are achieved.
Patent Information
- Application Number
- CN202510070316.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-04-01
AI Technical Summary
In the prior art, when controlling the LED of the vehicle lights through PWM signals, it may cause fluctuations in the driving current and voltage output by the LED driving chip, triggering an open circuit alarm, and causing adverse effects such as the control light pause.
By pre-testing the PWM signal that determines the appropriate target duty cycle, the signal is provided to the LED driver chip to ensure that the voltage difference between the output voltage and the input voltage is not less than the open-circuit alarm threshold during the period of controlling the LED group.
It effectively avoids the LED driver chip triggering the open alarm when controlling the LED group, ensuring the stability and continuity of the headlight control process.
Smart Images

Figure CN119743866A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a method, system, computer device and storage medium for controlling vehicle lights. Background Art
[0002] Currently, controlling a light emitting diode (LED) by a pulse width modulation (PWM) signal is widely used in controlling the LED of a vehicle lamp because the brightness of the LED can be precisely controlled.
[0003] In the related art, the duty cycle of the PWM signal for controlling the LED of the vehicle's headlights is determined based on the prior experience of vehicle engineers. When the LED corresponding to the corresponding channel of the LED driver chip is driven by the corresponding channel of the LED driver chip, that is, when the driving current is output to the LED corresponding to the corresponding channel of the LED driver chip, the driving current output by the LED driver chip may fluctuate, and the voltage output by the LED driver chip may fluctuate, resulting in the voltage difference between the output voltage of the corresponding channel of the LED driver chip and the input voltage of the LED driver chip being less than the open circuit alarm threshold, triggering an open circuit alarm, causing some adverse effects such as suspending the control of the LED of the headlights during the elimination alarm period. How to avoid triggering an open circuit alarm when controlling the LED of the headlights has become a problem that needs to be solved. Summary of the invention
[0004] In view of this, embodiments of the present application provide a method, system, computer device, and storage medium for controlling vehicle lights.
[0005] In a first aspect, an embodiment of the present application provides a method for controlling a vehicle light, the method comprising:
[0006] receiving a signal indicating that a target LED group of target lights on a vehicle needs to be controlled;
[0007] During the control of the target LED group, a target PWM signal having a target duty cycle for the target LED group is provided to the target LED driver chip on the vehicle, so that the target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal;
[0008] Among them, the target duty cycle is used to ensure that: when the target LED group is controlled according to the target PWM signal to output a driving current to the target LED group, the voltage difference between the output voltage of the target channel and the input voltage of the target LED driver chip is not less than the open circuit alarm threshold, and the target duty cycle is determined in advance from multiple candidate duty cycles through testing, and the test includes: determining whether the candidate duty cycle can make the channel corresponding to the LED group for test output a driving current to the LED group for test during the period when the LED driver chip for test controls the LED group for test according to the candidate duty cycle, the voltage difference between the output voltage of the channel corresponding to the LED group for test and the input voltage of the LED driver chip for test is not less than the open circuit alarm threshold.
[0009] In a possible implementation, the target LED group includes: a plurality of target LEDs connected in series, and the LED group for testing includes: a plurality of LEDs for testing connected in series.
[0010] In a possible implementation, each of the multiple target LEDs connected in series belongs to a different voltage classification, and each of the multiple LEDs for testing connected in series belongs to a different voltage classification.
[0011] In a possible implementation, receiving a signal indicating that a target LED group of a target lamp on a vehicle needs to be controlled includes:
[0012] Receiving, from a first CAN (Controller Area Network, CAN for short), a signal sent by a vehicle control module of the vehicle on the first CAN bus indicating that a target LED group of a target headlight on the vehicle needs to be controlled; and providing a target PWM signal having a target duty cycle for the target LED group to a target LED driver chip on the vehicle, comprising:
[0013] The target PWM signal is sent to the second CAN bus, so that the target LED driver chip receives the target PWM signal from the second CAN bus.
[0014] In one possible implementation, the magnitude of the driving current output to the target LED group during the period of controlling the target LED group according to the target PWM signal is determined according to the reference resistance of the target LED driver chip, wherein the reference resistance is an adjustable resistance, and the reference resistance is used to adjust the magnitude of the driving current output to the LED group.
[0015] In a possible implementation, the target vehicle light is a tail light of a vehicle.
[0016] In a second aspect, an embodiment of the present application provides a system for controlling a vehicle light, the system for controlling a vehicle light comprising: a vehicle light control unit, a target LED driver chip;
[0017] The vehicle light control unit is used to receive a signal indicating that a target LED group of a target vehicle light on the vehicle needs to be controlled; during the control of the target LED group, a target PWM signal having a target duty cycle for the target LED group is provided to a target LED driver chip on the vehicle, so that a target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal;
[0018] Among them, the target duty cycle is used to ensure that: when the target LED group is controlled according to the target PWM signal to output a driving current to the target LED group, the voltage difference between the output voltage of the target channel and the input voltage of the target LED driver chip is not less than the open circuit alarm threshold, and the target duty cycle is determined in advance from multiple candidate duty cycles through testing, and the test includes: determining whether the candidate duty cycle can make the channel corresponding to the LED group for test output a driving current to the LED group for test during the period when the LED driver chip for test controls the LED group for test according to the candidate duty cycle, the voltage difference between the output voltage of the channel corresponding to the LED group for test and the input voltage of the LED driver chip for test is not less than the open circuit alarm threshold.
[0019] In a possible implementation, the target LED group includes: a plurality of target LEDs connected in series, and the LED group for testing includes: a plurality of LEDs for testing connected in series.
[0020] In a possible implementation, each of the multiple target LEDs connected in series belongs to a different voltage classification, each of the multiple LEDs for testing connected in series belongs to a different voltage classification, the multiple target LEDs connected in series correspond one-to-one to the multiple LEDs for testing connected in series, and the target LEDs and the LEDs for testing corresponding to the target LEDs belong to the same voltage classification.
[0021] In one possible implementation, the headlight control unit is also used to receive a signal on the first CAN bus sent by the vehicle control module of the vehicle, indicating that a target LED group of target headlights on the vehicle needs to be controlled; and send the target PWM signal to the second CAN bus so that the target LED driver chip receives the target PWM signal from the second CAN bus.
[0022] In one possible implementation, the magnitude of the driving current output to the target LED group during the period of controlling the target LED group according to the target PWM signal is determined according to the reference resistance of the target LED driver chip, wherein the reference resistance is an adjustable resistance, and the reference resistance is used to adjust the magnitude of the driving current output to the LED group.
[0023] In a possible implementation, the target vehicle light is a tail light of a vehicle.
[0024] In a third aspect, an embodiment of the present application provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0025] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0026] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0027] The method for controlling a vehicle light provided in an embodiment of the present application provides a target PWM signal having a target duty cycle for the target LED group to a target LED driver chip on the vehicle during the control of the target LED group, and the target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal; wherein the target duty cycle is used to ensure that: when the drive current is output to the target LED group during the control of the target LED group, the voltage difference between the output voltage of the target channel and the input voltage of the target LED driver chip is not less than the open circuit alarm threshold, that is, the voltage difference is greater than or equal to the open circuit alarm threshold. wherein the target duty cycle is used to ensure that: when the drive current is output to the target LED group during the control of the target LED group according to the target PWM signal, the voltage difference between the output voltage of the target channel of the target LED driver chip corresponding to the target LED group and the input voltage of the target LED driver chip is not less than the open circuit alarm threshold. The principle that the target duty cycle is used to ensure that when the target LED group is controlled according to the target PWM signal, the voltage difference between the output voltage of the target channel of the target LED driver chip corresponding to the target LED group and the input voltage of the target LED driver chip is not less than the open circuit alarm threshold can be summarized as follows: the target duty cycle is used to ensure that when the target LED group is controlled, the target channel of the target LED driver chip corresponding to the target LED group outputs a stable drive current, which can ensure that the voltage output by the target channel of the target LED driver chip corresponding to the target LED group is stable, avoids spike fluctuations, and avoids the voltage difference between the output voltage of the target channel of the target LED driver chip corresponding to the target LED group and the input voltage of the target LED driver chip being less than the open circuit alarm threshold and triggering the open circuit alarm. Thus, it is ensured that the open circuit alarm will not be triggered during the control of the target LED group. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1 is a schematic diagram of an example of an LED group for controlling a headlight of a vehicle;
[0030] Figure 2 is a schematic diagram of a method for controlling a vehicle light provided in an embodiment of the present application;
[0031] Figure 3 This is a schematic diagram of an example of the pinout of the target LED driver chip;
[0032] Figure 4 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0034] In the related art, when a PWM signal having a duty cycle set according to prior experience is used to control the LED of a car light, when the PWM signal having a duty cycle set according to prior experience is in the ON state, that is, when the PWM signal having a duty cycle set according to prior experience is at a high level, using the PWM signal having a duty cycle set according to prior experience to control the LED of a car light may cause fluctuations in the driving current output by the corresponding channel of the LED driver chip. The fluctuations in the driving current output by the corresponding channel of the LED driver chip cause fluctuations in the output voltage of the corresponding channel of the LED driver chip, resulting in a spike fluctuation. The spike fluctuation is as follows: the output voltage with the largest peak in the waveform of the output voltage of the corresponding channel of the LED driver chip is the spike output voltage, and the peak output voltage is significantly greater than the average value of the voltage output by the corresponding channel of the LED driver chip during the period when the PWM signal having a duty cycle set according to prior experience is in the ON state. In addition, the large instantaneous power of the LED of the car light will also lower the input VIN voltage of the LED driver chip, and ultimately, cause the voltage difference between the peak output voltage of the corresponding channel output of the LED driver chip and the input voltage of the LED driver chip to be small, that is, the result of the input voltage of the LED driver chip minus the peak output voltage of the corresponding channel output of the LED driver chip is small, and the voltage difference between the output voltage of the corresponding channel of the LED and the input voltage of the LED driver chip is less than the open circuit alarm threshold, triggering the open circuit alarm.
[0035] In the method for controlling a vehicle lamp provided in the embodiment of the application, a PWM signal having a target duty cycle for a target LED group of a target vehicle lamp obtained by pre-testing is used to control a target LED group of a target vehicle lamp. The target LED group may be any LED group of a target vehicle lamp. Thus, for any LED group of a target vehicle lamp, it is ensured that an open circuit alarm will not be triggered during the control of the LED group.
[0036] In the method for controlling vehicle lights provided in an embodiment of the application, during the control of the target LED group, a target PWM signal having a target duty cycle for the target LED group is provided to a target LED driver chip on the vehicle, and a target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal having the target duty cycle for the target LED group; wherein the target duty cycle is used to ensure that: during the period when the target LED group is controlled according to the target PWM signal having the target duty cycle for the target LED group, when a driving current is output to the target LED group, a voltage difference between an output voltage of the target channel of the target LED driver chip corresponding to the target LED group and an input voltage of the target LED driver chip is not less than an open circuit alarm threshold. The target duty cycle is used to make the target channel of the target LED driver chip corresponding to the target LED group output a stable driving current when the driving current is output to the target LED group during the control of the target LED group, which can ensure that the voltage output by the target channel of the target LED driver chip corresponding to the target LED group is stable, avoiding the following spike fluctuations: the target channel output corresponding to the target LED group of the target LED driver chip is significantly greater than the average value of the voltage output by the target channel of the target LED driver chip corresponding to the target LED group during the period of outputting the driving current to the target LED group, that is, during the period of driving the target LED group. Thus, the following situation is avoided: when the driving current is output to the target LED group during the control of the target LED group, the voltage difference between the output voltage of the target channel of the target LED driver chip corresponding to the target LED group and the input voltage of the target LED driver chip is less than the open circuit alarm threshold and triggers the open circuit alarm. Ensure that the open circuit alarm will not be triggered when the driving current is output to the target LED group during the control of the target LED group. Ensure that the open circuit alarm will not be triggered during the control of the LED group.
[0037] refer to Figure 1 , which shows an example of an LED group for controlling the headlights of a vehicle.
[0038] In this example, the target vehicle light is a tail light. The module for executing the method for controlling vehicle lights provided in the embodiment of the present application is called a tail light driving control module (RCM).
[0039] When it is necessary to control the target LED group of the target headlight on the vehicle, the vehicle control module (CEM) sends a signal indicating that the target LED group of the target headlight on the vehicle needs to be controlled. The driving taillight control module receives the signal indicating that the target LED group of the target headlight on the vehicle needs to be controlled.
[0040] The driving taillight control module provides the target LED driver chip with an input voltage of the target LED driver chip. In other words, the driving taillight control module outputs the input voltage of the target LED driver chip to the target LED driver chip.
[0041] When it is necessary to control an LED group of a target headlight on a vehicle, the taillight control module is driven to send a target PWM signal with a target duty cycle for the LED group, and the LED driver chip receives the target PWM signal with a target duty cycle for the LED group through a pin for receiving the target PWM signal with a target duty cycle for the LED group.
[0042] The target LED driver chip includes the 1st channel, the 2nd channel, and the Nth channel. The 1st channel is connected to the 1st LED group, the 2nd channel is connected to the 2nd LED group, and the Nth channel is connected to the Nth LED group. The 1st channel is used to drive the 1st LED group. The 2nd channel is used to drive the 2nd LED group. The Nth channel is used to drive the Nth LED group.
[0043] refer to Figure 2 , which shows a flow chart of a method for controlling vehicle lights provided by an embodiment of the present application. The method is executed by a module on a vehicle for executing the method for controlling vehicle lights provided by an embodiment of the present application.
[0044] In step S201, a signal indicating that a target LED group of a target lamp on a vehicle needs to be controlled is received.
[0045] The target LED group may be any LED group of target headlights on the vehicle.
[0046] In a possible implementation, the target vehicle light is a tail light of a vehicle.
[0047] The target LED group includes: one or more LEDs.
[0048] It should be noted that an LED in the embodiment of the present application may specifically refer to an LED chip.
[0049] All LEDs of the target vehicle light are divided into one or more LED groups, and the target LED group can be any LED group of the target vehicle light.
[0050] In a possible implementation, the target LED group includes: 3 LEDs connected in series.
[0051] It should be noted that the same LED on a vehicle may be reused by multiple headlights of the vehicle.
[0052] The module on the vehicle for executing the method for controlling the vehicle lights provided in the embodiment of the present application determines the target LED group of the target vehicle lights on the vehicle that need to be controlled according to the control indication signal.
[0053] In one possible implementation of receiving a signal indicating that a target LED group of target lights on a vehicle needs to be controlled, a signal for sending a signal indicating that a target LED group of target lights on a vehicle needs to be controlled, for example, a vehicle controller on a vehicle sends a signal indicating that a target LED group of target lights on a vehicle needs to be controlled to a module for executing a method for controlling lights provided in an embodiment of the present application.
[0054] In another possible implementation of receiving a signal indicating that a target LED group of target lights on a vehicle needs to be controlled, the signal for sending the signal indicating that a target LED group of target lights on a vehicle needs to be controlled is, for example, a vehicle controller on the vehicle sends the signal indicating that a target LED group of target lights on the vehicle needs to be controlled to a first controller area network bus, and a module for executing the method for controlling lights provided in an embodiment of the present application receives a signal indicating that a target LED group of target lights on the vehicle needs to be controlled from the first CAN bus.
[0055] In step S202, during the control of the target LED group, a target PWM signal having a target duty cycle for the target LED group is provided to the target LED driver chip on the vehicle, so that the target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal.
[0056] In the embodiment of the present application, the target LED driver chip is a multi-channel LED driver chip. The target LED driver chip can be any type of LED driver chip that controls LEDs according to PWM signals.
[0057] Each channel of the target LED driver chip can be used to generate a driving current and output the driving current.
[0058] It should be noted that each channel of the target LED driver chip may be a circuit with the same structure. The target duty cycle of each LED group of the target vehicle may be the same duty cycle.
[0059] In one possible implementation of providing a target PWM signal having a target duty cycle for a target LED group to a target LED driver chip on a vehicle, a module for executing the method for controlling a vehicle light provided in an embodiment of the present application sends a target PWM signal having a target duty cycle for a target LED group to a target LED driver chip on the vehicle.
[0060] In another possible implementation of providing a target PWM signal having a target duty cycle for a target LED group to a target LED driver chip on a vehicle, a module for executing the method for controlling a vehicle lamp provided in an embodiment of the present application sends a target PWM signal having a target duty cycle for a target LED group to a second CAN bus, so that the target LED driver chip receives a target PWM signal having a target duty cycle for a target LED group from the second CAN bus. The second CAN bus may be a private CAN bus, and the target PWM signal having a target duty cycle for a target LED group may be a private CAN signal.
[0061] In a possible implementation method of controlling the target LED group according to a target PWM signal for a target duty cycle of the target LED group, the target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal for a target duty cycle of the target LED group, including: when the target PWM signal for the target duty cycle of the target LED group is at a high level, driving the target LED group through the target channel of the target LED driver chip corresponding to the target LED group, wherein driving the target LED group through the target channel of the target LED driver chip corresponding to the target LED group may include: outputting a driving current to the target LED group through an output pin corresponding to the target channel of the target LED driver chip corresponding to the target LED group, so that each LED in the target LED group is lit; when the target PWM signal for the target duty cycle of the target LED group is at a low level, the output pin corresponding to the target channel of the target LED driver chip corresponding to the target LED group does not output a driving current, and when the target PWM signal for the target duty cycle of the target LED group is at a low level, each LED in the target LED group is in an off state.
[0062] In an embodiment of the present application, the target duty cycle is used to ensure that: when a driving current is output to the target LED group during a period in which the target LED group is controlled according to a target PWM signal, a voltage difference between an output voltage of a target channel of a target LED driver chip corresponding to the target LED group and an input voltage of the target LED driver chip is not less than an open circuit alarm threshold.
[0063] It can also be said that the target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal with a target duty cycle for the target LED group, so that: during the period of outputting driving current to the target LED group within the period of controlling the target LED group according to the target PWM signal with a target duty cycle for the target LED group, the voltage difference between the output voltage of the target channel of the target LED driver chip corresponding to the target LED group and the input voltage of the target LED driver chip is not less than the open circuit alarm threshold value, thereby ensuring that the open circuit alarm is not triggered during the period of outputting driving current to the target LED group within the period of controlling the target LED group according to the target PWM signal with a target duty cycle for the target LED group.
[0064] It should be noted that the voltage difference between the output voltage of the target channel of the target LED driver chip corresponding to the target LED group and the input voltage of the target LED driver chip is: the input voltage of the target LED driver chip minus the output voltage of the target channel of the target LED driver chip corresponding to the target LED group, that is, the input voltage of the target LED driver chip - the output voltage of the target channel of the target LED driver chip corresponding to the target LED group. The input voltage of the target LED driver chip is recorded as VIN, the output voltage of the target channel of the target LED driver chip corresponding to the target LED group is recorded as VOUT, and the voltage difference between the output voltage of the target channel of the target LED driver chip corresponding to the target LED group and the input voltage of the target LED driver chip is recorded as VIN-VOUT.
[0065] Among them, the voltage difference between the output voltage of the target channel of the target LED driver chip corresponding to the target LED group and the input voltage of the target LED driver chip can be called the minimum voltage value of the target channel of the target LED driver chip corresponding to the target LED group.
[0066] It should be noted that the period during which the target LED group is controlled according to the target PWM signal for the target duty cycle of the target LED group can be divided into two sub-periods, namely, a period during which the drive current is output to the target LED group and a period during which the drive current is not output to the target LED group. The period during which the drive current is output to the target LED group can refer to: a period during which the target PWM signal for the target duty cycle of the target LED group is at a high level within the period during which the target LED group is controlled according to the target PWM signal for the target duty cycle of the target LED group, and a period during which the drive current is not output to the target LED group can refer to: a period during which the target PWM signal for the target duty cycle of the target LED group is at a low level within the period during which the target LED group is controlled according to the target PWM signal for the target duty cycle of the target LED group
[0067] In one possible implementation, when a target PWM signal with a target duty cycle for a target LED group controls the target LED group to output a driving current to the target LED group, a voltage difference between an output voltage of a target channel of a target LED driver chip corresponding to the target LED group and an input voltage of the target LED driver chip is greater than 0.7V.
[0068] In the embodiment of the present application, the target duty cycle is determined in advance from a plurality of candidate duty cycles through testing.
[0069] The test includes: determining whether the candidate duty cycle can make the voltage difference between the output voltage of the channel corresponding to the LED group for test and the input voltage of the LED driver chip for test be no less than the open circuit alarm threshold value during the period when the channel of the LED driver chip corresponding to the LED group for test controls the LED group for test according to the candidate duty cycle to output a driving current to the LED group for test.
[0070] It should be noted that the model of the LED driver chip used for testing is the same as the model of the target LED driver chip.
[0071] Among them, the input voltage of the LED driver chip for testing specifically refers to: the voltage input to the LED driver chip for testing during the period when the channel of the LED driver chip for testing corresponding to the LED group for testing controls the LED group for testing according to the candidate duty cycle.
[0072] It should be noted that the number of LEDs in the LED group used for testing is the same as the number of LEDs in the target LED group.
[0073] The LEDs in the LED group for testing correspond to the LEDs in the target LED group one by one. For a target LED corresponding to a LED for testing in the LED group for testing, the model of the LED for testing is the same as the model of the target LED.
[0074] In one possible implementation of the test, during the test, a plurality of first candidate duty ratios are sampled from a total duty ratio interval of the PWM signal, for example, a plurality of first candidate duty ratios are sampled in a uniform sampling manner. The total duty ratio interval is pre-set by a vehicle engineer. It is determined whether there is a first candidate duty ratio among the plurality of first candidate duty ratios that can be used as a target duty ratio for a target LED group.
[0075] Determining whether there is a first candidate duty cycle that can be used as a target duty cycle among multiple first candidate duty cycles includes: for each first candidate duty cycle, determining whether the first candidate duty cycle can make: when the channel corresponding to the LED group for test of the LED driver chip for test outputs a driving current to the LED group for test during the period when the channel corresponding to the LED group for test controls the LED group for test according to the first candidate duty cycle, the voltage difference between the output voltage of the channel corresponding to the LED group for test and the input voltage of the LED driver chip for test is not less than an open circuit alarm threshold; if so, determining the first candidate duty cycle as the first candidate duty cycle that can be used as the target duty cycle.
[0076] During the test, if it is determined that there is only one first candidate duty ratio that can be used as the target duty ratio, the first candidate duty ratio that can be used as the target duty ratio will be used as the target duty ratio. During the test, if it is determined that there are multiple first candidate duty ratios that can be used as the target duty ratio, one duty ratio can be randomly selected from the multiple first candidate duty ratios that can be used as the target duty ratio as the target duty ratio. During the test, if it is determined that there is no first candidate duty ratio that is the target duty ratio among the multiple first candidate duty ratios, the maximum output voltage corresponding to each of the multiple first candidate duty ratios is determined, wherein the maximum output voltage corresponding to the first candidate duty ratio is: during the period when the channel corresponding to the LED group for testing of the LED driver chip for testing controls the LED group for testing according to the first candidate duty ratio to output the driving current to the LED group for testing, the maximum output voltage output by the channel corresponding to the LED group for testing. The plurality of first candidate duty ratios are sorted from small to large according to the maximum output voltage corresponding to each duty ratio in the plurality of first candidate duty ratios, and after the sorting, the first two first candidate duty ratios are determined, and a plurality of second candidate duty ratios are sampled from intervals with each first candidate duty ratio in the first two first candidate duty ratios as an endpoint, and it is determined whether there is a second candidate duty ratio that can be used as the target duty ratio in the plurality of second candidate duty ratios.
[0077] During the test, the process of determining whether there is a second candidate duty cycle among multiple second candidate duty cycles that can serve as the target duty cycle is the same as the process of determining whether there is a first candidate duty cycle among multiple first candidate duty cycles that can serve as the target duty cycle.
[0078] During the test, if it is determined that there is only one second candidate duty ratio that can be used as the target duty ratio, the second candidate duty ratio that can be used as the target duty ratio is used as the target duty ratio. During the test, if it is determined that there are multiple second candidate duty ratios that can be used as the target duty ratio, a duty ratio can be randomly selected from the multiple second candidate duty ratios that can be used as the target duty ratio as the target duty ratio.
[0079] During the test, if it is determined that there is no first candidate duty ratio as the target duty ratio among the plurality of second candidate duty ratios, the maximum output voltage corresponding to each second candidate duty ratio among the plurality of second candidate duty ratios is determined, wherein the maximum output voltage corresponding to the second candidate duty ratio is: the maximum output voltage output by the channel corresponding to the LED group for testing during the period when the channel of the LED driver chip corresponding to the LED group for testing controls the LED group for testing according to the second candidate duty ratio to output the driving current to the LED group for testing. The plurality of second candidate duty ratios are sorted from small to large according to the maximum output voltage corresponding to each duty ratio among the plurality of second candidate duty ratios, and after the sorting, the first two second candidate duty ratios are determined, and a plurality of third candidate duty ratios are sampled from the intervals with each second candidate duty ratio among the first two second candidate duty ratios as the endpoints. It is determined whether there is a third candidate duty ratio that can be the target duty ratio among the plurality of third candidate duty ratios.
[0080] And so on, until the target duty cycle is determined.
[0081] In a possible implementation, each of the multiple target LEDs connected in series belongs to a different voltage classification (BIN), each of the multiple LEDs for testing connected in series belongs to a different voltage classification, and the multiple target LEDs connected in series correspond to the multiple LEDs for testing connected in series one by one. For a target LED, the target LED and the LED for testing corresponding to the target LED belong to the same voltage classification.
[0082] LED voltage classification corresponds to a voltage range. For a voltage classification, the voltage applied to the LED of the voltage classification should be within the voltage range corresponding to the voltage classification.
[0083] As an example, the voltage classification is divided into: voltage classification A, voltage classification B, voltage classification C, and voltage classification D.
[0084] In the embodiment of the present application, each of the multiple target LEDs connected in series in the target LED group belongs to a different voltage classification, so that LEDs of different voltage classifications can be combined into an LED group, which can ensure that an open circuit alarm will not be triggered during the control of the LED group composed of LEDs of different voltage classifications. There is no restriction that only LEDs of a certain voltage classification can be selected to form an LED group in order to ensure that an open circuit alarm will not be triggered, thereby improving the flexibility of driving LEDs.
[0085] In a possible implementation, the target LED driver chip has a reference resistor, and the magnitude of the driving current output to the target LED group during the period of controlling the target LED group according to the target PWM signal is determined according to the reference resistor of the target LED driver chip, wherein the reference resistor of the target LED driver chip is an adjustable resistor, and the reference resistor is used to adjust the magnitude of the driving current output to the LED group. The magnitude of the driving current output to the target LED group during the period of controlling the target LED group according to the target PWM signal can be flexibly adjusted by adjusting the resistance value of the reference resistor.
[0086] As an example, the magnitude of the driving current output to the target LED group during the period when the target PWM signal controls the target LED group is:
[0087] Among them, V(REF) is the reference voltage of the target LED driver chip, R(REF) is the reference resistance of the target LED driver chip, K(REF) is the drive current adjustment coefficient, and the reference voltage and drive current adjustment coefficient of the target LED driver chip are inherent parameters of the target LED driver chip.
[0088] refer to Figure 3 , which is a schematic diagram showing an example of the pins of the target LED driver chip.
[0089] It should be noted that Figure 3 The pins of the target LED driver chip shown are exemplary. The method for controlling a vehicle light provided in the embodiment of the present application is applicable to any type of LED driver chip that controls an LED according to a PWM signal.
[0090] Figure 3 The TX pin and RX pin of the target LED driver chip for receiving the target PWM signal with the target duty cycle for the target LED group are shown. The module for executing the method for controlling the vehicle light provided in the embodiment of the present application sends the target PWM signal with the target duty cycle for the target LED group to the second CAN bus, and the target LED driver chip receives the target PWM signal with the target duty cycle for the target LED group from the second CAN bus through the TX and RX pins.
[0091] Figure 3 The input voltage pins of the target LED driver chip, namely two pins named supply, are shown. The voltage between the two supply pins of the target LED driver chip is the input voltage of the target LED driver chip.
[0092] Figure 3The target LED driver chip shows 11 output pins, namely, an output pin named OUT1, an output pin named OUT2, ..., an output pin named OUT11. The target LED driver chip includes a first channel, a second channel, ... an eleventh channel.
[0093] The 1st channel, the 2nd channel, and the 11th channel correspond to the 1st LED group, the 2nd LED group, and the Nth LED group, respectively. The output pin named OUT1, the output pin named OUT2, and the output pin named OUT11 correspond to the 1st channel, the 2nd channel, and the 11th channel, respectively. The output pin named OUT1, the output pin named OUT2, and the output pin named OUT11 are connected to the 1st LED group, the 2nd LED group, and the Nth LED group, respectively.
[0094] For example, when the target PWM signal for the target duty cycle of the first LED group is at a high level, the first LED group is driven by the first channel of the target LED driver chip corresponding to the first LED group. Driving the first LED group by the first channel of the target LED driver chip corresponding to the first LED group may include: outputting a driving current to the first LED group through an output pin named OUT1 corresponding to the first channel of the target LED driver chip corresponding to the first LED group, so that each LED in the first LED group is lit; when the target PWM signal for the target duty cycle of the first LED group is at a low level, the output pin named OUT1 corresponding to the first channel of the target LED driver chip corresponding to the first LED group does not output a driving current. When the target PWM signal for the target duty cycle of the first LED group is at a low level, each LED in the first LED group is in an off state.
[0095] Figure 3 The pin of the reference resistor of the target LED driver chip is shown, that is, the pin numbered 12 and named REF. The pin of the reference resistor is connected to the reference resistor of the target LED driver chip.
[0096] The embodiments of the present application provide a system for controlling vehicle lights. The system for controlling vehicle lights is used to implement the above embodiments and preferred implementations, and those that have been described will not be repeated. As used below, the term "unit" may be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0097] The system for controlling the car lights includes: a car light control unit, a target LED driver chip;
[0098] The vehicle light control unit is used to receive a signal indicating that a target LED group of a target vehicle light on the vehicle needs to be controlled; during the control of the target LED group, a target PWM signal having a target duty cycle for the target LED group is provided to a target LED driver chip on the vehicle, so that a target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal;
[0099] Among them, the target duty cycle is used to ensure that: when the target LED group is controlled according to the target PWM signal to output a driving current to the target LED group, the voltage difference between the output voltage of the target channel and the input voltage of the target LED driver chip is not less than the open circuit alarm threshold, and the target duty cycle is determined in advance from multiple candidate duty cycles through testing, and the test includes: determining whether the candidate duty cycle can make the channel corresponding to the LED group for test output a driving current to the LED group for test during the period when the LED driver chip for test controls the LED group for test according to the candidate duty cycle, the voltage difference between the output voltage of the channel corresponding to the LED group for test and the input voltage of the LED driver chip for test is not less than the open circuit alarm threshold.
[0100] In a possible implementation, the target LED group includes: a plurality of target LEDs connected in series, and the LED group for testing includes: a plurality of LEDs for testing connected in series.
[0101] In a possible implementation, each of the multiple target LEDs connected in series belongs to a different voltage classification, each of the multiple LEDs for testing connected in series belongs to a different voltage classification, the multiple target LEDs connected in series correspond one-to-one to the multiple LEDs for testing connected in series, and the target LEDs and the LEDs for testing corresponding to the target LEDs belong to the same voltage classification.
[0102] In one possible implementation, the headlight control unit is also used to receive a signal on the first CAN bus sent by the vehicle control module of the vehicle, indicating that a target LED group of target headlights on the vehicle needs to be controlled; and send the target PWM signal to the second CAN bus so that the target LED driver chip receives the target PWM signal from the second CAN bus.
[0103] In one possible implementation, the magnitude of the driving current output to the target LED group during the period of controlling the target LED group according to the target PWM signal is determined according to the reference resistance of the target LED driver chip, wherein the reference resistance is an adjustable resistance, and the reference resistance is used to adjust the magnitude of the driving current output to the LED group.
[0104] In a possible implementation, the target vehicle light is a tail light of a vehicle.
[0105] In this embodiment, the system is presented in the form of functional units, where the units refer to ASIC circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0106] The further functional description of each of the above units is the same as that of the above corresponding embodiments and will not be repeated here.
[0107] refer to Figure 4 , which shows a schematic diagram of the structure of a computer device provided in an embodiment of the present application. If the module for executing the method for controlling a vehicle light provided in an embodiment of the present application is software, the module for controlling a vehicle light can be run on the computer device provided in an embodiment of the present application. If the module for executing the method for controlling a vehicle light provided in an embodiment of the present application is hardware, the module for executing the method for controlling a vehicle light provided in an embodiment of the present application can include the computer device. The computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0108] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0109] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0110] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0111] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0112] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means.
[0113] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0114] The embodiment of the present application also provides a computer-readable storage medium. The above method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0115] A part of the embodiments of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can be called or provided through the operation of the computer. It should be understood by those skilled in the art that the existence of computer program instructions in a computer-readable medium includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which the computer program instructions are executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0116] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for controlling a vehicle light, characterized in that: The method comprises: receiving a signal indicating that a target light emitting diode LED group on a target vehicle light needs to be controlled; During the control of the target LED group, a target pulse width modulation (PWM) signal having a target duty cycle for the target LED group is provided to a target LED driver chip on the vehicle, so that a target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal; Among them, the target duty cycle is used to ensure that: when the target LED group is controlled according to the target PWM signal to output a driving current to the target LED group, the voltage difference between the output voltage of the target channel and the input voltage of the target LED driver chip is not less than the open circuit alarm threshold, and the target duty cycle is determined in advance from multiple candidate duty cycles through testing, and the test includes: determining whether the candidate duty cycle can make the channel corresponding to the LED group for test output a driving current to the LED group for test during the period when the LED driver chip for test controls the LED group for test according to the candidate duty cycle, the voltage difference between the output voltage of the channel corresponding to the LED group for test and the input voltage of the LED driver chip for test is not less than the open circuit alarm threshold.
2. The method according to claim 1, characterized in that The target LED group includes: a plurality of target LEDs connected in series, and the LED group for testing includes: a plurality of LEDs for testing connected in series.
3. The method according to claim 2, characterized in that Each of the multiple target LEDs connected in series belongs to a different voltage classification, each of the multiple LEDs for testing connected in series belongs to a different voltage classification, the multiple target LEDs connected in series correspond one to one to the multiple LEDs for testing connected in series, and the target LEDs and the LEDs for testing corresponding to the target LEDs belong to the same voltage classification.
4. The method according to claim 1, characterized in that: Receiving a signal indicating that a target LED group of target lights on a vehicle needs to be controlled includes: Receiving, from a first controller area network CAN bus, a signal sent by a vehicle control module of the vehicle on a first CAN bus indicating that a target LED group of a target headlight on the vehicle needs to be controlled; and providing a target PWM signal having a target duty cycle for the target LED group to a target LED driver chip on the vehicle comprises: The target PWM signal is sent to the second CAN bus, so that the target LED driver chip receives the target PWM signal from the second CAN bus.
5. The method according to claim 1, characterized in that During the period of controlling the target LED group according to the target PWM signal, the magnitude of the driving current output to the target LED group is determined according to the reference resistance of the target LED driver chip, wherein the reference resistance is an adjustable resistance, and the reference resistance is used to adjust the magnitude of the driving current output to the LED group.
6. The method according to any one of claims 1 to 5, characterized in that The target lights are the tail lights of the vehicle.
7. A system for controlling vehicle lights, characterized in that: The system comprises: a headlight control unit and a target LED driver chip; The vehicle light control unit is used to receive a signal indicating that a target LED group of a target vehicle light on the vehicle needs to be controlled; during the control of the target LED group, a target PWM signal having a target duty cycle for the target LED group is provided to a target LED driver chip on the vehicle, so that a target channel of the target LED driver chip corresponding to the target LED group controls the target LED group according to the target PWM signal; Among them, the target duty cycle is used to ensure that: when the target LED group is controlled according to the target PWM signal to output a driving current to the target LED group, the voltage difference between the output voltage of the target channel and the input voltage of the target LED driver chip is not less than the open circuit alarm threshold, and the target duty cycle is determined in advance from multiple candidate duty cycles through testing, and the test includes: determining whether the candidate duty cycle can make the channel corresponding to the LED group for test output a driving current to the LED group for test during the period when the LED driver chip for test controls the LED group for test according to the candidate duty cycle, the voltage difference between the output voltage of the channel corresponding to the LED group for test and the input voltage of the LED driver chip for test is not less than the open circuit alarm threshold.
8. A computer device installed in a vehicle, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 6.