Multifunctional light source controller and application method thereof

Through the design of the multifunctional light source controller, the shortcomings of intelligent light source adjustment, filter switching and image data transmission in the industrial vision detection system are solved, and dynamic adjustment of light source brightness, precise filter switching and stable transmission of image data are realized, improving the adaptability and intelligence level of the system.

CN120282339APending Publication Date: 2025-07-08SUZHOU JIALI AUTOMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510673811.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing industrial vision detection systems have shortcomings in intelligent light source adjustment, filter switching, image data transmission and high-speed response control, including poor dynamic perception of light intensity, inaccurate filter switching, image data loss and response delay.

Method used

A multifunctional light source controller is designed, including a main control processing module, a channel light source driving module, a trigger mode recognition module, a brightness detection and closed-loop control module, a filter switching module and a communication interface module to realize dynamic adjustment of light source brightness, precise filter switching, stable transmission of image data and high-speed response control.

Benefits of technology

It improves the system's ability to adapt to complex lighting conditions, enhances the capture efficiency and data integrity in image processing scenarios, improves the intelligence and dynamic adjustment capabilities of the light source control system, and ensures the accuracy and stability of light source switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120282339A_ABST
    Figure CN120282339A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of visual inspection, and discloses a multifunctional light source controller and an application method thereof, and the multifunctional light source controller comprises a main control processing module which is used for receiving an external control instruction, executing parameter setting, working mode switching and channel scheduling; the channel light source driving module is in communication connection with the main control processing module and is used for controlling current output, channel configuration current, brightness and a trigger mode of a light source channel; the trigger mode recognition module is connected with the main control processing module and used for recognizing a trigger signal from the outside or the inside and controlling the light source channel to respond according to a set mode; a brightness detection and closed-loop control module; an optical filter switching module; a light detection module; and a communication interface module. According to the invention, through light intensity perception, optical filter precise control and high-speed communication structures, the comprehensive control effect of brightness self-adjustment, filtering rapid positioning and stable image data transmission is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vision detection, and specifically to a multifunctional light source controller and its application method. Background Art

[0002] In the fields of industrial automation and precision detection, vision detection technology is widely used in the rapid identification and positioning of product surface defects. Especially in the mass production processes of electronic components, metal parts or precision structural parts, etc., it is often necessary to rely on a detection light source with high stability and high response speed to direct light on the target surface, so as to cooperate with the camera to complete multi-angle and multi-band capture work.

[0003] In the prior art, some industrial vision systems have realized the control output of different types of light sources by integrating a constant current light source controller in the detection device. Such controllers usually cooperate with a fixed trigger mechanism and preset brightness parameters, and complete the instruction issuance in cooperation with the central processing unit, which can meet the requirements of the detection scenario to a certain extent. At the same time, some systems have also introduced a channel flash control structure, which can realize fast light source switching, so as to adapt to multi-angle and multi-posture shooting methods. In terms of communication, most traditional controllers use methods such as serial ports or CAN buses to complete parameter interaction between the host computer and the main control board, and have good stability for low-frequency parameter configuration data. Generally speaking, the existing solutions can achieve relatively complete control operations in medium-complexity application scenarios.

[0004] Although the prior art can achieve relatively complete control operations in medium-complexity application scenarios, there are still some deficiencies in the actual application of the prior art; firstly, the traditional controller lacks the ability to dynamically perceive the light intensity, resulting in the brightness adjustment process completely relying on manual setting, with poor adaptability; secondly, in scenarios where it is necessary to frequently switch filters or quickly respond to spectral changes, the existing filter control structures generally lack an encoder feedback and step-by-step precision control mechanism, and problems such as inaccurate positioning and jamming occur frequently, reducing the system operation stability; in addition, in high-speed image acquisition tasks, the amount of image data is large while the transmission channel bandwidth is limited, and problems such as frame loss and timing disorder in the image transmission process of traditional communication interfaces are relatively prominent, making it difficult to ensure data integrity; finally, and more importantly, the way of the CPU serially processing logic signals and light source control commands is prone to response delays under microsecond-level exposure requirements, resulting in phenomena such as gray-scale jitter and water ripples, directly affecting the final image quality. Summary of the Invention

[0005] Aiming at the deficiencies of the prior art, the present invention provides a multifunctional light source controller and its application method, which solves the problems of the traditional controller in terms of intelligent light source adjustment, precise filter switching, stable image data transmission and high-speed response control.

[0006] To achieve the above object, the present invention is implemented through the following technical solutions: A multifunctional light source controller, including: A main control processing module, which is used to receive external control instructions and perform parameter setting, working mode switching, and channel scheduling; A channel light source driving module, which is communicatively connected to the main control processing module and is used to control the current output of the light source channel, channel configuration current, brightness, and trigger mode; A trigger mode recognition module, which is connected to the main control processing module and is used to recognize external or internal trigger signals and control the light source channel to respond according to the set mode; A brightness detection and closed-loop control module, which is connected to the main control processing module and the light source driving module and is used to collect the actual brightness value of the light source and perform dynamic adjustment by controlling the DA output with 12-bit precision; A filter switching module, which is connected to the main control processing module and is used to control the rotation of the color wheel through a motor to realize the position switching of different filters; A light detection module, which is used to collect the brightness of the internal light source in real time and feedback it to the main control processing module, and automatically increase the brightness of the light source when the light source has light decay after long-term lighting; A communication interface module, which is used to realize parameter interaction with the host computer and image data interface communication.

[0007] Preferably, the channel light source driving module includes: A constant current output circuit, which realizes stable supply of current values in the range of 0-6A through an adjustable power output module and a current limiting feedback loop; A linear constant current circuit using an adder and an integrator for hybrid processing, and then using a 12-bit precision DA output to control the magnitude of the current output of the constant current circuit; A channel independent scheduling unit, which configures independent trigger modes, brightness targets, current magnitudes, and filter numbers for each light source channel through a multiplexer and a parameter memory.

[0008] Preferably, the trigger mode recognition module includes: A level trigger unit, which receives a continuous high-level or low-level signal through an external IO interface and controls the light source channel to remain lit; An edge trigger unit, which triggers a single-chip microcomputer peripheral interrupt by capturing the rising edge or falling edge of the input signal, thereby controlling the instantaneous lighting of the light source; An internal trigger unit, which periodically generates a control signal through a timer and drives the channel to automatically flash at a set time interval; A mode selection logic, which performs logical judgment and switching control on the level, edge, or internal trigger mode through user instructions or host computer configuration data.

[0009] Preferably, the brightness detection and closed-loop control module includes: A photosensitive sensor that collects the actual emitted light intensity of each light source and converts the sampling signal into a digital quantity for feedback to the main control module; An error calculator that generates a brightness error signal through differential processing of the difference between the set target brightness and the collected actual brightness; A linear constant current circuit that quickly and dynamically adjusts the output current through sampling and calculation of the output current.

[0010] Preferably, the filter switching module includes: A color wheel assembly that mechanically mounts multiple filter slots and can rotate to the target filter position in a specified order; A stepper motor that controls the rotation angle through the pulse signal of the main control module to achieve precise positioning of the color wheel; An encoder that feeds back the actual position of the current filter through magnetic induction or photoelectric detection and transmits the position information back to the main control module; A control logic that calculates the number of rotation steps of the stepper motor through the difference between the filter number and the current color wheel position to achieve rapid positioning and switching of the filter.

[0011] Preferably, the light detection module includes: A digital light sensor that converts the analog light signal into a digital illuminance value by sensing the surrounding illumination intensity; A data converter that transmits the collected light data to the main control module for processing through the I 2 C module; An adaptive brightness adjustment unit that adjusts the target brightness value for subsequent light source current control by comparing the set threshold with the current light intensity.

[0012] The present invention also provides an application method for a multifunctional light source controller, including the following steps: An initialization step, in which the main control processing module reads the historical configuration data in the memory and initializes the working parameters of each light source channel, including the trigger mode, brightness target value, current output value, and filter number; A trigger response step, in which the trigger mode recognition module monitors external or timing signals and activates the selected light source channel according to the set mode; A filter switching step, in which after receiving the filter number instruction, the filter switching module is controlled to drive the color wheel to rotate to the target filter position; A light source driving step, in which the selected channel is driven to start the light source output according to the set 12-bit precision DA output; An image acquisition synchronization step, in which the main control processing module outputs a trigger signal synchronized with the exposure signal to an external imaging device to achieve coordinated image acquisition actions.

[0013] Preferably, the initialization step includes: A historical parameter reading step of restoring the channel parameters saved before the last system power-off by reading the stored content in the EEPROM; a filter wheel return step of controlling the color wheel to automatically rotate to the corresponding position by obtaining the last filter number. A remote configuration update step of updating the channel configuration parameters by issuing an instruction from the host computer and writing the new configuration into the non-volatile memory.

[0014] Preferably, the light source driving step includes: A brightness acquisition step of collecting the current light source emission brightness value through a brightness detection module and uploading it to the main control module. An error calculation step of performing a differential process on the actual brightness and the target brightness through an error calculator to obtain an error signal. Use a linear constant current circuit and a 12-bit precision DA to control the magnitude of the output current of the constant current circuit.

[0015] Preferably, the adaptive brightness adjustment step includes: A light intensity sampling step of periodically obtaining the internal light intensity value of the controller through a light detection module. A target correction step of performing a correction calculation on the target brightness by the main control module to adapt to the current light intensity. An image feedback adjustment step of further finely adjusting the target brightness according to the gray deviation on the premise that the image acquisition system provides the feedback of the average gray value of the image. A current correction step of transmitting the final brightness target to the linear constant current circuit and the 12-bit precision DA to adjust the light source driving current.

[0016] The present invention provides a multifunctional light source controller and its application method, which has the following beneficial effects: 1. The present invention adopts the technical solution of an integrated light detection module and an adaptive brightness adjustment mechanism, realizing the automatic adjustment of the light source brightness when the light source has light decay during long-term lighting. Compared with the existing light source control solutions that rely on fixed current setting values or manual adjustment methods, it solves the problem of brightness inadaptability caused by light decay changes, improves the adaptability of the system to complex lighting conditions, and effectively reduces the risk of power consumption fluctuations during long-term operation.

[0017] 2. The present invention realizes the high-speed and stable communication between the host computer and the main control module by constructing a data frame structure based on a standard communication protocol and an image data packet transmission mechanism. Compared with traditional controllers that only support low-speed instruction communication, it solves the problems of easy blocking and response delay of large-capacity image data, and improves the capture efficiency and data integrity of the multifunctional light source controller in the image processing application scenario.

[0018] 3. The present invention adopts a filter switching scheme that synergistically locates and controls a color wheel assembly and a stepper motor, and introduces an encoder real-time feedback mechanism, effectively improving the accuracy and reliability of filter switching. Compared with the problem of difficult and slow filter switching in existing mechanical or fixed filter systems, it solves the technical shortcoming of inaccurate positioning and slow response during frequent switching, and has higher practicability especially in high-speed imaging or multi-band switching scenarios.

[0019] 4. The present invention designs a complete data interaction interface architecture, supports bidirectional communication of image information, light intensity, and instruction control, and realizes the closed-loop control of the overall information link of the system. Compared with the traditional controller that only supports one-way parameter distribution or status query mode, it solves the problems of broken system feedback chain and inability to synchronize status in real time, thus significantly enhancing the intelligence and dynamic adjustment ability of the light source control system. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is the architecture diagram of the controller of the present invention; Figure 2 It is the method flow chart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the specification of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0022] Please refer to the attached Figure 1 , the embodiments of the present invention provide a multifunctional light source controller and its application method, including: A main control processing module, which is used to receive external control instructions and execute parameter setting, working mode switching, and channel scheduling; The main control processing module undertakes key control tasks in the entire multifunctional light source control system. By receiving external control instructions and combining built-in logic control, it realizes the scheduling and management of each sub-module of the light source controller (such as the light source driving module, trigger mode recognition module, brightness detection and closed-loop control module, etc.). The core functions of the main control processing module are parameter setting, working mode switching, and channel scheduling. It is not only responsible for communication and interaction with external devices, but also needs to monitor the working status of each module in real time to ensure the stable operation of the light source system under predetermined working conditions.

[0023] Specifically, the main control processing module adjusts various parameters of the system through multiple input signals (such as external user input, system status feedback, light intensity, etc.). In the initialization stage, the main control processing module first reads the previously saved working parameters from the non-volatile memory (such as EEPROM) and configures each channel of the system according to these parameters. During this process, the main control processing module will perform some preset calibration operations, such as reading the filter number and channel settings before the last system power-off, to ensure that the system can resume its previous working state after startup. This can ensure the continuity and stability of the system to the greatest extent and avoid the need for reconfiguration every time it is started.

[0024] During the control process, the main control processing module calculates and updates the system parameters in real time according to the information from each module. For example, under the feedback of the brightness detection and closed-loop control module, the main control module will adjust the output current of the light source through a 12-bit precision DA according to the difference between the current brightness and the target brightness to ensure that the brightness of the light source is stable within a predetermined range. In addition, the main control processing module is also responsible for receiving external or internal trigger signals and controlling the switching of the corresponding light source channels according to the preset working mode. For example, when the system works in the "level trigger" mode, the main control processing module will determine the lighting and extinguishing of the light source by detecting the high and low levels of the external signal. In the "edge trigger" mode, the main control processing module will trigger the switching of the corresponding light source channel according to the rising or falling edge of the input signal.

[0025] In a possible implementation, the working process of the main control processing module is as follows: Receive external control instructions: The main control processing module is connected to the host computer or external device through a communication interface to receive the control instructions input by the user. These instructions usually include the adjustment requirements for parameters such as light source current, brightness, and trigger mode.

[0026] According to the received control instructions, the main control processing module will adjust the working parameters of each channel through communication with other sub-modules. For example, the main control processing module can adjust the current output, brightness target, trigger mode, etc. of each channel to ensure that the output light source of the system meets the user requirements.

[0027] The main control processing module can not only switch the working mode of the light source according to the user instructions, but also detect the brightness of the internal light source inside the controller; only after the brightness compensation function is enabled, due to the light source being lit for a long time, the light source has light decay resulting in a decrease in brightness, and the controller can automatically increase the brightness for compensation.

[0028] Channel Scheduling: The main control processing module is responsible for scheduling different light source channels. Each light source channel can be independently controlled, and parameters such as current and brightness of each channel can be set individually. By scheduling the operation of different channels, the main control processing module can achieve independent control of the channels, thus meeting different application requirements.

[0029] In some embodiments, the main control processing module also implements the following functions: Real-time Monitoring and Fault Diagnosis: The main control processing module can monitor the operating status of each sub-module in real time. When an abnormality is detected in a certain module (such as excessive current, over-standard brightness, etc.), the main control module can quickly take measures (such as stopping the light source output, triggering an alarm, etc.) to ensure the safety of the system.

[0030] Communication Protocol and Data Interaction: The main control processing module conducts data interaction with external devices through a standard communication interface. It not only receives external control instructions but also can feedback the working status of the system to external devices. The process of data exchange ensures the openness and scalability of the system, facilitating collaborative work with other devices.

[0031] Adaptive Adjustment Function: When the internal light intensity changes significantly, the main control processing module can automatically adjust the brightness of the light source according to the real-time data provided by the light detection module. This adaptive adjustment function ensures that the light source always maintains the best brightness output while avoiding unnecessary energy waste.

[0032] In this embodiment, the main control processing module also involves the PID control algorithm, which is applied to adjust the brightness of the light source during the closed-loop control process. Specifically, the main control processing module calculates the brightness error and adjusts the 12-bit precision DA through the PID algorithm to accurately control the brightness of the light source.

[0033] Assume the target brightness is L target , and the actually collected brightness is L actual , then the brightness error E can be expressed as: E = L target - L actual ; The PID controller adjusts the 12-bit precision DA according to this error E: Where: K p is the proportional gain; K i is the integral gain; K d is the derivative gain; E is the brightness error (Brightness Error), representing the difference between the target brightness and the actual brightness; is the integral of the error (Integral of the Error); is the rate of change of the error.

[0034] Through this formula, the main control processing module adjusts the 12-bit precision DA according to the brightness error, thus achieving precise brightness adjustment.

[0035] The main control processing module ensures the efficient operation and stability of the light source control system through precise algorithms and scheduling mechanisms. In different application scenarios, the main control module can flexibly adjust various parameters, adapt to changes in light intensity, and work in coordination with external devices through communication interfaces, thereby improving the functionality and reliability of the system.

[0036] The channel light source driving module, communicatively connected to the main control processing module, is used to control the current output of multiple light source channels, and each channel is independently configured with current, brightness, and trigger mode; The channel light source driving module plays a core role in the multi-functional light source controller. It is communicatively connected to the main control processing module tightly, responsible for controlling the current output of multiple light source channels, and ensuring that each light source channel works independently. Specifically, the current, brightness, and trigger mode of each light source channel can be independently configured, which provides the system with a high degree of flexibility and precise control ability. The channel light source driving module can meet the requirement of automatically increasing the light brightness when the light decays.

[0037] To achieve efficient and stable light source control, the channel light source driving module includes a constant current output circuit and a channel independent scheduling unit. The functions and implementation methods of each component in the system will be further described in detail to ensure that the entire light source driving system can work stably under various complex conditions and provide consistent performance.

[0038] In some embodiments, the constant current output circuit combines an adjustable power output module with a current limiting feedback loop to ensure stable current output for each light source channel, and the output is adjustable within the range of 0 - 6A. The main task of the constant current output circuit is to convert the input voltage signal into a stable current and perform real-time adjustment through the current limiting feedback loop to prevent the current from exceeding the predetermined safe range.

[0039] Specifically, the constant current circuit monitors the actual value of the current through a feedback mechanism and adjusts the output voltage according to the deviation to ensure stable current output. Such a design not only provides a flexible current adjustment range but also guarantees the accuracy of the current, which is applicable to various different types of light sources. For example, in the application of lasers, different models of lasers have different current requirements, and the constant current output circuit can provide precise current output according to the actual needs.

[0040] To meet the requirements of independent channel control, the channel light source drive module designs a channel scheduling unit. Through the cooperation of a multiplexer and a parameter memory, this unit configures independent trigger modes, brightness targets, current magnitudes, and filter numbers for the light source channels. The parameters of the light source channels can all be personalized configured according to actual needs, ensuring that each channel works independently and flexibly.

[0041] Specifically, the channel independent scheduling unit receives the configuration instructions transmitted from the main control module and distributes the instructions to each channel. On one channel, a higher current may be configured to achieve a stronger brightness output, while on another channel, a lower current and a different trigger mode may be required. This ability of independent configuration enables the entire light source system to handle complex multi-tasking environments and make timely adjustments according to requirements.

[0042] For example, if the system requires different channels to execute different light source working modes, some channels can be set to the "level trigger" mode, while others can be set to the "edge trigger" mode. Through the channel independent scheduling unit, each channel can be flexibly configured according to specific requirements, thereby improving the adaptability and efficiency of the system.

[0043] In some embodiments, the multiplexer in the channel independent scheduling unit is used to select the target channel according to the configuration instructions and transfer the parameters (such as current, voltage, brightness target, etc.) set by the main control module to the drive unit of the target channel. In this way, each channel can independently obtain the settings and execute corresponding operations.

[0044] In addition, the parameter memory is used to store the working parameters of each light source channel, ensuring that the system can restore to the previous working state each time it starts. This design greatly simplifies the operation process of the system, and users no longer need to reconfigure the parameters of each light source channel every time. Through this storage mechanism, the system can respond quickly to changes, and at the same time, it also improves the stability and reliability of the system.

[0045] The channel light source drive module can achieve independent and precise control of multiple light source channels. The main control module adjusts the light source brightness and flexibly configures the current, brightness, and trigger mode of each channel through the channel independent scheduling unit, so as to meet various application requirements.

[0046] A trigger mode recognition module, connected to the main control processing module, is used to recognize trigger signals from external or internal sources and control the light source channels to respond according to the set mode; The trigger mode recognition module is responsible for identifying and judging the trigger mode based on external or internal trigger signals, thereby controlling the light source channel to respond according to the set mode. This module can support multiple trigger modes, such as level trigger, edge trigger, and internal trigger mode, providing a flexible trigger control method for the system. The trigger mode recognition module is closely connected to the main control processing module, and realizes precise control of the light source channel by receiving and processing various signals.

[0047] Specifically, the design of the trigger mode recognition module is to solve the differences in the requirements for light source control in different application scenarios, ensuring that the light source can automatically respond according to external conditions and set requirements. In some embodiments, the trigger mode recognition module can support flexible switching between external trigger signals and timed trigger signals, providing multiple operation modes for the system.

[0048] In some embodiments, the trigger mode recognition module includes a level trigger unit. This unit receives continuous high-level or low-level signals through an external IO interface and controls the lighting or extinguishing of the light source channel according to this signal. Specifically, when the external IO interface receives a high-level signal, the level trigger unit will trigger the corresponding light source channel to light up; when a low-level signal is received, the light source channel will remain extinguished.

[0049] Generally, the level trigger method is used for applications that require long-term stable lighting. For example, in some industrial applications, the light source may need to operate continuously under certain specific conditions. At this time, the level trigger mode can provide a simple and reliable solution. Controlling the switch of the light source through an external level signal can avoid manual intervention and complex operations, improving the stability of the system.

[0050] As part of the trigger mode recognition module, the edge trigger unit triggers the peripheral interrupt of the single-chip microcomputer by capturing the rising edge or falling edge of the input signal, and controls the light source channel to light up instantaneously. Specifically, when the system receives the rising edge or falling edge of an external signal, the edge trigger unit will generate a trigger signal to drive the light source channel to light up or perform corresponding operations.

[0051] In a possible implementation, the edge trigger unit can implement different control logics according to the different rising edges or falling edges. For example, the rising edge trigger mode can be used for application scenarios that require immediate response when the signal just changes. By precisely capturing the input signal, the edge trigger mode provides a more flexible and immediate control method for the lighting of the light source. This mode is widely used in scenarios where signals need to be quickly responded to, such as rapid detection, automation control, etc.

[0052] The internal trigger unit is another important part of the trigger mode recognition module. It periodically generates control signals through a timer and drives the light source channel to flash automatically according to a predetermined time interval. Specifically, the internal trigger unit generates periodic trigger signals based on the set timer interval and controls the corresponding light source channel to flash or turn off at the predetermined time interval.

[0053] The internal trigger unit is particularly suitable for light source applications that require timed flashing. For example, in some occasions of prompts, warnings, or stroboscopic lights, the flashing of the light source must be strictly carried out according to the set time interval. The internal trigger mode can precisely control the turning on and off of the light source each time through the configuration of the timer, ensuring that the light source executes a fixed operation cycle as required.

[0054] To achieve flexible trigger mode switching, the trigger mode recognition module designs a mode selection logic. In some embodiments, the user can select the required trigger mode (such as level trigger, edge trigger, or internal trigger) by setting instructions or configuring data through the host computer. The mode selection logic makes a logical judgment on the trigger mode based on these input signals and passes the selection result to the corresponding trigger unit to guide it to work according to the set mode.

[0055] As an option, the mode selection logic not only supports user settings through the interface but also can be dynamically switched according to the real-time needs of the system. For example, during the operation of the system, if the internal light intensity of the controller changes, the system can switch the trigger mode according to preset rules or automatic detection mechanisms to adapt to the new requirements. Through this flexible mode selection logic, the trigger mode recognition module can efficiently meet the needs of different applications.

[0056] The trigger mode recognition module provides diversified trigger mode support for the multi-functional light source controller. The level trigger mode provides continuous and stable light source control, the edge trigger mode can achieve fast response, and the internal trigger mode can perform timed flashing according to the set period. The mode selection logic provides a flexible control method for the system, enabling the user or the system to dynamically select the trigger mode according to different needs, thereby achieving precise control of the light source channel.

[0057] The brightness detection and closed-loop control module is connected to the main control processing module and the light source drive module, and is used to collect the actual brightness value of the light source and perform dynamic adjustment through a 12-bit precision DA; The brightness detection and closed-loop control module is connected to the main control processing module and the light source drive module, responsible for collecting the actual brightness value of the light source, and then using a linear constant current circuit with an adder and an integrator for hybrid processing, and then adopting a 12-bit precision DA to output an analog quantity to control the magnitude of the output current of the constant current circuit to maintain the constancy of the brightness.

[0058] The design purpose of this module is to ensure the accuracy and stability of the light source output brightness, especially when the light source brightness may be affected by light decay during long-term use. Through the closed-loop control mechanism, the system can automatically compensate for the brightness error and avoid manual intervention, thereby improving the self-adaptability and intelligence level of the system.

[0059] In some embodiments, the brightness detection and closed-loop control module includes a photosensitive sensor, which is used to collect the actual emitted light intensity of the light source channel in real time. The photosensitive sensor converts the optical signal into a digital signal and feeds the sampling signal back to the main control module for processing. The type of the photosensitive sensor can be a photodiode, a photoresistor, a CCD sensor, etc. In this way, the system can obtain real-time light source brightness data, providing a data basis for closed-loop control.

[0060] Specifically, the output voltage of the photosensitive sensor is proportional to the actual brightness of the light source. The main control module calculates the actual brightness based on the collected signal and compares it with the set target brightness. The response speed and sensitivity of the photosensitive sensor have an important impact on the accuracy of brightness control, so it is necessary to select a sensor suitable for the system requirements.

[0061] The error calculator in the brightness detection and closed-loop control module is responsible for calculating the difference between the actual brightness and the target brightness. The error calculator receives the actual brightness value L actual fed back by the main control module and the preset target brightness value L target , and generates a brightness error signal E through differential processing.

[0062] Use the formula represented by the brightness error E in the main control processing module.

[0063] The role of the error calculator is to ensure that the system can detect the brightness deviation in a timely manner and provide a control signal for the PID controller. Specifically, when the actual brightness is lower than the target brightness, the error is positive, and the system will increase the current output; when the actual brightness is higher than the target brightness, the error is negative, and the system will reduce the current output.

[0064] Dynamically adjust the current output of the light source by controlling the 12-bit precision DA output to ensure that the light source brightness is stable at the predetermined target value.

[0065] In actual operation, after the main control processing module (MCU) is powered on and starts, it initializes the hardware resources, including the 12-bit DA module, the light detection module, the filter switching module, and the light source drive module.

[0066] The DA module is initialized to an intermediate voltage (such as 2.5V), and the preset constant current output is at the standard brightness level to ensure that the light source is smoothly lit when the system starts.

[0067] The light detection module performs the first light intensity sampling to provide a benchmark for subsequent brightness dynamic adjustment.

[0068] The main control module calculates the target current I corresponding to the required light source brightness according to the detection task requirements or light feedback. target .

[0069] Will I target Convert to the reference voltage V that the DA module needs to output ref , the conversion formula is: V ref =R sense ×I target ; Where: R sense is the resistance value of the sampling resistor. The master sends the digital quantity to the DA module, and the DA module outputs the corresponding analog voltage V ref .

[0070] The constant current circuit is composed of a mixed processing module consisting of an adder and an integrator.

[0071] The adder compares the set voltage V in real time ref The actual feedback sampling voltage V fb (Sampled in the light source circuit).

[0072] Differential signal (error voltage) formula: V err =V ref -V fb ; Integrator to V err Perform integration processing and generate adjustment instructions.

[0073] The integrator controls the power driver (MOSFET / BJT) to adjust the current flowing through the light source to make it close to the target I target .

[0074] The brightness detection and closed-loop control module collects the actual brightness of the light source through the photosensitive sensor and calculates the brightness error through the error operator. The 12-bit precision DA output analog quantity controls the output current of the constant current circuit, thereby controlling the current output of the light source to ensure the stability of the light source brightness. Through this closed-loop control mechanism, the system can automatically adjust when the light decays or the characteristics of the light source change to maintain a stable light source brightness.

[0075] The filter switching module is connected to the main control processing module and is used to control the rotation of the color wheel through a motor to achieve position switching of different filters; The filter switching module is responsible for controlling the rotation of the color wheel through a motor to achieve precise position switching of different filters. The filter switching module is connected to the main control processing module and can quickly and accurately switch filters as needed to meet the requirements of different applications for the spectral characteristics of the light source (such as wavelength selectivity). Through this module, the system can accurately complete the filter replacement operation according to user settings or automatic control instructions without manual intervention.

[0076] Specifically, the filter switching module includes parts such as a color wheel assembly, a stepper motor, an encoder, and control logic. These components work together to ensure that the filter can be switched at the precise time and position, improving the automation level and working efficiency of the system.

[0077] In some embodiments, the color wheel assembly mechanically mounts multiple filter slots and can rotate to the target filter position in a predetermined order. The color wheel consists of a turntable with multiple slots, and each slot can be installed with different types of optical filters. By rotating the color wheel, the system can selectively align a specific filter with the light source output optical path, thereby adjusting the wavelength characteristics of the light source.

[0078] Generally, the design of the color wheel assembly needs to ensure that it can withstand continuous rotational work and can accurately and smoothly complete filter switching. The color wheel is usually made of high-strength materials to ensure its stability and durability during long-term use.

[0079] The role of the stepper motor in the filter switching module is to control the rotation angle of the color wheel according to the pulse signal from the main control module. The stepper motor can accurately control the rotation angle and step distance each time, ensuring that the color wheel reaches the precise position when switching filters. Through the high-precision control of the stepper motor, the system can ensure that the filter is accurately aligned with the light source output channel at a predetermined angle.

[0080] In a possible implementation, the stepper motor drives the color wheel to rotate by receiving pulse signals from the main control module. The frequency and quantity of the pulse signals determine the rotation angle of the motor, thereby achieving precise positioning of the filter. The accuracy and response speed of the stepper motor are crucial for the smooth progress of filter switching.

[0081] The encoder feeds back the current position of the color wheel through magnetic induction or photoelectric detection and transmits the feedback signal back to the main control module. The role of the encoder is to ensure that the position of the color wheel is always in the correct state and can real-time feedback the current position of the filter to the main control module. After the main control module obtains the current position of the color wheel through the encoder, it further determines whether it is necessary to adjust the color wheel to achieve filter switching.

[0082] Specifically, the encoder generates signals related to the rotation angle by detecting the position change of a reference point during the rotation of the color wheel, and converts these signals into digital data and returns them to the main control module. Through this feedback mechanism, the system can real-time monitor the state of the color wheel and avoid situations such as incorrect filter switching or inaccurate positioning.

[0083] The control logic plays a core role in the filter switching module. By calculating the difference between the filter number and the current position of the color wheel, the control logic calculates the number of steps required to rotate, thereby precisely controlling the rotation amount of the stepper motor to ensure that the color wheel rotates to the target filter position.

[0084] In some embodiments, the control logic completes the filter switching through the following steps: The main control module receives the instruction of the filter number and determines the current position of the color wheel through the control logic; Based on the difference between the target filter number and the current position of the color wheel, calculate the number of steps the stepper motor needs to rotate; Transmit the control signal to the stepper motor, and the stepper motor rotates the color wheel according to the calculated number of steps until the target filter reaches the predetermined position; The encoder real-time feeds back the current position of the color wheel to the main control module to ensure the accurate position of the filter.

[0085] This control method ensures the efficiency and accuracy of filter switching. Especially in application scenarios where rapid filter switching is required, it can effectively improve the response speed of the system.

[0086] In some embodiments, the color wheel assembly can further expand the function of the system by increasing the number of filter slots. For example, the color wheel may be installed with multiple different types of filters (such as filters of different wavelengths, filters of different colors, etc.) to meet different light source adjustment requirements. To improve the switching accuracy and speed, the system can also optimize the driving method of the stepper motor to further improve the accuracy and stability of filter switching.

[0087] The filter switching module realizes the rapid and accurate switching of different filters through the collaborative work of the color wheel assembly, stepper motor, encoder and control logic.

[0088] The light detection module is used to collect the light intensity of the controller in real-time and feed it back to the main control processing module; The light detection module plays an important role in the multi-functional light source controller. It is responsible for collecting the light intensity in real-time and feeding it back to the main control processing module. This module senses the light intensity inside the controller through a digital light sensor, converts it into a digital signal, and then transmits it to the main control module for processing. Based on this data, the main control module can intelligently adjust the output brightness of the light source to ensure that the light source always maintains an appropriate brightness output under different conditions.

[0089] The light detection module mainly consists of a digital light sensor, a data converter, and an adaptive brightness adjustment unit. This module can dynamically adjust the brightness of the light source according to the change of light decay, ensuring the automatic adjustment ability and flexibility of the system to adapt to different lighting conditions.

[0090] Digital light sensor In some embodiments, the light detection module includes a digital light sensor. The role of the digital light sensor is to sense the light intensity inside the controller and convert it into a digital illuminance value. The output of the sensor is proportional to the light intensity and can provide accurate light data according to the change of light intensity.

[0091] Generally, the digital light sensor senses the light through components such as photodiodes or photoresistors, and converts the collected analog signal into a digital signal. This digital signal can be further processed by the main control module of the system. The accuracy and response time of the sensor have an important impact on the real-time and accuracy of light detection. Therefore, a suitable sensor needs to be selected to meet the requirements of different light intensity ranges.

[0092] Data converter The data converter is a key component in the light detection module, responsible for converting the analog light signal collected by the digital light sensor into a digital signal that can be processed by the main control module. Generally, the data converter converts the collected light data into a digital value through an I 2 C or ADC module and transmits it to the main control module for processing.

[0093] In some embodiments, the data converter uses an I 2 C interface or an ADC converter to convert the analog signal into a digital signal. Through the I 2 C protocol, the converter can transmit the collected light intensity data to the main control module to ensure the accurate transmission of the signal. The ADC module converts the analog signal into a digital signal through sampling and quantization processing, thereby improving the transmission accuracy and real-time of the data.

[0094] The adaptive brightness adjustment unit is an important part of the light detection module, used to dynamically adjust the target brightness according to the change of light intensity. By comparing the current light intensity with the set brightness threshold, the system can intelligently adjust the target brightness value, thereby optimizing the brightness output of the light source.

[0095] Specifically, when the system detects a change in light intensity, the adaptive brightness adjustment unit calculates the current target brightness correction value and passes the corrected brightness value to the light source driving module. This module adjusts the current output of the light source to keep the light source output at an appropriate brightness under different light intensities.

[0096] The calculation method of adaptive brightness adjustment can be expressed by the following formula: Where: L adjusted is the adjusted target brightness value; L target is the original target brightness value, the ideal brightness set by the user; I env is the current light intensity, fed back by the light sensor; I threshold is the set brightness threshold for adjusting the brightness response range.

[0097] In actual operation, the light detection module continuously monitors the light intensity of the controller. When a change in light intensity is detected, the digital light sensor converts the collected analog signal into a digital signal and transmits it to the main control module through a data converter. The main control module compares the light data with the set brightness threshold and adjusts the target brightness value according to the adaptive brightness adjustment algorithm. Then, the main control module passes the new target brightness value to the light source driving module, and the light source driving module adjusts the current output of the light source according to the new target brightness to ensure that the brightness of the light source in the system adapts to the current light conditions.

[0098] Through the coordinated work of the digital light sensor, data converter and adaptive brightness adjustment unit, the light detection module realizes real-time monitoring of light intensity and can dynamically adjust the light source brightness according to real-time data. This module can effectively respond to light changes, automatically adjust the light source brightness, and avoid manual adjustment and human intervention.

[0099] The communication interface module is used to realize parameter interaction with the host computer and image data interface communication; In the overall architecture of the multi-functional light source controller system, the communication interface module constitutes a key bridge for data interaction between the main control processing module and the host computer. Following the optical path control and adaptation functions completed by the filter switching module and the light detection module, the system needs to transmit relevant parameter status, detection data, and image acquisition data to the host computer efficiently and reliably through the communication interface module, so as to support the host computer's monitoring of the system operation status, parameter adjustment, and issuance of control commands.

[0100] To achieve the above object, the communication interface module not only needs to have stable physical layer communication capabilities, but also needs to support data encapsulation and verification mechanisms at multiple protocol layers, and establish a standardized communication instruction structure with the main control module to achieve a low-latency and high-throughput data exchange mechanism.

[0101] In this embodiment, the communication interface module is used to implement two-way data communication with the host computer, and supports core functions such as receiving and parsing parameter instructions, feedback reporting of operation data, and transmission and caching of image data.

[0102] Generally, the communication interface module is connected to the host computer through communication bus methods such as serial port (UART), USB, SPI, CAN, or Ethernet. In a possible implementation, a USB2.0 high-speed interface is preferably used to meet the real-time transmission bandwidth requirements of image data. As an option, for scenarios with low bandwidth requirements but intensive communication instructions, the serial port method can be used for low-speed instruction interaction.

[0103] Specifically, the communication interface module internally includes a data transceiver unit, a protocol processing unit, and a cache management unit.

[0104] In some embodiments, the data transceiver unit realizes data level matching and two-way transceiver with the external physical bus through a serial communication chip (such as CP2102, FT232, etc.) or a communication pin integrated inside the microprocessor.

[0105] The protocol processing unit then parses and frames the received data packets according to a custom communication protocol or a standard protocol (such as Modbus, TCP / IP, HID, etc.). A standard frame format structure can be agreed upon between the main control module and the communication interface module. For example: F = [H s , C m , D1, D2,..., D n , CRC]; Where: F is the complete data frame; H s is the frame header, used to identify the start position of the communication; C m is the command byte, used to identify the data type or operation instruction of this communication; D1, D2,..., D n is the data segment, used to carry actual parameter data, image fragments, etc.; CRC is the cyclic redundancy check code, used to check the entire frame to prevent data corruption.

[0106] Through this frame format, the communication interface module can identify control instructions issued by the host computer, such as brightness setting, filter position request, light intensity parameter upload, image frame synchronization and other instruction types.

[0107] In terms of image data interaction, the communication interface module also needs to cooperate with the image cache management mechanism to ensure that the frame-by-frame transmission of large-capacity image data will not cause buffer overflow or data loss. Specifically, an image cache queue is provided in the communication interface module, and the first-in, first-out (FIFO) structure is used for cache scheduling, while DMA direct transmission is supported to improve the transmission efficiency.

[0108] In a possible implementation, the image data packets are split and transmitted in the following format: P i =[ID,S i ,D i ,CRC i ; Where: P i is the i-th image data packet; ID is the image frame identifier; S i is the sequence number of the current packet in the whole frame; D i is the actual image data content; CRC i is the check code of the current data packet.

[0109] After receiving a complete image frame, the communication interface module integrates it through caching and forwards the merged image information to the host computer for image restoration processing. This method ensures that even in the case of disordered or partially lost data packets, retransmission and recovery can be completed with the help of the numbering and verification mechanisms.

[0110] As an option, to improve the anti-interference ability of communication, the communication interface module can also introduce a differential transmission mechanism, such as RS-485 or CAN bus, which is particularly suitable for industrial light source control scenarios in a strong electrical interference environment.

[0111] Furthermore, the communication interface module can also trigger a host computer notification through an event interruption mechanism. For example, when the light detection module detects a sudden change in light intensity or a failure of the filter holder, the communication interface module can immediately report an abnormal status frame to notify the host computer to execute the corresponding response strategy. This type of interruption reporting mechanism can be distinguished by an event coding field, for example: E1 = [E type ,E code ,T stamp ; Where: E1 is the event frame; E type is the event type identifier; E code is the specific content coding of the event; T stamp is the timestamp of the event occurrence.

[0112] Through the above mechanism, the communication interface module not only realizes the basic data interaction function, but also enhances the fault tolerance and event response ability of the system, providing the necessary data support and interface guarantee for the intelligent operation of the multifunctional light source controller.

[0113] The application method of a multi-functional light source controller described below can be correspondingly referred to the multi-functional light source controller described above.

[0114] Please refer to the appendix Figure 2 , the present invention also provides an application method of a multi-functional light source controller, including the following steps: an initialization step, reading historical configuration data in a memory through a main control processing module, and initializing the working parameters of each light source channel, including a trigger mode, a brightness target value, a current output value, and a filter number; A trigger response step, monitoring an external or timing signal through a trigger mode recognition module, and activating a selected light source channel according to the set mode; A filter switching step, after receiving a filter number instruction, controlling a filter switching module to drive a color wheel to rotate to a target filter position; A light source driving step, controlling the magnitude of the current output by a constant current circuit by outputting an analog quantity with 12-bit precision DA according to a setting, so as to stabilize the light source output; An image acquisition synchronization step, outputting a trigger signal synchronized with an exposure signal to an external imaging device through a main control processing module to achieve coordinated image acquisition actions.

[0115] The method of this embodiment can be used to execute the above controller embodiment, and its principle and technical effects are similar, which will not be elaborated here.

[0116] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principle and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A multifunctional light source controller, characterized in that, Including: A main control processing module, which is used to receive external control instructions and perform parameter setting, working mode switching, and channel scheduling; A channel light source driving module, which is communicatively connected to the main control processing module and is used to control the current output of the light source channel, channel configuration current, brightness, and trigger mode; A trigger mode recognition module, which is connected to the main control processing module and is used to recognize external or internal trigger signals and control the light source channel to respond according to the set mode; A brightness detection and closed-loop control module, which is connected to the main control processing module and the light source driving module, is used to collect the actual brightness value of the light source, and perform dynamic adjustment by controlling the DA output with 12-bit precision; A filter switching module, which is connected to the main control processing module and is used to control the rotation of the color wheel by a motor to realize the position switching of different filters; A light detection module, which is used to collect the brightness of the internal light source in real time and feedback it to the main control processing module, and automatically increase the brightness of the light source when the light source is lit for a long time and light decay occurs; A communication interface module, which is used to realize parameter interaction with the upper computer and image data interface communication.

2. The multifunctional light source controller according to claim 1, characterized in that The channel light source driving module includes: A constant current output circuit, which realizes the stable supply of the current value in the range of 0-6A through an adjustable power output module and a current limiting feedback loop; A linear constant current circuit using an adder and an integrator for hybrid processing, and then using a 12-bit precision DA output to control the magnitude of the current output by the constant current circuit; A channel independent scheduling unit, which configures the trigger mode, brightness target, current magnitude, and filter number for the light source channel through a multiplexer and a parameter memory.

3. The multifunctional light source controller according to claim 1, characterized in that, The trigger mode recognition module includes: A level trigger unit, which receives a continuous high-level or low-level signal through an external IO interface and controls the light source channel to remain lit; An edge trigger unit, which triggers the external interrupt of the single-chip microcomputer by capturing the rising edge or falling edge of the input signal, thereby controlling the instantaneous lighting of the light source; An internal trigger unit, which periodically generates a control signal through a timer and drives the channel to automatically flash at a set time interval; A mode selection logic, which performs logical judgment and switching control on the level, edge, or internal trigger mode through user instructions or upper computer configuration data.

4. A multifunctional light source controller according to claim 1, characterized in that The brightness detection and closed-loop control module includes: A photosensitive sensor, which collects the actual emitted light intensity of each light source and converts the sampling signal into a digital quantity and feeds it back to the main control module; An error arithmetic unit, which generates a brightness error signal by performing differential processing on the difference between the set target brightness and the collected actual brightness; A linear constant current circuit, which quickly and dynamically adjusts the output current through sampling calculation of the output current.

5. A multifunctional light source controller according to claim 1, characterized in that, The filter switching module includes: A color wheel assembly, which mechanically installs multiple filter slots and can rotate to the target filter position in a specified order; A stepper motor, which controls the rotation angle through the pulse signal of the main control module to realize the precise positioning of the color wheel; An encoder, which detects and feeds back the actual position of the current filter through photoelectric detection and transmits the position information back to the main control module; A control logic, which calculates the number of rotation steps of the stepper motor by the difference between the filter number and the current color wheel position to realize the rapid positioning and switching of the filter.

6. The multifunctional light source controller according to claim 1, characterized in that, The light detection module includes: A digital light sensor that converts an analog optical signal into a digital illuminance value by sensing the surrounding illumination intensity; Data converter, through the I 2 C module, transfers the collected light data to the main control module for processing; An adaptive brightness adjustment unit that compares a set threshold with the current internal light intensity and adjusts the target brightness value for subsequent light source current control.

7. Application method of a multi-functional light source controller, characterized in that, Using a multifunctional light source controller according to any one of claims 1-6, comprising the following steps: An initialization step, in which the main control processing module reads the historical configuration data in the memory and initializes the working parameters of each light source channel, including the trigger mode, brightness target value, current output value, and filter number; A trigger response step, in which the trigger mode recognition module monitors external or timing signals and activates the selected light source channel according to the set mode; A filter switching step, in which after receiving the filter number instruction, the filter switching module is controlled to drive the color wheel to rotate to the target filter position; A light source driving step, in which the selected channel is driven to start the light source output according to the set 12-bit precision DA output; An image acquisition synchronization step, in which the main control processing module outputs a trigger signal synchronized with the exposure signal to an external imaging device to achieve coordinated image acquisition actions.

8. The application method of a multifunctional light source controller according to claim 7, characterized in that, The initialization step includes: A historical parameter reading step, in which the channel parameters saved before the last system power-off are restored by reading the stored content in the EEPROM; A filter return step, in which the color wheel is automatically rotated to the corresponding position by obtaining the last filter number; A remote configuration update step, in which the channel configuration parameters are updated by an instruction from the host computer and the new configuration is written into the non-volatile memory.

9. The application method of a multifunctional light source controller according to claim 7, characterized in that, The light source driving step includes: A brightness acquisition step, in which the current light source emission brightness value is acquired by the brightness detection module and uploaded to the main control module; An error calculation step, in which the actual brightness and the target brightness are differentially processed by an error calculator to obtain an error signal; Using a linear constant current circuit and a 12-bit precision DA to control the magnitude of the current output by the constant current circuit.

10. The application method of a multifunctional light source controller according to claim 7, characterized in that, The adaptive brightness adjustment step includes: A light intensity sampling step, in which the internal light intensity value of the controller is periodically acquired by the light detection module; A target correction step, in which the main control module corrects and calculates the target brightness to adapt to the current light intensity; An image feedback adjustment step, in which on the premise that the image acquisition system provides image gray mean feedback, the target brightness is further finely adjusted according to the gray deviation; A current correction step, in which the final brightness target is transmitted to the linear constant current circuit and the 12-bit precision DA to adjust the light source drive current.