Electrical parameter measuring circuit and measuring method for output signal of LED driver
By designing an electrical parameter measurement circuit for the LED driver output signal, the problem of inconvenient measurement of the LED driver output signal in the existing technology is solved, and efficient measurement of the DC constant current and PWM signal duty cycle is achieved, simplifying It simplifies the measurement process and supports automated judgment.
Patent Information
- Application Number
- CN202411082149.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-10-01
AI Technical Summary
The existing technology lacks electrical parameters specifically used to measure LED driver output signals, especially the DC constant current and the duty cycle of non-superimposed and superimposed PWM signals, resulting in inconvenient measurement.
An electrical parameter measurement circuit for the LED driver output signal is designed, including the measurement circuit input terminal, current sampling circuit, switching circuit, voltage dividing circuit, ADC acquisition circuit and microcontroller. By collecting and processing signals, the DC constant current is realized Measurement of current magnitude, non-superposition and superposition PWM signal duty cycle.
It realizes convenient and efficient measurement of various electrical parameters of the LED driver output signal, simplifies the measurement process, supports automated judgment, and ensures that the LED driver performance meets the design requirements.
Smart Images

Figure CN118731655A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to LED driver technology. Background Art
[0002] LED has the characteristics of small size, high brightness, rich color variety, pure chromaticity, low power consumption and long life. Therefore, it is widely used in the automotive field. For example, automobile headlights, fog lights, license plate lights, reversing lights, brake lights, turn signals, position lights, clearance lights, daytime running lights, etc. all use LED.
[0003] The function of the LED driver is to provide a constant current output signal, a PWM signal, etc. to the LED load to drive the LED load to work. Currently, there is no measurement circuit on the market that specifically measures the electrical parameters of the output signal of the LED driver. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide an electrical parameter measurement circuit for an LED driver output signal, which can measure various electrical parameters such as the DC constant current output by the LED driver, the duty cycle of the non-superimposed LED load brightness adjustment PWM signal of the LED driver, and the duty cycle of the superimposed LED load brightness adjustment PWM signal of the LED driver, and the circuit structure is simple and easy to implement.
[0005] Another technical problem to be solved by the present invention is to provide a method for measuring the duty cycle of a superimposed PWM signal.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0007] According to an embodiment of the present invention, an electrical parameter measurement circuit of an LED driver output signal includes a measurement circuit input terminal, a measurement circuit output terminal, a current sampling circuit, a switch circuit, a switch driving circuit, a voltage divider circuit, a first voltage follower, a second voltage follower, an ADC acquisition circuit, a level conversion circuit, a multiplexing circuit and a single-chip computer; the measurement circuit input terminal is used to connect to the signal output terminal of the LED driver, the measurement circuit input terminal is respectively connected to the input terminal of the voltage divider circuit and the first terminal of the current sampling circuit, the second terminal of the current sampling circuit is connected to the first conduction terminal of the switch circuit, the second conduction terminal of the switch circuit is connected to the measurement circuit output terminal, and the measurement circuit output terminal is used to connect to an LED load; the output terminal of the voltage divider circuit is connected to the input terminal of the first voltage follower, the output terminal of the current sampling circuit is connected to the input terminal of the first voltage follower, and the output terminal of the current sampling circuit is connected to the output terminal of the measurement circuit. The output end is respectively connected to the input end of the second voltage follower and the input end of the level conversion circuit; the analog signal input end of the ADC acquisition circuit is respectively connected to the output end of the first voltage follower and the output end of the second voltage follower, and the digital signal output end of the ADC acquisition circuit is connected to the single-chip microcomputer; the multiplexing circuit has multiple signal input ends, a signal output end and a control end; the output end of the level conversion circuit is connected to one of the signal input ends of the multiplexing circuit, the signal output end of the multiplexing circuit is connected to the single-chip microcomputer, and the level conversion circuit is used to convert the voltage output by the current sampling circuit into a voltage recognizable by the single-chip microcomputer; the single-chip microcomputer is respectively connected to the control end of the multiplexing circuit and the input end of the switch driving circuit, and the output end of the switch driving circuit is connected to the controlled end of the switch circuit.
[0008] According to the method for measuring the duty cycle of a superimposed PWM signal by an electrical parameter measurement circuit of an LED driver output signal according to an embodiment of the present invention, the superimposed PWM signal is formed by superimposing n PWM signals; n≥2, and the voltage amplitudes of the n PWM signals are different. The method is characterized in that the method comprises the following steps:
[0009] The single-chip microcomputer obtains data covering more than three cycles of the superimposed PWM signal from the ADC acquisition circuit, traverses the acquired data, finds the low-level starting data of the superimposed PWM signal, and then reads the data in sequence from the low-level starting data in the order in which the data is collected, until the quantization level corresponding to the data reaches the first set percentage of the second-order level, and each time a data is read, the first counter is incremented by 1 from zero, and the second counter is incremented by 1 from zero;
[0010] The single chip microcomputer starts from the first data whose quantization level exceeds the first set percentage of the second-order level, and reads the data in sequence according to the time sequence of the data acquisition, until the quantization level corresponding to the data reaches the second set percentage of the third-order level, and each time a data is read, the third counter is incremented by 1 from zero, and the first counter continues to be incremented by 1;
[0011] And so on, until the single chip starts from the first data whose quantization level exceeds the nth set percentage of the (n+1)th level, and reads the data in the order of the data acquisition time, until the quantization level corresponding to the data is less than the (n+1)th set percentage of the (n+1)th level, each time a data is read, the (n+1)th counter is incremented from zero, and the first counter continues to be incremented by 1;
[0012] The sum of the count values of the third counter to the (n+1)th counter is divided by the count value of the first counter to obtain the second-order level duty cycle of the superimposed PWM signal; the sum of the count values of the fourth counter to the (n+1)th counter is divided by the count value of the first counter to obtain the third-order level duty cycle of the superimposed PWM signal, and so on, until the count value of the (n+1)th counter is divided by the count value of the first counter to obtain the n+1th level duty cycle of the superimposed PWM signal;
[0013] Among them, the second-order level, the third-order level, ... (n+1)-order level are quantization levels corresponding to the voltage amplitudes of n PWM signals with voltage amplitudes from low to high.
[0014] After adopting the above technical solution, the present invention has at least the following advantages and characteristics:
[0015] 1. The measurement circuit of the embodiment of the present invention can measure the DC constant current output by the LED driver, the voltage drop of the LED load in the constant current loop, the duty cycle of the non-superimposed LED load brightness adjustment PWM signal of the LED driver, the duty cycle of the superimposed LED load brightness adjustment PWM signal of the LED driver, and other electrical parameter values, making the measurement work more convenient, efficient, and simple, and helping to realize automatic measurement and judge whether the working performance of the LED driver meets the design requirements;
[0016] 2. The overall circuit of the present invention is implemented on a PCBA board, which has a simple and compact structure and is easy to implement. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A principle block diagram of an electrical parameter measuring circuit of an LED driver output signal according to an embodiment of the present invention is shown.
[0018] Figure 2 A circuit schematic diagram of an electrical parameter measuring circuit for an LED driver output signal according to an embodiment of the present invention is shown.
[0019] Figure 3 A schematic diagram of a waveform of an ADC code value obtained by a single chip microcomputer from an ADC acquisition circuit in a specific implementation manner of the present invention is shown.
[0020] Figure 4A flow chart of a specific implementation of measuring the duty cycle of a superimposed PWM signal by an electrical parameter measuring circuit of an LED driver output signal according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0021] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] Figure 1 and Figure 2 The circuit principle of the electrical parameter measurement circuit of the LED driver output signal according to an embodiment of the present invention is shown. Figure 1 and Figure 2 The electrical parameter measuring circuit 100 of the output signal of the LED driver according to an embodiment of the present invention comprises a measuring circuit input terminal IN, a measuring circuit output terminal OUT, a current sampling circuit 1, a switch circuit 21, a switch driving circuit 22, a voltage dividing circuit 3, a first voltage follower 41, a second voltage follower 42, an ADC acquisition circuit 5, a level conversion circuit 6, a multiplexing circuit 7 and a single chip computer 8.
[0023] The input terminal IN of the measuring circuit is used to connect the signal output terminal of the LED driver 91 to be measured, and the input terminal IN of the measuring circuit is respectively connected to the input terminal of the voltage divider circuit 3 and the first terminal of the current sampling circuit 1, the second terminal of the current sampling circuit 1 is connected to the first conductive terminal of the switch circuit 21, the second conductive terminal of the switch circuit 21 is connected to the output terminal OUT of the measuring circuit, and the output terminal OUT of the measuring circuit is used to connect the LED load 92. The output terminal of the voltage divider circuit 3 is connected to the input terminal of the first voltage follower 41, and the output terminal of the current sampling circuit 1 is respectively connected to the input terminal of the second voltage follower 42 and the input terminal of the level conversion circuit 6.
[0024] The analog signal input end of the ADC acquisition circuit 5 is connected to the output end of the first voltage follower 41 and the output end of the second voltage follower 42 respectively, and the digital signal output end of the ADC acquisition circuit 5 is connected to the single chip computer 8. The voltage follower can prevent excessive transient voltage and current from interfering with and damaging the ADC acquisition circuit 5, and perform impedance conversion on the voltage signal loop output by the voltage divider circuit 3. Since the voltage follower has an extremely low output impedance (Ro≈0), it can improve the driving ability of the voltage after voltage division.
[0025] The multiplexing circuit 7 has a plurality of signal input terminals, a signal output terminal and a control terminal. The input terminal of the level conversion circuit 6 is connected to the output terminal of the current sampling circuit 1, the output terminal of the level conversion circuit 6 is connected to one of the signal input terminals of the multiplexing circuit 7, the signal output terminal of the multiplexing circuit 7 is connected to the single-chip computer 8, and the level conversion circuit 6 is used to convert the voltage output by the current sampling circuit 1 into a voltage recognizable by the single-chip computer 8.
[0026] The single chip microcomputer 8 is connected to the control end of the multiplexing circuit 7 and the input end of the switch driving circuit 22 respectively, and the output end of the switch driving circuit 22 is connected to the controlled end of the switch circuit 21 .
[0027] In this embodiment, the current sampling circuit 1 includes a sampling resistor Rs and a current detection amplifier chip U1. The first end and the second end of the sampling resistor Rs constitute the first end and the second end of the current sampling circuit 1 respectively. The first input end and the second input end of the current detection amplifier chip U1 are respectively connected to the first end and the second end of the sampling resistor Rs, and the output end of the current detection amplifier chip U1 constitutes the output end of the current sampling circuit 1. Optionally, the current detection amplifier chip U1 uses a current detection amplifier chip of model INA240A2DR produced by Texas Instruments, which can accurately measure the current without causing a large transient change in the output voltage and corresponding recovery ripple. The voltage divider circuit 3 includes a resistor R1 and a resistor R2, and the resistor R1 is connected in series with the resistor R2; the first end of the resistor R1 constitutes the input end of the voltage divider circuit 3, and the common point of the second end of the resistor R1 and the first end of the resistor R2 constitutes the output end of the voltage divider circuit 3, and the second end of the resistor R2 is grounded. The model of the first voltage follower 41 and the second voltage follower 42 is LMV321AIDBVR.
[0028] In this embodiment, the ADC acquisition circuit 5 uses an analog-to-digital converter of model ADS7953 produced by Texas Instruments, and the analog-to-digital converter and the single-chip computer 8 realize data interaction through the SPI bus. The sampling frequency of the analog-to-digital converter is 1MHz, and it has 16 analog signal input channels. After the four processes of sampling, holding, quantization and encoding, the binary coded data is transmitted to the register of the single-chip computer 8 through the SPI bus. The level conversion circuit 6 uses an analog comparator of model TLV3201AIDBVT produced by Texas Instruments. The first input end of the comparator is connected to the output end of the current sampling circuit 1, the second input end of the comparator is connected to the reference voltage, and the output end of the comparator is connected to one of the signal input ends of the multiplexing circuit 7; the comparator is used to output a high-level signal when the output voltage of the current sampling circuit 1 is greater than the reference voltage, and output a low-level signal when the output voltage of the current sampling circuit 1 is less than the reference voltage. The multiplexing circuit 7 uses a multiplexing switch of model ADG706BRUZ produced by Analog Devices. In some specific implementations, the reference voltage is 0.3V, the low level is 0V, and the high level is 3.3V.
[0029] In this embodiment, the switch circuit 21 is an NMOS tube, and the gate, drain and source of the NMOS tube respectively constitute the controlled end, the first conduction end and the second conduction end of the switch circuit 21; the switch drive circuit 22 is an NMOS tube drive circuit. The NMOS tube drive circuit 22 uses a transistor array driver chip of model TBD62083AFWG produced by Toshiba. The single-chip computer 8 uses an embedded microcontroller of model STM32F427VGT6 produced by ST.
[0030] When the measuring circuit of this embodiment is used to measure the electrical parameters of the output signal of the LED driver 91, the measuring circuit input terminal IN is connected to the signal output terminal of the LED driver 91, the measuring circuit output terminal OUT is connected to the signal input terminal of the LED load 92, and the brightness adjustment terminal SL of the LED driver 91 is connected to the load loop terminal of the LED load 92. Depending on the model, the LED driver 91 has one or more brightness adjustment terminals SL, and the LED load 92 is provided with the same number of load loop terminals. Figure 2 In the example, the LED load 92 includes two groups of LED light strings connected in series, the output terminal OUT of the measuring circuit is connected to the anode of the group of LED light strings at the head end, and the cathode of the group of LED light strings at the end is grounded, and the LED driver 91 has a brightness adjustment terminal SL, which is connected to the common node P1 of the two groups of LED light strings (that is, the load loop end of the LED load 92), and a switch S1 is provided on the connection path between the brightness adjustment terminal SL and the common node P1.
[0031] When measuring the DC constant current output by the LED driver and the voltage drop value of the LED load in the constant current loop, the signal output end of the LED driver 91 outputs a DC constant current (at this time, the PWM modulation circuits Q2 and Q3 inside the LED driver are not modulated, and the switch S1 is disconnected). At this time, the single-chip computer 8 controls the switch circuit 21 (NMOS tube) to be turned on through the switch drive circuit 22, and controls the multiplexing circuit 7 to be turned off (even if the signal input end of the multiplexing circuit 7 is not connected to the signal output end), and the constant current output by the LED driver 91 flows into the LED load 92 (grounded through the entire LED light string) through the sampling resistor Rs. The current detection amplifier chip INA240A2DR amplifies the voltage difference generated by the sampling resistor Rs through the internal operational amplifier and outputs a voltage with a fixed gain value. The voltage signal is input into the analog-to-digital conversion channel of the ADC acquisition circuit 5 (i.e., as a current source for measurement) after passing through the second voltage follower 42. The voltage drop generated by the LED load 92 (i.e., the voltage value at the first end of the sampling resistor Rs) is divided by the voltage divider circuit 3 and output to the first voltage follower 41, and then output to the analog-to-digital conversion channel of the ADC acquisition circuit 5 (i.e., as a voltage source for measurement) through the first voltage follower 41. The above-mentioned current source and voltage source are sampled, held, quantized, and encoded internally by the analog-to-digital converter ADS7953, and the converted 12-bit ADC code value is stored in the associated register, and then the data is transmitted to the single-chip microcomputer 8 through its peripheral SPI serial data bus. The single-chip microcomputer 8 obtains the constant current value output by the LED driver and the voltage drop value of the LED load according to the transmitted ADC code value. In other embodiments, the single-chip microcomputer 8 can also obtain 500 or more data in a continuous time period, and calculate the average value after accumulation as the constant current output by the LED driver and the voltage drop value of the LED load.
[0032] When measuring the duty cycle of the non-superimposed LED load brightness adjustment PWM signal of the LED driver, the PWM modulation circuit Q3 inside the LED driver does not work, the switch S1 is disconnected, and the signal output end of the LED driver 91 outputs a constant current with a certain duty cycle (the duty cycle is the duty cycle of the non-superimposed LED load brightness adjustment PWM signal) modulated by the PWM modulation circuit Q2 inside the LED driver; at this time, the single-chip microcomputer 8 controls the switch circuit 21 (NMOS tube) to turn on through the switch drive circuit 22, and controls the multiplexing circuit 7 to work at the same time, and the current output by the LED driver 91 flows into the LED load 92 (through the entire LED lamp series connection) through the sampling resistor Rs. The current detection amplifier chip INA240A2DR amplifies the voltage difference generated by the sampling resistor Rs through the internal operational amplifier, and outputs a voltage signal with a fixed gain value. The signal is divided into two paths. One path passes through the second voltage follower 42 and is input into the analog-to-digital conversion channel of the ADC acquisition circuit 5 (because the signal of the duty cycle of the measured PWM signal is finally introduced into the single-chip microcomputer for measurement and processing through the multiplexing switch, the output signal of the ADC acquisition circuit 5 is ignored), and the other path is converted into a PWM signal with a voltage amplitude of 3.3V at the same frequency by the level conversion circuit 6, and the signal flows into the multiplexing circuit 7 (that is, the non-superimposed ordinary PWM signal source for measurement). The PWM signal output by the multiplexing circuit 7 enters the PWM acquisition port of the single-chip microcomputer 8. The single-chip microcomputer 8 obtains the pulse width and period of the PWM signal by the timer timing, and then the duty cycle of the PWM signal can be obtained. The aforementioned timer timing method is a prior art, which means that when the single-chip microcomputer detects the rising edge of the PWM signal, the timer is triggered to work, and after detecting the falling edge of the PWM signal, the time between the rising edge and the falling edge (corresponding to the pulse width in the PWM signal) is recorded, and when the next rising edge of the PWM signal is detected, the duration of one cycle of the PWM signal is recorded. In a specific embodiment, the single-chip microcomputer 8 repeatedly collects more than 200 groups of data from the multiplexing circuit 7, and calculates the average value after accumulation as the cycle value and pulse width value of the PWM output by the LED driver.
[0033] When measuring the duty cycle of the LED driver's superimposed LED load brightness adjustment PWM signal, the signal output end of the LED driver 91 outputs a constant current with a certain duty cycle modulated by the PWM modulation circuit Q2 inside the LED driver, and the PWM modulation circuit Q3 inside the LED driver 91 also works (that is, the LED load brightness adjustment PWM signal of the PWM modulation circuit Q2 is superimposed on the LED load brightness adjustment PWM signal of the PWM modulation circuit Q3), and the switch S1 is closed. At this time, the single-chip computer 8 controls the switch circuit 21 (NMOS tube) to be turned on through the switch drive circuit 22, and controls the multiplexing circuit 7 to be turned off (even if the signal input end of the multiplexing circuit 7 is not connected to the signal output end). The current output by the LED driver 91 flows into the signal input end of the LED load 92 through the sampling resistor Rs, and flows into the brightness adjustment end SL of the LED driver 91 through the common node P1 of the first group of LED light strings and the second group of LED light strings. The voltage value at the first end of the sampling resistor Rs is divided by the voltage divider circuit 3 and output to the first voltage follower 41, and then output to the analog-to-digital conversion channel of the ADC acquisition circuit 5 through the first voltage follower 41. The single-chip microcomputer 8 continuously collects the ADC code value transmitted by the ADC acquisition circuit 5. The amount of data collected is determined according to the cycle of the superimposed PWM signal, and at least covers data of more than three cycles of the superimposed PWM signal. In some specific implementation methods, the amount of data collected is 600 groups. These data are stored in the memory inside the single-chip microcomputer 8.
[0034] Figure 3 FIG. 1 shows a waveform diagram of an ADC code value obtained by a single chip microcomputer from an ADC acquisition circuit in a specific embodiment of the present invention. Figure 3 The numbers on the horizontal axis represent the data volume, and the numbers on the vertical axis represent the quantization level of the ADC code value. A flow chart of a specific implementation method of the single chip microcomputer 8 measuring the duty cycle of the superimposed PWM signal using the acquired ADC code value (data) is shown in FIG. Figure 4 In this embodiment, the number of quantization bits is 12 bits, and the full scale of the ADC signal is 0-5V.
[0035] refer to Figure 4 The single chip microcomputer 8 traverses the acquired data and first finds the low level starting data of the superimposed PWM signal, such as Figure 3 To find the starting data of the low level, the data with the maximum quantization level can be found first, and the first data with the minimum quantization level adjacent to the data with the maximum quantization level is considered as the starting data of the low level.
[0036] Then, the single chip microcomputer 8 starts to read the data in the order of the time when the data is collected, starting from the low level starting data, until the quantization level corresponding to the data reaches 75% of the second-order level. Each time a data is read, the first counter (counter A) is incremented from zero, and the second counter (counter B) is incremented from zero. The second-order level is as follows: Figure 3 The position indicated by the arrow A2 is the quantization level corresponding to the voltage amplitude of the PWM signal with the smallest voltage amplitude in the superimposed PWM signal (in this embodiment, it is the PWM signal output by the PWM modulation circuit Q2), 75% is the preset first percentage, and the low level is the first-order level.
[0037] After that, the single chip computer 8 starts from the first data whose quantization level exceeds 75% of the second-order level, and reads the data in the order in which the data are collected, until the quantization level corresponding to the data reaches 75% of the third-order level. Each time a data is read, the third counter (counter C) is incremented from zero, and the first counter (counter A) continues to be incremented; the third-order level is as follows: Figure 3 The position indicated by the arrow A3 is the quantization level corresponding to the voltage amplitude of the PWM signal with the largest voltage amplitude in the superimposed PWM signal (in this embodiment, the PWM signal output by the PWM modulation circuit Q3), where 75% is the preset second percentage.
[0038] Next, the single-chip computer 8 starts from the first data whose quantization level exceeds 75% of the third-order level, and reads the data in sequence according to the time sequence in which the data are collected, until the quantization level corresponding to the data is less than 60% of the third-order level. Each time a data is read, the fourth counter (counter D) is incremented by 1 from zero, and the first counter (counter A) continues to be incremented by 1; in this way, the data traversal of one cycle of the superimposed PWM signal is completed.
[0039] The count value of counter A is the amount of data in one cycle of the superimposed PWM signal, the count value of counter B is the amount of data of the first-order level (low level) in one cycle of the superimposed PWM signal, the count value of counter C is the amount of data of the second-order level in one cycle of the superimposed PWM signal, and the count value of counter D is the amount of data of the third-order level in one cycle of the superimposed PWM signal. The sum of the count values of the third counter and the fourth counter is divided by the count value of the first counter to obtain the second-order (such as Figure 3 The sum of the count values of the fourth counter divided by the count value of the first counter gives the third order (such as Figure 3 The time t of each step is equal to the corresponding counter value multiplied by 37us, and 37us is the time for the single chip microcomputer 8 and the ADC acquisition circuit 5 to transmit one data.
[0040] The superimposed PWM signal in the above-mentioned implementation mode is a PWM signal formed by superimposing two PWM signals (n=2). If it is a PWM signal formed by superimposing three PWM signals (n=3), then five counters with four levels are required, and so on.
[0041] In summary, the superimposed PWM signal is formed by superimposing n PWM signals; n ≥ 2, and the voltage amplitudes of the n PWM signals are different. Then, the method for measuring the duty cycle of the superimposed PWM signal by the electrical parameter measurement circuit of the LED driver output signal includes the following steps:
[0042] The single-chip microcomputer obtains data covering more than three cycles of the superimposed PWM signal from the ADC acquisition circuit, traverses the acquired data, finds the low-level starting data of the superimposed PWM signal, and then reads the data in sequence from the low-level starting data in the order in which the data is collected, until the quantization level corresponding to the data reaches the first set percentage of the second-order level, and each time a data is read, the first counter is incremented by 1 from zero, and the second counter is incremented by 1 from zero;
[0043] The single chip microcomputer starts from the first data whose quantization level exceeds the first set percentage of the second-order level, and reads the data in sequence according to the time sequence of the data acquisition, until the quantization level corresponding to the data reaches the second set percentage of the third-order level, and each time a data is read, the third counter is incremented by 1 from zero, and the first counter continues to be incremented by 1;
[0044] And so on, until the single chip starts from the first data whose quantization level exceeds the nth set percentage of the (n+1)th level, and reads the data in the order of the data acquisition time, until the quantization level corresponding to the data is less than the (n+1)th set percentage of the (n+1)th level, each time a data is read, the (n+1)th counter is incremented from zero, and the first counter continues to be incremented by 1;
[0045] The sum of the count values of the third counter to the (n+1)th counter is divided by the count value of the first counter to obtain the second-order level duty cycle of the superimposed PWM signal, the sum of the count values of the fourth counter to the (n+1)th counter is divided by the count value of the first counter to obtain the third-order level duty cycle of the superimposed PWM signal, and so on, until the count value of the (n+1)th counter is divided by the count value of the first counter to obtain the n+1th level duty cycle of the superimposed PWM signal;
[0046] The second-order level, the third-order level, ... the (n+1)-order level are quantization levels corresponding to the voltage amplitudes of n PWM signals with voltage amplitudes from low to high.
[0047] The second-order level corresponds to the voltage amplitude of the PWM signal with the smallest voltage amplitude in the superimposed PWM signals, the third-order level corresponds to the voltage amplitude of the PWM signal with the second smallest voltage amplitude in the superimposed PWM signals, and so on. The (n+1)-order level corresponds to the voltage amplitude of the PWM signal with the largest voltage amplitude in the superimposed PWM signals.
[0048] The measurement circuit of the embodiment of the present invention can measure various electrical parameter values such as the DC constant current value output by the LED driver, the voltage drop value of the LED load in the constant current loop, the duty cycle of the LED load brightness adjustment PWM signal of the LED driver, and the duty cycle of the superimposed LED load brightness adjustment PWM signal of the LED driver, making the measurement work more convenient, efficient and simple, and helping to realize automated measurement and judge whether the working performance of the LED driver meets the design requirements.
Claims
1. The electrical parameter measurement circuit of the LED driver output signal is characterized by: It includes a measurement circuit input terminal, a measurement circuit output terminal, a current sampling circuit, a switch circuit, a switch driving circuit, a voltage divider circuit, a first voltage follower, a second voltage follower, an ADC acquisition circuit, a level conversion circuit, a multiplexing circuit and a single chip microcomputer; The input end of the measurement circuit is used to connect to the signal output end of the LED driver. The input end of the measurement circuit is respectively connected to the input end of the voltage divider circuit and the first end of the current sampling circuit. The second end of the current sampling circuit is connected to the first conductive end of the switch circuit. The second conductive end of the switch circuit is connected to the output end of the measurement circuit. The output end of the measurement circuit is used to connect to the LED load. The output end of the voltage divider circuit is connected to the input end of the first voltage follower. The output end of the current sampling circuit is respectively connected to the input end of the second voltage follower and the input end of the level conversion circuit. The analog signal input end of the ADC acquisition circuit is connected to the output end of the first voltage follower and the output end of the second voltage follower respectively, and the digital signal output end of the ADC acquisition circuit is connected to the single chip microcomputer; The multiplexing circuit has a plurality of signal input terminals, a signal output terminal, and a control terminal; the output terminal of the level conversion circuit is connected to one of the signal input terminals of the multiplexing circuit, and the signal output terminal of the multiplexing circuit is connected to the single-chip microcomputer; the level conversion circuit is used to convert the voltage output by the current sampling circuit into a voltage recognizable by the single-chip microcomputer; The single chip microcomputer is connected to the control end of the multiplexing circuit and the input end of the switch driving circuit respectively, and the output end of the switch driving circuit is connected to the controlled end of the switch circuit.
2. The electrical parameter measurement circuit of the LED driver output signal according to claim 1, wherein: The current sampling circuit includes a sampling resistor and a current detection amplifier chip; The first end and the second end of the sampling resistor constitute the first end and the second end of the current sampling circuit respectively; The first input terminal and the second input terminal of the current detection amplifier chip are respectively connected to the first terminal and the second terminal of the sampling resistor, and the output terminal of the current detection amplifier chip constitutes the output terminal of the current sampling circuit.
3. The electrical parameter measurement circuit of the LED driver output signal according to claim 2, wherein: The current detection amplifier chip is a current detection amplifier chip of model INA240A2DR produced by Texas Instruments.
4. The electrical parameter measurement circuit of the LED driver output signal according to claim 1, wherein: The voltage divider circuit includes a resistor R1 and a resistor R2, and the resistor R1 and the resistor R2 are connected in series; the first end of the resistor R1 constitutes the input end of the voltage divider circuit, the common connection point of the second end of the resistor R1 and the first end of the resistor R2 constitutes the output end of the voltage divider circuit, and the second end of the resistor R2 is grounded.
5. The electrical parameter measurement circuit of the LED driver according to claim 1, wherein: The models of the first voltage follower and the second voltage follower are both LMV321AIDBVR.
6. The electrical parameter measurement circuit of the LED driver output signal according to claim 1, wherein: The ADC acquisition circuit uses an analog-to-digital converter model ADS7953 produced by Texas Instruments.
7. The electrical parameter measurement circuit of the LED driver output signal according to claim 1, wherein: The switching circuit is an NMOS transistor, and the gate, drain and source of the NMOS transistor respectively constitute the controlled end, the first conducting end and the second conducting end of the switching circuit; The switch driving circuit is an NMOS tube driving circuit.
8. The electrical parameter measurement circuit of the LED driver output signal according to claim 1, wherein: The level conversion circuit includes a comparator, a first input terminal of the comparator is connected to the output terminal of the current sampling circuit, a second input terminal of the comparator is connected to a reference voltage, and an output terminal of the comparator is connected to one of the signal input terminals of the multiplexing circuit; the comparator is configured to output a high-level signal when the output voltage of the current sampling circuit is greater than the reference voltage, and output a low-level signal when the output voltage of the current sampling circuit is less than the reference voltage.
9. The electrical parameter measurement circuit of the LED driver output signal according to claim 1, wherein: The multiplexing circuit uses a multiplexing switch of model ADG706BRUZ produced by Analog Devices.
10. The method for measuring the duty cycle of a superimposed PWM signal by an electrical parameter measurement circuit of an LED driver output signal according to claim 1, wherein the superimposed PWM signal is formed by superimposing n PWM signals; n ≥ 2, and the voltage amplitudes of the n PWM signals are different, characterized in that: The method comprises the following steps: The single-chip microcomputer obtains data covering more than three cycles of the superimposed PWM signal from the ADC acquisition circuit, traverses the obtained data, finds the low-level starting data of the superimposed PWM signal, and then reads the data in sequence starting from the low-level starting data in the order in which the data was acquired until the quantization level corresponding to the data reaches the first set percentage of the second-order level. Each time a data is read, the first counter is incremented by 1 from zero, and the second counter is incremented by 1 from zero. The single-chip microcomputer starts reading data from the first data whose quantization level exceeds the first set percentage of the second-order level, and reads data in sequence according to the time sequence of the data acquisition until the quantization level corresponding to the data reaches the second set percentage of the third-order level. Each time a data is read, the third counter is incremented by 1 from zero, and the first counter continues to be incremented by 1. The same process is repeated until the microcontroller starts reading data from the first data whose quantization level exceeds the nth set percentage of the (n+1)-order level, and reads data in the order in which the data are collected, until the quantization level corresponding to the data is less than the (n+1)th set percentage of the (n+1)-order level. Each time a data is read, the (n+1)th counter is incremented from zero, and the first counter continues to increment by 1. The second-order level duty cycle of the superimposed PWM signal is obtained by dividing the sum of the count values of the third counter to the (n+1)th counter by the count value of the first counter; the third-order level duty cycle of the superimposed PWM signal is obtained by dividing the sum of the count values of the fourth counter to the (n+1)th counter by the count value of the first counter, and so on, until the n+1th level duty cycle of the superimposed PWM signal is obtained by dividing the count value of the (n+1)th counter by the count value of the first counter; The second-order level, the third-order level, ..., the (n+1)-order level are quantization levels corresponding to the voltage amplitudes of n PWM signals with voltage amplitudes from low to high.
Citation Information
Patent Citations
Combined intelligent universal meter
CN103245814A
Improved silicon controlled LED dimming drive circuit
CN105163416A
USB based standard frequency signal generation and test system and work method thereof
CN109286448A
LED drive control circuit, LED drive control method and LED drive system
CN114364091A
Constant-voltage LED driving power supply load detection circuit with DALI function and detection method
CN115226274A
