A photoelectric sensor with automatic gain adjustment

Through the photoelectric sensor that automatically adjusts the gain, one-click automatic calibration is achieved using the controller and the gain adjustment module, which solves the problems of slow detection speed and high cost of existing photoelectric sensors, and improves detection efficiency and product consistency.

CN111044089BActive Publication Date: 2024-12-10SHANGHAI LANBAO SENSING TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010004688.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-03
Publication Date
2024-12-10
Estimated Expiration
2040-01-03

AI Technical Summary

Technical Problem

Existing photoelectric sensors are slow to detect transparent objects, costly and poorly consistent, and require manual adjustment of programmable gain amplifiers, which increases debugging difficulty and cost.

Method used

A photoelectric sensor that automatically adjusts the gain is designed, using a controller to control the intensity of the emitted light and the gain of the reception process. One-click automatic calibration is achieved through the A/D conversion module and the gain adjustment module, which reduces the cost of the product and production complexity. .

Benefits of technology

It realizes faster and more convenient detection of transparent objects, reduces product costs, improves product consistency and cost-effectiveness, and builds a hardware platform for smart sensors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111044089B_ABST
    Figure CN111044089B_ABST
Patent Text Reader

Abstract

The present invention provides a photoelectric sensor for automatically adjusting gain, which comprises: a transmitting module electrically connected to a controller, and used for transmitting a light signal of a specified intensity to a reflector under the control of the controller; a receiving module for receiving the reflected light signal, and the output end of the receiving module is electrically connected to the input end of a gain adjustment module; the gain adjustment module also has a control end, and the control end is electrically connected to the controller, and the controller adjusts the gain between the input end and the output end of the gain adjustment module through the control end; the output end of the gain adjustment module is connected to the controller through an A / D conversion module; and the output circuit and the key circuit are electrically connected to the controller. The sensor adopts a one-button distance setting method, which is more convenient for users to use than the traditional distance setting using a potentiometer. The low-cost circuit architecture is adopted, and the threshold value is adjusted by software to realize the detection of transparent objects, which reduces the cost of the product and has a higher cost performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of electronic technology, and in particular to a photoelectric sensor capable of automatically adjusting gain. Background Art

[0002] In recent years, with the development of industry, more and more industries need to detect transparent films, plastic bottles, etc., especially the food and pharmaceutical industries. Currently, the most reliable transparent sensor is generally an ultrasonic sensor, but due to its slow detection speed, it cannot meet the needs of factories.

[0003] When the detection object is a transparent object, the light receiving signal value that decreases when the detection object passes is very small. Therefore, in order to be able to distinguish the change caused by this small light receiving signal value, it is necessary to set the threshold for transparent object detection through very fine adjustment.

[0004] In order to improve the detection speed, some manufacturers have launched photoelectric sensors that can detect transparent objects, including through-beam and regressive reflective types. Through the sensitivity adjustment part (rotatable single-turn potentiometer), the resistance value is changed and then the corresponding table is consulted to adjust the signal strength, signal gain, and product threshold. The appropriate emission intensity and threshold are selected to achieve the distinction of tiny signals and thus achieve the purpose of transparent object detection.

[0005] Products in the prior art are usually equipped with potentiometers to calibrate the distance, so that during the calibration process, the staff needs to constantly fine-tune the potentiometer to achieve the specified effect. Programmable gain amplifiers are usually used in existing sensors to adjust the gain, which is expensive and complicated to use. Due to various errors in the product assembly process, the consistency of the products is poor, and the production requires a lot of man-hours, resulting in high production costs. The poor product consistency further leads to the need for manual calibration of each sensor, and each programmable gain amplifier also needs to be adjusted separately, which increases the difficulty and cost of debugging. Summary of the invention

[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a photoelectric sensor with automatic gain adjustment. The sensor adopts a controller to control the intensity of the emitted light and the gain of the receiving process, thereby realizing the function of one-key automatic calibration of the sensor.

[0007] In order to achieve the above object, the present invention provides a photoelectric sensor with automatic gain adjustment, which includes a controller, a key circuit, an output circuit, a gain adjustment module, a transmitting module, a receiving module and a reflector, wherein:

[0008] The transmitting module is electrically connected to the controller and is used to transmit a light signal of a specified intensity to the reflector under the control of the controller;

[0009] The receiving module is used to receive the reflected optical signal, and the output end of the receiving module is electrically connected to the input end of the gain adjustment module;

[0010] The gain adjustment module further has a control end, the control end is electrically connected to the controller, and the controller adjusts the gain between the input end and the output end of the gain adjustment module through the control end;

[0011] The output end of the gain adjustment module is connected to the controller through an A / D conversion module;

[0012] The output circuit and the key circuit are electrically connected to the controller.

[0013] A further improvement of the present invention is that the transmitting module includes a transistor, a light emitting diode and a resistor; the emitter of the transistor is grounded through the resistor, the collector of the transistor is connected to the cathode of the light emitting diode, the anode of the light emitting diode is connected to the power supply VCC; the base of the transistor is connected to the controller.

[0014] A further improvement of the present invention is that the gain adjustment module includes a first amplifier, a second amplifier, and two transistors; the input end of the first amplifier is the input end of the gain adjustment module, and the output end of the first amplifier is connected to the first node through a resistor; the first node is connected to the input end of the second amplifier through a capacitor, and the output end of the second amplifier is the output end of the gain adjustment module; the emitters of the two transistors are grounded, the collectors of the two transistors are respectively connected to the first node through a resistor, and the bases of the two transistors are respectively connected to the two pins of the controller.

[0015] A further improvement of the present invention is that both the first amplifier and the second amplifier are inverting amplifiers constructed using operational amplifiers.

[0016] A further improvement of the present invention is that before use, the reflector is placed at a predetermined position, and the photoelectric sensor is controlled to enter a calibration mode through a key circuit. During the calibration mode, the controller determines whether the output value of the A / D conversion module is within a target range.

[0017] If the output value of the A / D conversion module is greater than the target range, the controller controls the gain adjustment module to reduce the gain or / and controls the transmitting module to reduce the intensity of the light signal it transmits;

[0018] If the output value of the A / D conversion module is smaller than the target range, the controller prompts through an indicator light that the position of the reflector is too far.

[0019] A further improvement of the present invention is that the controller controls the gain adjustment module to reduce the gain by increasing the base voltage of any one of the transistors in the gain adjustment module.

[0020] A further improvement of the present invention is that the controller controls the transmitting module to reduce the intensity of the optical signal it transmits by reducing the base voltage of the transistor of the transmitting module.

[0021] A further improvement of the present invention is that the output circuit is used to communicate with a host computer and has a storage module; the minimum value of the upper limit of the target range is determined by maximum distance calibration; during the maximum distance calibration process, the reflector is placed at the maximum distance, and the host computer sends an instruction to the controller through the output circuit, so that the controller collects and determines the output value of the A / D conversion module, and writes the output value into the storage module of the output circuit.

[0022] The beneficial technical effects of the present invention are:

[0023] 1) The one-button distance setting method is more convenient for users than the traditional distance setting using a potentiometer.

[0024] 2) The low-cost circuit architecture is adopted, combined with the solution of adjusting the threshold by software to realize the detection of transparent objects, which reduces the cost of the product, has a higher cost performance and a wider range of applications.

[0025] 3) The use of a dedicated output chip with communication function solves the errors in the product production process, ensures the quality and performance of the product, and at the same time builds a good hardware platform for the subsequent development of smart sensors. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 The schematic diagram of the photoelectric sensor for automatically adjusting gain of the present invention;

[0027] Figure 2 A three-dimensional diagram of a photoelectric sensor for automatically adjusting gain according to the present invention;

[0028] Figure 3 This is the schematic diagram of the output circuit and gain adjustment module. DETAILED DESCRIPTION

[0029] The following is based on the attached Figure 1 , give the preferred embodiments of the present invention, and describe them in detail so that the functions and features of the present invention can be better understood.

[0030] See also Figure 1 , 2As shown, an embodiment of the present invention includes a photoelectric sensor for automatically adjusting gain, which includes a controller 1, a key circuit 2, an output circuit 3, a gain adjustment module 4, a transmitting module 5, a receiving module 6 and a reflector 7. The key circuit 2, the output circuit 3, the gain adjustment module 4 and the transmitting module 5 are all electrically connected to the controller 1. The above components are all encapsulated inside the housing, the key 9 of the key circuit 2 is arranged on the surface of the housing, the housing has a transparent window 10, and the transmitting module 5 and the receiving module 6 are facing the transparent window 10.

[0031] like Figure 3 As shown, the transmitting module 5 is electrically connected to the controller 1, and is used to transmit a light signal of a specified intensity to the reflector 7 under the control of the controller 1. The controller 1 can be implemented by a commercially available controller such as a single-chip microcomputer, a PLC, an FPGA, a DSP, etc. The transmitting module 5 includes a transistor T1, a light-emitting diode D1, and a resistor R1. The emitter of the transistor T1 is grounded through the resistor R1, the collector of the transistor T1 is connected to the cathode of the light-emitting diode D1, and the anode of the light-emitting diode D2 is connected to the power supply VCC; the base of the transistor T1 is connected to the controller.

[0032] The controller 1 controls the current flowing through the light emitting diode D1 by controlling the base voltage of the transistor T1, thereby controlling the light intensity of the light emitting diode D1. In this embodiment, the controller 1 can output a GPIO of an analog voltage connected to the base of the transistor T1.

[0033] The receiving module 6 is used to receive the reflected optical signal, and the output end of the receiving module 6 is electrically connected to the input end of the gain adjustment module 4, and the output end of the gain adjustment module 4 is connected to the controller 1 through the A / D conversion module 8. The gain adjustment module 4 also has a control end, which is electrically connected to the controller 1, and the controller 1 adjusts the gain between the input end and the output end of the gain adjustment module 4 through the control end.

[0034] The receiving module 6 converts the received optical signal into an electrical signal, which is then amplified by the gain adjustment module 4 and converted by the A / D conversion module 8, and finally converted into a digital signal, which is received by the controller 1. Finally, the size of the digital signal received by the controller 1 is mainly affected by the following factors: (1) the intensity of the optical signal emitted by the transmitting module 5; (2) the distance between the reflector 7 and the transmitting module 5 and the receiving module 6; (3) the gain of the gain adjustment module 4; and (4) the object being detected.

[0035] Since the sensor of this embodiment is used to detect transparent objects, when the transparent object blocks the propagation path of the light signal, it will cause a certain attenuation of the light signal received by the receiving module 6, and the attenuation amplitude is small. Therefore, the distance of the reflector 7, the signal strength emitted by the transmitting module 5 and the gain of the gain adjustment module 4 need to be adjusted so that the attenuation caused by the detected transparent object can have sufficient recognition in the digital signal received by the controller 1.

[0036] In a specific embodiment, the gain adjustment module 4 includes a first amplifier A1, a second amplifier A2, and two transistors T2 and T3. The input end of the first amplifier A1 is the input end of the gain adjustment module 4, and the output end of the first amplifier A1 is connected to the first node through a resistor R2; the first node is connected to the input end of the second amplifier A2 through a capacitor C1, and the output end of the second amplifier A2 is the output end of the gain adjustment module 4; the emitters of the two transistors T2 and T3 are grounded, and the collectors of the two transistors T2 and T3 are connected to the first node through resistors R3 and R4 respectively, and the bases of the two transistors T2 and T3 serve as the control end of the gain adjustment module 4, and are respectively connected to the two pins of the controller 1.

[0037] In this embodiment, the first amplifier A1 and the second amplifier A2 are both inverting amplifiers formed by operational amplifiers. The controller 1 is connected to the control end of the gain adjustment module 4 via two pins that can output analog signals. Specifically, the controller 1 pulls up the base voltage of the transistor T2 or the transistor T3 to reduce the gain of the gain adjustment module 4, and reduces the base voltage of the transistor T2 or the transistor T3 to increase the gain of the gain adjustment module 4. Transistor T2 and transistor T3 can use different base voltages, so that the gain of the gain adjustment module 4 can be flexibly adjusted. The gain adjustment module 4 uses an ordinary operational amplifier combined with a resistor to achieve product gain control, reduce the material cost of the product, and is simple to operate.

[0038] Before use, the reflector 7 is placed at a predetermined position, and the key circuit 2 is used to control the photoelectric sensor to enter a calibration mode. During the calibration mode, the controller 1 determines whether the output value of the A / D conversion module 8 is within a target range.

[0039] If the output value of the A / D conversion module is greater than the target range, the controller 1 controls the gain adjustment module 4 to reduce the gain or / and controls the transmitting module 5 to reduce the intensity of the optical signal it transmits; in this step, the gain of the gain adjustment module 4 is preferentially reduced, and when it cannot be further reduced, the optical signal intensity of the transmitting module 5 is adjusted; the target range is obtained through experiments. The above adjustment process is automatically completed by the controller 1.

[0040] If the output value of the A / D conversion module is smaller than the target range, the controller 1 prompts through the indicator light 11 that the position of the reflector 7 is too far.

[0041] In the above calibration process, the distance is set by pressing buttons, and the adjustment process also controls the product gain and the transmitting current, and then the collected signal value is used as the threshold or adjusted as the threshold in a certain way based on the collected signal value.

[0042] The photoelectric sensor of this embodiment also includes an indicator light 11. The indicator light can be used to display the working state of the photoelectric sensor. For example, after the user presses the button of the key circuit 2, the indicator light 11 enters a flashing state. At this time, the photoelectric sensor can enter a calibration mode by lifting the button. During the calibration process, the gain is automatically adjusted by the controller 1, so that the calibration process can be automatically completed with one button, reducing the workload required for the calibration process.

[0043] The photoelectric sensor of this embodiment includes an output circuit 3, which is used to connect to the host computer for communication with the host computer. In addition, the output circuit 3 also has a storage module. The minimum value of the upper limit of the target range of the above calibration process (this value can represent the maximum distance of the reflector 7) is determined by the maximum distance calibration method; during the maximum distance calibration process, the reflector 7 is placed at the maximum distance, and the host computer sends an instruction to the controller 1 through the output circuit 3, so that the controller 1 controls the transmitter module 5 and the gain adjustment module 4 to output the maximum. At this time, the output value of the A / D conversion module is collected and judged, and the output value is written into the storage module of the output circuit. The maximum distance calibration process uses the host computer-output dedicated chip-sensor, and the calibration scheme solves the problem of product consistency in the production process. Make the photoelectric sensors shipped have the same maximum available distance. The controller 1 can read the corresponding data from the memory of the output circuit 3.

[0044] The present invention is described in detail above in conjunction with the embodiments of the accompanying drawings. A person skilled in the art can make various variations of the present invention according to the above description. Therefore, certain details in the embodiments should not constitute a limitation of the present invention, and the scope of protection of the present invention shall be defined by the scope of the attached claims.

Claims

1. A photoelectric sensor with automatic gain adjustment, characterized in that: It includes a controller, a key circuit, an output circuit, a gain adjustment module, a transmitting module, a receiving module and a reflector, wherein: The transmitting module is electrically connected to the controller and is used to transmit a light signal of a specified intensity to the reflector under the control of the controller; The receiving module is used to receive the reflected optical signal, and the output end of the receiving module is electrically connected to the input end of the gain adjustment module; The gain adjustment module further has a control end, the control end is electrically connected to the controller, and the controller adjusts the gain between the input end and the output end of the gain adjustment module through the control end; The output end of the gain adjustment module is connected to the controller through an A / D conversion module; The output circuit and the key circuit are electrically connected to the controller; The transmitting module includes a triode, a light emitting diode and a resistor; the emitter of the triode is grounded through the resistor, the collector of the triode is connected to the cathode of the light emitting diode, and the anode of the light emitting diode is connected to the power supply VCC; the base of the triode is connected to the controller; The gain adjustment module includes a first amplifier, a second amplifier, and two transistors; the input end of the first amplifier is the input end of the gain adjustment module, and the output end of the first amplifier is connected to the first node through a resistor; the first node is connected to the input end of the second amplifier through a capacitor, and the output end of the second amplifier is the output end of the gain adjustment module; the emitters of the two transistors are grounded, the collectors of the two transistors are respectively connected to the first node through a resistor, and the bases of the two transistors are respectively connected to the two pins of the controller.

2. The photoelectric sensor with automatic gain adjustment according to claim 1, characterized in that: The first amplifier and the second amplifier are both inverting amplifiers constructed using operational amplifiers.

3. The photoelectric sensor with automatic gain adjustment according to claim 1, characterized in that: Before use, the reflector is placed at a predetermined position, and the photoelectric sensor is controlled to enter a calibration mode through a key circuit. During the calibration mode, the controller determines whether the output value of the A / D conversion module is within the target range. If the output value of the A / D conversion module is greater than the target range, the controller controls the gain adjustment module to reduce the gain or / and controls the transmitting module to reduce the intensity of the light signal it transmits; If the output value of the A / D conversion module is smaller than the target range, the controller prompts through an indicator light that the position of the reflector is too far.

4. The photoelectric sensor with automatic gain adjustment according to claim 3, characterized in that: The controller controls the gain adjustment module to reduce the gain by increasing the base voltage of any one of the transistors in the gain adjustment module.

5. The photoelectric sensor with automatic gain adjustment according to claim 3, characterized in that: The controller controls the transmitting module to reduce the intensity of the transmitted optical signal by reducing the base voltage of the transistor of the transmitting module.

6. The photoelectric sensor with automatic gain adjustment according to claim 3, characterized in that: The output circuit is used for communication connection with the host computer and has a storage module; the minimum value of the upper limit of the target range is determined by maximum distance calibration; during the maximum distance calibration, the reflector is placed at the maximum distance, and the host computer sends an instruction to the controller through the output circuit, so that the controller collects and determines the output value of the A / D conversion module, and writes the output value into the storage module of the output circuit.