Light source controller and method for controlling light source

文档序号:440208 发布日期:2021-12-24 浏览:2次 中文

阅读说明:本技术 光源控制器及控制光源的方法 (Light source controller and method for controlling light source ) 是由 朱柏熊 顾福乾 胡兵 于 2021-09-24 设计创作,主要内容包括:本申请公开了一种光源控制器及控制光源的方法。光源控制器包括:微控制器电路及与微控制器电路电性连接的模式控制电路、参数设定电路、触发电路和输出控制电路。模式控制电路用于设置光源控制器的工作模式;参数设定电路用于在光源控制器处于不同的工作模式下,设定对应的参数的大小;触发电路用于发送触发信号给微控制器电路;微控制器电路基于触发信号、模式控制电路设置的工作模式及参数设定电路设定的对应的参数的大小,持续控制输出控制电路输出对应的光源驱动信号,以使与光源控制器电性连接的光源持续基于光源驱动信号产生对应的发光模式。因此,本申请的光源控制器相较于模拟光源控制器,满足工业上的自动化要求。(The application discloses a light source controller and a method for controlling a light source. The light source controller includes: microcontroller circuit and with microcontroller circuit electric connection's mode control circuit, parameter setting circuit, trigger circuit and output control circuit. The mode control circuit is used for setting the working mode of the light source controller; the parameter setting circuit is used for setting the size of the corresponding parameter when the light source controller is in different working modes; the trigger circuit is used for sending a trigger signal to the microcontroller circuit; the microcontroller circuit continuously controls the output control circuit to output a corresponding light source driving signal based on the trigger signal, the working mode set by the mode control circuit and the corresponding parameter set by the parameter setting circuit, so that the light source electrically connected with the light source controller continuously generates a corresponding light emitting mode based on the light source driving signal. Therefore, compared with an analog light source controller, the light source controller meets the industrial automation requirement.)

1. A light source controller, comprising:

a microcontroller circuit;

the mode control circuit is electrically connected with the microcontroller circuit and is used for transmitting a mode control signal to the microcontroller circuit so as to set the working mode of the light source controller;

the parameter setting circuit is electrically connected with the microcontroller circuit and is used for transmitting a parameter setting signal to the microcontroller circuit when the light source controller is in different working modes so as to set the size of a corresponding parameter;

the trigger circuit is electrically connected with the microcontroller circuit and is used for sending a trigger signal to the microcontroller circuit; and

and the microcontroller circuit continuously controls the output control circuit to output a corresponding light source driving signal based on the triggering signal, the working mode set by the mode control circuit and the corresponding parameter set by the parameter setting circuit, so that a light source electrically connected with the light source controller continuously generates a corresponding light emitting mode based on the light source driving signal.

2. The light source controller of claim 1, wherein the parameter setting circuit comprises: the system comprises an up-regulation circuit, a down-regulation circuit and a determination circuit, wherein the up-regulation circuit, the down-regulation circuit and the determination circuit are respectively electrically connected with a microcontroller circuit; the up-regulation circuit is used for increasing the size of the parameter, the down-regulation circuit is used for decreasing the size of the parameter, and the determination circuit is used for transmitting the parameter setting signal to the microcontroller circuit so as to determine the size of the parameter.

3. The light source controller of claim 1, further comprising: and the serial port control circuit is electrically connected with the microcontroller circuit and used for switching the light source controller to be in a serial port control mode through the microcontroller circuit, and setting the magnitude of a brightness parameter corresponding to the serial port control mode and/or continuously controlling the output control circuit to output a light source control signal so as to enable the light source to emit light based on the light source control signal.

4. The light source controller of claim 1, further comprising: and the nonvolatile storage circuit is electrically connected with the microcontroller circuit and is used for storing the set sizes of the parameters corresponding to different working modes.

5. The light source controller of claim 1, wherein the operation modes include an input/output mode and a strobe mode, the parameters corresponding to the input/output mode are brightness parameters, and the parameters corresponding to the strobe mode are time parameters.

6. The light source controller of claim 5, wherein the output control circuit comprises: and the timer is electrically connected with the microcontroller circuit and used for counting based on the size of the time parameter corresponding to the stroboscopic mode.

7. The light source controller according to claim 5, wherein when the operation mode set by the mode control circuit is the input-output mode, the magnitude of the amplitude of the light source driving signal corresponds to the magnitude of the luminance parameter.

8. The light source controller according to claim 5, wherein when the operating mode set by the mode control circuit is the strobe mode, the light source driving signal is a pulse width modulation signal, and a duration of a high voltage level of the pulse width modulation signal corresponds to a magnitude of the time parameter.

9. The light source controller of claim 1, further comprising: and the display circuit is electrically connected with the microcontroller circuit and is used for displaying the working mode set by the mode control circuit and the corresponding size of the parameter set by the parameter setting circuit.

10. The light source controller of claim 1, further comprising: and the power supply circuit is used for supplying power to the microcontroller circuit, the mode control circuit, the parameter setting circuit, the trigger circuit and the output control circuit.

11. The light source controller of claim 10, further comprising: and the power supply indicating circuit is electrically connected with the power supply circuit and is used for indicating whether the power supply of the power supply circuit is abnormal or not.

12. The light source controller of claim 11, wherein the power indication circuit comprises a display device, a light emitting diode and/or a speaker.

13. The light source controller of claim 1, further comprising: and the light source current detection circuit is electrically connected with the microcontroller circuit and the light source electrically connected with the light source controller and is used for monitoring whether the light source is abnormal or not in real time.

14. A method for controlling a light source is used for a light source controller, the light source controller comprises a microcontroller circuit, a mode control circuit, a parameter setting circuit, a trigger circuit and an output control circuit, and the method is characterized by comprising the following steps:

the mode control circuit transmits a mode control signal to the microcontroller circuit to set a working mode of the light source controller;

when the light source controller is in different working modes, the parameter setting circuit transmits a parameter setting signal to the microcontroller circuit so as to set the size of a corresponding parameter;

the trigger circuit sends a trigger signal to the microcontroller circuit; and

the microcontroller circuit continuously controls the output control circuit to output a corresponding light source driving signal based on the trigger signal, the working mode set by the mode control circuit and the corresponding parameter set by the parameter setting circuit, so that the light source electrically connected with the light source controller continuously generates a corresponding light emitting mode based on the light source driving signal.

15. The method of controlling a light source of claim 14, further comprising the steps of:

the serial port control circuit switches the light source controller to be in a serial port control mode through the microcontroller circuit, sets the brightness parameter corresponding to the serial port control mode and/or continuously controls the output control circuit to output a light source control signal, so that the light source emits light based on the light source control signal.

16. The method of controlling a light source of claim 14, further comprising the steps of:

the nonvolatile storage circuit stores the set sizes of the parameters corresponding to different working modes through the microcontroller circuit; and

when the light source controller is powered on again after being powered off, the microcontroller circuit continuously controls the output control circuit to output the corresponding light source driving signal based on the triggering signal, the working mode set by the mode control circuit and the size of the parameter corresponding to the different working modes stored by the nonvolatile storage circuit, so that the light source continuously generates the corresponding light emitting mode based on the light source driving signal.

17. The method of claim 14, wherein the step of the microcontroller circuit continuously controlling the output control circuit to output the corresponding light source driving signal based on the trigger signal, the operation mode set by the mode control circuit and the corresponding magnitude of the parameter set by the parameter setting circuit comprises:

when the working mode set by the mode control circuit is an input-output mode, the microcontroller circuit controls the output control circuit to output the corresponding light source driving signal, wherein the amplitude of the light source driving signal corresponds to the brightness parameter corresponding to the input-output mode.

18. The method of claim 14, wherein the step of the microcontroller circuit continuously controlling the output control circuit to output the corresponding light source driving signal based on the trigger signal, the operation mode set by the mode control circuit and the corresponding magnitude of the parameter set by the parameter setting circuit comprises:

when the working mode set by the mode control circuit is a stroboscopic mode, the microcontroller circuit controls the output control circuit to output the corresponding light source driving signal, wherein the light source driving signal is a pulse width modulation signal, and the time length of the high potential of the pulse width modulation signal corresponds to the time parameter corresponding to the stroboscopic mode.

19. The method of controlling a light source of claim 14, wherein the light source controller further comprises a display circuit, the method of controlling a light source further comprising the steps of:

the display circuit displays the working mode set by the mode control circuit and the size of the corresponding parameter set by the parameter setting circuit.

20. The method of controlling a light source of claim 14, wherein the light source controller further comprises a power supply circuit and a power indication circuit, the power indication circuit being electrically connected to the power supply circuit, the method further comprising:

the power supply circuit supplies power to the microcontroller circuit, the mode control circuit, the parameter setting circuit, the trigger circuit and the output control circuit; and

the power supply indicating circuit indicates whether the power supply of the power supply circuit is abnormal or not.

Technical Field

The present application relates to the field of light source control technologies, and in particular, to a light source controller and a method for controlling a light source.

Background

In the industrial production process, the light source controller is mainly used for controlling the brightness of the light source and/or controlling the illumination state of the light source (namely controlling the on or off of the light source), and can also control the light source to carry out stroboscopic illumination by inputting an external signal, so that the service life of the light source is prolonged.

The light source controller commonly used in the market is an analog light source controller, and related adjustment is performed in a manual mode, so that the problems of complex operation, low accuracy and easy error exist. However, with the explosion of automation technology, analog light source controllers have been far from meeting the automation requirements in the industry.

Therefore, how to provide a light source controller to overcome the shortcomings of the analog light source controller and meet the industrial automation requirements is a problem to be solved urgently by those skilled in the art.

Disclosure of Invention

The embodiment of the application provides a light source controller and a method for controlling a light source, which can effectively solve the problem that in the prior art, a simulation light source controller cannot meet industrial automation requirements due to complex operation, low accuracy and easy error.

In order to solve the technical problem, the present application is implemented as follows:

in a first aspect, a light source controller is provided, comprising: the device comprises a microcontroller circuit, a mode control circuit, a parameter setting circuit, a trigger circuit and an output control circuit, wherein the mode control circuit, the parameter setting circuit, the trigger circuit and the output control circuit are respectively and electrically connected with the microcontroller circuit. The mode control circuit is used for transmitting a mode control signal to the microcontroller circuit so as to set the working mode of the light source controller; the parameter setting circuit is used for transmitting a parameter setting signal to the microcontroller circuit when the light source controller is in different working modes so as to set the size of the corresponding parameter; the trigger circuit is used for sending a trigger signal to the microcontroller circuit; the microcontroller circuit continuously controls the output control circuit to output a corresponding light source driving signal based on the trigger signal, the working mode set by the mode control circuit and the corresponding parameter set by the parameter setting circuit, so that the light source electrically connected with the light source controller continuously generates a corresponding light emitting mode based on the light source driving signal.

In a second aspect, a method for controlling a light source is provided for a light source controller, where the light source controller includes a microcontroller circuit, a mode control circuit, a parameter setting circuit, a trigger circuit, and an output control circuit. The method of controlling a light source comprises the steps of: the mode control circuit transmits a mode control signal to the microcontroller circuit to set a working mode of the light source controller; when the light source controller is in different working modes, the parameter setting circuit transmits a parameter setting signal to the microcontroller circuit so as to set the size of the corresponding parameter; the trigger circuit sends a trigger signal to the microcontroller circuit; and the microcontroller circuit continuously controls the output control circuit to output a corresponding light source driving signal based on the trigger signal, the working mode set by the mode control circuit and the corresponding parameter set by the parameter setting circuit, so that the light source electrically connected with the light source controller continuously generates a corresponding light emitting mode based on the light source driving signal.

In the embodiment of the application, through the design of the whole circuit architecture, compared with an analog light source controller, the light source controller has the technical effects of simple operation, high accuracy and more flexible use. In addition, the corresponding light source driving signal can be continuously output based on the triggering signal, the set working mode and the set corresponding parameter, so that the light source controller has the technical effect of high automation degree, and meets the industrial automation requirement.

Drawings

The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:

FIG. 1 is a block diagram of one embodiment of a light source controller according to the present application;

FIG. 2 is a waveform diagram of one embodiment of a light source driving signal and a trigger signal when the light source controller of FIG. 1 is in an input-output mode;

FIG. 3 is a waveform diagram of one embodiment of a light source driving signal and a trigger signal when the light source controller of FIG. 1 is in a strobe mode;

FIG. 4 is a flowchart of a method of controlling a light source according to a first embodiment of the present application;

FIG. 5 is a flowchart of a method of controlling a light source according to a second embodiment of the present application;

FIG. 6 is a flowchart of a method of controlling a light source according to a third embodiment of the present application;

FIG. 7 is a flowchart of a method of controlling a light source according to a fourth embodiment of the present application; and

fig. 8 is a flowchart of a fifth embodiment method of controlling a light source according to the present application.

Detailed Description

Embodiments of the present invention will be described below with reference to the accompanying drawings. In the drawings, the same reference numerals indicate the same or similar components or process flows.

It will be understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, values, method steps, operations, components, and/or components, but do not preclude the presence or addition of further features, values, method steps, operations, components, and/or groups thereof.

It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. In contrast, when an element is described as being "directly connected" or "directly coupled" to another element, there are no intervening elements present.

Please refer to fig. 1, which is a block diagram of an embodiment of a light source controller according to the present application. As shown in fig. 1, in the present embodiment, the light source controller 100 includes: the microcontroller circuit 110, the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140 and the output control circuit 150, wherein the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140 and the output control circuit 150 are electrically connected with the microcontroller circuit 110 respectively.

In practical implementation, the microcontroller circuit 110, the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140 and the output control circuit 150 can be implemented by analog circuits, Integrated Circuits (ICs), digital circuits and the like. Wherein, the integrated circuit can be, for example, a microprocessor (Micro-processor), a Microcontroller (MCU), a programmable logic gate array (FPGA or CPLD), or an Application Specific Integrated Circuit (ASIC), but the application is not limited thereto; the analog circuit may include a plurality of electronic components.

In an embodiment, the microcontroller circuit 110 includes a plurality of input/output (IO) pins, and the microcontroller circuit 110 is electrically connected to the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140, and the output control circuit 150 through the IO pins, respectively, for transmitting data/signals. In actual implementation, the microcontroller circuit 110 may be, but is not limited to, an STM32 single chip microcomputer.

In this embodiment, the mode control circuit 120 is configured to transmit a mode control signal to the microcontroller circuit 110 to set the operation mode of the light source controller 100 (i.e., the mode control circuit 120 sets the operation mode of the light source controller 100 through the microcontroller circuit 110); the parameter setting circuit 130 is configured to transmit a parameter setting signal to the microcontroller circuit 110 when the light source controller 100 is in different operating modes, so as to set the size of the corresponding parameter (i.e., when the light source controller 100 is in different operating modes, the parameter setting circuit 130 sets the size of the corresponding parameter through the microcontroller circuit 110); the trigger circuit 140 is used to send a trigger signal to the microcontroller circuit 110; the microcontroller circuit 110 continuously controls the output control circuit 150 to output the corresponding light source driving signal based on the trigger signal, the working mode set by the mode control circuit 120, and the corresponding parameter set by the parameter setting circuit 130, so that the light source (not drawn) electrically connected to the light source controller 100 continuously generates the corresponding light emitting mode based on the light source driving signal (i.e., the microcontroller circuit 110 continuously outputs the corresponding light source driving signal through the output control circuit 150 based on the trigger signal, the working mode set by the mode control circuit 120, and the corresponding parameter set by the parameter setting circuit 130, so that the light source continuously generates the corresponding light emitting mode based on the light source driving signal).

It should be noted that the microcontroller circuit 110 may control the output control circuit 150 to output the corresponding light source driving signal based on the currently received trigger signal, the operation mode set by the current mode control circuit 120, and the size of the corresponding parameter currently or previously set by the parameter setting circuit 130 (the size of the corresponding parameter previously set by the parameter setting circuit 130 may be stored in a memory (not shown) of the light source controller 100).

In an embodiment, the operating modes include an input/output mode and a strobe mode, the parameter corresponding to the input/output mode is a brightness parameter, and the parameter corresponding to the strobe mode is a time parameter. In one example, when the mode control circuit 120 transmits the mode control signal to the microcontroller circuit 110 and sets the light source controller 100 in the input/output mode, the parameter setting circuit 130 transmits the parameter setting signal to the microcontroller circuit 110 to set the magnitude of the brightness parameter, wherein the magnitude of the brightness parameter can be different brightness levels of the light source. In another example, when the mode control circuit 120 transmits another mode control signal to the microcontroller circuit 110 and sets the light source controller 100 in the strobe mode, the parameter setting circuit 130 transmits another parameter setting signal to the microcontroller circuit 110 to set the time parameter, wherein the time parameter can be the time duration of the normally on light source.

In an embodiment, please refer to fig. 2, which is a waveform diagram of an embodiment of the light source driving signal and the trigger signal when the light source controller of fig. 1 is in the input-output mode. As shown in fig. 2, when the operating mode set by the mode control circuit 120 is the input/output mode, the light source driving signal and the trigger signal have substantially the same waveform or approximately the same waveform, and the amplitude of the light source driving signal corresponds to the brightness parameter. The light source driving signal and the trigger signal can be similar to TTL signals, the high potential of the light source driving signal can enable the light source to emit light, and the low potential of the light source driving signal can enable the light source to be extinguished; the larger the brightness parameter corresponding to the amplitude of the light source driving signal is, the larger the amplitude of the light source driving signal is; the smaller the brightness parameter corresponding to the amplitude of the light source driving signal is, the smaller the amplitude of the light source driving signal is; the higher the voltage value (i.e., amplitude) of the high potential of the light source driving signal, the higher the luminance at which the light source emits light. The high level of the light source driving signal may refer to a signal greater than or equal to a low level, and the low level may refer to a ground signal. It should be noted that the high voltage level of the light source driving signal may include a triangular wave (also called a sawtooth wave or a ripple wave).

In an embodiment, please refer to fig. 3, which is a waveform diagram of an embodiment of the light source driving signal and the trigger signal when the light source controller of fig. 1 is in the strobe mode. As shown in fig. 3, when the operating mode set by the mode control circuit 120 is the strobe mode, the light source driving signal is a pulse width modulation signal (also called PWM signal), and the duration of the high level T of the pulse width modulation signal corresponds to the magnitude of the time parameter. The trigger signal can be similar to a pulse signal, the high potential of the light source driving signal can enable the light source to emit light, and the low potential of the light source driving signal can enable the light source to be extinguished; the larger the time parameter is, the longer the time T of the high potential is; the smaller the time parameter, the shorter the time T of the high potential. It should be noted that, when the operating mode set by the mode control circuit 120 is the stroboscopic mode, the light source controller 100 is configured to control the on-off time of the light source, and the amplitude of the light source driving signal can be adjusted according to actual requirements, for example: the amplitude of the light source driving signal may correspond to a maximum brightness level of the light source (i.e., the light source may emit a maximum brightness based on the light source driving signal); in addition, the high potential of the pwm signal may include the triangle wave (also called sawtooth wave or ripple).

In one embodiment, the output control circuit 150 may include: the timer 152 is electrically connected to the microcontroller circuit 110, and configured to count based on the size of the time parameter corresponding to the strobe mode. In other words, when the operation mode set by the mode control circuit 120 is the strobe mode, the timer 152 is used to time the high level of the light source driving signal, and when the counting is completed, the switching of the high level and the low level of the light source driving signal is performed.

In one embodiment, the parameter setting circuit 130 may include: the up-regulation circuit 132, the down-regulation circuit 134 and the determination circuit 136, wherein the up-regulation circuit 132, the down-regulation circuit 134 and the determination circuit 136 are respectively electrically connected with the microcontroller circuit 110; the up-regulation circuit 132 is configured to increase the magnitude of the parameter, the down-regulation circuit 134 is configured to decrease the magnitude of the parameter, and the determination circuit 136 is configured to transmit the parameter setting signal to the microcontroller circuit 110 to determine the magnitude of the parameter (i.e., the determination circuit 136 determines the magnitude of the parameter via the microcontroller circuit 110). In other words, the up-regulation circuit 132 and the down-regulation circuit 134 are used for adjusting the size of the parameter, and the parameter setting signal can be transmitted through the determination circuit 136 after the size of the parameter is adjusted, so as to complete the setting of the size of the parameter. In one embodiment, the up-adjust circuit 132 may include an up-adjust key, the down-adjust circuit 134 may include a down-adjust key, and the determination circuit 136 may include a determination key, so that the parameter setting circuit 130 may complete the setting of the size of the parameter by pressing the up-adjust key, the down-adjust key, and the determination key.

In one embodiment, the trigger circuit 140 may include a Programmable Logic Controller (PLC) or a single chip microcomputer, and the trigger signal is output through a high-low level of an IO port thereof.

In an embodiment, the light source controller 100 may further include: the nonvolatile memory circuit 170 is electrically connected to the microcontroller circuit 110, and is configured to store the set values of the parameters corresponding to the different operating modes through the microcontroller circuit 110. Therefore, each time the light source controller 100 is powered off and then powered on again, the microcontroller circuit 110 may continuously control the output control circuit 150 to output the corresponding light source driving signal based on the trigger signal, the working mode set by the mode control circuit 120, and the size of the parameter corresponding to the different working modes stored by the non-volatile storage circuit 170, so that the light source continuously generates the corresponding light emitting mode based on the light source driving signal. In an example, the non-volatile storage circuit 170 may be, but is not limited to, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), or a flash memory.

In an embodiment, the light source controller 100 may further include: the display circuit 180, the display circuit 180 is electrically connected to the microcontroller circuit 110, and is configured to display the working mode set by the mode control circuit 120 and the size of the corresponding parameter set by the parameter setting circuit 130. In one example, the display circuit 180 may be, but is not limited to, a nixie tube display circuit.

In an embodiment, the light source controller 100 may further include: the circuit board 105, the microcontroller circuit 110, the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140, and the output control circuit 150 are provided on the circuit board 105. The electrical connection lines between the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140, and the output control circuit 150 and the microcontroller circuit 110 may be disposed on the circuit board 105. In one example, the circuit board 105 may include a plurality of sub-circuit boards electrically connected to each other, and the microcontroller circuit 110, the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140, and the output control circuit 150 may be distributed on the plurality of sub-circuit boards.

In an embodiment, the light source controller 100 may further include: the power supply circuit 190 is used for supplying power to the microcontroller circuit 110, the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140 and the output control circuit 150. In an example, the power supply circuit 190 is electrically connected to the circuit board 105, and supplies power to the microcontroller circuit 110, the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140, and the output control circuit 150 through the circuit board 105.

In an embodiment, the light source controller 100 may further include: the power indication circuit 192 is electrically connected to the power supply circuit 190, and is configured to indicate whether the power supply of the power supply circuit 190 is abnormal. The power indication circuit 192 may indicate whether the power supply of the power supply circuit 190 is abnormal through the text information, the lamp information, and the voice information. The power indication circuit 192 may include a display device, a light emitting diode, and/or a speaker, among others. In an example, the power indication circuit 192 may be, but is not limited to, a display device, and indicates whether the power supply of the power supply circuit 190 is abnormal or not by displaying the text message. In another example, the power indication circuit 192 may include a Light Emitting Diode (LED) that distinguishes whether the power supply of the power supply circuit 190 is abnormal with different Light Emitting colors, for example: the red color indicates that the power supply of the power supply circuit 190 is abnormal, and the green color indicates that the power supply of the power supply circuit 190 is normal. In yet another example, the power indication circuit 192 may be a speaker for indicating whether the power supply of the power supply circuit 190 is abnormal by playing the voice message. The determination of whether the power supply of the power supply circuit 190 is abnormal may be performed by the power supply circuit 190 or the power indication circuit 192, and the determination method of whether the power supply of the power supply circuit 190 is abnormal is well known to those skilled in the art and therefore will not be described herein.

In an embodiment, the light source controller 100 may further include: the light source current detection circuit 194 is electrically connected to the microcontroller circuit 110 and the light source electrically connected to the light source controller 100, and is configured to monitor whether the light source is abnormal in real time. Specifically, the light source current detection circuit 194 monitors the current of the light source in real time, and when the monitored current is greater than a default value, it is determined that the light source is abnormal; when the light source current detection circuit 194 determines that the light source is abnormal, a protection signal is output to the microcontroller circuit 110, so that the microcontroller circuit 110 interrupts the output control circuit 150 to output the light source driving signal in time, and the light source is turned off.

In an embodiment, the light source controller 100 may further include: the serial port control circuit 160 is electrically connected to the microcontroller circuit 110. The serial control circuit 160 is configured to switch the light source controller 100 to be in a serial control mode through the microcontroller circuit 110, and set a magnitude of a luminance parameter corresponding to the serial control mode and/or continuously control the output control circuit 150 to output a light source control signal, so that the light source emits light based on the light source control signal. The serial port control circuit 160 may include a serial port (also referred to as a serial communication port or a COM port) for electrically connecting to an external control device (e.g., a computer device). The external control device may directly switch the operating mode of the light source controller 100 to the serial port control mode through the serial port (i.e., the light source controller 100 may be switched to the serial port control mode through the microcontroller circuit 110 after the serial port control circuit 160 is connected to the external control device), and set the magnitude of the luminance parameter corresponding to the serial port control mode through the serial port and the microcontroller circuit 110 and/or continuously control the output control circuit 150 to output the light source control signal through the serial port and the microcontroller circuit 110, so that the light source emits light based on the light source control signal. The output control circuit 150 may output a corresponding light source control signal based on the magnitude of the luminance parameter corresponding to the serial port control mode; the waveform of the light source control signal can be controlled by the external control device, and the amplitude of the light source control signal corresponds to the brightness parameter corresponding to the serial port control mode; the larger the brightness parameter corresponding to the serial port control mode is, the larger the amplitude of the light source control signal is; the smaller the brightness parameter corresponding to the serial port control mode is, the smaller the amplitude of the light source control signal is.

Please refer to fig. 4, which is a flowchart illustrating a method of controlling a light source according to a first embodiment of the present application. As shown in fig. 4, in the present embodiment, a method 200 of controlling a light source is used for the light source controller 100, and the method 200 of controlling a light source includes the steps of: the mode control circuit 120 transmits a mode control signal to the microcontroller circuit 110 to set an operation mode of the light source controller 100 (step 210); when the light source controller 100 is in different operation modes, the parameter setting circuit 130 transmits a parameter setting signal to the microcontroller circuit 110 to set the size of the corresponding parameter (step 220); the trigger circuit 140 sends a trigger signal to the microcontroller circuit 110 (step 230); and the micro controller circuit 110 continuously controls the output control circuit 150 to output the corresponding light source driving signal based on the trigger signal, the operation mode set by the mode control circuit 120 and the magnitude of the corresponding parameter set by the parameter setting circuit 130, so that the light source continuously generates the corresponding light emitting mode based on the light source driving signal (step 240).

It should be noted that the microcontroller circuit 110 may control the output control circuit 150 to output the corresponding light source driving signal based on the currently received trigger signal, the operating mode set by the current mode control circuit 120, and the size of the corresponding parameter currently or previously set by the parameter setting circuit 130 (i.e., the size of the corresponding parameter previously set by the parameter setting circuit 130 may be stored in a memory (not shown) of the light source controller 100). Therefore, the steps or actions in the description of the method 200 for controlling the light source can be changed or adjusted in sequence according to the obvious ways of those skilled in the art, and other detailed descriptions are described in the above paragraphs and will not be repeated herein.

In an embodiment, the step 240 of the microcontroller circuit 110 continuously controlling the output control circuit 150 to output the corresponding light source driving signal based on the trigger signal, the operation mode set by the mode control circuit 120 and the magnitude of the corresponding parameter set by the parameter setting circuit 130 may include: when the operation mode set by the mode control circuit 120 is the input/output mode, the micro-controller circuit 110 controls the output control circuit 150 to output the corresponding light source driving signal, wherein the light source driving signal has a waveform substantially the same as or close to the same as that of the trigger signal, and the amplitude of the light source driving signal corresponds to the brightness parameter corresponding to the input/output mode. The detailed description is already described in the above paragraphs, and will not be repeated herein.

In an embodiment, the step 240 of the microcontroller circuit 110 continuously controlling the output control circuit 150 to output the corresponding light source driving signal based on the trigger signal, the operation mode set by the mode control circuit 120 and the magnitude of the corresponding parameter set by the parameter setting circuit 130 may include: when the operating mode set by the mode control circuit 120 is the strobe mode, the microcontroller circuit 110 controls the output control circuit 150 to output a corresponding light source driving signal, where the light source driving signal is a pulse width modulation signal, and the duration of the high potential of the pulse width modulation signal corresponds to the magnitude of the time parameter corresponding to the strobe mode. The detailed description is already described in the above paragraphs, and will not be repeated herein.

In one embodiment, please refer to fig. 5, which is a flowchart illustrating a method of controlling a light source according to a second embodiment of the present application. As shown in fig. 5, the method 200 of controlling a light source may further include the steps of: the serial port control circuit 160 switches the light source controller 100 to be in the serial port control mode through the microcontroller circuit 110, and sets the magnitude of the brightness parameter corresponding to the serial port control mode and/or continuously controls the output control circuit 150 to output the light source control signal, so that the light source emits light based on the light source control signal (step 250). The detailed description is already described in the above paragraphs, and will not be repeated herein.

In one embodiment, please refer to fig. 6, which is a flowchart illustrating a method of controlling a light source according to a third embodiment of the present application. As shown in fig. 6, the method 200 of controlling a light source may further include the steps of: the nonvolatile memory circuit 170 stores the set size of the parameter corresponding to the different operation modes through the microcontroller circuit 110 (step 260); and when the light source controller 100 is powered off and then powered on again, the microcontroller circuit 110 continuously controls the output control circuit 150 to output the corresponding light source driving signal based on the trigger signal, the working mode set by the mode control circuit 120, and the size of the parameter corresponding to the different working modes stored in the nonvolatile memory circuit 170, so that the light source continuously generates the corresponding light emitting mode based on the light source driving signal (step 270). The detailed description is already described in the above paragraphs, and will not be repeated herein.

In an embodiment, please refer to fig. 7, which is a flowchart illustrating a method according to a fourth embodiment of the present disclosure. As shown in fig. 7, the method 200 of controlling a light source may further include the steps of: the display circuit 180 displays the operation mode set by the mode control circuit 120 and the size of the corresponding parameter set by the parameter setting circuit 130 (step 280). The detailed description is already described in the above paragraphs, and will not be repeated herein.

In an embodiment, please refer to fig. 8, which is a flowchart illustrating a method according to a fifth embodiment of the present disclosure. As shown in fig. 8, the method 200 of controlling a light source may further include the steps of: the power supply circuit 190 supplies power to the microcontroller circuit 110, the mode control circuit 120, the parameter setting circuit 130, the trigger circuit 140 and the output control circuit 150 (step 290); and the power supply indicating circuit 192 indicates whether the power supply of the power supply circuit 190 is abnormal (step 292). The detailed description is already described in the above paragraphs, and will not be repeated herein.

In summary, the light source controller and the method for controlling the light source in the embodiments of the present application have the technical effects of simple operation, high accuracy, and flexibility in use, compared with the analog light source controller, through the design of the whole circuit architecture. In addition, the corresponding light source driving signal can be continuously output based on the triggering signal, the set working mode and the set corresponding parameter, so that the light source controller has the technical effect of high automation degree, and meets the industrial automation requirement.

Although the above-described elements are included in the drawings of the present application, it is not excluded that more additional elements may be used to achieve better technical results without departing from the spirit of the invention.

While the invention has been described using the above embodiments, it should be noted that these descriptions are not intended to limit the invention. Rather, this invention encompasses modifications and similar arrangements as would be apparent to one skilled in the art. The scope of the claims is, therefore, to be construed in the broadest manner to include all such obvious modifications and similar arrangements.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种路灯集中控制系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!