A stroboscopic controller and output control method thereof

By configuring the timer logic AND gate of the stroboscopic controller, precise control of N light sources and N camera outputs using a general-purpose processor was achieved, solving the problem that a general-purpose processor cannot meet the requirements of 2N independent timers and reducing the difficulty of processor selection.

CN114779699BActive Publication Date: 2025-12-30LUSTER TERABAND PHOTONICS TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210458131.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2025-12-30
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

General-purpose processors cannot meet the controller's requirements for precise control of N light source outputs and N camera outputs, especially the requirement for 2N independent timers.

Method used

A stroboscopic controller is provided, which implements two PWM mode outputs for light sources and one PWM mode output for camera output through a logic AND gate of configuration information and timers. This reduces the requirement for the number of timers in the processor and enables the stroboscopic controller function to be implemented using a general-purpose processor.

Benefits of technology

It reduces the requirement for the number of timers in the processor, simplifies processor selection, and enables precise control of N-channel light source output and N-channel camera output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114779699B_ABST
    Figure CN114779699B_ABST
Patent Text Reader

Abstract

The application provides a stroboscopic controller and an output control method thereof, comprising N light source outputs, N camera outputs and a processor, the processor has at least M timers (N≤M<2N), each timer comprises a channel comparison register, a count register and a channel control register, and is configured to: acquire configuration information; when the configuration information meets a configuration condition, determine that the timer has 2-way PWM mode output through a logic AND gate for the light source output and 1-way PWM mode output for controlling the camera output according to the configuration of the channel control register; acquire a trigger signal and start the count of the timer; and realize 1-way light source output and 1-way camera output control according to the count value of the count register and the working mode of the timer. The application reduces the requirement for the number of timers in the processor, reduces the difficulty of processor selection, and realizes the function of the stroboscopic controller by using a general-purpose processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial control, and in particular to a strobe controller and its output control method. Background Technology

[0002] With the development of industrial automation, machine vision systems have become a core driver of industrial automation, and the light source is a crucial factor affecting the input of machine vision systems. Since there is no universal standard for light source equipment, the light source is adjusted by a controller for each specific application scenario to achieve the best results for the machine vision system.

[0003] For current industrial needs, controllers often need to control multiple light source outputs and multiple camera outputs. Each output is controlled by an independent timer. As the number of light source and camera outputs increases, the requirements for the controller's chip also increase. When precise control of N light source outputs and N camera outputs is required, the controller's processor needs at least 2N independent timers, and each of these 2N timers must support at least one PWM (Pulse Width Modulation) output. However, general-purpose processors typically support 3-5 (less than 2N) independent timers, which is insufficient to meet the requirement of 2N independent timers. Summary of the Invention

[0004] This application provides a stroboscopic controller and its output control method to solve the technical problem that the controller using a general-purpose processor cannot achieve precise control of N-channel light source output and N-channel camera output.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0006] In a first aspect, this application provides a strobe controller, characterized in that it includes N light source outputs, N camera outputs, and a processor, wherein the processor has at least M timers (N≤M<2N), each timer including a channel comparison register, a count register, and a channel control register, and each timer is configured as follows:

[0007] Obtain configuration information, which includes preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width;

[0008] When the configuration information meets the configuration conditions, the timer is determined to have 2 PWM mode outputs for light source output and 1 PWM mode output for camera output control, based on the configuration of the channel control register. The overflow values ​​of the channel comparison register and the counter register are also modified according to the configuration information.

[0009] Acquire the trigger signal and start the timer's counting;

[0010] Based on the count value of the counter register and the working mode of the timer, one light source output and one camera control output are obtained.

[0011] In conjunction with the first aspect, in one possible implementation, the configuration conditions include: the preset light source output delay is greater than a delay threshold; the preset light source output pulse width is greater than or equal to 0µs and less than or equal to 999µs; the preset camera output delay is greater than or equal to the preset light source output delay and less than the sum of the preset light source output delay and the preset light source output pulse width; and the sum of the preset camera output delay and the preset camera output pulse width is greater than the sum of the preset light source output delay and the preset light source output pulse width.

[0012] In conjunction with the first aspect, in one possible implementation, modifying the overflow values ​​of the channel comparison register and the counter register according to the configuration information includes: the overflow value of the counter register is the sum of a preset camera output pulse width and a preset camera output delay; when the light source is output, the first value corresponding to the channel comparison register is the preset light source output delay, and the second value corresponding to the channel comparison register is the sum of the preset light source output delay and the preset light source output pulse width; when controlling the camera output, the third value corresponding to the channel comparison register is the preset camera output delay.

[0013] In conjunction with the first aspect, in one possible implementation, each timer further includes a counter auto-reload register: when the configuration information meets the configuration conditions, the value of the counter auto-reload register is configured according to the configuration information, and the value of the counter auto-reload register is equal to the sum of the camera light source output delay and the preset camera output pulse width.

[0014] In conjunction with the first aspect, in one possible implementation, obtaining one control light source output and one control camera output based on the count value of the counter register and the operating mode of the timer includes:

[0015] The output level is determined by comparing the count value of the counter register with the value of the channel comparator register.

[0016] When the timer count value exceeds the second value corresponding to the channel comparison register, the light source output is turned off.

[0017] When the timer count exceeds the value of the automatic reload register, the camera output is turned off.

[0018] In conjunction with the first aspect, in one possible implementation, when the light source is output and the timer is in upward counting mode, an output level is determined by comparing the count value of the count register with the value of the channel comparison register, including:

[0019] The light source output is a logical AND operation of the first PWM mode output and the second PWM mode output;

[0020] When the first PWM mode is output, a low level is output when the count value of the counter register is less than the first value of the channel comparator register; a high level is output when the count value of the counter register is equal to the first value of the channel comparator register; and a low level is output when the count value of the counter register reaches the value of the counter auto-reload register.

[0021] When the second PWM mode is output, a high level is output when the count value of the counter register is less than the second value of the channel comparator register; a low level is output when the count value of the counter register is equal to the second value of the channel comparator register; and a high level is output when the count value of the counter register reaches the value of the counter auto-reload register.

[0022] In conjunction with the first aspect, in one possible implementation, when the camera output is controlled and the timer's operating mode is up-counting, the output level is determined by comparing the count value of the count register with the value of the channel comparison register, including:

[0023] When the count value of the counter register is less than the third value of the channel compare register, a low level is output;

[0024] When the count value of the counter register is equal to the third value of the channel compare register, a high level is output;

[0025] When the count value of the counter register reaches the value of the counter auto-reload register, a low level is output.

[0026] As can be seen from the above technical solutions, this application provides a stroboscopic controller, including N light source outputs, N camera outputs, and a processor. The processor has at least M timers (N≤M<2N), each timer including a channel comparison register, a counting register, and a channel control register. Each timer is configured to: acquire configuration information, including preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width. When the configuration information meets the configuration conditions, based on the configuration of the channel control register, it is determined that the timer has 2 PWM mode outputs used for light source output through a logic AND gate and 1 PWM mode output used for camera control output; and the overflow values ​​of the channel comparison register and the counting register are modified according to the configuration information; a trigger signal is acquired, and the counting of the timer is started; based on the count value of the counting register and the working mode of the timer, 1 light source output and 1 camera control output are obtained. This application uses 1 timer to implement 1 light source output and 1 camera control output; it reduces the requirement for the number of timers in the processor, reduces the difficulty of processor selection, and uses a general-purpose processor to implement the function of the stroboscopic controller.

[0027] Secondly, this application provides an output control method for a stroboscopic controller, the output control method comprising the following steps:

[0028] Obtain configuration information, which includes preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width;

[0029] When the configuration information meets the configuration conditions, the timer is determined to have 2 PWM mode outputs for light source output and 1 PWM mode output for camera output control based on the configuration of the channel control register, and the values ​​of the channel comparison register, the count register and the counter auto-reload register are modified according to the configuration information.

[0030] Acquire the trigger signal and start the timer's counting;

[0031] Based on the count value of the counter register and the working mode of the timer, one light source output and one camera control output are obtained.

[0032] As can be seen from the above technical solutions, this application provides an output control method for a stroboscopic controller, including acquiring configuration information, which includes preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width. When the configuration information meets the configuration conditions, the timer is determined to have two PWM mode outputs for light source output and one PWM mode output for camera control output based on the configuration of the channel control register; the overflow values ​​of the channel comparison register and the counting register are modified according to the configuration information; a trigger signal is acquired, and the counting of the timer is started; based on the count value of the counting register and the working mode of the timer, one light source output and one camera control output are obtained. This application uses one timer to implement one light source output and one camera control output; it reduces the requirement for the number of timers in the processor, reduces the difficulty of processor selection, and uses a general-purpose processor to implement the function of the stroboscopic controller. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a schematic diagram of the structure of a strobe controller according to an embodiment of this application;

[0035] Figure 2 This is a diagram showing the relationship between the trigger signal, light source output, and camera output of a stroboscopic controller according to an embodiment of this application.

[0036] Figure 3 This is a flowchart illustrating an output control method for a stroboscopic controller according to an embodiment of this application. Detailed Implementation

[0037] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0039] Machine vision automates factory processes based on acquired image data. Machine vision mainly consists of: a light source, a lens, and a camera. The light source is a crucial factor affecting the input of a machine vision system. Since there is no universal standard for light source equipment, the appropriate lighting device is adjusted by a controller for each specific application scenario to achieve the best results for the machine vision system.

[0040] The main function of the light source controller is to control the brightness and illumination status (such as on / off) of the light source. Generally speaking, the controller has two main control modes for the light source: constant-on mode and strobe mode. In constant-on mode, the light source maintains continuous illumination according to the set current or voltage value; in strobe mode, the light source controller illuminates the light source at a specific moment and keeps it off at other times, and can instantly increase the brightness of the light source several times without affecting its lifespan.

[0041] In strobe mode, the controller provides instantaneous brightness by controlling the light source device. Because the light source is lit for a short time, it suppresses the internal temperature rise of the light source device and extends the service life of the light source device.

[0042] When precise control of N light source outputs and N camera control outputs is required, the processor in the controller needs at least 2N independent timers, and each of these 2N timers must support at least one PWM (Pulse Width Modulation) output. However, general-purpose processors typically support 3-5 (less than 2N) independent timers, which is insufficient to meet the requirement of 2N independent timers.

[0043] To address the aforementioned problems, some embodiments of this application provide a strobe-type controller, such as... Figure 1As shown, the stroboscopic controller includes N light source outputs, N camera outputs, and a processor. The processor has M timers (N≤M<2N), each timer being independent. Each timer includes an auto-reload register, a channel compare register, a count register, and a channel control register.

[0044] For ease of description, this embodiment uses the following designations: the timer is denoted as Tm, where m can be 0, 1, 2, or n-1, corresponding to the N independent timers of the MCU; the automatic reload register for the counter is denoted as PERIOD; the channel comparison register is denoted as CHxVAL, where x is 0 or 1 for light source output, and x is 2 for camera output control; the counter register is denoted as COUNT; and the channel control register is denoted as CHxCTL, where x is 0 or 1 for light source output, and x is 2 for camera output control.

[0045] Each timer is configured as follows:

[0046] The configuration information includes preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width. For ease of description, this embodiment denotes the preset light source output delay as dch, the preset light source output pulse width as pch, the preset camera output delay as dtr, and the preset camera output pulse width as ptr.

[0047] The units for preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width are μs and are positive integers.

[0048] The system determines whether the configuration information meets the configuration conditions. These conditions are: the preset light source output delay is greater than a delay threshold; the preset light source output pulse width is greater than or equal to 0µs and less than or equal to 999µs; the preset camera output delay is greater than or equal to the preset light source output delay and less than the sum of the preset light source output delay and the preset light source output pulse width; and the sum of the preset camera output delay and the preset camera output pulse width is greater than the sum of the preset light source output delay and the preset light source output pulse width. Specifically, dch > delay threshold; pch >= 0µs and pch < 999µs; dtr >= dch and dtr<dch+pch;dtr+ptr> dch+pch.

[0049] In one implementation, the delay threshold can be set to 10µs. For general hardware, if the delay is within 10µs, software compensation is required to achieve a state close to 10µs. Alternatively, the delay threshold can be set to 20µs.

[0050] If the configuration information does not meet the configuration conditions, the current configuration operation will end, and the previous configuration information can be retained.

[0051] When the configuration information meets the configuration conditions, the timer is determined to have 2 PWM mode outputs for light source output and 1 PWM mode output for camera output through a logic AND gate, according to the configuration of the channel control register. The overflow values ​​of the channel comparison register and the count register are modified according to the configuration information, and the value of the counter auto-reload register is configured according to the configuration information.

[0052] Among them, the two PWM mode outputs are used for light source output through a logic AND gate, including the first PWM mode output and the second PWM mode output. The first PWM mode output and the second PWM mode output are used as light source output through a logic AND operation.

[0053] The value of the counter auto-reload register is equal to the sum of the preset camera output delay and the preset camera output pulse width.

[0054] Modify the overflow values ​​of the channel compare register and the count register according to the configuration information, including:

[0055] The overflow value of the counter register COUNT is the sum of the preset camera output pulse width and the preset camera output delay, i.e., COUNT = dtr + ptr.

[0056] Under the light source output (i.e., 2-channel PWM mode output through a logic AND gate), the value of the channel comparison register CH0VAL (i.e., the first corresponding value) is the preset light source output delay, i.e., CH0VAL = dch; the value of the channel comparison register CH1VAL (i.e., the second corresponding value) is the sum of the preset light source output delay and the preset light source output pulse width, i.e., CH1VAL = dch + pch.

[0057] When controlling the camera output (i.e., 1-channel PWM mode output), the value of the channel comparison register CH2VAL (i.e., the corresponding third value) is the preset camera output delay, i.e., CH2VAL = dtr.

[0058] Configure channel control registers CH0CTL and CH2CTL to output 1 in PWM mode, and CH1CTL to output 0 in PWM mode. CH0CTL and CH1CTL output via an AND gate, which is the light source output. Configure channel control register CH2CTL to output in PWM mode, which is the camera control output. The light source output controls the flicker illumination of the light source based on the preset light source output pulse width and preset light source output delay. The camera control output controls the camera based on the preset camera output pulse width and preset camera output delay, typically using an edge-triggered signal, i.e., outputting a rising edge signal from low to high or a falling edge signal from high to low.

[0059] like Figure 2As shown, TmC0 (first PWM mode output) is the PWM mode output when the timer Tm channel is 0, TmC1 is the PWM mode output when the timer Tm channel is 1, and TmC2 (second PWM mode output) is the PWM mode output when the timer Tm channel is 2. Among them, TmC0 and TmC1 are used as light source outputs through the AND circuit, and TmC2 is used as the camera control output.

[0060] like Figure 2 As shown, the camera output can be controlled by a rising edge trigger, and the following examples in this application embodiment will all use rising edge trigger; the camera output can also be controlled by a falling edge trigger. Figure 2 In Chinese, the meaning of time is as follows:

[0061] t0: Start time;

[0062] t1: The stroboscopic controller receives a trigger signal from an external rising edge;

[0063] t2: The light source begins to output a high level;

[0064] t3: Controls the camera to start outputting a high level;

[0065] t4: Light source output ends;

[0066] t5: Controls the camera to stop outputting; simultaneously, the stroboscopic controller stops this trigger output and disables the timer's counting function. Between t1 and t5, only the trigger signal at time t1 is responded to; trigger signals at other times are ignored.

[0067] The configuration information needs to be confirmed before the trigger signal is received.

[0068] Obtain the trigger signal and start the counting function of the timer.

[0069] When the light source is outputting, if the timer count value COUNT exceeds the value of the channel comparison register CH1VAL, the light source output is turned off.

[0070] When controlling the camera output, if the timer count value COUNT exceeds the value of the automatic reload register of the counter, the camera output is turned off.

[0071] When outputting in PWM mode, timer Tm can operate in an up-counting mode. For example... Figure 2 As shown:

[0072] When TmC0 operates in PWM mode, output 1: At time t1, the count value COUNT in the counter register is less than the value of the channel comparator register CH0VAL, and the output is low; at time t2, the count value COUNT in the counter register is equal to the value of the channel comparator register CH0VAL, and the output is high; at time t5, when the count value COUNT in the counter register reaches the value of the counter auto-reload register PERIOD, that is, when it overflows and is ready to enter the next round of counting, the output is low.

[0073] When TmC1 operates in PWM mode, outputting 0: At time t1, the count value COUNT in the counter register is less than the value of the channel comparator register CH1VAL, and the output is high; at time t4, the count value COUNT in the counter register is equal to the value of the channel comparator register CH1VAL, and the output is low; at time t5, when the count value COUNT in the counter register reaches the value of the counter auto-reload register PERIOD, i.e., overflows, and is ready to enter the next round of counting, the output is high.

[0074] The light source output is obtained by using the AND gates TmC0 and TmC1.

[0075] When TmC2 operates in PWM mode, output 1 (i.e., controlling the camera output): At time t1, the count value COUNT in the counter register is less than the value of the channel comparator register CH2VAL, and the output is low; at time t3, the count value COUNT in the counter register is equal to the value of the channel comparator register CH2VAL, and the output is high; at time t5, when the count value COUNT in the counter register reaches the value of the counter auto-reload register PERIOD, i.e., overflows, and is ready to enter the next round of counting, the output is low.

[0076] For example, when precise control of four light source outputs and four camera control outputs is required, the processor in a stroboscopic controller needs at least eight independent timers, and each of these eight timers must support at least one PWM (Pulse Width Modulation) output. However, general-purpose processors typically support three to five independent timers, which cannot meet the requirement of eight independent timers. This application enables a general-purpose processor (supporting at least four independent timers) to meet the requirements of controlling four light source outputs and four camera control outputs.

[0077] As can be seen from the above technical solutions, this application provides a stroboscopic controller, including N light source outputs, N camera outputs, and a processor. The processor has at least M timers (N≤M<2N), each timer including a channel comparison register, a counting register, and a channel control register. Each timer is configured to: acquire configuration information, including preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width. When the configuration information meets the configuration conditions, based on the configuration of the channel control register, it is determined that the timer has 2 PWM mode outputs used for light source output through a logic AND gate and 1 PWM mode output used for camera control output; and the overflow values ​​of the channel comparison register and the counting register are modified according to the configuration information; a trigger signal is acquired, and the counting of the timer is started; based on the count value of the counting register and the working mode of the timer, 1 light source output and 1 camera control output are obtained. This application uses 1 timer to implement 1 light source output and 1 camera control output; it reduces the requirement for the number of timers in the processor, reduces the difficulty of processor selection, and uses a general-purpose processor to implement the function of the stroboscopic controller.

[0078] This application provides an output control method for a strobe controller in some embodiments, such as... Figure 3 As shown, the output control method includes the following steps:

[0079] S101. Obtain configuration information, which includes preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width.

[0080] The preset camera output pulse width is a fixed value. The units for the preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width are microseconds (µs) and are positive integers.

[0081] S102. When the configuration information meets the configuration conditions, determine that the timer has 2 PWM mode outputs for light source output through a logic AND gate and 1 PWM mode output for camera output control according to the configuration of the channel control register, and modify the overflow values ​​of the channel comparison register and the count register according to the configuration information.

[0082] The overflow value of the counter register COUNT is the sum of the preset camera output pulse width and the preset camera output delay, i.e., COUNT = dtr + ptr.

[0083] Under the condition of immediate light source output, the value of the channel comparison register CH0VAL (i.e., the first corresponding value) is the preset light source output delay, i.e., CH0VAL = dch; the value of the channel comparison register CH1VAL (i.e., the second corresponding value) is the sum of the preset light source output delay and the preset light source output pulse width, i.e., CH1VAL = dch + pch.

[0084] When controlling the camera output, the value of the channel comparison register CH2VAL (i.e., the corresponding third value) is the preset camera output delay, i.e., CH2VAL = dtr.

[0085] S103. If the configuration information does not meet the configuration conditions, the current configuration operation shall be terminated.

[0086] At this point, you can keep the previous configuration information.

[0087] S104. Obtain the trigger signal and start the timer's counting.

[0088] S105. Based on the count value of the counter register and the working mode of the timer, obtain one light source output and one control camera output.

[0089] When the light source is outputting, if the timer count value COUNT exceeds the value of the channel comparison register CH1VAL, the light source output is turned off.

[0090] When controlling the camera output, if the timer count value COUNT exceeds the value of the automatic reload register of the counter, the camera output is turned off.

[0091] The first PWM mode output of the light source: At time t1, the count value COUNT of the counter register is less than the value of the channel comparator register CH0VAL, and the output is low; at time t2, the count value COUNT of the counter register is equal to the value of the channel comparator register CH0VAL, and the output is high; at time t5, when the count value COUNT of the counter register reaches the value of the counter auto-reload register PERIOD, that is, when it overflows and is ready to enter the next round of counting, the output is low.

[0092] The second PWM mode output of the light source: At time t1, the count value COUNT of the counter register is less than the value of the channel comparator register CH1VAL, and the output is high; at time t4, the count value COUNT of the counter register is equal to the value of the channel comparator register CH1VAL, and the output is low; at time t5, when the count value COUNT of the counter register reaches the value of the counter auto-reload register PERIOD, that is, when it overflows and is ready to enter the next round of counting, the output is high.

[0093] The light source output is obtained by ANDing the first PWM mode output and the second PWM mode output logic gate.

[0094] Camera output control: At time t1, the count value COUNT in the counter register is less than the value of the channel comparison register CH2VAL, and the output is low; at time t3, the count value COUNT in the counter register is equal to the value of the channel comparison register CH2VAL, and the output is high; at time t5, when the count value COUNT in the counter register reaches the value of the automatic reload register PERIOD, that is, when it overflows and is ready to enter the next round of counting, the output is low.

[0095] As can be seen from the above technical solutions, this application provides an output control method for a stroboscopic controller, including acquiring configuration information, which includes preset light source output delay, preset light source output pulse width, preset camera output delay, and preset camera output pulse width. When the configuration information meets the configuration conditions, the timer is determined to have two PWM mode outputs for light source output and one PWM mode output for camera control output based on the configuration of the channel control register; the overflow values ​​of the channel comparison register and the counting register are modified according to the configuration information; a trigger signal is acquired, and the counting of the timer is started; based on the count value of the counting register and the working mode of the timer, one light source output and one camera control output are obtained. This application uses one timer to implement one light source output and one camera control output; it reduces the requirement for the number of timers in the processor, reduces the difficulty of processor selection, and uses a general-purpose processor to implement the function of the stroboscopic controller.

[0096] The above content is only for illustrating the technical concept of this application and should not be used to limit the scope of protection of this application. Any modifications made to the technical solution based on the technical concept proposed in this application shall fall within the scope of protection of the claims of this application.

[0097] Furthermore, unless expressly stated in the claims, the order of processing elements and sequences, the use of numbers and letters, or other names described in this application are not intended to limit the order of the processes and methods of this application. Although some embodiments that are currently considered useful have been discussed through various examples in the foregoing disclosure, it should be understood that such details are for illustrative purposes only, and the appended claims are not limited to the disclosed embodiments. Rather, the claims are intended to cover all modifications and equivalent combinations that conform to the substance and scope of the embodiments of this application. For example, while the system components described above can be implemented by hardware devices, they can also be implemented solely by software solutions, such as installing the described system on existing servers or mobile devices.

[0098] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of the present application requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.

[0099] For each patent, patent application, patent application publication, and other material such as articles, books, specifications, publications, and documents referenced in this application, the entire contents of that patent are incorporated herein by reference. This excludes historical application documents that are inconsistent with or conflict with the content of this application, as well as documents that limit the broadest scope of the claims in this application (currently or subsequently appended to this application). It should be noted that if there are any inconsistencies or conflicts between the descriptions, definitions, and / or terminology used in the supplementary materials of this application and the content of this application, the descriptions, definitions, and / or terminology used in this application shall prevail.

Claims

1. A stroboscopic controller, characterized by The application relates to a light source output and a camera output, and comprises a processor with M timers (N<=M<2N), each timer comprising a channel comparison register, a count register and a channel control register, wherein the processor is configured to: obtain configuration information, the configuration information comprising a preset light source output delay, a preset light source output pulse width, a preset camera output delay and a preset camera output pulse width; when the configuration information meets a configuration condition, determine, according to the configuration of the channel control register, that the timer has a 2-way PWM mode output through a logical AND gate for light source output and a 1-way PWM mode output for controlling camera output, and modify the overflow values of the channel comparison register and the count register according to the configuration information; obtain a trigger signal and start the count of the timer; and obtain 1-way light source output and 1-way camera output control according to the count value of the count register and the working mode of the timer. The configuration condition comprises: the preset light source output delay is greater than a delay threshold; the preset light source output pulse width is greater than or equal to 0 us and less than or equal to 999 us; the preset camera output delay is greater than or equal to the preset light source output delay and less than the sum of the preset light source output delay and the preset light source output pulse width; and the sum of the preset camera output delay and the preset camera output pulse width is greater than the sum of the preset light source output delay and the preset light source output pulse width. The modification of the overflow values of the channel comparison register and the count register according to the configuration information comprises: the overflow value of the count register is the sum of the preset camera output pulse width and the preset camera output delay; the first value corresponding to the channel comparison register is the preset light source output delay when the light source output is performed, and the second value corresponding to the channel comparison register is the sum of the preset light source output delay and the preset light source output pulse width; and the third value corresponding to the channel comparison register is the preset camera output delay when the camera output is controlled. The count register further comprises a counter automatic reload register, and when the configuration information meets the configuration condition, the value of the counter automatic reload register is configured according to the configuration information, and the value of the counter automatic reload register is equal to the sum of the preset camera output delay and the preset camera output pulse width. The 1-way light source output and the 1-way camera output control according to the count value of the count register and the working mode of the timer comprise: comparing the count value of the count register with the value of the channel comparison register to output a level; when the count value of the timer exceeds the second value corresponding to the channel comparison register, the light source output is turned off; and when the count value of the timer exceeds the value of the counter automatic reload register, the camera output control is turned off. When the light source output is performed and the working mode of the timer is upward counting, the comparison of the count value of the count register with the value of the channel comparison register to output a level comprises: the light source output is a logical AND operation of a first PWM mode output and a second PWM mode output. ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ 2. A stroboscopic controller according to claim 1, wherein ​ ​ ​ ​ 3. A stroboscopic controller according to claim 2, wherein, ​ ​ In the first PWM mode, when the count value of the count register is less than the first value of the channel comparison register, output low level; when the count value of the count register is equal to the first value of the channel comparison register, output high level; when the count value of the count register reaches the value of the counter automatic reload register, output low level. In the second PWM mode, when the count value of the count register is less than the second value of the channel comparison register, output high level; when the count value of the count register is equal to the second value of the channel comparison register, output low level; when the count value of the count register reaches the value of the counter automatic reload register, output high level.

4. A stroboscopic controller according to claim 2, wherein, When the camera output is controlled, and the working mode of the timer is upward counting, the output level is obtained by comparing the count value of the count register and the value of the channel comparison register, comprising: When the count value of the count register is less than the third value of the channel comparison register, output low level; When the count value of the count register is equal to the third value of the channel comparison register, output high level; When the count value of the count register reaches the value of the counter automatic reload register, output low level.

5. An output control method of a stroboscopic controller, characterized by, Comprising: Obtaining configuration information, the configuration information comprising preset light source output delay, preset light source output pulse width, preset camera output delay and preset camera output pulse width; When the configuration information meets the configuration condition, determining that the timer has 2-way PWM mode output through logic AND gate for light source output and 1-way PWM mode output for controlling camera output according to the configuration of the channel control register, and modifying the values of the channel comparison register, the count register and the counter automatic reload register according to the configuration information; Obtaining a trigger signal, and starting the count of the timer; Obtaining 1-way light source output and 1-way control camera output according to the count value of the count register and the working mode of the timer; The configuration condition comprises: The preset light source output delay is greater than the delay threshold value; The preset light source output pulse width is greater than or equal to 0us and less than or equal to 999us; The preset camera output delay is greater than or equal to the preset light source output delay and less than the sum of the preset light source output delay and the preset light source output pulse width; The sum of the preset camera output delay and the preset camera output pulse width is greater than the sum of the preset light source output delay and the preset light source output pulse width; The modification of the overflow value of the channel comparison register and the count register according to the configuration information comprises: The overflow value of the count register is the sum of the preset camera output pulse width and the preset camera output delay; In the light source output, the first value corresponding to the channel comparison register is the preset light source output delay, and the second value corresponding to the channel comparison register is the sum of the preset light source output delay and the preset light source output pulse width; In the control camera output, the third value corresponding to the channel comparison register is the preset camera output delay; The timer further comprises a counter automatic reload register: When the configuration information meets the configuration condition, the value of the counter automatic reload register is configured according to the configuration information, and the value of the counter automatic reload register is equal to the sum of the preset camera output delay and the preset camera output pulse width.

6. The output control method of a stroboscopic controller according to claim 5, wherein The 1-way control light source output and 1-way control camera output are obtained according to the count value of the count register and the working mode of the timer, and the method comprises the steps of: Comparing the count value of the count register with the value of the channel comparison register to output a level; When the count value of the timer exceeds the second value corresponding to the channel comparison register, the light source output is turned off; When the count value of the timer exceeds the value of the counter automatic reload register, the control camera output is turned off.

Citation Information

Patent Citations

  • Light source controller trigger delay control method and system

    CN109375451A

  • Programmable LED light source strobing controller

    CN109688339A