A detection circuit and detection method for the voltage and current of a light source
Through the light source voltage and current detection circuit, three-core wires are used to connect the light source controller to accurately detect the light source voltage and current and output the corresponding voltage and current, solving the problems of large light source volume and difficulty in wiring, and achieving the expansion of the scope of application of the light source controller and improving the wiring efficiency.
Patent Information
- Application Number
- CN202011641843.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2040-12-31
AI Technical Summary
In the prior art, the voltage and current diversity of the light source leads to the need for multiple light source controllers, resulting in the larger diameter of the light source line, the larger outlet, and the greater difficulty of field wiring.
The light source voltage and current detection circuit is adopted, including the light source controller, the main control module, the parameter resistance identification module and the light source driving module. The light source is connected through the three-core wire, and the parameter resistance identification module and the light source driving module are used to accurately detect the voltage and current of the light source under the control of the main control module, and output the corresponding voltage and current.
The light source volume is reduced, the wiring efficiency is improved, the light source controller is expanded, the light source wire is simplified, and the normal and efficient operation of the LED module is ensured.
Smart Images

Figure CN112763786B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of semiconductor integrated circuits, and particularly relates to a detection circuit and a detection method for the voltage and current of a light source. Background Art
[0002] A light source is a core component in the machine vision industry. With the development of the machine vision industry, people's requirements for the light sources in machine vision devices have become increasingly high. At the same time, the voltages and currents of the light sources have also become diverse. Therefore, due to the diversity of the voltages and currents of the light sources, the types of light source controllers have also become more and more, such that multiple light source controllers are required to meet the needs of light sources with multiple different voltages and currents.
[0003] The inventor found that in the prior art, in order to simultaneously and automatically identify the voltage and current of a light source, in many cases, multiple sensor devices need to be placed on the light source using multi-core wires. This not only causes the diameter of the light source wire to increase and the outlet of the light source wire to become larger, but also affects the volume of the light source and increases the difficulty of on-site wiring.
[0004] Therefore, there is an urgent need to propose a new detection circuit and detection method to solve the above problems. Summary of the Invention
[0005] One of the purposes of the present invention is: aiming at the deficiencies of the prior art, to provide a detection circuit for the voltage and current of a light source, which can accurately detect the voltage and current of the light source, and can accurately output corresponding voltage and current according to the detected voltage and current. It can not only effectively reduce the volume of the light source, but also effectively improve the wiring efficiency, and has the advantages of simplifying the light source wire and expanding the applicable range of the light source controller.
[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions:
[0007] A detection circuit for the voltage and current of a light source, comprising a light source controller, a light source and a three-core wire. The light source controller is provided with a main control module, a parameter resistor identification module and a light source driving module. The parameter resistor identification module and the light source driving module are both electrically connected to the main control module. The light source includes a parameter resistor and an LED module. The parameter resistor is electrically connected to the LED module. The three-core wire is provided with a RES terminal, an LED + terminal and an LED - terminal. The LED + terminal is used to provide the positive electrode of the electrical energy to the LED module, and the LED - terminal is used to provide the negative electrode of the electrical energy to the LED module. One end of the parameter resistor and the parameter resistor identification module are both connected to the RES terminal. The other end of the parameter resistor, the parameter resistor identification module, the light source driving module and the LED module are all connected to the LED + terminal. The light source driving module and the LED module are both connected to the LED - terminal.
[0008] Further, the main control module is provided with a control unit, the control unit has a control chip and a control circuit connected to the control chip, and the parameter resistor identification module and the light source driving module are both electrically connected to the control unit.
[0009] Further, the parameter resistor identification module includes a resistor voltage detection module and a constant current source module. The resistor voltage detection module is electrically connected to the control unit and the constant current source module respectively. One end of the parameter resistor, the resistor voltage detection module and the constant current source module are all connected to the RES terminal, and the other end of the parameter resistor and the resistor voltage detection module are both connected to the LED+ terminal.
[0010] Further, the resistor voltage detection module is provided with a first differential amplification unit. The first differential amplification unit has an operational amplifier and a differential amplification circuit connected to the operational amplifier. The first differential amplification unit is electrically connected to the control unit and the parameter resistor respectively.
[0011] Further, the light source driving module includes a voltage regulation module, a current regulation module and a light source voltage detection module. The voltage regulation module, the current regulation module and the light source voltage detection module are all electrically connected to the control unit and the LED module. The voltage regulation module, the light source voltage detection module and the LED module are all connected to the LED+ terminal, and the current regulation module, the light source voltage detection module and the LED module are all connected to the LED- terminal.
[0012] Further, the voltage regulation module is provided with a positive phase amplification unit. The positive phase amplification unit has an operational amplifier and a positive phase amplification circuit connected to the operational amplifier. The positive phase amplification unit is electrically connected to the control unit and the LED module respectively.
[0013] Further, the current regulation module is provided with a negative feedback constant current circuit. The control unit and the LED module are electrically connected to the negative feedback constant current circuit respectively.
[0014] Further, the light source voltage detection module is provided with a second differential amplification unit. The second differential amplification unit is electrically connected to the control unit and the LED module respectively.
[0015] Further, the resistance value of the parameter resistor is 0.8 KΩ to 1.2 KΩ, and its resistance value includes but is not limited to 0.9 KΩ, 1 KΩ and 1.1 KΩ.
[0016] The second object of the present invention is to provide a method for detecting the voltage and current of a light source, including the following steps:
[0017] S1. The main control module periodically reads the output voltage of the parameter resistor identification module to determine whether the light source is connected to the light source controller.
[0018] S2. The main control module calculates the resistance value R of the parameter resistor and the current I of the light source, and controls the output current of the light source drive module to also be I according to the current I of the light source.
[0019] S3. The main control module reads the output voltage Vout of the light source drive module and calculates the voltage V of the light source. The main control module makes the light source work in a safe voltage and current to obtain the detection result.
[0020] Further, S3 further includes that after the detection is completed, when the main control module periodically reads that the output voltage of the parameter resistor identification module is zero, the main control module controls the light source drive module to output a constant standby voltage Vsb and a constant standby current Isb.
[0021] The beneficial effects of the present invention are as follows: 1) The light source controller of the present invention is connected to the light source through a three-core wire, and can accurately detect the voltage and current of the light source, and accurately output the corresponding voltage and current according to the detected voltage and current, significantly increasing the applicable range of the controller; 2) The parameter resistor identification module and the light source drive module of the present invention are both electrically connected to the main control module. The parameter resistor is electrically connected to the parameter resistor identification module and the LED module respectively, and the LED module is electrically connected to the light source drive module. Under the control of the main control module, the parameter resistor identification module can detect and identify the voltage value of the parameter resistor of the light source, so as to effectively determine the connection situation of the light source; 5) The light source drive module is used to detect and adjust the voltage and current of the light source, which can ensure the normal and efficient operation of the LED module, and make the detection circuit have the advantages of high controllability and high safety. Description of the Drawings
[0022] Figure 1 It is the schematic diagram of the detection circuit of the present invention.
[0023] Figure 2 It is the circuit schematic diagram of the main control module of the present invention.
[0024] Figure 3 It is the circuit schematic diagram of the parameter resistor identification module of the present invention.
[0025] Figure 4 It is the circuit schematic diagram of the light source drive module of the present invention.
[0026] Figure 5 It is the circuit schematic diagram of the voltage regulation module of the present invention.
[0027] Figure 6Schematic diagram of the current regulation module of the present invention.
[0028] Figure 7 Schematic diagram of the light source voltage detection module of the present invention.
[0029] Figure 8 Flowchart of the detection method of the present invention.
[0030] Wherein: 1 - light source controller; 2 - light source; 3 - three-core wire; 11 - main control module; 12 - parameter resistor identification module; 13 - light source drive module; 21 - parameter resistor; 22 - LED module. Detailed implementation manners
[0031] As used in the specification and claims, certain terms are used to refer to specific components. Those skilled in the art should understand that manufacturers may use different terms to refer to the same component. The specification and claims do not use the difference in names as a way to distinguish components, but use the difference in functions of components as the criterion for distinction. As used throughout the specification and claims, the term "comprising" is an open-ended term and should be interpreted as "including but not limited to". "Substantially" means within an acceptable error range. Those skilled in the art can solve technical problems within a certain error range and basically achieve technical effects.
[0032] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "upper", "lower", "front", "rear", "left", "right", "horizontal", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention.
[0033] In the present invention, unless otherwise clearly defined and limited, the terms "installed", "connected", "connected", "fixed", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0034] The following combines the attached Figures 1 to 8 and specific embodiments to further describe the present invention in detail, but it is not a limitation of the present invention.
[0035] Embodiment 1
[0036] A detection circuit for the light source voltage and current, as Figure 1As shown in the figure, it includes a light source controller 1, a light source 2, and a three-core wire 3. The light source controller 1 is provided with a main control module 11, a parameter resistor identification module 12, and a light source driving module 13. The parameter resistor identification module 12 and the light source driving module 13 are both electrically connected to the main control module 11. The light source 2 includes a parameter resistor 21 and an LED module 22. The parameter resistor 21 is electrically connected to the LED module 22. The three-core wire 3 is provided with a RES terminal, an LED+ terminal, and an LED- terminal. Both ends of the RES wire of the three-core wire 3 are RES terminals. Both ends of the LED+ wire of the three-core wire 3 are LED+ terminals. Both ends of the LED- wire of the three-core wire 3 are LED- terminals. The LED+ terminal is used to provide the positive electrode of electric energy to the LED module 22, and the LED- terminal is used to provide the negative electrode of electric energy to the LED module 22. One end of the parameter resistor 21 and the parameter resistor identification module 12 are both connected to the RES terminal. The other end of the parameter resistor 21, the parameter resistor identification module 12, the light source driving module 13, and the LED module 22 are all connected to the LED+ terminal. The light source driving module 13 and the LED module 22 are both connected to the LED- terminal, thereby effectively simplifying the light source wire and expanding the applicable range of the light source controller 1.
[0037] Among them, in the light source controller 1, the main control module 11 is provided with a control unit. The control unit has an STM32F103 control chip and a control circuit connected to the control chip, as Figure 2 shown. The control chip is driven by a voltage of 3.3V. The parameter resistor identification module 12 is electrically connected to the RES Volat signal terminal of the control unit. The light source driving module 13 is electrically connected to the Volat DAC signal terminal, Curr DAC signal terminal, and LED Volat signal terminal of the control unit.
[0038] And, as Figure 3 shown, the parameter resistor identification module 12 includes a resistor voltage detection module and a constant current source module. The resistor voltage detection module is electrically connected to the control unit and the constant current source module respectively. The resistor voltage detection module is connected to the ADC channel 1 of the STM32F103 control chip. One end of the parameter resistor 21, the resistor voltage detection module, and the constant current source module are all connected to the RES terminal. The other end of the parameter resistor 21 and the resistor voltage detection module are both connected to the LED+ terminal. The resistor voltage detection module is used to detect and identify the voltage value of the parameter resistor 21 of the light source 2.
[0039] Among them, the resistor voltage detection module is provided with a first differential amplification unit. The first differential amplification unit is provided with an LM258 operational amplifier, a resistor R49 with a resistance value of 20KΩ, and a capacitor C67 with a capacitance value of 1nF. The amplification coefficient K1 of the first differential amplification unit is 0.5. The ratio of the output to the input of the resistor voltage detection module is K1. The first differential amplification unit is electrically connected to the control unit and the parameter resistor 21 respectively.
[0040] Meanwhile, the constant current source module is provided with an NPN transistor S9014 and a potentiometer WR1. Adjusting WR1 can make the constant current source module output a constant current of 1 mA.
[0041] As Figures 4 to 7 shown, in the light source controller 1, the light source driving module 13 includes a voltage regulating module, a current regulating module, and a light source voltage detecting module. The voltage regulating module, the current regulating module, and the light source voltage detecting module are all electrically connected to the control unit and the LED module 22. Moreover, the voltage regulating module, the light source voltage detecting module, and the LED module 22 are all connected to the LED+ terminal, and the current regulating module, the light source voltage detecting module, and the LED module 22 are all connected to the LED- terminal.
[0042] Among them, the voltage regulating module is connected to the DAC channel 1 of the STSTM32F103 control chip. The voltage regulating module is provided with a positive-phase amplifying unit. The positive-phase amplifying unit is provided with an LM258 operational amplifier, a transistor S9014, and a transistor BU406. The amplification factor of the positive-phase amplifying unit is 10. The positive-phase amplifying unit is electrically connected to the Volat DAC signal terminal of the control unit and the LED+ signal terminal of the LED module 22 respectively.
[0043] In the light source driving module 13, the current regulating module is connected to the DAC channel 2 of the STSTM32F103 control chip. The current regulating module is provided with a negative feedback constant current circuit. The negative feedback constant current circuit is provided with an LM258 operational amplifier and a MOS transistor 50N06. The Curr DAC signal terminal of the control unit and the LED- signal terminal of the LED module 22 are electrically connected to the negative feedback constant current circuit respectively.
[0044] Moreover, in the light source driving module 13, the light source voltage detecting module is connected to the ADC channel 2 of the STM32F103 control chip. The light source voltage detecting module is provided with a second differential amplifying unit. The second differential amplifying unit is provided with an LM258 operational amplifier, a resistor R69 with a value of 100 KΩ, and a capacitor C74 with a capacitance value of 1 nF. The amplification factor K3 of the second differential amplifying unit is 0.1. The ratio of the output to the input of the light source voltage detecting module is K3. The second differential amplifying unit is electrically connected to the LEDVolat signal terminal of the control unit, the LED+ signal terminal, and the LED- signal terminal of the LED module 22 respectively.
[0045] After the detection circuit is connected, its detection operation process is as follows:
[0046] (1) When the light source controller 1 is powered on, the constant current source module of the parameter resistor identification module 12 outputs a constant current Ires of 1 mAs. The main control module 11 outputs 1.2 V through DAC1, so that the voltage regulation module in the light source driving module 13 outputs a constant standby voltage Vsb of 12 V. The main control module 11 outputs 5 mV through DAC2, so that the current regulation module outputs a constant standby current Isb of 10 mA.
[0047] (2) The main control module 11 of the light source controller 1 periodically reads the output voltage of the resistance voltage detection module of the parameter resistor identification module 12. When the read voltage is zero, it means that the light source 2 is not inserted. When the read voltage is greater than zero, it means that the light source 2 has been inserted.
[0048] (3) When it is detected that the light source 2 is inserted, the main control module 11 of the light source controller 1 reads the output voltage Vres of the resistance voltage detection module of the parameter resistor identification module 12 as 0.5 V. The main control module 11 calculates the resistance value of the parameter resistor in the light source as 1 KΩ through Vres÷(K1×Ires), that is, 0.5÷(0.5×0.001). The main control module 11 internally stipulates that the ratio K2 of the current of the light source 2 to the parameter resistor 21 is 1. The main control module 11 calculates the light source current Iled as 1000 mA through K2×R, that is, 1×1000. According to the calculated light source current of 1000 mA for the light source 2, the main control module 11 outputs 0.5 V through DAC2, so that the current regulation module in the light source driving module 13 outputs a current of 1000 mA. At this time, the main control module 11 outputs 2.5 V through DAC1, so that the voltage regulation module in the light source driving module 13 outputs the maximum voltage Vmax of 25 V. At this time, the main control module 11 reads the output voltage Vout of the light source voltage detection module in the light source driving module 13 as 1.2 V. The main control module 11 calculates the light source voltage Vled as 12 V through Vout÷K3, that is, 1.2÷0.1. The current regulation module in the light source driving module 13 outputs 1000 mA, and it is required that the VDS voltage difference of the MOS transistor 50N06 remains above 0.2 V. The required minimum voltage difference △V is (Iled×R67)+VDS, that is, (1×0.5)+0.2, which is equal to 0.7 V. Finally, based on the light source voltage Vled of 12 V and combined with the minimum voltage difference △V required by the current regulation module in the light source driving module 13 of 0.7 V, the main control module 11 calculates that the voltage regulation module in the light source driving module 13 needs to output a voltage of (Vled + △V), that is, 12.7 V, and outputs 1.27 V through DAC1 to make the voltage regulation module in the light source driving module 13 output a voltage of 12.7 V, so that the light source 2 operates at a safe voltage and current.
[0049] (4) After the third step is completed, the main control module 11 of the light source controller 1 regularly reads the output voltage of the resistance voltage detection module of the parameter resistance identification module 12. When the read voltage is zero, it indicates that the light source 2 is not inserted. At this time, the main control module 11 outputs 1.2V through DAC1, so that the voltage regulation module in the light source drive module 13 outputs a constant standby voltage Vsb of 12V. The main control module 11 outputs 5mV through DAC2, so that the current regulation module outputs a constant standby current Isb of 10mA. Then continue to execute step (2).
[0050] Embodiment 2
[0051] A method for detecting the voltage and current of a light source, as Figure 8 shown, includes the following steps:
[0052] S1. The main control module 11 regularly reads the output voltage of the parameter resistance identification module 12 to determine whether the light source 2 is connected to the light source controller 1;
[0053] S2. The main control module 11 calculates the resistance value R of the parameter resistance 21 and the current I of the light source 2, and controls the output current of the light source drive module 13 to be also I according to the current I of the light source 2;
[0054] S3. The main control module 11 reads the output voltage Vout of the light source drive module 13 and calculates the voltage V of the light source 2. The main control module 11 makes the light source 2 work at a safe voltage and current to obtain the detection result. After the detection is completed, when the main control module 11 regularly reads that the output voltage of the parameter resistance identification module 12 is zero, the main control module 11 controls the light source drive module 13 to output a constant standby voltage Vsb and a constant standby current Isb.
[0055] Obviously, the light source controller of the present invention is only connected to the light source through a three-core wire, and the controller can accurately detect the voltage and current of the light source, and accurately output the corresponding voltage and current according to the detected voltage and current, which not only effectively increases the applicable range of the controller, but also effectively reduces the volume of the light source and improves the wiring efficiency.
[0056] According to the disclosure and teaching of the above specification, those skilled in the art to which the present invention pertains can also make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the above specific embodiments, and any obvious improvements, substitutions or variations made by those skilled in the art on the basis of the present invention all belong to the protection scope of the present invention. In addition, although some specific terms are used in this specification, these terms are only for convenience of description and do not constitute any limitation to the present invention.
Claims
1. A detection circuit for the voltage and current of a light source, characterized in that: It includes a light source controller (1), a light source (2) and a three-core wire (3). The light source (2) includes a parameter resistor (21) and an LED module (22). The parameter resistor (21) is electrically connected to the LED module (22). The resistance value of the parameter resistor (21) is 0.8 KΩ to 1.2 KΩ. The three-core wire (3) is provided with a RES terminal, an LED+ terminal and an LED- terminal; The light source controller (1) is provided with a main control module (11), a parameter resistor identification module (12) and a light source driving module (13). The parameter resistor identification module (12) includes a resistor voltage detection module and a constant current source module that are electrically connected. The resistor voltage detection module is provided with a first differential amplification unit. The first differential amplification unit has an operational amplifier and a differential amplification circuit connected to the operational amplifier. The first differential amplification unit is provided with an LM258 operational amplifier, a 20 KΩ resistor R49, and a C67 with a capacitance value of 1 nF. The amplification coefficient K1 of the first differential amplification unit is 0.
5. The constant current source module is provided with an NPN transistor S9014 and a potentiometer WR1. Adjust WR1 to make the constant current source module constantly output a current of 1 mA; The main control module (11) is provided with a control unit. The first differential amplification unit is electrically connected to the control unit and the parameter resistor (21) respectively; One end of the parameter resistor (21), the resistor voltage detection module and the constant current source module are all connected to the RES terminal; The light source driving module (13) includes a voltage regulation module, a current regulation module and a light source voltage detection module. The voltage regulation module, the current regulation module and the light source voltage detection module are all electrically connected to the control unit and the LED module (22); The other end of the parameter resistor (21), the resistor voltage detection module, the voltage regulation module, the light source voltage detection module and the LED module (22) are all connected to the LED+ terminal. The current regulation module, the light source voltage detection module and the LED module (22) are all connected to the LED- terminal; The voltage regulation module is provided with a positive-phase amplification unit. The positive-phase amplification unit is provided with an LM258 operational amplifier, a transistor S9014 and a transistor BU406. The amplification coefficient of the positive-phase amplification unit is 10. The positive-phase amplification unit is electrically connected to the control unit and the LED module (22) respectively; The current regulation module is provided with a negative feedback constant current circuit. The negative feedback constant current circuit is provided with an LM258 operational amplifier and a MOS transistor 50N06. The control unit and the LED module (22) are electrically connected to the negative feedback constant current circuit respectively; The light source voltage detection module is provided with a second differential amplification unit, and the second differential amplification unit is provided with an LM258 operational amplifier, a resistor R69 with a resistance of 100 KΩ, and a capacitor C74 with a capacitance of 1 nF. The amplification factor K3 of the second differential amplification unit is 0.1, and the second differential amplification unit is electrically connected to the control unit and the LED module (22) respectively; Among them, the main control module (11) periodically reads the output voltage of the parameter resistor identification module (12) to determine whether the light source (2) is connected to the light source controller (1); Then, the main control module (11) calculates the resistance value R of the parameter resistor (21) and the current I of the light source (2), and controls the output current of the light source drive module (13) to be I according to the current I of the light source (2); Finally, the main control module (11) reads the output voltage Vout of the light source drive module (13) and calculates the voltage V of the light source (2). The main control module (11) makes the light source (2) work at a safe voltage and current to obtain the detection result. After the detection is completed, when the output voltage read by the main control module (11) from the parameter resistor identification module (12) is zero, the main control module (11) controls the light source drive module (13) to output a constant standby voltage Vsb and a constant standby current Isb.
Citation Information
Patent Citations
Electric tool
CN102478792A
Bus communication LED control panel with detection function and control system thereof
CN111556617A
Detection circuit for voltage and current of light source
CN214150842U