Light source control circuit and method, industrial visual inspection system, medium and product

By introducing a highly integrated constant current drive module and an independent power supply scheme, the light source control circuit is simplified, the reliability problem caused by complex analog control loops is solved, and the stability and anti-interference capability of the industrial vision inspection system are improved.

CN121842890APending Publication Date: 2026-04-10SIDEA SEMICON EQUIP (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

The reliability issues caused by the complex analog control loop of existing low-voltage high-precision light source control schemes include the risk of early failure and the decline in reliability caused by factors such as component aging and temperature cycling stress during long-term operation, as well as insufficient anti-interference capability in complex electromagnetic environments.

Method used

The system adopts a highly integrated constant current drive module as the core execution unit, which simplifies the circuit structure. The power supply module provides independent processing power and drive power, realizing power isolation between digital control and power drive, forming a simple digital-analog hybrid control link and reducing failure points.

Benefits of technology

It significantly improves the reliability and anti-interference capability of the light source control circuit, and enhances the operational stability and overall reliability in industrial settings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121842890A_ABST
    Figure CN121842890A_ABST
Patent Text Reader

Abstract

The invention discloses a light source control circuit and method, an industrial visual inspection system, a medium and a product, and relates to the technical field of industrial visual inspection, in the circuit, a power supply module is electrically connected with an external direct-current power supply, and the power supply module is set to convert the external direct-current power supply into two paths of power supply voltages; one of the two paths of power supply voltages is a processing power supply voltage, and the other path of power supply voltage is a driving power supply voltage; the processing module is electrically connected with the power supply module, and the processing module is set to generate at least one path of pulse width modulation signal based on the accessed processing power supply voltage; and the constant current driving module is electrically connected with the processing module, the power supply module and the external load light source, and the constant current driving module is set to adjust the driving current output to the external load light source based on the duty ratio of the pulse width modulation signal when the driving power supply voltage is connected. The invention aims to improve the reliability of the light source control circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial vision inspection technology, and in particular to a light source control circuit, method, industrial vision inspection system, medium, and product. Background Technology

[0002] With the increasing application of industrial vision inspection systems in semiconductor manufacturing, precision automation, and other fields, the requirements for long-term continuous and stable operation of these systems are becoming increasingly stringent. As the core component driving the lighting unit, the reliability of the light source control circuit directly determines the availability and maintenance cost of the entire vision inspection system.

[0003] Currently, the industry typically employs a circuit architecture based on an MCU (Microcontroller Unit) controlling a DAC (Digital-to-Analog Converter) combined with operational amplifier feedback circuitry, or directly using PWM (Pulse Width Modulation) to drive MOS (Metal-Oxide-Semiconductor) transistors, as the mainstream low-voltage, high-precision light source control solution. However, to achieve high-precision control, this type of low-voltage, high-precision light source control solution generally relies on a complex analog control loop composed of multiple discrete components cascaded together, such as the MCU, DAC, operational amplifier, feedback network, and power MOS transistors. This complex analog control loop has significant drawbacks during operation. The circuit signal links in this complex analog control loop are too long, and there are numerous core nodes, with each additional discrete component constituting a potential point of failure. This not only increases the risk of early failure during the manufacturing process due to the discreteness of the components or the complexity of soldering, but also poses a severe challenge to the overall reliability of the system during long-term continuous operation due to factors such as component aging and temperature cycling stress, making it difficult to improve the mean time between failures (MTBF). Furthermore, the complexity of the circuit structure and the redundancy of components also reduce the board-level anti-interference capability. In the complex electromagnetic environment of industrial sites, it is more likely to cause control signal distortion or output instability, which further exacerbates the reliability problem.

[0004] Therefore, improving the reliability of light source control circuits is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] The main objective of this application is to provide a light source control circuit, method, industrial vision inspection system, medium, and product, which aims to improve the reliability of the light source control circuit.

[0006] To achieve the above objectives, this application proposes a light source control circuit, the light source control circuit comprising: The power supply module is electrically connected to an external DC power supply. The power supply module is configured to convert the external DC power supply into two power supply voltages, wherein one of the two power supply voltages is a processing power supply voltage, and the other of the two power supply voltages is a driving power supply voltage. A processing module, which is electrically connected to the power supply module, is configured to generate at least one pulse width modulation signal based on the accessed processing power supply voltage; At least one constant current driving module is provided, which is electrically connected to the processing module, the power supply module and the external load light source respectively. The constant current driving module is configured to adjust the driving current output to the external load light source based on the duty cycle of the pulse width modulation signal after the driving power supply voltage is connected.

[0007] In one embodiment, the power supply module includes a first power supply branch and a second power supply branch; The first power supply branch is electrically connected to the external DC power supply and the processing module respectively. The first power supply branch is configured to convert the external DC power supply into the processing power supply voltage and provide the processing power supply voltage to the processing module. The second power supply branch is electrically connected to the external DC power supply and the constant current drive module respectively. The second power supply branch is configured to convert the external DC power supply into the drive power supply voltage and provide the drive power supply voltage to the constant current drive module.

[0008] In one embodiment, the first power supply branch includes at least a first filter circuit, a DC-DC switching unit, and a linear voltage regulator unit; The first terminal of the first filter circuit is electrically connected to the external DC power supply, the second terminal of the first filter circuit is electrically connected to the first terminal of the linear voltage regulator unit, and the second terminal of the linear voltage regulator unit is electrically connected to the processing module.

[0009] In one embodiment, the light source control circuit includes a communication serial port circuit, and the second terminal of the linear voltage regulator unit is electrically connected to an external main control device through the communication serial port circuit. The communication serial port circuit is also electrically connected to the processing module.

[0010] In one embodiment, the constant current drive module includes a step-down constant current chip, an inductor, a load interface socket, a first capacitor, a second capacitor, a third capacitor, a first resistor, a second resistor, and a third resistor; The first terminal of the step-down constant current chip is electrically connected to the first terminal of the first resistor, the second terminal of the first resistor is electrically connected to the first terminal of the load interface socket and the first terminal of the second resistor, and the second terminal of the second resistor is grounded. The second end of the load interface socket is electrically connected to the first end of the first capacitor and the first end of the inductor, respectively. The second end of the inductor is electrically connected to the fifth end of the step-down constant current chip and the first end of the second capacitor, respectively. The second end of the second capacitor is electrically connected to the sixth end of the step-down constant current chip, and the second end of the first capacitor is grounded. The second terminal of the step-down constant current chip is electrically connected to the processing module through the third resistor. The third terminal of the step-down constant current chip and the first terminal of the third capacitor are respectively grounded. The fourth terminal of the step-down constant current chip is electrically connected to the second terminal of the third capacitor and the second power supply branch.

[0011] Furthermore, this application also provides a light source control method, which is applied to the light source control circuit described above, and the light source control method includes: The external DC power supply is converted into two power supply voltages through the power supply module. One of the two power supply voltages is the processing power supply voltage, and the other power supply voltage is the drive power supply voltage. The control processing module generates at least one pulse width modulation signal based on the processing power supply voltage provided by the power supply module; After the constant current drive module is connected to the drive power supply voltage provided by the power supply module, the drive current output to the external load light source is adjusted based on the duty cycle of the pulse width modulation signal.

[0012] In one embodiment, the light source control circuit further includes a communication serial port circuit electrically connected to an external main control device. The communication serial port circuit is also electrically connected to the power supply module and the processing module, respectively. The step of the control processing module generating at least one pulse width modulation signal based on the processing power supply voltage provided by the power supply module includes: After synchronously activating the communication serial port circuit and the processing module based on the processing power voltage provided by the power supply module, the brightness control command of the external main control device is accessed through the communication serial port circuit. The processing module is enabled to parse the brightness control command to obtain the pulse width modulation signal corresponding to the target constant current module, wherein the target constant current module is any one of the multiple constant current driving modules.

[0013] In addition, this application also provides an industrial vision inspection system, the industrial vision inspection system comprising: The light source control circuit described above; At least one external load light source, wherein the external load light source is electrically connected to the constant current drive module in the light source control circuit; An external master control device is electrically connected to the communication serial port circuit in the light source control circuit.

[0014] In addition, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the light source control method described above.

[0015] In addition, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the light source control method described above.

[0016] This application provides a light source control circuit that improves reliability. Specifically, the circuit includes a power supply module, a processing module, and at least one constant current drive module. The power supply module is directly connected to an external DC power supply and converts the input power supply into two independent power supply voltages: a processing power supply voltage for the processing module and a drive power supply voltage for the constant current drive module. After receiving the processing power supply voltage, the processing module generates at least one pulse width modulation signal. The constant current drive module is connected to the processing module, the power supply module, and the external load light source. When the constant current drive module receives the drive power supply voltage provided by the power supply module, it adjusts the drive current output to the external load light source in real time according to the duty cycle of the pulse width modulation signal, thereby achieving constant current drive for the external load light source.

[0017] Compared to the complex analog control loops commonly used in traditional low-voltage, high-precision light source control schemes, which consist of cascaded discrete components such as MCUs, DACs, operational amplifiers, feedback networks, and power MOSFETs, this application introduces a highly integrated constant current drive module as the core execution unit, replacing the voltage setting and current feedback loops built with discrete components. This significantly shortens the signal chain path and reduces the number of core circuit nodes and components. Furthermore, the power supply module uses two independent and regulated power outputs to power the processing module and the constant current drive module respectively, achieving power isolation between digital control and power drive and reducing mutual interference. The processing module directly outputs a pulse width modulation signal to the dimming interface of the constant current drive module, forming a simple digital-analog hybrid control link. This fundamentally reduces potential failure points introduced by the large number of components and the complexity of the link, effectively overcoming the early failure risk caused by the large number of solder points and high component discreteness in the manufacturing process of traditional solutions, as well as the reliability decline caused by component aging and temperature rise stress accumulation during long-term operation. In other words, the light source control circuit provided in this application significantly simplifies the light source control architecture of the industrial vision inspection system while ensuring high-precision current control, enhances the anti-interference capability and operational stability in the complex electromagnetic environment of the industrial site, and ultimately achieves an effective improvement in the overall reliability of the light source control circuit. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the structure of the first embodiment of the light source control circuit of this application; Figure 2 This is a schematic diagram of the power supply path involved in the embodiments of this application; Figure 3 This is a schematic diagram of the input protection circuit structure involved in the embodiments of this application; Figure 4 This is a schematic diagram of the light source control circuit framework involved in the embodiments of this application; Figure 5 This is a schematic diagram of the DC switching unit circuit structure involved in the embodiments of this application; Figure 6 This is a schematic diagram of the linear voltage regulator unit circuit structure involved in the embodiments of this application; Figure 7 This is a schematic diagram of the constant current drive module circuit structure involved in the embodiments of this application; Figure 8 This is a schematic diagram of the hardware operating environment involved in the device in this application.

[0019] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings.

[0020] Explanation of reference numerals: 100, Light source control circuit; 10, Power supply module; 20, Processing module; 30, Constant current drive module; 40, Communication serial port circuit; 11, First power supply branch; 111, First filter circuit; 112, DC switching unit; 113, Linear voltage regulator unit; 12, Second power supply branch; 13, Input protection circuit; 200, External DC power supply; 300, External load light source; U3, Step-down constant current chip; L1, Inductor; J2, Load interface socket; C1, First capacitor; C2, Second capacitor; C3, Third capacitor; R1, First resistor; R2, Second resistor; R3, Third resistor. Detailed Implementation

[0021] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0023] With the increasing application of industrial vision inspection systems in semiconductor manufacturing, precision automation, and other fields, the requirements for long-term continuous and stable operation of these systems are becoming increasingly stringent. As the core component driving the lighting unit, the reliability of the light source control circuit directly determines the availability and maintenance cost of the entire vision inspection system.

[0024] Currently, the industry typically employs a circuit architecture based on an MCU (Microcontroller Unit) controlling a DAC (Digital-to-Analog Converter) combined with operational amplifier feedback circuitry, or directly using PWM (Pulse Width Modulation) to drive MOS (Metal-Oxide-Semiconductor) transistors, as the mainstream low-voltage, high-precision light source control solution. However, to achieve high-precision control, this type of low-voltage, high-precision light source control solution generally relies on a complex analog control loop composed of multiple discrete components cascaded together, such as the MCU, DAC, operational amplifier, feedback network, and power MOS transistors. This complex analog control loop has significant drawbacks during operation. The circuit signal links in this complex analog control loop are too long, and there are numerous core nodes, with each additional discrete component constituting a potential point of failure. This not only increases the risk of early failure during the manufacturing process due to the discreteness of the components or the complexity of soldering, but also poses a severe challenge to the overall reliability of the system during long-term continuous operation due to factors such as component aging and temperature cycling stress, making it difficult to improve the mean time between failures (MTBF). Furthermore, the complexity of the circuit structure and the redundancy of components also reduce the board-level anti-interference capability. In the complex electromagnetic environment of industrial sites, it is more likely to cause control signal distortion or output instability, which further exacerbates the reliability problem.

[0025] Therefore, improving the reliability of light source control circuits is a technical problem that urgently needs to be solved.

[0026] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art.

[0027] Therefore, based on the shortcomings of the above light source control schemes, the light source control method of this application is proposed. The solution of this application embodiment is as follows: This application introduces a highly integrated constant current drive module as the core execution unit, replacing the voltage setting and current feedback loop built with discrete components, which significantly shortens the signal chain path and reduces the number of core circuit nodes and components; furthermore, the power supply module adopts two independent and regulated power outputs to power the processing module and the constant current drive module respectively, realizing power isolation between digital control and power drive, and reducing mutual interference; the processing module directly outputs the pulse width modulation signal to the dimming interface of the constant current drive module, forming a simple digital-analog hybrid control link, thereby fundamentally reducing the potential failure points introduced by the large number of components and the complexity of the link, effectively overcoming the early failure risk caused by the large number of solder points and the large discreteness of components in the manufacturing process of traditional solutions, as well as the reliability decline caused by component aging and temperature rise stress accumulation in long-term operation. In other words, the light source control circuit provided in this application significantly simplifies the light source control architecture of the industrial vision inspection system while ensuring high-precision current control, enhances the anti-interference capability and operational stability in the complex electromagnetic environment of the industrial site, and ultimately achieves an effective improvement in the overall reliability of the light source control circuit.

[0028] Based on this, the embodiments of this application provide a light source control circuit, referring to... Figure 1 , Figure 1 This is a schematic diagram of the structure of the first embodiment of the light source control circuit of this application.

[0029] Reference Figure 1 The light source control circuit 100 includes: The power supply module 10 is electrically connected to the external DC power supply 200. The power supply module 10 is configured to convert the external DC power supply 200 into two power supply voltages, wherein one of the two power supply voltages is a processing power supply voltage and the other of the two power supply voltages is a driving power supply voltage.

[0030] In this embodiment, the power supply module 10 enables intelligent allocation and efficient conversion of the external DC power supply 200. Specifically, the power supply module 10 reliably converts the single external DC power supply 200 into two electrically isolated power supply voltages. One of the power supply voltages provides a clean, low-noise digital logic power supply (i.e., processing power supply voltage) to the processing module 20, while the other power supply voltage provides a direct power supply to the constant current drive module 30, reducing energy loss along the transmission path. In other words, by converting the external DC power supply 200 into two power supply voltages through the power supply module 10, this application fundamentally reduces the mutual interference between the digital circuit (i.e., processing module 20) and the power circuit (i.e., constant current drive module 30), thereby improving the overall electromagnetic compatibility and long-term operational stability of the light source control circuit 100.

[0031] It should be noted that the external DC power supply 200 typically refers to a 24V or 48V DC switching power supply commonly found in industrial environments. The processing power supply voltage is generally a low voltage such as 3.3V or 5V, which is used to power the processing module 20 and the communication serial port circuit 40. The drive power supply voltage is usually the same as the external DC power supply 200 voltage, and this drive power supply voltage is filtered by the filter circuit before being applied to the constant current drive module 30.

[0032] In a specific embodiment, refer to Figure 2 The power supply module 10 may include an input protection circuit 13, a first power supply branch 11, and a second power supply branch 12. Specifically, after the input voltage of the external DC power supply 200 is protected by the input protection circuit 13, the protected input voltage enters the first power supply branch 11 and the second power supply branch 12 respectively, thereby forming independent processing power supply voltage and driving power supply voltage. The processing power supply voltage supplies power to the processing module 20 and the communication serial port circuit 40, and the driving power supply voltage serves as the power supply for the constant current driving module 30.

[0033] Furthermore, it should be noted that the input protection circuit 13 may include Figure 3 The socket shown is J1, PTC (Positive Temperature Coefficient) resettable fuse F1, transient voltage suppressor diode TVS1, three resistors, two capacitors, and diode D1.

[0034] For example, refer to Figure 3The 24V DC voltage provided by the external DC power supply 200 is input through socket J1 and overcurrent protection is provided by a series-connected PTC resettable fuse F1 to improve the maintainability of the light source control circuit 100. Next, to further enhance reliability, a transient voltage suppressor diode TVS1 is connected in parallel between the two ends of socket J1 (i.e., the positive and negative input terminals) to absorb transient overvoltages such as surge voltages from the power grid or load and electrostatic discharge, protecting the downstream circuitry from damage. Subsequently, a circuit consisting of PMOS transistor Q1, resistor R4, and resistor R5 implements reverse connection protection. Specifically, when the 24V DC voltage provided by the external DC power supply 200 is connected in the positive direction, PMOS transistor Q1 is turned on, and the 24V DC voltage passes normally; when the 24V DC voltage provided by the external DC power supply 200 is connected in the reverse direction, PMOS transistor Q1 is turned off, effectively blocking the current and preventing circuit damage due to misoperation. Furthermore, after the reverse connection protection circuit, a capacitor combination of one large and one small capacitor (e.g., a 47μF electrolytic capacitor CE1 and a 0.1nF ceramic capacitor C4) is connected in parallel between the positive and negative terminals of the input, forming a decoupling filter network that combines high and low frequencies, effectively reducing voltage fluctuations and noise of the 24V DC voltage. In addition, the input protection circuit 13 also includes a diode LED1 connected in series with resistor R6 to provide a clear indication of the power-on status, facilitating on-site debugging and troubleshooting.

[0035] The processing module 20 is electrically connected to the power supply module 10, and the processing module 20 is configured to generate at least one pulse width modulation signal based on the accessed processing power supply voltage.

[0036] In this embodiment, after the processing module 20 is activated by the processing power supply voltage provided by the power supply module 10, the processing module 20 and the processing module 20 are then... Figure 4 The electrical connection between the communication serial port circuits 40 shown is used by the processing module 20 to generate a precise pulse width modulation signal based on the brightness control command provided by the communication serial port circuits 40. This completely replaces the complex analog voltage setting and feedback loop that relies on discrete components such as external digital-to-analog converters and operational amplifiers in the traditional solution. This not only greatly simplifies the circuit board hardware design and reduces the number of components and failure points, but also significantly improves the reliability of the light source control.

[0037] It should be noted that the processing module 20 can be an MCU (Microcontroller Unit), which can be an STM32 series chip, such as the STM32F103 microcontroller. A pulse width modulation signal can be understood as a PWM signal, which is a digital signal that controls the average voltage or current by adjusting the proportion of high-level time (duty cycle) within a cycle.

[0038] In a specific embodiment, the processing module 20 can be an STM32F103 microcontroller. The built-in timers (such as TIM2, TIM3, and TIM4) in the processing module 20 are configured in PWM generation mode to generate square wave signals (i.e., pulse width modulation signals) with a fixed frequency (e.g., 10kHz) and an adjustable duty cycle. In addition, to cooperate with the FreeMODBUS protocol, the STM32F103 microcontroller's resource serial port USART1 (PA9, PA10) and TIM1 timer are used to configure the Modbus driver.

[0039] At least one constant current drive module 30 is provided, which is electrically connected to the processing module 20, the power supply module 10 and the external load light source 300 respectively. The constant current drive module 30 is configured to adjust the drive current output to the external load light source 300 based on the duty cycle of the pulse width modulation signal when the drive power supply voltage is connected.

[0040] In this embodiment, a high-efficiency and precise constant current output drive is achieved through the constant current drive module 30. Specifically, when the constant current drive module 30 is connected to the drive power supply voltage provided by the power supply module 10, the drive current output to the external load light source 300 is adjusted in real time according to the duty cycle of the pulse width modulation signal, thereby achieving constant current drive of the external load light source 300.

[0041] It should be noted that the constant current drive module 30 refers to a power drive circuit that can maintain a constant output current that does not change with minor variations in load impedance or input voltage. The drive current refers to the constant current that ultimately flows through the load light source.

[0042] Furthermore, in some feasible embodiments, the power supply module 10 includes a first power supply branch 11 and a second power supply branch 12; the first power supply branch 11 is electrically connected to the external DC power supply 200 and the processing module 20 respectively, and the first power supply branch 11 is configured to convert the external DC power supply 200 into the processing power supply voltage and provide the processing power supply voltage to the processing module 20.

[0043] In this embodiment, the external DC power supply 200 is converted into a processing power supply voltage through the first power supply branch 11, thereby providing a clean and low-noise processing power supply voltage for the subsequent processing module 20 and the communication serial port circuit 40. This ensures that the processing module 20 and the communication serial port circuit 40 can operate stably and reliably under various working conditions, fundamentally avoiding problems such as program crashes, communication errors, or decreased control accuracy caused by power quality. This is the basis for improving the overall reliability and accuracy of the light source control circuit 100.

[0044] In a specific embodiment, refer to Figure 2The first power supply branch 11 includes a first filter circuit 111, a DC-DC switching unit 112, and a linear voltage regulator unit 113 connected in sequence. Specifically, after the external DC power supply 200 passes through the input protection circuit 13, it first undergoes preliminary filtering through the first filter circuit 111. Then, the filtered processing power supply voltage is converted from 24V external DC power supply 200 to 5V intermediate voltage through the DC-DC switching unit 112. Next, the 5V intermediate voltage is linearly regulated through the linear voltage regulator unit 113, finally generating a stable, low-noise 3.3V processing power supply voltage to power the processing module 20 and the communication serial port circuit 40.

[0045] The second power supply branch 12 is electrically connected to the external DC power supply 200 and the constant current drive module 30 respectively. The second power supply branch 12 is configured to convert the external DC power supply 200 into the drive power supply voltage and provide the drive power supply voltage to the constant current drive module 30.

[0046] In this embodiment, the 24V external DC power supply 200 after passing through the input protection circuit 13 directly enters the second power supply branch 12 for filtering, so that the filtered and pure 24V external DC power supply 200 is directly delivered to the power input pin of each constant current drive module 30 as the driving power supply voltage, so as to provide energy for each constant current drive module 30 and its connected external load light source 300.

[0047] Furthermore, in some other feasible embodiments, the first power supply branch 11 includes at least a first filter circuit 111, a DC-DC switching unit 112, and a linear voltage regulator unit 113; the first end of the first filter circuit 111 is electrically connected to the external DC power supply 200, the second end of the first filter circuit 111 is electrically connected to the first end of the linear voltage regulator unit 113, and the second end of the linear voltage regulator unit 113 is electrically connected to the processing module 20.

[0048] In this embodiment, the 24V DC voltage provided by the external DC power supply 200 is initially filtered by the first filter circuit 111, and the filtered 24V DC voltage is converted into a 5V intermediate voltage by the DC switching unit 112. Next, the 5V intermediate voltage is linearly regulated by the linear voltage regulator unit 113, and finally a stable and low-noise 3.3V processing power supply voltage is generated to power the processing module 20 and the communication serial port circuit 40.

[0049] It should be noted that the circuit structure of the DC switching unit 112 can be used... Figure 5The circuit shown specifically employs a synchronous buck DC-DC controller chip U1 (e.g., a DC buck chip with model number SGM61220XTN6G / TR), along with power inductors L1 and L2 and input / output capacitors C5 and C6, to form a BUCK circuit that efficiently reduces the 24V voltage to 5V.

[0050] Linear regulator unit 113 can be used Figure 6 The circuit shown specifically illustrates that the linear regulator unit 113 uses a 3.3V output linear regulator chip U2 (model LN6210B332MR-Gd). The input of the linear regulator chip U2 is connected to the 5V intermediate voltage output from the DC-DC converter unit 112. After linear regulation by the linear regulator chip U2, a processed power supply voltage of 3.3V is output through the output of the linear regulator chip U2. Furthermore, multiple capacitors (i.e., ...) are connected in parallel at both the input and output terminals of the linear regulator chip U2. Figure 6 The capacitors C9 to C11 shown are used to further optimize their transient response and noise performance.

[0051] Furthermore, in some feasible embodiments, the light source control circuit 100 includes a communication serial port circuit 40, the second end of the linear voltage regulator unit 113 is electrically connected to an external main control device through the communication serial port circuit 40, and the communication serial port circuit 40 is also electrically connected to the processing module 20.

[0052] In this embodiment, Figure 4 The communication serial port circuit 40 shown establishes a standardized and highly reliable industrial communication interface for the light source control circuit 100. By providing the communication serial port circuit 40 and the processing module 20 with the processing power supply voltage processed by the first power supply branch 11, the absolute stability and consistency of the communication interface level between the communication serial port circuit 40 and the processing module 20 are ensured. This fundamentally eliminates communication errors, data packet loss, or interface chip malfunctions caused by power fluctuations, enabling the light source control circuit 100 to be seamlessly integrated into higher-level industrial automation networks (such as PLCs, industrial PCs, or vision master control systems), meeting the core requirements of industrial vision systems for centralized control, flexible configuration, and system integration.

[0053] In a specific embodiment, the communication serial port circuit 40 includes at least one RS232 level conversion chip. The power supply pin of this RS232 level conversion chip is directly connected to the 3.3V processing power supply voltage output by the linear regulator unit 113. The TTL level side pin of the RS232 level conversion chip is directly connected to the serial communication interface of the processing module 20 (MCU). The RS-232 level side pin of the RS232 level conversion chip is connected to a standard DB9 female connector, and connected to an external host device via a serial cable. At the software level, the FreeMODBUS protocol stack is ported and run in the processing module 20 to configure the processing module 20 as a Modbus RTU slave. When the host computer sends a brightness control command conforming to the Modbus format (such as writing a brightness value to a specified holding register) through this serial port circuit, the processing module 20 parses the brightness control command and controls the pulse width modulation signal (PWM) output, thereby realizing precise and programmable control of the external load light source 300.

[0054] Furthermore, in some other feasible embodiments, the constant current drive module 30 includes a step-down constant current chip U3, an inductor L1, a load interface socket J2, a first capacitor C1, a second capacitor C2, a third capacitor C3, a first resistor R1, a second resistor R2, and a third resistor R3; the first terminal of the step-down constant current chip U3 is electrically connected to the first terminal of the second resistor R2, the second terminal of the second resistor R2 is electrically connected to the first terminal of the load interface socket J2 and the first terminal of the third resistor R3, and the second terminal of the third resistor R3 is grounded; the second terminal of the load interface socket J2 is electrically connected to the first terminal of the third capacitor C3 and the first terminal of the third capacitor C2. The first end of the inductor L1 is electrically connected, the second end of the inductor L1 is electrically connected to the fifth end of the step-down constant current chip U3 and the first end of the second capacitor C2, the second end of the second capacitor C2 is electrically connected to the sixth end of the step-down constant current chip U3, and the second end of the third capacitor C3 is grounded; the second end of the step-down constant current chip U3 is electrically connected to the processing module 20 through the first resistor R1, the third end of the step-down constant current chip U3 and the first end of the first capacitor C1 are grounded, and the fourth end of the step-down constant current chip U3 is electrically connected to the second end of the first capacitor C1 and the second power supply branch 12.

[0055] In this embodiment, the constant current drive module 30 is the core execution unit for achieving high-precision and high-efficiency constant current drive. This constant current drive module 30 uses a highly integrated buck constant current chip U3 as its core, replacing the complex constant current source circuit built from discrete components such as operational amplifiers, MOSFETs, and feedback networks in traditional solutions. This not only greatly reduces the number of components in the core power circuit, fundamentally lowering the probability of failure, but also significantly improves the reliability of the light source control circuit 100. Furthermore, the synchronous rectification architecture (synchronous buck) integrated within the buck constant current chip U3 has extremely low conduction and switching losses compared to traditional external MOSFETs or linear adjustment methods, resulting in high power conversion efficiency and low temperature rise. Moreover, the constant current drive module 30 can be directly controlled by the pulse width modulation (PWM) signal from the processing module 20, achieving stepless, linear, and flicker-free brightness adjustment.

[0056] It should be noted that the buck constant current chip U3 refers to a dedicated integrated circuit that integrates a BUCK (buck) switching regulator topology with a high-precision constant current feedback loop. The signal of the buck constant current chip U3 can be an SGM3770. The buck constant current chip U3 can automatically adjust the switching duty cycle according to the feedback voltage to maintain a constant output current.

[0057] Inductor L1 is a key energy storage component in the switching power supply topology, and its inductance value affects the ripple of the output current and the operating frequency.

[0058] The first capacitor C1 is typically a high-frequency decoupling capacitor for the power supply pin of the buck constant current chip U3. The second capacitor C2 is connected to the BST pin of the buck constant current chip U3 and is used to construct a charge pump for the internal gate drive voltage. The third capacitor C3 is connected in parallel across the external load light source 300 and is used to filter out the high-frequency switching ripple of the output current.

[0059] The first resistor R1 is usually a pull-up or current-limiting resistor for the pulse width modulation signal (PWM). The second resistor R2 and the third resistor R3 form a current sampling network, where the third resistor R3 is a current sampling resistor. The resistance value of the third resistor R3 directly determines the maximum output current of the constant current drive module 30 (I_max = V_ref / R3, where V_ref is usually a precision reference voltage inside the chip, such as 100mV).

[0060] For example, refer to Figure 6 When the processing module 20 outputs pulse width modulation (PWM) signals with different duty cycles to the PWM pin of the SGM3770, the SGM3770 linearly adjusts its internal current reference, thereby changing the constant current output to the external load light source 300 to achieve precise dimming. The output current value is determined by I_out = (100mV * PWM duty cycle) / R3.

[0061] Furthermore, based on the first embodiment of the light source control circuit 100 of this application, a second embodiment of the light source control method of this application is proposed. The light source control method is applied to the light source control circuit 100 described above, and the light source control method includes steps S10 to S30.

[0062] Step S10: The external DC power supply 200 is converted into two power supply voltages by the power supply module 10. One of the two power supply voltages is the processing power supply voltage, and the other power supply voltage is the driving power supply voltage.

[0063] In this embodiment, the power supply module 10 reliably converts a single external DC power supply 200 into two electrically isolated power supply voltages. One of the power supply voltages provides a clean, low-noise digital logic power supply (i.e., processing power supply voltage) to the processing module 20, while the other power supply voltage provides a direct power supply to the constant current drive module 30, reducing energy loss along the transmission path. In other words, by converting the external DC power supply 200 into two power supply voltages through the power supply module 10, this application fundamentally reduces the mutual interference between the digital circuit (i.e., processing module 20) and the power circuit (i.e., constant current drive module 30), thereby improving the overall electromagnetic compatibility and long-term operational stability of the light source control circuit 100.

[0064] Step S20: The control processing module 20 generates at least one pulse width modulation signal based on the processing power supply voltage provided by the power supply module 10.

[0065] In this embodiment, after the processing module 20 is activated by the processing power supply voltage provided by the power supply module 10, the processing module 20 and the processing module 20 are then... Figure 4 The electrical connection between the communication serial port circuits 40 shown is used by the processing module 20 to generate a precise pulse width modulation signal based on the brightness control command provided by the communication serial port circuits 40. This completely replaces the complex analog voltage setting and feedback loop that relies on discrete components such as external digital-to-analog converters and operational amplifiers in the traditional solution. This not only greatly simplifies the circuit board hardware design and reduces the number of components and failure points, but also significantly improves the reliability of the light source control.

[0066] Step S30: After the constant current drive module 30 is connected to the drive power supply voltage provided by the power supply module 10, the drive current output to the external load light source 300 is adjusted based on the duty cycle of the pulse width modulation signal.

[0067] In this embodiment, a high-efficiency and precise constant current output drive is achieved through the constant current drive module 30. Specifically, when the constant current drive module 30 is connected to the drive power supply voltage provided by the power supply module 10, the drive current output to the external load light source 300 is adjusted in real time according to the duty cycle of the pulse width modulation signal, thereby achieving constant current drive of the external load light source 300.

[0068] Furthermore, in some other feasible embodiments, the light source control circuit 100 further includes a communication serial port circuit 40 electrically connected to an external main control device. The communication serial port circuit 40 is also electrically connected to the power supply module 10 and the processing module 20 respectively. The above step S20, which controls the processing module 20 to generate at least one pulse width modulation signal based on the processing power supply voltage provided by the power supply module 10, may also include steps S201 to S202.

[0069] Step S201: After activating the communication serial port circuit 40 and the processing module 20 synchronously based on the processing power supply voltage provided by the power supply module 10, the brightness control command of the external main control device is accessed through the communication serial port circuit 40.

[0070] In this embodiment, after the processing module 20 is powered on, its internal program initializes the serial port peripheral and the FreeMODBUS protocol stack, configuring itself as a Modbus slave. When an external master device (e.g., industrial control computer probe station software) needs to adjust the external load light source 300 connected to the target constant current module, the external master device sends a brightness control command to the processing module 20 through the communication serial port circuit 40. This brightness control command includes the register address corresponding to the target channel and the target brightness value.

[0071] Step S202: Enable the processing module 20 to parse the brightness control command and obtain the pulse width modulation signal corresponding to the target constant current module. The target constant current module is any one of the multiple constant current driving modules 30.

[0072] In this embodiment, the enabling processing module 20 parses the brightness control command, maps the parsed register address to the target channel, and calculates the target PWM duty cycle based on the received target brightness value using a preset conversion relationship (e.g., a brightness value of 1000 corresponds to a 100% duty cycle). Finally, the processing module 20 updates the comparison register of its timer (e.g., TIM2) for the target channel, thereby generating and outputting the pulse width modulation signal corresponding to the target PWM duty cycle to the PWM pin of the target constant current module (i.e., the target constant current module connected to the target channel), ultimately achieving precise control of the brightness of the external load light source 300 connected to the target constant current module.

[0073] In summary, this application introduces a highly integrated constant current drive module as the core execution unit, replacing the voltage setting and current feedback loops built with discrete components. This significantly shortens the signal chain path and reduces the number of core circuit nodes and components. Furthermore, the power supply module uses two independent and regulated power outputs to power the processing module and the constant current drive module respectively, achieving power isolation between digital control and power drive and reducing mutual interference. The processing module directly outputs a pulse width modulation signal to the dimming interface of the constant current drive module, forming a simple digital-analog hybrid control link. This fundamentally reduces potential failure points introduced by the large number of components and the complexity of the link, effectively overcoming the early failure risk caused by the large number of solder points and high component discreteness in traditional solutions during manufacturing, as well as the reliability decline caused by component aging and temperature rise stress accumulation during long-term operation. In other words, the light source control circuit provided by this application, while ensuring high-precision current control, significantly simplifies the light source control architecture of the industrial vision inspection system, enhances the anti-interference capability and operational stability in the complex electromagnetic environment of the industrial site, and ultimately achieves an effective improvement in the overall reliability of the light source control circuit.

[0074] In addition, this application also provides an industrial vision inspection system, the industrial vision inspection system comprising: The light source control circuit described above; At least one external load light source, wherein the external load light source is electrically connected to the constant current drive module in the light source control circuit; An external master control device is electrically connected to the communication serial port circuit in the light source control circuit.

[0075] In addition, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the light source control method described above.

[0076] In addition, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the light source control method described above.

[0077] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the light source control method in Embodiment 1 above.

[0078] The following is for reference. Figure 5The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0079] like Figure 5 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various devices are shown in the figures, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0080] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0081] The electronic device provided in this application, employing the light source control method described in the above embodiments, can solve the technical problem of how to automate the monitoring of brushing behavior to improve the user's brushing behavior without interfering with the normal brushing process. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the light source control method provided in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0082] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0083] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0084] This application provides a medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the light source control method in the above embodiments.

[0085] The computer storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of the medium may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0086] The aforementioned medium may be included in an electronic device; or it may exist independently without being assembled into an electronic device.

[0087] The aforementioned medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to perform the following light source control operations: The external DC power supply is converted into two power supply voltages through the power supply module. One of the two power supply voltages is the processing power supply voltage, and the other power supply voltage is the drive power supply voltage. The control processing module generates at least one pulse width modulation signal based on the processing power supply voltage provided by the power supply module; After the constant current drive module is connected to the drive power supply voltage provided by the power supply module, the drive current output to the external load light source is adjusted based on the duty cycle of the pulse width modulation signal.

[0088] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0090] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0091] The computer storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the above-described light source control method, thus solving the technical problem of poor reliability in light source control circuits. Compared with the prior art, the beneficial effects of the computer storage medium provided in this application are the same as those of the light source control method provided in the above embodiments, and will not be repeated here.

[0092] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the light source control method described above.

[0093] The computer program product provided in this application solves the technical problem of poor reliability in light source control circuits. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the light source control method provided in the above embodiments, and will not be repeated here.

[0094] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A light source control circuit, characterized in that, The light source control circuit includes: The power supply module is electrically connected to an external DC power supply. The power supply module is configured to convert the external DC power supply into two power supply voltages, wherein one of the two power supply voltages is a processing power supply voltage, and the other of the two power supply voltages is a driving power supply voltage. A processing module, which is electrically connected to the power supply module, is configured to generate at least one pulse width modulation signal based on the accessed processing power supply voltage; At least one constant current driving module is provided, which is electrically connected to the processing module, the power supply module and the external load light source respectively. The constant current driving module is configured to adjust the driving current output to the external load light source based on the duty cycle of the pulse width modulation signal when the driving power supply voltage is applied.

2. The light source control circuit as described in claim 1, characterized in that, The power supply module includes a first power supply branch and a second power supply branch; The first power supply branch is electrically connected to the external DC power supply and the processing module respectively. The first power supply branch is configured to convert the external DC power supply into the processing power supply voltage and provide the processing power supply voltage to the processing module. The second power supply branch is electrically connected to the external DC power supply and the constant current drive module respectively. The second power supply branch is configured to convert the external DC power supply into the drive power supply voltage and provide the drive power supply voltage to the constant current drive module.

3. The light source control circuit as described in claim 2, characterized in that, The first power supply branch includes at least a first filter circuit, a DC-DC switching unit, and a linear voltage regulator unit; The first terminal of the first filter circuit is electrically connected to the external DC power supply, the second terminal of the first filter circuit is electrically connected to the first terminal of the linear voltage regulator unit, and the second terminal of the linear voltage regulator unit is electrically connected to the processing module.

4. The light source control circuit as described in claim 3, characterized in that, The light source control circuit includes a communication serial port circuit. The second end of the linear voltage regulator unit is electrically connected to an external main control device through the communication serial port circuit. The communication serial port circuit is also electrically connected to the processing module.

5. The light source control circuit as described in claim 2, characterized in that, The constant current drive module includes a step-down constant current chip, an inductor, a load interface socket, a first capacitor, a second capacitor, a third capacitor, a first resistor, a second resistor, and a third resistor; The first terminal of the step-down constant current chip is electrically connected to the first terminal of the second resistor, the second terminal of the second resistor is electrically connected to the first terminal of the load interface socket and the first terminal of the third resistor, and the second terminal of the third resistor is grounded. The second end of the load interface socket is electrically connected to the first end of the third capacitor and the first end of the inductor, respectively. The second end of the inductor is electrically connected to the fifth end of the step-down constant current chip and the first end of the second capacitor, respectively. The second end of the second capacitor is electrically connected to the sixth end of the step-down constant current chip, and the second end of the third capacitor is grounded. The second terminal of the step-down constant current chip is electrically connected to the processing module through the first resistor. The third terminal of the step-down constant current chip and the first terminal of the first capacitor are respectively grounded. The fourth terminal of the step-down constant current chip is electrically connected to the second terminal of the first capacitor and the second power supply branch.

6. A light source control method, characterized in that, The light source control method is applied to the light source control circuit according to any one of claims 1 to 5, and the light source control method includes: The external DC power supply is converted into two power supply voltages through the power supply module. One of the two power supply voltages is the processing power supply voltage, and the other power supply voltage is the drive power supply voltage. The control processing module generates at least one pulse width modulation signal based on the processing power supply voltage provided by the power supply module; After the constant current drive module is connected to the drive power supply voltage provided by the power supply module, the drive current output to the external load light source is adjusted based on the duty cycle of the pulse width modulation signal.

7. The light source control method as described in claim 6, characterized in that, The light source control circuit further includes a communication serial port circuit electrically connected to an external main control device. The communication serial port circuit is also electrically connected to the power supply module and the processing module. The step of the control processing module generating at least one pulse width modulation signal based on the processing power supply voltage provided by the power supply module includes: After synchronously activating the communication serial port circuit and the processing module based on the processing power voltage provided by the power supply module, the brightness control command of the external main control device is accessed through the communication serial port circuit. The processing module is enabled to parse the brightness control command to obtain the pulse width modulation signal corresponding to the target constant current module, wherein the target constant current module is any one of the multiple constant current driving modules.

8. An industrial vision inspection system, characterized in that, The industrial vision inspection system includes: The light source control circuit according to any one of claims 1 to 5; At least one external load light source, wherein the external load light source is electrically connected to the constant current drive module in the light source control circuit; An external master control device is electrically connected to the communication serial port circuit in the light source control circuit.

9. A computer-readable storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, implements the steps of the light source control method as described in any one of claims 6 to 7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the light source control method as described in any one of claims 6 to 7.