Light source controller and optical detector
By designing a light source controller with a communication module, a main control module, and a drive module, constant current power supply or pulse current power supply is achieved, which solves the problem of low convenience of traditional light source controllers and improves the application range of optical detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- HANGZHOU CHANGCHUAN TECH CO LTD
- Filing Date
- 2025-06-26
- Publication Date
- 2026-06-26
AI Technical Summary
Traditional light source controllers use electronic switches to control the light source, which cannot meet different usage needs and results in low ease of use.
Design a light source controller that includes a communication module, a main control module, and a drive module. By receiving configuration parameters from a host computer, it can achieve constant current power supply or pulse current power supply, support multi-channel light source control, and perform precise current control in conjunction with a trigger signal input module.
It improves the ease of use of the light source controller, expands the application range of optical inspection, and meets different optical inspection needs.
Smart Images

Figure CN224418982U_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical inspection technology, and in particular to a light source controller and an optical inspection instrument. Background Technology
[0002] A light source controller is used to power the light source, control its brightness, and regulate its illumination, enabling the camera to capture stable images at high speed. Traditional light source controllers use electronic switches to control the power supply, thus controlling the light source's on / off state. This approach cannot meet diverse usage needs and suffers from low ease of use. Utility Model Content
[0003] Therefore, it is necessary to provide a light source controller and optical inspection instrument that can improve ease of use in response to the above problems.
[0004] The first aspect of this application provides a light source controller, including: a communication module, a main control module, and a driver.
[0005] The system includes a communication module connected to a host computer, a main control module connected to the communication module and the drive module, and a drive module connected to a light source. The communication module receives configuration parameters from the host computer and sends them to the main control module. The main control module outputs drive signals to the drive module. The drive module receives the drive signals and provides constant current or pulse current power to the light source.
[0006] In one embodiment, the light source controller further includes a trigger signal input module connected to the main control module. The trigger signal input module sends a trigger signal to the main control module. After receiving the trigger signal, the main control module outputs a drive signal to control the drive module to supply pulse current to the light source.
[0007] In one embodiment, the driving module is connected to the corresponding light source through different output channels; the main control module outputs a driving signal to the driving module according to the received configuration parameters, and controls the driving module to provide constant current power to the light source of the corresponding output channel; or the main control module outputs a driving signal to the driving module according to the received configuration parameters and trigger signal, and controls the driving module to provide pulse current power to the light source of the corresponding output channel.
[0008] In one embodiment, the driving module includes a DAC analog voltage output unit, an analog switch unit, and a current driving circuit. The DAC analog voltage output unit is connected to the main control module and the analog switch unit. The analog switch unit is connected to the DAC analog voltage output unit and the current driving circuit. The current driving circuit is connected to the light source. The DAC analog voltage output unit outputs a corresponding analog voltage to the analog switch unit. When the analog switch unit is turned on, it delivers the analog voltage to the current driving circuit. The current driving circuit provides constant current or pulsed current power to the light source according to the analog voltage.
[0009] In one embodiment, the analog switch unit includes an analog switch and a resistor R1. The control terminal of the analog switch is connected to the main control module and grounded through the resistor R1. The first input terminal of the analog switch is connected to the DAC analog voltage output unit, the second input terminal of the analog switch is connected to the power supply input terminal, and the output terminal of the analog switch is connected to the current drive circuit.
[0010] In one embodiment, the analog switch unit further includes capacitors C1, C2, and C3. The first input terminal of the analog switch is also grounded through capacitor C2, the second input terminal of the analog switch is also grounded through capacitor C1, and the output terminal of the analog switch is also grounded through capacitor C3.
[0011] In one embodiment, the current drive circuit includes an operational amplifier, resistors R2, R4, R5, R6, R7, R8, and R9, capacitors C4 and C7, and a power transistor. The non-inverting input of the operational amplifier is grounded through resistor R4 and connected to the first terminal of resistor R7. The second terminal of resistor R7 is connected to the power input terminal. The inverting input of the operational amplifier is connected to the analog switch unit through resistor R2 and to the output terminal of the operational amplifier through capacitor C4. The output terminal of the operational amplifier is connected to the control terminal of the power transistor through resistor R6. The first terminal of the power transistor is connected to the light source. The second terminal of the power transistor is connected to the inverting input of the operational amplifier through resistor R8 and grounded through resistor R9. Resistor R5 and capacitor C7 are connected in series to the first and second terminals of the power transistor.
[0012] In one embodiment, the current drive circuit further includes capacitors C6 and C8, the non-inverting input terminal of the operational amplifier is grounded through capacitor C6, and the second terminal of resistor R7 is grounded through capacitor C8.
[0013] In one embodiment, the drive module further includes a temperature measuring circuit connected to the main control module; and / or the light source controller further includes a storage module connected to the main control module.
[0014] A second aspect of this application provides an optical inspection instrument, including a light source and the aforementioned light source controller.
[0015] The aforementioned light source controller and optical inspection instrument utilize a communication module that receives configuration parameters from the host computer and sends them to the main control module. The main control module outputs drive signals to the drive module, which receives these signals and provides constant current or pulsed current power to the light source. The power supply method to the light source can be adjusted according to actual needs to meet different optical inspection requirements, expanding the application range of optical inspection and improving ease of use. Attached Figure Description
[0016] Figure 1 This is a structural block diagram of the light source controller in one embodiment;
[0017] Figure 2 This is a schematic diagram of the structure of the light source controller in one embodiment;
[0018] Figure 3 This is a schematic diagram of the structure of a simulated switching unit and a current driving circuit in one embodiment. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0021] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.
[0022] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising,” “including,” or “having,” etc., specify the presence of the stated feature, whole, operation, component, part, or combination thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, operations, components, parts, or combinations thereof.
[0023] In one embodiment, such as Figure 1 As shown, a light source controller is provided, including a communication module 110, a main control module 120, and a drive module 130. The communication module 110 is connected to a host computer, the main control module 120 is connected to the communication module 110 and the drive module 130, and the drive module 130 is connected to the light source 200. The communication module 110 receives configuration parameters from the host computer and sends them to the main control module 120. The main control module 120 outputs drive signals to the drive module 130. The drive module 130 receives the drive signals and provides constant current or pulse current power to the light source 200.
[0024] The light source controller may include multiple output channels (e.g., 8 output channels), each connected to a corresponding light source 200. The drive module 130 provides constant current or pulsed current power to the corresponding output channel's light source 200 based on the received drive signal. Specifically, the host computer sends configuration parameters to the main control module 120 via the communication module 110 according to the actual optical detection needs, configuring the output type and parameters. Output types include constant current output and pulsed current output modes. Output parameters include output channel selection (selecting which channels to output), output delay time (used to control the output rise time for camera capture), output current magnitude, output duration, and trigger mode (selecting the corresponding trigger mode based on the output channel, such as 1-to-1, 1-to-many, or 2-to-many). The main control module 120 controls the drive module 130 to output based on the configured parameters. The drive module 130 is the core module of the light source controller, responsible for current output. The communication module 110 is responsible for communication with the host computer and supports various communication methods such as CAN communication, serial communication (e.g., RS232), and network communication. If multiple light source controllers are used together, the communication module 110 can choose CAN communication, allowing dozens of light source controllers to work together with a single CAN communication line, resulting in very low cost. For high-speed communication, the communication module 110 can choose network communication, supporting speeds from 10Mbps to 100Mbps. In this embodiment, the communication module 110 uses an RS232 bus to communicate with the host computer. The main control module 120 can be a main control chip such as an FPGA, CPU, or MCU; in this embodiment, the main control module 120 is an MCU.
[0025] In one embodiment, such as Figure 2 As shown, the light source controller also includes a trigger signal input module 140 connected to the main control module 120. The trigger signal input module 140 sends a trigger signal to the main control module 120. After receiving the trigger signal, the main control module 120 outputs a drive signal to control the drive module 130 to supply pulse current to the light source.
[0026] Specifically, the trigger signal input module 140 is connected to the main control module 120 via an I / O interface. The main control module 120 determines the output type based on the configuration parameters. In constant current output mode, after the host computer sends the configuration parameters to the main control module 120 via the communication module 110, the main control module 120 outputs a drive signal to the drive module 130, controlling the drive module 130 to provide constant current power to the light source 200. In pulse current output mode, after the host computer sends the configuration parameters to the main control module 120 via the communication module 110, the main control module 120 waits for the trigger signal from the trigger signal input module 140. Upon receiving the trigger signal, it outputs a drive signal, controlling the drive module 130 to provide pulse current power to the light source 200.
[0027] In pulse current mode, the main control module 120 needs to receive trigger signals and set trigger modes. Taking a light source controller with 8 output channels as an example, there are three trigger modes: the first is 1-to-1 triggering, where each trigger signal corresponds to one output channel; the second is 1-to-4 triggering, where 2 trigger signals control 8 output channels; and the third is 1-to-8 triggering, where 1 trigger signal controls 8 output channels. The trigger signal input module 140 can use an optocoupler isolation module to transmit signals. To transmit signals to the main control module 120 as quickly as possible, the trigger signal input module 140 uses a high-speed optocoupler chip. Specifically, the trigger signal input module 140 can be connected to a camera, transmitting trigger signals to the main control module 120 based on the signals output by the camera, causing the light source 200 to perform strobe illumination, thereby extending the lifespan of the light source 200.
[0028] Furthermore, the drive module 130 is connected to the corresponding light source 200 through different output channels; the main control module 120 outputs a drive signal to the drive module 130 according to the received configuration parameters, controlling the drive module 130 to provide constant current power to the light source 200 of the corresponding output channel, or the main control module 120 outputs a drive signal to the drive module 130 according to the received configuration parameters and trigger signal, controlling the drive module 130 to provide pulse current power to the light source 200 of the corresponding output channel. This supports power supply control for multiple light sources, meeting the needs of different optical testing scenarios.
[0029] In one embodiment, continue to refer to Figure 2The driving module 130 includes a DAC analog voltage output unit 132, an analog switch unit 134, and a current drive circuit 136. The DAC analog voltage output unit 132 is connected to the main control module 120 and the analog switch unit 134. The analog switch unit 134 is connected to the DAC analog voltage output unit 132 and the current drive circuit 136. The current drive circuit 136 is connected to the light source 200. The DAC analog voltage output unit 132 outputs a corresponding analog voltage to the analog switch unit 134. When the analog switch unit 134 is turned on, it delivers the analog voltage to the current drive circuit 136. The current drive circuit 136 provides constant current or pulse current power to the light source 200 according to the analog voltage. The communication module 110 can be connected to the main control module 120 via a UART interface. The DAC analog voltage output unit 132 can be connected to the main control module 120 via an SPI interface. The DAC analog voltage output unit 132 outputs an analog voltage according to the drive signal sent by the main control module 120. The analog switch unit 134 can be connected to the main control module 120 via an I / O interface. In constant current output mode, the main control module 120 controls the analog switch unit 134 to remain closed, connecting the DAC analog voltage output unit 132 to the current drive circuit 136, thus providing constant current power to the light source 200. In pulse current output mode, after receiving a trigger signal, the main control module 120 controls the on / off duration of the analog switch unit 134 according to the configuration parameters, providing pulse current power to the light source 200. In different output modes, the analog voltage output by the DAC analog voltage output unit 132 is transmitted to the current drive circuit 136, which converts the analog voltage into analog current to drive the light source 200 to emit light. The magnitude of the analog voltage output by the DAC analog voltage output unit 132 can be adjusted according to actual needs to achieve multi-channel high-power output.
[0030] It should be noted that when the light source controller includes multiple output channels, a current drive circuit 136 can be set for each output channel to realize constant current or pulse current power supply for different output channels; or the same current drive circuit 136 can be connected to different output channels to control the current drive circuit 136 to provide constant current or pulse current power supply to different output channels.
[0031] In addition, the light source controller also includes a storage module 150 connected to the main control module 120. The storage module 150 can be a FLASH memory or other types of memory. The storage module 150 can be connected to the main control module 120 via an SPI interface and can be used to store configuration parameters and other data.
[0032] In one embodiment, such as Figure 3As shown, taking the main control module 120 as an MCU as an example, the analog switch unit 134 includes an analog switch U1 and a resistor R1. The control terminal IN of the analog switch U1 is connected to the main control module 120 through the I / O interface (terminal MCU_SW_00) and grounded through the resistor R1. The first input terminal NO of the analog switch U1 is connected to the DAC analog voltage output unit 132 through the terminal DAC_OUT_00. The second input terminal NC of the analog switch U1 is connected to the power input terminal VDD. The output terminal COM of the analog switch U1 is connected to the current drive circuit 136 through the terminal COM00. Further, the analog switch unit 134 also includes capacitors C1, C2, and C3. The first input terminal NO of the analog switch U1 is also grounded through capacitor C2, the second input terminal NC of the analog switch U1 is also grounded through capacitor C1, and the output terminal COM of the analog switch U1 is also grounded through capacitor C3. The capacitors are used to filter the input or output power, improving power supply reliability and circuit stability. Specifically, the output terminal COM of the analog switch U1 is filtered by capacitor C3 and then connected to the current drive circuit 136 through the COM00 terminal.
[0033] Furthermore, the current drive circuit 136 includes an operational amplifier U2, resistors R2, R4, R5, R6, R7, R8, and R9, capacitors C4 and C7, and a power transistor Q1. The non-inverting input of the operational amplifier U2 is grounded through resistor R4 and connected to the first end of resistor R7. The second end of resistor R7 is connected to the power input terminal VDD. The inverting input of the operational amplifier U2 is connected to the analog switch unit 134 through resistor R2, specifically to the output terminal COM of the analog switch U1. The inverting input of the operational amplifier U2 is connected to the output terminal of the operational amplifier U2 through capacitor C4. The output terminal of the operational amplifier U2 is connected to the control terminal of the power transistor Q1 through resistor R6. The first end of the power transistor Q1 is connected to the light source 200. The second end of the power transistor Q1 is connected to the inverting input of the operational amplifier U2 through resistor R8 and grounded through resistor R9. Resistor R5 and capacitor C7 are connected in series to the first and second ends of the power transistor Q1. Specifically, resistor R9 is a sampling resistor. Resistor R5 and capacitor C7 are connected in series, with the other end of resistor R5 connected to the first terminal of power transistor Q1, and the other end of capacitor C7 connected to the second terminal of power transistor Q1. In this embodiment, power transistor Q1 is a MOSFET, with the gate as the control terminal, the drain as the first terminal, and the source as the second terminal. Furthermore, the current drive circuit 136 also includes capacitors C6 and C8. The non-inverting input terminal of operational amplifier U2 is grounded through capacitor C6, and the second terminal of resistor R7 is grounded through capacitor C8.
[0034] In addition, such as Figure 2As shown, the drive module 130 also includes a temperature measuring circuit 138 connected to the main control module 120. The temperature measuring circuit 138 can be connected to the main control module 120 via an IIC interface. The temperature measuring circuit 138 detects the temperature of the drive module 130, and the main control module 120 determines whether the temperature exceeds the limit or is abnormal. If an abnormality is detected, the drive module 130 will be shut down in time, and an alarm will be triggered via communication to prevent danger from occurring.
[0035] The maximum output current of the drive module 130 is designed to support pulse current output with adjustable output time. An analog switch U1 is added to the circuit for switching control. The main control module 120 outputs a high level according to the configured output time through the timer I / O interface (MCU_SW_00), controlling the output terminal COM of the analog switch U1 to connect to the first input terminal NO. At this time, the voltage at terminal COM00 is equal to the analog voltage output by the DAC analog voltage output unit 132. The current can then be calculated using the virtual short and virtual open characteristic formulas of the operational amplifier U2. The internal timer of the main control module 120 starts counting, and when the set time is reached, it outputs a low level, controlling the output terminal COM of the analog switch U1 to connect to the second input terminal NC to receive VDD DC power. The voltage at terminal COM00 is then equal to the VDD voltage value. The VDD value is transmitted to the inverting input terminal of the operational amplifier U2 through the COM00 terminal. Since the VDD value is greater than the input voltage of the non-inverting input terminal of the operational amplifier U2, the output of the operational amplifier U2 is 0, so the current is 0A. The light source 200 has no current and appears to be in an off state.
[0036] The aforementioned light source controller is communicated between the host computer and the light source controller via a communication module 110 (e.g., RS232 bus). The main function of the light source controller is to control the light source's on / off state and brightness. First, it selects between constant current mode and pulse current mode for output based on configuration requirements. In constant current mode, the current is continuously output until the host computer shuts off the current output via the communication module 110. In this mode, the output channel (selected from eight channels) and the current magnitude need to be set. In pulse current mode, the current waveform is a square wave. The output channel (selected from eight channels), current magnitude, trigger mode (selected from three trigger modes), output current time, and trigger delay time need to be set. After setting these parameters, it waits for a trigger signal. Once the main control module 120 receives the trigger signal, the corresponding output channel can output current according to the configured parameters. In constant current mode, setting the current magnitude and output channel controls the output current of the corresponding output channel; in pulse mode, the output channel outputs current after the trigger signal arrives.
[0037] In addition, if the main control module 120 detects an abnormal state during operation, it will stop the relevant functions, save the relevant data, and the alarm service will analyze the data to determine the type of alarm, such as self-test failure, system abnormality, hardware abnormality, temperature abnormality, etc. Then, it will save the alarm information and feed it back to the user through communication and human-machine interaction services to remind the user to deal with it in a timely manner.
[0038] In one embodiment, an optical inspection instrument is also provided, including a light source and the aforementioned light source controller. The light source may specifically be an LED matrix light source. The optical inspection instrument may also include a host computer and a camera. The host computer may be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The portable wearable device may be a smartwatch, smart bracelet, head-mounted device, etc.
[0039] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0040] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the utility model patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A light source controller, characterized in that, include: The system includes a communication module, a main control module, and a drive module. The communication module is connected to a host computer, the main control module is connected to the communication module and the drive module, and the drive module is connected to a light source. The communication module receives the configuration parameters sent by the host computer and sends them to the main control module, and the main control module outputs a drive signal to the drive module; The driving module receives the driving signal and provides constant current or pulsed current power to the light source.
2. The light source controller according to claim 1, characterized in that, It also includes a trigger signal input module connected to the main control module. The trigger signal input module sends a trigger signal to the main control module. After receiving the trigger signal, the main control module outputs a drive signal to control the drive module to supply pulse current to the light source.
3. The light source controller according to claim 2, characterized in that, The driving module is connected to the corresponding light source through different output channels; the main control module outputs a driving signal to the driving module according to the received configuration parameters, and controls the driving module to provide constant current power to the light source of the corresponding output channel, or the main control module outputs a driving signal to the driving module according to the received configuration parameters and trigger signal, and controls the driving module to provide pulse current power to the light source of the corresponding output channel.
4. The light source controller according to claim 1, characterized in that, The driving module includes a DAC analog voltage output unit, an analog switch unit, and a current driving circuit. The DAC analog voltage output unit is connected to the main control module and the analog switch unit. The analog switch unit is connected to the DAC analog voltage output unit and the current driving circuit. The current driving circuit is connected to the light source. The DAC analog voltage output unit outputs a corresponding analog voltage to the analog switch unit. When the analog switch unit is turned on, it delivers the analog voltage to the current driving circuit. The current driving circuit provides constant current or pulsed current power to the light source according to the analog voltage.
5. The light source controller according to claim 4, characterized in that, The analog switch unit includes an analog switch and a resistor R1. The control terminal of the analog switch is connected to the main control module and grounded through the resistor R1. The first input terminal of the analog switch is connected to the DAC analog voltage output unit, the second input terminal of the analog switch is connected to the power supply input terminal, and the output terminal of the analog switch is connected to the current drive circuit.
6. The light source controller according to claim 5, characterized in that, The analog switch unit also includes capacitors C1, C2 and C3. The first input terminal of the analog switch is grounded through capacitor C2, the second input terminal of the analog switch is grounded through capacitor C1, and the output terminal of the analog switch is grounded through capacitor C3.
7. The light source controller according to claim 4, characterized in that, The current drive circuit includes an operational amplifier, resistors R2, R4, R5, R6, R7, R8, and R9, capacitors C4 and C7, and a power transistor. The non-inverting input of the operational amplifier is grounded through resistor R4 and connected to the first terminal of resistor R7. The second terminal of resistor R7 is connected to the power input terminal. The inverting input of the operational amplifier is connected to the analog switch unit through resistor R2 and to the output terminal of the operational amplifier through capacitor C4. The output terminal of the operational amplifier is connected to the control terminal of the power transistor through resistor R6. The first terminal of the power transistor is connected to the light source. The second terminal of the power transistor is connected to the inverting input of the operational amplifier through resistor R8 and grounded through resistor R9. Resistor R5 and capacitor C7 are connected in series to the first and second terminals of the power transistor.
8. The light source controller according to claim 7, characterized in that, The current drive circuit also includes capacitors C6 and C8. The non-inverting input terminal of the operational amplifier is grounded through capacitor C6, and the second terminal of resistor R7 is grounded through capacitor C8.
9. The light source controller according to any one of claims 1 to 8, characterized in that, The drive module further includes a temperature measuring circuit connected to the main control module; and / or the light source controller further includes a storage module connected to the main control module.
10. An optical inspection instrument, characterized in that, Includes a light source and a light source controller as described in any one of claims 1 to 9.