CN114157816B - Light source control circuit and visual detector - Google Patents

Light source control circuit and visual detector Download PDF

Info

Publication number
CN114157816B
CN114157816B CN202111348689.3A CN202111348689A CN114157816B CN 114157816 B CN114157816 B CN 114157816B CN 202111348689 A CN202111348689 A CN 202111348689A CN 114157816 B CN114157816 B CN 114157816B
Authority
CN
China
Prior art keywords
ith
control circuit
light source
signal
trigger signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111348689.3A
Other languages
Chinese (zh)
Other versions
CN114157816A (en
Inventor
高向阳
程俊
康宇航
任子良
张锲石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to CN202111348689.3A priority Critical patent/CN114157816B/en
Priority to PCT/CN2021/137610 priority patent/WO2023082395A1/en
Publication of CN114157816A publication Critical patent/CN114157816A/en
Application granted granted Critical
Publication of CN114157816B publication Critical patent/CN114157816B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B45/00Circuit arrangements for operating light-emitting diodes [LED]
    • H05B45/30Driver circuits
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B45/00Circuit arrangements for operating light-emitting diodes [LED]
    • H05B45/30Driver circuits
    • H05B45/32Pulse-control circuits
    • H05B45/325Pulse-width modulation [PWM]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

A light source control circuit and a visual detector belong to the technical field of vision, and are connected with n cameras and n light source modules, wherein the ith camera sends an ith trigger signal; the embodiment of the invention comprises a control circuit and n drive circuits; the control circuit receives the ith trigger signal, acquires an exposure mode corresponding to the ith trigger signal from a database, and outputs an ith control signal group according to the exposure mode; the ith driving circuit outputs an ith driving signal group according to the ith control signal group so as to drive the ith light source module to be lightened; wherein n is a natural number, and i is a natural number less than or equal to n; due to the fact that the software and the hardware are combined, a user can conveniently configure the port and the mode of the light source control circuit, exposure modes of various logic combinations can be further designed, and therefore the integration level is improved, the method is suitable for various detection working conditions, the visual detector is convenient to build and develop, design is simplified in a complex application scene, and system stability is improved.

Description

Light source control circuit and visual detector
Technical Field
The application belongs to the technical field of vision, especially relates to a light source control circuit and visual detection appearance.
Background
Nowadays, more and more enterprises begin to install visual inspection instruments on production lines, and the visual inspection is widely popularized.
The light source is an important factor affecting the visual inspection apparatus, and it directly affects the quality of input data and application effect. Due to the diversity of the detection objects, for each specific application instance, the corresponding lighting device is selected to achieve the best effect. The light source can be divided into visible light and invisible light. Several visible light sources commonly used are white lamps, fluorescent lamps, mercury lamps and sodium lamps. The visible light has a disadvantage that light energy cannot be stably maintained. How to keep the light energy stable to a certain extent is a problem that needs to be solved urgently in the practical process, and a light source system can be divided into the following methods according to the irradiation method: back lighting, forward lighting, structured light, and stroboscopic lighting, among others. Among them, the back lighting is that the measured object is put between light source and camera, its advantage is that it can obtain the high contrast picture. The forward lighting is that the light source and the camera are located on the same side of the object to be measured, which is a convenient way to install. The structured light illumination is to project a grating or a line light source and the like onto a measured object, and demodulate three-dimensional information of the measured object according to distortion generated by the grating or the line light source and the like. The stroboscopic light illumination is to irradiate high-frequency light pulse on an object, and the shooting of a camera is required to be synchronous with a light source.
The machine vision backlight source is one of vision light sources, namely is placed on the back of an object to be detected, and is mainly applied to contour detection of the object to be detected, stain defect detection of a transparent body, liquid crystal character inspection, size and appearance detection of small electronic components, appearance and size inspection of bearings, appearance and size inspection of semiconductor lead frames and the like.
The high-brightness backlight illumination has the characteristics of protruding the appearance profile characteristics of an object, low heat productivity, uniform light, no flicker and the like. Therefore, the method can be widely used for external inspection of electronic components, stain inspection of transparent films and the like, inspection of liquid crystal characters, inspection of Small Out-Line packages (SOPs) and Chip Scale Packages (CSPs), inspection of the appearance and size of bearings, appearance and size of semiconductor lead frames, and the like. The light source has a very important role in a machine vision system, different illumination modes must be adopted for different detection objects to highlight the characteristics of the detected objects, sometimes, the combination of the modes may need to be adopted, and the selection of the optimal illumination method and the light source often needs a large amount of tests to be found.
However, due to the diversity of the objects to be tested, the characteristics of the objects to be tested are different, the requirements of the visual inspection method on the light source are different, and the light source control circuits on the market generally solidify a certain light source control mode, such as a normally bright mode, an edge-triggered stroboscopic mode or a follow-up input level mode. Therefore, in some complex application scenarios, the single fixed mode may limit the acquisition of more features by the visual inspection algorithm. The special light source control circuit can be built or designed through a plurality of light control modules, the complexity of the light source control circuit is increased, the system stability is reduced, the cost is increased, the research and development workload is increased, and the development risk is brought to the whole visual detection system.
Disclosure of Invention
An object of the application is to provide a light source control circuit and visual detector, aim at solving the problem that relevant light source control circuit designs complicacy and system stability is poor in complicated application scene.
The embodiment of the application provides a light source control circuit, which is connected with n cameras and n light source modules, wherein the ith camera is configured to send an ith trigger signal; the light source control circuit comprises a control circuit and n drive circuits;
the control circuit is connected with the n cameras and configured to receive the ith trigger signal, acquire an exposure mode corresponding to the ith trigger signal in a database and output an ith control signal group according to the exposure mode;
the ith driving circuit is connected with the control circuit and is configured to output an ith driving signal group according to the ith control signal group so as to drive the ith light source module to be lightened;
wherein n is a natural number, and i is a natural number less than or equal to n.
In one embodiment, the control circuit is specifically configured to receive the ith trigger signal, record the number of times the ith trigger signal is received, acquire an exposure mode corresponding to the ith trigger signal and the number of times from a database, and output an ith control signal group according to the exposure mode.
In one embodiment, the ith control signal group comprises a plurality of control signals of an ith group; the exposure pattern comprises an electrical parameter;
the control circuit is specifically configured to receive the ith trigger signal, acquire the electrical parameter of each control signal of the ith group corresponding to the ith trigger signal in a database, and output each control signal of the ith group according to the electrical parameter of each control signal of the ith group.
In one embodiment, the driving circuit comprises a plurality of driving components, and the light source module comprises a plurality of light sources;
the driving component is configured to output a driving signal according to the control signal so as to drive the light source to be lightened.
In one embodiment, the circuit further comprises n isolation circuits;
the ith isolation circuit is connected between the control circuit and the ith drive circuit and is configured to isolate the ith control signal group;
the ith driving circuit is specifically configured to output an ith driving signal group according to the isolated ith control signal group so as to drive the ith light source module to light up.
In one embodiment, the method further comprises the following steps:
the key circuit is connected with the control circuit and is configured to output a key signal according to the sensed key operation;
the control circuit is further configured to receive the key signal, acquire an exposure mode of the ith trigger signal corresponding to the key signal, and store the association between the ith trigger signal and the exposure mode in the database.
In one embodiment, the method further comprises the following steps:
the communication circuit is connected with the control circuit and is configured to forward an exposure mode of the ith trigger signal sent by the upper computer and forward mode information to the upper computer;
the control circuit is further configured to receive an exposure mode of the ith trigger signal, store the association between the ith trigger signal and the exposure mode in the database, and output the mode information according to the exposure mode corresponding to the ith trigger signal.
In one embodiment, the method further comprises the following steps:
the display circuit is connected with the control circuit and is configured to display according to a display signal;
the control circuit is further configured to output the display signal according to the exposure mode.
In one embodiment, the control circuit comprises a microprocessor, a first resistor, a second resistor, a third resistor and a fourth resistor;
the power supply end of the microprocessor, the first end of the first resistor, the first end of the second resistor, the first end of the third resistor and the first end of the fourth resistor are commonly connected to a first power supply, the second end of the fourth resistor and the first general input/output end of the microprocessor are commonly used as a1 st trigger signal input end of the control circuit, the second end of the third resistor and the second general input/output end of the microprocessor are commonly used as a2 nd trigger signal input end of the control circuit, the second end of the second resistor and the third general input/output end of the microprocessor are commonly used as a3 rd trigger signal input end of the control circuit, the second end of the first resistor and the fourth general input/output end of the microprocessor are commonly used as a4 th trigger signal input end of the control circuit, the fifth general input/output end of the microprocessor and the sixth general input/output end of the microprocessor are commonly used as a1 st control signal output end of the control circuit, the seventh general input/output end of the microprocessor and the eighth general input/output end of the microprocessor are commonly used as a2 nd control signal input/output end of the control circuit, the seventh general input/output end of the microprocessor and the eighth general input/output end of the ninth general control circuit are commonly used as a twelfth control signal group, the eleventh control signal output end of the microprocessor and the twelfth general input/output end of the control circuit, the eleventh control circuit are commonly used as a group of the twelfth general control circuit, and the twelfth general control output end of the control circuit, and the eleventh control circuit, and the twelfth general control signal output end of the twelfth general control circuit are commonly used as a group of the control circuit, and the eleventh control circuit, and the twelfth general input/output end of the control circuit.
The embodiment of the invention also provides a visual detector which comprises the light source control circuit.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the control circuit receives the ith trigger signal, acquires an exposure mode corresponding to the ith trigger signal from the database, and outputs an ith control signal group according to the exposure mode; the ith driving circuit outputs an ith driving signal group according to the ith control signal group so as to drive the ith light source module to be lightened; therefore, by combining software and hardware, a user can conveniently configure the port and the mode of the light source control circuit, exposure modes of various logic combinations can be further designed, the integration level is improved, the method is suitable for various detection working conditions, the construction and the development of a visual detector are facilitated, the design is simplified in a complex application scene, and the system stability is improved.
Drawings
In order to more clearly illustrate the technical invention in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced, it is obvious that the drawings in the description below are only some embodiments of the present invention, and other drawings may be obtained by those skilled in the art without inventive efforts.
Fig. 1 is a schematic structural diagram of a light source control circuit according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of an external interrupt function provided in an embodiment of the present application;
fig. 3 is another schematic structural diagram of a light source control circuit according to an embodiment of the present application;
fig. 4 is another schematic structural diagram of a light source control circuit according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a light source control circuit according to an embodiment of the present disclosure;
fig. 6 is another schematic structural diagram of a light source control circuit according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a portion of an exemplary circuit for a light source control circuit according to an embodiment of the present application;
fig. 8 is a schematic diagram of a partial example circuit of a light source control circuit according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that when an element is referred to as being "secured to" or "disposed on" another element, it can be directly on the other element or be indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or be indirectly connected to the other element.
It will be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like, refer to an orientation or positional relationship illustrated in the drawings for convenience in describing the present application and to simplify description, and do not indicate or imply that the referenced device or element must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the present application.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
Fig. 1 shows a schematic structural diagram of a light source control circuit provided in a preferred embodiment of the present application, and for convenience of description, only the relevant portions of the present embodiment are shown, which are detailed as follows:
the light source control circuit 11 is connected to the n cameras 10 and the n light source modules 20, and the ith camera 10 is configured to transmit an ith trigger signal; the light source control circuit 11 includes a control circuit 11 and n drive circuits 12;
the control circuit 11 is connected with the n cameras 10, and is configured to receive the ith trigger signal, acquire an exposure mode corresponding to the ith trigger signal from the database, and output an ith control signal group according to the exposure mode;
an ith driving circuit 12 connected to the control circuit 11 and configured to output an ith driving signal group according to the ith control signal group to drive the ith light source module 20 to light up;
wherein n is a natural number, and i is a natural number less than or equal to n.
In specific implementation, the light source module 20 may be an LED device, and the driving circuit 12 converts a voltage source into a constant current source, and can complete matching with the voltage and current of the conventional LED device according to the requirement of the conventional LED device.
By way of example and not limitation, the ith control signal group includes a plurality of control signals of the ith group; the exposure mode includes an electrical parameter; the control circuit 11 is specifically configured to receive the ith trigger signal, obtain the electrical parameter of each control signal of the ith group corresponding to the ith trigger signal in the database, and output each control signal of the ith group according to the electrical parameter of each control signal of the ith group.
The driving circuit 12 includes a plurality of driving components, and the light source module 20 includes a plurality of light sources; the driving component is configured to output a driving signal according to the control signal so as to drive the light source to be lightened.
Include a plurality of control signal of ith group through ith control signal group, and light source module 20 includes a plurality of light sources, has realized using a plurality of light sources to carry out visual detection, has richened visual detection's function.
In an embodiment, the control circuit 11 is specifically configured to receive the ith trigger signal, record the number of times of receiving the ith trigger signal, obtain an exposure mode corresponding to the ith trigger signal and the number of times in the database, and output the ith control signal group according to the exposure mode.
By acquiring the exposure mode corresponding to the ith trigger signal and the number of times and outputting the ith control signal group according to the exposure mode, different exposure modes can be set for each path of light source module 20 according to the trigger number of times, thereby enriching the function of visual detection.
In specific implementation, each path of trigger signal in the application is respectively and independently corresponding to one path of interrupt control, and the requirement of interrupt priority is highest, so that the preemption priority is designed to be one level, and the response priority is respectively 1, 2, 3, 4 and the like in sequence. And when a trigger signal is received, the external interrupt function is called, and the corresponding output control signal group is mainly modulated and output according to the current exposure mode setting in the external interrupt function.
For example, in one embodiment, the flow diagram of the external interrupt function is shown in FIG. 2: judging whether the trigger signal is the trigger signal or not after the interrupt trigger, and then inquiring the interrupt signal to judge which trigger source is the interrupt signal; if so, the exposure mode of the channel is invoked. And judging the current exposure mode, if the current exposure mode is the mode 1, loading the PWM signals endowed to the corresponding channels by the current duty ratio of the mode 1, and then simultaneously outputting the PWM signals by two control lines of the corresponding channels, otherwise, judging whether the current exposure mode is the mode 2. If the mode is 2, loading the PWM signal of the corresponding channel endowed by the current duty ratio of the mode 2, then triggering the control line 1 to output the PWM signal when the triggering signal is odd times, triggering the control line 2 to output the PWM signal when the triggering signal is even times, and otherwise, judging whether the mode is 3. If the mode is 3, loading the PWM signal of the corresponding channel endowed by the current duty ratio of the mode 3, then triggering the control line 1 to output the PWM signal when the triggering signal is odd times, and outputting the PWM signal by the control line 2, otherwise judging whether the mode is 4. If the current duty ratio is in the mode 4, loading the PWM signal of the corresponding channel endowed by the current duty ratio in the mode 4, then outputting the PWM signal by the control line 1, triggering the control line 2 to output the PWM signal when the triggering signal is even times, and then ending the interrupt program.
As shown in fig. 3, the light source control circuit 11 further includes n isolation circuits 13.
An ith isolation circuit 13 connected between the control circuit 11 and the ith drive circuit 12 and configured to isolate an ith control signal group;
the ith driving circuit 12 is specifically configured to output an ith driving signal group according to the isolated ith control signal group to drive the ith light source module 20 to light up.
By the isolation circuit 13, interference of a subsequent high-power circuit to the front-end control circuit 11 is prevented.
As shown in fig. 4, the light source control circuit 11 further includes a key circuit 14.
A key circuit 14 connected to the control circuit 11 and configured to output a key signal according to a sensed key operation;
the control circuit 11 is further configured to receive the key signal, acquire an exposure mode of an ith trigger signal corresponding to the key signal, and store an association between the ith trigger signal and the exposure mode in a database.
The key circuit 14 realizes information input of a user and simultaneously feeds back user operation to assist the user in setting the light source control circuit.
As shown in fig. 5, the light source control circuit 11 further includes a communication circuit 15.
The communication circuit 15 is connected with the control circuit 11 and is configured to forward an exposure mode of an ith trigger signal sent by the upper computer and forward mode information to the upper computer;
the control circuit 11 is further configured to receive an exposure mode of the ith trigger signal, store the association between the ith trigger signal and the exposure mode in the database, and output mode information according to the exposure mode corresponding to the ith trigger signal.
Through the communication circuit 15, the setting of the exposure mode through the upper computer and the display of the exposure mode information on the upper computer are realized, and the use convenience of the light source control circuit 11 is improved.
As shown in fig. 6, the light source control circuit 11 further includes a display circuit 16.
A display circuit 16 connected to the control circuit 11 and configured to perform display in accordance with a display signal;
the control circuit 11 is also configured to output a display signal according to the exposure mode.
The light source control circuit 11 may further include some auxiliary circuits, such as a power supply circuit. Because the application needs to use 5v and 3.3v DC power supplies, the design of the application can adopt 12v standard DC power supplies, and the application realizes the 5v and 3.3v power supplies through a DC conversion circuit.
Fig. 7 shows a partial exemplary circuit structure of a light source control circuit provided by an embodiment of the present invention, fig. 8 shows another partial exemplary circuit structure of a light source control circuit provided by an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the detailed description is as follows:
the control circuit 11 includes a microprocessor U1, a first resistor R1, a second resistor R2, a third resistor R3, and a fourth resistor R4.
The power supply terminal VDD of the microprocessor U1, the first terminal of the first resistor R1, the first terminal of the second resistor R2, the first terminal of the third resistor R3, and the first terminal of the fourth resistor R4 are commonly connected to the first power VAA, the second terminal of the fourth resistor R4 and the first general-purpose input/output terminal PC8 of the microprocessor U1 are commonly used as the 1 st trigger signal input terminal of the control circuit 11, the second terminal of the third resistor R3 and the second general-purpose input/output terminal PC9 of the microprocessor U1 are commonly used as the 2 nd trigger signal input terminal of the control circuit 11, the second terminal of the second resistor R2 and the third general-purpose input/output terminal PC10 of the microprocessor U1 are commonly used as the 3 rd trigger signal input terminal of the control circuit 11, the second terminal of the first resistor R1 and the fourth general-purpose input/output terminal PC11 of the microprocessor U1 are commonly used as the 4 th trigger signal input terminal of the control circuit 11, the fifth general input/output end PC0 of the microprocessor U1 and the sixth general input/output end PC1 of the microprocessor U1 are commonly used as a1 st control signal group output end of the control circuit 11, the seventh general input/output end PC2 of the microprocessor U1 and the eighth general input/output end PC3 of the microprocessor U1 are commonly used as a2 nd control signal group output end of the control circuit 11, the ninth general input/output end PC4 of the microprocessor U1 and the tenth general input/output end PC5 of the microprocessor U1 are commonly used as a3 rd control signal group output end of the control circuit 11, the eleventh general input/output end PC6 of the microprocessor U1 and the twelfth general input/output end PC7 of the microprocessor U1 are commonly used as a4 th control signal group output end of the control circuit 11, and the ground terminal VSS of the microprocessor U1 is connected with a power ground.
A thirteenth general input/output end PA11 of the microprocessor U1 and a fourteenth general input/output end PA12 of the microprocessor U1 are jointly used as an exposure mode input end of the control circuit 11 and a mode information output end of the control circuit 11; a fifteenth general input/output end PA0 of the microprocessor U1, a sixteenth general input/output end PA1 of the microprocessor U1, a seventeenth general input/output end PA2 of the microprocessor U1, an eighteenth general input/output end PA3 of the microprocessor U1, a nineteenth general input/output end PA4 of the microprocessor U1, a twentieth general input/output end PA5 of the microprocessor U1, a twenty-first general input/output end PA6 of the microprocessor U1, and a twenty-second general input/output end PA7 of the microprocessor U1 are used as key signal input ends of the control circuit 11; the twenty-third universal input/output terminal PB10 of the microprocessor U1, the twenty-fourth universal input/output terminal PB11 of the microprocessor U1, the twenty-fifth universal input/output terminal PB12 of the microprocessor U1, the twenty-sixth universal input/output terminal PB13 of the microprocessor U1, and the twenty-seventh universal input/output terminal PB14 of the microprocessor U1 are collectively used as a display signal output terminal of the control circuit 11.
The first resistor R1 to the fourth resistor R4 are responsible for matching and receiving the trigger signal transmitted from the camera 10, and can resist interference and have small delay.
The first general-purpose input/output end PC8 of the microprocessor U1 to the fourth general-purpose input/output end PC11 of the microprocessor U1 mainly receive the timing information (trigger signal) sent by the camera 10, the timing information mainly includes the exposure information of the camera 10, and the light source module 20 is controlled to cooperate with the exposure of the camera 10 according to the information, so that the requirement of receiving the information on the real-time performance is very high. The characteristics of the signal output circuit of the camera 10 are also considered because most of the exposure information output signals (trigger signals) of the camera 10 pass through the photocoupling isolation circuit 13. Therefore, the design needs to be performed in cooperation with the output circuit of the camera 10, and the I/O ports (the first general input/output port PC8 of the microprocessor U1 to the fourth general input/output port PC11 of the microprocessor U1) with the external interrupt function of the microprocessor are respectively connected to the I/O ports, so that the embedded software can ensure the real-time performance of the time sequence receiving.
The control module plays a key role in supporting software functions and hardware functions, and therefore, the design and the model selection need to be considered comprehensively. The microprocessor mainly receives input time sequence information (trigger signals), processes the input time sequence information according to a certain set rule, and finally outputs a control signal group. Among many microprocessors, the STM32 family is based on the ARM core and is specialized for embedded processors requiring high performance, low cost, and low power consumption. On the Peripheral connection, the STM32 has a1 μ s dual 12-bit analog-to-digital converter, a4 mbit/s Asynchronous Receiver/Transmitter (UART), an 18 mbit/s Serial Peripheral Interface (SPI), and an 18MHz input/output port flipping speed; on the integration, the reset circuit, the low voltage detection, the voltage regulator and the precise RC oscillator are integrated; in performance, the highest working frequency can reach 72MHz, and a FLASH memory of 32-512KB and an SRAM memory of 6-64KB are integrated. With abundant expanded resources and high-speed data processing capability, STM32 has become one of the hot microprocessors of embedded hardware design. Stm32f103rct6 that this application microprocessor can adopt, it possesses 64 pins, 256K program space, 32K's processing space belongs to the intensive chip in STM32, satisfies the system needs completely.
The communication circuit 15 includes a Universal Serial Bus (USB) conversion chip U2, a crystal oscillator X1, a first capacitor C1, a second capacitor C2, a third capacitor C3, and a fourth capacitor C4.
A UART data transmitting terminal TXD of the USB conversion chip U2 is used as an exposure mode output terminal of the communication circuit 15, a UART data receiving terminal RXD of the USB conversion chip U2 is used as a mode information input terminal of the communication circuit 15, a positive USB data terminal D + of the USB conversion chip U2 and a negative USB data terminal D-of the USB conversion chip U2 are used as an exposure mode input terminal of the communication circuit 15 and a mode information output terminal of the communication circuit 15 together, a crystal oscillator input terminal XI of the USB conversion chip U2 is connected to a first terminal of the crystal oscillator X1 and a first terminal of the first capacitor C1, a crystal oscillator output terminal XO of the USB conversion chip U2 is connected to a second terminal of the crystal oscillator X1 and a first terminal of the second capacitor C2, a power terminal VCCB of the USB conversion chip U2 and a first terminal of the third capacitor C3 are connected to a second power supply, a decoupling capacitor terminal V3 of the USB conversion chip U2 is connected to a first terminal of the fourth capacitor C4, a ground terminal of the USB conversion chip U2, a second terminal GND of the first capacitor C1, a second terminal of the second capacitor C2, a second terminal of the third capacitor C3 and a second terminal of the fourth capacitor C4 are connected to a ground.
Through the communication circuit 15, the upper computer can be connected through an RS232 interface, and the configuration of the system is realized. The communication circuit mainly realizes data communication between the light source control circuit and an upper computer, and the communication circuit can be connected with the upper computer through an RS232 interface to realize that the upper computer directly sets the light source control circuit 11. This application communication interface adopts the USB to connect, so adopt the thought that the USB changes the serial ports in the design, specifically can realize through chip CH 340G.
The isolation circuit 13 includes a first optocoupler U3, a second optocoupler U4, a first triode Q1, a second triode Q2, a fifth resistor R5, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, a ninth resistor R9, and a tenth resistor R10.
The first end of the fifth resistor R5 and the first end of the eighth resistor R8 are commonly used as an i-th control signal group input end of the isolation circuit 13, the second end of the fifth resistor R5 is connected with the base of the first triode Q1, the collector of the first triode Q1 is connected with the first end of the sixth resistor R6, the second end of the sixth resistor R6 is connected with the negative electrode of the first optocoupler U3, the second end of the eighth resistor R8 is connected with the base of the second triode Q2, the collector of the second triode Q2 is connected with the first end of the ninth resistor R9, the second end of the ninth resistor R9 is connected with the negative electrode of the second optocoupler U4, the positive electrode of the first optocoupler U3, the first end of the seventh resistor R7, the positive electrode of the second optocoupler U4 and the first end of the tenth resistor R10 are commonly connected to a third power source VCC, the collector of the first optocoupler U3, the collector of the second optocoupler U4, the second end of the seventh resistor R7 and the second end of the tenth resistor R10 are commonly used as an i-th control signal group input end of the isolation circuit 13, the emitter of the first optocoupler U3 and the emitter of the second optocoupler Q2 are commonly connected to the emitter of the second optocoupler 3, the emitter of the second triode Q3.
The isolation circuit 13 mainly completes amplification and isolation of an output signal (control signal group) of the microprocessor U1, so that the control signal group can be stably transmitted to a controlled unit without being attenuated to cause errors or unstable levels, and in consideration of the fact that a power peripheral is to be connected subsequently, the primary isolation circuit 13 is designed for avoiding interference of the power circuit on the control signal group in the application. The NPN type triode MMBT3904 is adopted to design a triode amplifying circuit, and the amplification of a control signal group is achieved. This application adopts the opto-coupler, realizes the isolation of control signal group and back-end circuit, and TLP127 can be chooseed for use to the opto-coupler.
The following further description of fig. 7 and 8 is made in conjunction with the working principle:
the light source control circuit 11 is connected with the 4 cameras 10 and the 4 light source modules 20, and the ith camera 10 sends an ith trigger signal.
For example, the 2 nd camera 10 sends the 2 nd trigger signal to the second general input/output end PC9 of the microprocessor U1, the microprocessor obtains the exposure mode corresponding to the 2 nd trigger signal in the database, and outputs the 2 nd control signal group according to the exposure mode; in specific implementation, the microprocessor U1 records the number of times the 2 nd trigger signal is received, acquires an exposure mode corresponding to the 2 nd trigger signal and the number of times from the database, and outputs the 2 nd control signal group according to the exposure mode. Wherein the 2 nd control signal group comprises 2 control signals of the 2 nd group; the exposure mode includes an electrical parameter (e.g., duty cycle of a PWM signal); the microprocessor U1 acquires the electrical parameters of the respective control signals of the 2 nd group corresponding to the 2 nd trigger signal from the database, and outputs the respective control signals of the 2 nd group from the seventh general-purpose input/output terminal PC2 of the microprocessor U1 and the eighth general-purpose input/output terminal PC3 of the microprocessor U1 according to the electrical parameters of the respective control signals of the 2 nd group.
The 1 st control signal of the 2 nd group is input to a base electrode of a first triode Q1, the first triode Q1 amplifies the 1 st control signal of the 2 nd group, the amplified 1 st control signal of the 2 nd group is input to a negative electrode of a first optocoupler U3, the first optocoupler U3 isolates the 1 st control signal of the 2 nd group according to the amplified 1 st control signal, and the isolated 1 st control signal of the 2 nd group is output to a2 nd driving circuit 12; the 2 nd control signal of the 2 nd group is input to the base of second triode Q2, and second triode Q2 enlargies the 2 nd control signal of the 2 nd group, and the 2 nd control signal of the 2 nd group after the amplification is input to the negative pole of second opto-coupler U4, and second opto-coupler U4 is kept apart according to the 2 nd control signal to the 2 nd group after the amplification to 2 nd control signal output to the 2 nd drive circuit 12 of the 2 nd group after will keeping apart.
The 2 nd driving circuit 12 outputs a2 nd driving signal group according to the 2 nd control signal group to drive the 2 nd light source module 20 to light up; the 2 nd driving signal group includes 2 driving signals, the 2 nd light source module 20 includes 2 light sources, and the 2 driving signals respectively drive the 2 light sources.
The embodiment of the invention also provides a visual detector which comprises the light source control circuit.
In the embodiment of the invention, the ith camera sends the ith trigger signal by being connected with the n cameras and the n light source modules; the embodiment of the invention comprises a control circuit and n drive circuits; the control circuit receives the ith trigger signal, acquires an exposure mode corresponding to the ith trigger signal from a database, and outputs an ith control signal group according to the exposure mode; the ith driving circuit outputs an ith driving signal group according to the ith control signal group so as to drive the ith light source module to be lightened; wherein n is a natural number, and i is a natural number less than or equal to n; due to the combination of software and hardware, a user can conveniently configure the port and the mode of the light source control circuit, and can further design exposure modes of various logic combinations, so that the integration level is improved, the method is suitable for various detection working conditions, the construction and the development of a visual detector are facilitated, the design is simplified in a complex application scene, and the system stability is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (9)

1. The light source control circuit is characterized by being connected with n cameras and n light source modules, wherein the ith camera is configured to send an ith trigger signal; the light source control circuit comprises a control circuit and n drive circuits;
the control circuit is connected with the n cameras and configured to receive the ith trigger signal, acquire an exposure mode corresponding to the ith trigger signal in a database and output an ith control signal group according to the exposure mode;
the ith driving circuit is connected with the control circuit and is configured to output an ith driving signal group according to the ith control signal group so as to drive the ith light source module to be lightened;
wherein n is a natural number, and i is a natural number less than or equal to n;
the control circuit is specifically configured to receive the ith trigger signal, record the number of times the ith trigger signal is received, acquire an exposure mode corresponding to the ith trigger signal and the number of times in a database, and output an ith control signal group according to the exposure mode.
2. The light source control circuit of claim 1, wherein the ith control signal group comprises a plurality of control signals of an ith group; the exposure mode comprises an electrical parameter;
the control circuit is specifically configured to receive the ith trigger signal, acquire the electrical parameter of each control signal of the ith group corresponding to the ith trigger signal in a database, and output each control signal of the ith group according to the electrical parameter of each control signal of the ith group.
3. The light source control circuit of claim 2, wherein the driving circuit comprises a plurality of driving components, and the light source module comprises a plurality of light sources;
the driving component is configured to output a driving signal according to the control signal so as to drive the light source to be lightened.
4. The light source control circuit of claim 1, further comprising n isolation circuits;
the ith isolation circuit is connected between the control circuit and the ith drive circuit and is configured to isolate the ith control signal group;
the ith driving circuit is specifically configured to output an ith driving signal group according to the isolated ith control signal group so as to drive the ith light source module to light up.
5. The light source control circuit of claim 1, further comprising:
the key circuit is connected with the control circuit and is configured to output a key signal according to the sensed key operation;
the control circuit is further configured to receive the key signal, acquire an exposure mode of the ith trigger signal corresponding to the key signal, and store the association between the ith trigger signal and the exposure mode in the database.
6. The light source control circuit of any one of claims 1 to 5, further comprising:
the communication circuit is connected with the control circuit and is configured to forward an exposure mode of the ith trigger signal sent by the upper computer and forward mode information to the upper computer;
the control circuit is further configured to receive an exposure mode of the ith trigger signal, store the association between the ith trigger signal and the exposure mode in the database, and output the mode information according to the exposure mode corresponding to the ith trigger signal.
7. The light source control circuit according to any one of claims 1 to 5, further comprising:
the display circuit is connected with the control circuit and is configured to display according to a display signal;
the control circuit is further configured to output the display signal according to the exposure mode.
8. The light source control circuit of any one of claims 1 to 5, wherein the control circuit comprises a microprocessor, a first resistor, a second resistor, a third resistor, and a fourth resistor;
the power supply end of the microprocessor, the first end of the first resistor, the first end of the second resistor, the first end of the third resistor and the first end of the fourth resistor are commonly connected to a first power supply, the second end of the fourth resistor and the first general input/output end of the microprocessor are commonly used as a1 st trigger signal input end of the control circuit, the second end of the third resistor and the second general input/output end of the microprocessor are commonly used as a2 nd trigger signal input end of the control circuit, the second end of the second resistor and the third general input/output end of the microprocessor are commonly used as a3 rd trigger signal input end of the control circuit, the second end of the first resistor and the fourth general input/output end of the microprocessor are commonly used as a4 th trigger signal input end of the control circuit, the fifth general input/output end of the microprocessor and the sixth general input/output end of the microprocessor are commonly used as a1 st control signal output end of the control circuit, the seventh general input/output end of the microprocessor and the eighth general input/output end of the microprocessor are commonly used as a2 nd control signal group, the seventh general input/output end of the microprocessor and the eleventh general input/output end of the microprocessor are commonly used as a twelfth general control signal group, the ninth general input/output end of the control circuit and the twelfth general control circuit, and the twelfth general control output end of the microprocessor are commonly used as a twelfth general control signal group of the control circuit, and the control output end of the control circuit.
9. A visual inspection apparatus comprising the light source control circuit of any one of claims 1 to 8.
CN202111348689.3A 2021-11-15 2021-11-15 Light source control circuit and visual detector Active CN114157816B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111348689.3A CN114157816B (en) 2021-11-15 2021-11-15 Light source control circuit and visual detector
PCT/CN2021/137610 WO2023082395A1 (en) 2021-11-15 2021-12-13 Light source control circuit and visual detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111348689.3A CN114157816B (en) 2021-11-15 2021-11-15 Light source control circuit and visual detector

Publications (2)

Publication Number Publication Date
CN114157816A CN114157816A (en) 2022-03-08
CN114157816B true CN114157816B (en) 2022-10-25

Family

ID=80459863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111348689.3A Active CN114157816B (en) 2021-11-15 2021-11-15 Light source control circuit and visual detector

Country Status (2)

Country Link
CN (1) CN114157816B (en)
WO (1) WO2023082395A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN211880664U (en) * 2020-03-24 2020-11-06 深圳市索科特智能照明有限公司 Light source control circuit, light source control device and lamp
CN213028625U (en) * 2020-08-10 2021-04-20 深圳市豪恩智能物联股份有限公司 Dimming control circuit, LED driving power supply and LED lamp
CN112748645A (en) * 2021-01-25 2021-05-04 武汉科技大学 High-frequency time-sharing exposure light source controller
CN214256459U (en) * 2021-01-26 2021-09-21 广州市晶华精密光学股份有限公司 Camera monitoring system and vehicle integrated with same

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012151678A1 (en) * 2011-05-12 2012-11-15 Lumen Dynamics Group Inc. Light source, pulse controller and method for programmable pulse generation and synchronization of light emitting devices
DE102015105656A1 (en) * 2015-04-14 2016-10-20 Chromasens Gmbh Control module for a camera, camera, production system and method for capturing images by means of such a camera
CN104797052A (en) * 2015-04-27 2015-07-22 江苏中科贯微自动化科技有限公司 Annular high-brightness LED light source for machine vision systems
CN205921785U (en) * 2016-06-30 2017-02-01 东莞市沃德普自动化科技有限公司 LED light source blast circuit
CN107231737A (en) * 2017-07-17 2017-10-03 广东奥普特科技股份有限公司 A kind of high speed stroboscopic blast light source controller with a variety of different flash patterns

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN211880664U (en) * 2020-03-24 2020-11-06 深圳市索科特智能照明有限公司 Light source control circuit, light source control device and lamp
CN213028625U (en) * 2020-08-10 2021-04-20 深圳市豪恩智能物联股份有限公司 Dimming control circuit, LED driving power supply and LED lamp
CN112748645A (en) * 2021-01-25 2021-05-04 武汉科技大学 High-frequency time-sharing exposure light source controller
CN214256459U (en) * 2021-01-26 2021-09-21 广州市晶华精密光学股份有限公司 Camera monitoring system and vehicle integrated with same

Also Published As

Publication number Publication date
CN114157816A (en) 2022-03-08
WO2023082395A1 (en) 2023-05-19

Similar Documents

Publication Publication Date Title
CN102135842B (en) Synchronous light pen electronic whiteboard system
CN106817794A (en) TOF circuit modules and its application
CN106131445A (en) A kind of image pickup method and device
CN114157816B (en) Light source control circuit and visual detector
CN110392149A (en) Image capture display terminal
TWI274505B (en) Scanning method for scanning apparatus
CN208656905U (en) A kind of light compensating lamp control equipment
CN201772873U (en) Laser range finder with backlight overturned LCD digital display device
CN209824086U (en) Control circuit and control device of intelligence light filling
CN103792764A (en) Lighting system
WO2019037246A1 (en) Smart assembly light
CN210402326U (en) LVDS video source module
CN205281332U (en) Memory module with detachable light emitting module
WO2021004349A1 (en) Structured light ranging chip module and electronic equipment
CN112584268A (en) Earphone light sensation calibration device and method
CN205451079U (en) Bar code scanning device
CN203719765U (en) Light intensity measurement apparatus
CN210943785U (en) Egg image continuous acquisition device
CN210694088U (en) Image acquisition device
CN221125242U (en) Circuit for realizing high-speed communication by two optocouplers
CN210137365U (en) Image acquisition circuit based on RS485 communication standard
CN110262990A (en) LVDS video source module and its application method
CN216414635U (en) Visual detection light source control circuit, control device and light source system
CN110118598B (en) Delay circuit for avalanche photodiode and integrated single photon detection circuit
CN221329177U (en) New energy car light control system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant