Optical sensor
The optical sensor adjusts exposure time using a brightness sensor to optimize image capture under fluctuating lighting, ensuring reliable and rapid code detection on moving objects.
Patent Information
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- LEUZE ELECTRONIC GMBH & CO KG
- Filing Date
- 2025-05-21
- Publication Date
- 2026-07-02
AI Technical Summary
Existing optical sensors struggle to reliably and quickly detect objects, particularly codes, due to fluctuating lighting conditions and varying surface reflectivities, especially when capturing images of moving objects on conveyors, as they rely on exposure times set based on previous images.
An optical sensor with a brightness sensor that adjusts the exposure time of the camera by measuring light energy during the actual image capture, using a brightness sensor to set the shutter opening and closing based on a threshold value, synchronizing with the lighting unit to prevent overexposure.
Ensures rapid and reliable detection of codes by optimizing exposure time based on real-time lighting conditions, preventing overexposure and enhancing code recognition accuracy.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
The invention relates to an optical sensor. Such optical sensors are generally used for object detection and consist of a camera with defined viewing angles, a light-emitting illumination unit, and a control and evaluation unit that manages the operation of the camera and the illumination unit. The control and evaluation unit also processes the received signals from the camera to generate an output signal. Such optical sensors are specifically designed as code readers, by means of which 1D or 2D codes are detected. For safe and reliable object detection, especially code capture, it is necessary to control the camera's exposure time to avoid overexposure of images captured by the camera, as this distorts the detection of objects, especially codes. One approach to controlling the exposure time in this way is to adopt the exposure time from the previous image for capturing the current image. However, this approach is insufficient for applications where objects or codes need to be captured quickly. One example of this is optical sensors in the form of code readers, which are used in conveyor and storage technology. In this system, a code on a box being transported on a conveyor unit must be read. The code can be located anywhere on the box. A sensor, such as a light barrier, detects the box and signals its presence to the code reader. When the light barrier detects the box, a reading gate opens in the code reader, within which a camera captures a series of images. Once the box is outside the detection range of the light barrier, the reading gate closes again. In such applications, it is possible that the code can only be captured with a single image within the reading gate. In these cases, it is not possible to adjust the exposure time based on a previous image in an image series because the image containing the feature to be captured only occurs once, or the image brightness varies greatly within the image series due to fluctuating surface reflection properties or distances in the surrounding area. US patent 2010 / 0252633 A1 concerns a barcode reader that incorporates an array of cameras. It also includes a brightness sensor in the form of diodes, which measures the light energy within a camera's field of view. The camera's exposure time is initiated by opening a shutter and closed when the measured amount of light reaches a certain threshold. The invention is based on the objective of providing an optical sensor by means of which safe and reliable object detection is ensured. The features of claim 1 are provided to solve this problem. Advantageous embodiments and expedient further developments of the invention are described in the dependent claims. The invention relates to an optical sensor for detecting objects, comprising a camera with an aperture angle, at least one light-emitting illumination unit, and a control and evaluation unit. This unit controls the operation of the camera and the illumination unit, evaluates received signals generated by the camera, and generates an output signal based on these evaluations. A brightness sensor is provided to determine the light energy of light rays directed towards the camera within the aperture angle. The camera's exposure time is set by opening a camera shutter, which initiates a measurement of the light energy using the brightness sensor. The shutter then closes when the light energy measured by the brightness sensor reaches a threshold value.The exposure time is set by means of an analog circuit controlled by the control and evaluation unit. Additionally, there is an analog circuit containing a capacitor whose charge is a measure of the light energy detected by the brightness sensor. The optical sensor according to the invention is generally designed for detecting objects, wherein the output signal generated in the optical sensor indicates whether a specific object has been detected. The optical sensor is particularly advantageous when configured as a code reader. In this case, the camera captures images of codes. The code information contained in the images is decoded in the control and evaluation unit. The optical sensor outputs the decoded code as a signal. The optical sensor, designed as a code reader, can advantageously evaluate both 1D and 2D codes, in particular barcodes, QCR codes, data matrix codes, and the like. A key advantage of the invention is that the optical sensor can also be used to reliably and quickly detect objects moving relative to it, especially codes. A typical application example is the detection of codes on objects that are moved past a stationary optical sensor on a conveyor unit. A code can be located at different points on the object, such as a box. Even in such cases, a code can be reliably detected using the optical sensor. According to the invention, this is achieved by predefining the exposure time for capturing an image with the optical sensor's camera based on the light energy incident on the camera, as detected by a brightness sensor. The exposure time is optimized during the exposure for capturing the current image, thus avoiding overexposure and the resulting error detections. The exposure time for taking a current image is therefore not set depending on previous image captures, but depending on the sensor signals of the brightness sensor during the capture of the current image. The exposure time for a camera image is set without delay during the actual image capture itself, enabling rapid adaptation to changing lighting conditions and, in particular, ensuring the reliable detection of codes in unknown positions on objects that may also have highly fluctuating surface reflectivities. Opening a shutter starts the camera's exposure upon object detection. According to the invention, the detection of light energy by the brightness sensor is initiated when the shutter opens. The registered light energy is then integrated. According to the invention, the camera shutter closes, thus ending the exposure time during image capture, when the light energy detected by the brightness sensor reaches a threshold value. By appropriately setting this threshold value, overexposure during image capture is prevented, thereby ensuring reliable object recognition, particularly code recognition. According to an advantageous embodiment, not only the camera's exposure time is controlled based on the sensor signals from the brightness sensor. Rather, the lighting unit is also switched on when the shutter opens and switched off when the shutter closes. The lighting unit is thus operated synchronously with the opening and closing of the camera's shutter. A key requirement for an exposure time that is optimally adapted to the respective situation without delay is that the light energy hitting the camera within the opening angle is at least partially captured by the brightness sensor. Advantageously, the brightness sensor has a sensor opening angle that at least partially overlaps with the opening angle of the camera. The brightness sensor can advantageously be formed by a photodiode. Furthermore, optical elements for adjusting the sensor opening angle are advantageously assigned to the brightness sensor. Optical elements can be purely mechanical elements such as lenses or apertures. A particularly advantageous optical element is the use of an LCD plate, which allows the sensor opening angle to be adjusted electronically. The camera advantageously features an image sensor and a lens. The image sensor can be a CCD or CMOS array. The lens determines the camera's field of view. The camera works advantageously with a frame-based or an event-based global shutter. In an event-based global shutter, only the pixels that have changed since the last exposure are transmitted to the control and evaluation unit. In a frame-based global shutter, all pixels of a new frame, i.e., the entire image sensor or a region of interest (ROI) of the image sensor, are transmitted to the control and evaluation unit. A further advantage is that the control and evaluation unit is formed by a microcontroller. According to the invention, the lighting unit is specified by means of an analog circuit controlled by the control and evaluation unit. When the camera shutter opens, the control and evaluation unit generates a trigger signal that starts the detection of light energy at the brightness sensor. Advantageously, the control and evaluation unit generates the trigger signal depending on a sensor signal from a trigger sensor. The trigger sensor can, for example, be formed by a light barrier that detects a box on a conveyor unit, with a code to be detected on the box. According to the invention, the analog circuit includes a capacitor whose charge is a measure of the light energy detected by the brightness sensor. Opening the shutter activates a switching device, such as a transistor, which charges the capacitor. This charging of the capacitor integrates the light energy incident on the brightness sensor. Advantageously, the output voltage of the capacitor is fed to a comparator, in which the output voltage is compared with a reference voltage that defines the limit value. Once the threshold is reached, the comparator's output switches, ending the exposure time. Simultaneously, the capacitor discharges so that it is available again to detect the light energy hitting the brightness sensor during a new image capture. The invention is explained below with reference to the drawings: Fig. 1: Sensor arrangement with the optical sensor according to the invention. Fig. 2: Analog circuit for the optical sensor according to Fig. 1. Fig. 3: Time dependence of signals of the analog circuit according to Fig. 2. Fig. 1 shows an embodiment of the optical sensor 1 according to the invention as part of a sensor arrangement 2, which in this case serves to detect codes 3. The optical sensor 1 is thus a code reader. The codes 3 can be configured as 1D or 2D codes. As shown in Fig. 1, a box 4, on whose top a code 3 is arranged, is transported in a conveying direction 5 on a conveyor unit 6. The optical sensor 1 detects the codes 3 of several such objects being transported on the conveyor unit 6. In the area of conveyor unit 6, there is a light barrier 7, which forms a trigger sensor for the optical sensor 1. The light barrier 7 detects the presence of box 4 or, more generally, of any object transported on conveyor unit 6. The optical sensor 1 is stationary on the conveyor unit 6. The components of the optical sensor 1 are integrated in a housing 8. A window 9, transparent to light rays from the optical sensor 1, is located in one wall of the housing 8. The optical sensor 1 has an illumination unit 10, which consists of an arrangement of light-emitting diodes. The optical sensor 1 also includes a camera as a receiver unit, consisting of an image sensor 11 and a lens 12 positioned in front of it. The image sensor 11 consists of a CCD or CMOS array. The lens 12 defines an opening angle 13 within which light rays reflected from objects are directed onto the camera. The camera works advantageously with a frame-based or an event-based global shutter. Furthermore, the optical sensor 1 includes a brightness sensor 14 in the form of a photodiode. An LCD panel 15 or a fixed aperture is associated with the brightness sensor 14, defining a sensor opening angle 16 for the brightness sensor 14. Light rays reflected back within the sensor opening angle 16 are directed onto the brightness sensor 14. The sensor opening angle 16 is set electronically using the LCD panel 15 or defined by the fixed aperture. As shown in Fig. 1, the sensor opening angle 16 largely overlaps with the camera's opening angle 13. The electronic and optoelectronic components of the optical sensor 1 are controlled by a control and evaluation unit 17, which in this case is a microcontroller. The control and evaluation unit 17 also evaluates the received signals to generate an output signal Ucomp. Since the optical sensor 1 is configured as a code reader in this case, the control and evaluation unit 17 decodes code information contained in the camera images and outputs a code 3 thus detected as the output signal Ucomp. Furthermore, the control and evaluation unit 17 is associated with an analog circuit 18, which is shown in detail in Fig. 2. Time-dependent signal waveforms for the analog circuit 18 are shown in Fig. 3. According to the invention, the brightness sensor 14 determines the light energy of light rays directed towards the camera within the opening angle 13. This is possible because the sensor opening angle 16 of the brightness sensor 14 largely overlaps with the opening angle 13 of the camera, so that the amount of light incident on the brightness sensor 14 is a measure of the light energy incident on the camera. According to the invention, an exposure time of the camera is specified by starting a measurement of the light energy using the brightness sensor 14 when a shutter of the camera is opened, and by closing the shutter when the light energy measured by the brightness sensor 14 reaches a limit value. This prevents overexposure in the camera when capturing Code 3. Advantageously, opening the shutter switches on the lighting unit 10 and closing the shutter switches off the lighting unit 10. The exposure time is set using the analog circuit 18 according to Fig. 2, which is controlled by the control and evaluation unit 17. The analog circuit 18 includes the brightness sensor 14 in the form of a photodiode, which is connected via a network of resistors 19a, 19b connected to supply voltage Vcc and a transistor 20 to a capacitor 21 which generates a voltage Uc. Capacitor 21 is charged by a transistor 20. The voltage Uc of capacitor 21 is fed to an input of a comparator 23, which compares the voltage Uc with a reference voltage UBel that defines the limit of the light energy on the image sensor 11. The output signal Ucompde of the comparator 23 is fed to a NOR gate 24, which is connected to the control and evaluation unit 17. The operation of the analog circuit 18 is explained with reference to Fig. 2 and Fig. 3. The control and evaluation unit 17 controls the operation of the lighting unit 10 and the camera using trigger signals T1, T2. The control and evaluation unit 17 specifies a maximum exposure time for the camera using the trigger signal T2. As soon as the binary trigger signal T2 drops from 1 to 0, transistor 20, whose base is connected to the trigger signal T2, closes. This causes the light energy falling on the brightness sensor 14 to be absorbed by capacitor 21. The camera shutter is opened by the trigger signal T1, which changes from 0 to 1. Capacitor 21 is charged until its voltage Uc reaches the reference voltage UBelde comparator 23. When this occurs, comparator 23 switches its output signal Ucomp from 0 to 1, causing the trigger signal T1 to return from 1 to 0. This ensures that the trigger signal T1 keeps the camera shutter open until the amount of light on the brightness sensor 14 corresponds to the limit value specified by the reference voltage UBel of the comparator 23. Simultaneously, the illumination unit 10 of the optical sensor 1 is switched on. As soon as the capacitor voltage reaches the value of the reference voltage UBe, the exposure time is ended and the lighting unit 10 is switched off, which is caused by the change of the trigger signal T1 from 1 to 0. As soon as the trigger signal T2 changes from 0 to 1, the transistor 22, whose base is connected to this trigger signal T2, switches on and the capacitor 21 is discharged, so that a new setting of the exposure time can then be started. Reference symbol list 1 Optical sensor 2 Sensor assembly 3 Code 4 Box 5 Conveyor direction 6 Conveyor unit 7 Light barrier 8 Housing 9 Window 10 Lighting unit 11 Image sensor 12 Lens 13 Opening angle 14 Brightness sensor 15 LCD panel 16 Sensor opening angle 17 Control and evaluation unit 18 Analog circuit 19a Resistor 19b Resistor 20 Transistor 21 Capacitor 22 Capacitor 23 Comparator 24 NOR gate Ucomp Output signal Ubel Reference voltage Uc Voltage T1 Trigger signal T2 Trigger signal Vcc Supply voltage
Claims
Optical sensor (1) for detecting objects with a camera having an opening angle (13), with at least one light-emitting illumination unit (10) and with a control and evaluation unit (17) by means of which the operation of the camera and the illumination unit (10) is controlled, and by means of which received signals generated by the camera are evaluated and an output signal (Ucomp) is generated depending on this, wherein a brightness sensor (14) is provided by means of which the light energy of light rays directed within the opening angle (13) towards the camera is determined, wherein an exposure time of the camera is specified by opening a shutter of the camera, wherein a measurement of the light energy by means of the brightness sensor (14) is started, and wherein the shutter is then closed when the light energy measured by the brightness sensor (14) reaches a limit value, characterized in thatthat the exposure time is specified by means of an analog circuit (18) controlled by the control and evaluation unit (17), and that the analog circuit (18) has a capacitor (21) whose charge is a measure of the light energy detected by the brightness sensor (14). Optical sensor (1) according to claim 1, characterized in that the lighting unit (10) is switched on when the shutter is opened, and that the lighting unit (10) is switched off when the shutter is closed. Optical sensor (1) according to one of claims 1 or 2, characterized in that the brightness sensor (14) has a sensor opening angle (16) which overlaps at least partially with the opening angle (13) of the camera, and / or that the brightness sensor (14) is formed by a photodiode or a phototransistor. Optical sensor (1) according to one of claims 1 to 3, characterized in that optical elements for adjusting the sensor opening angle (16) are assigned to the brightness sensor (14). Optical sensor (1) according to claim 4, characterized in that an aperture and / or an LCD plate (15) are provided as optical elements. Optical sensor (1) according to claim 5, characterized in that the control and evaluation unit (17) generates a trigger signal (T2) with which the detection of light energy in the brightness sensor (14) is started. Optical sensor (1) according to claim 6, characterized in that the control and evaluation unit (17) generates the trigger signal (T2) depending on a sensor signal of a trigger sensor. Optical sensor (1) according to one of claims 1 to 7, characterized in that the output voltage of the capacitor (21) is supplied to a comparator in which the output voltage is compared with a reference voltage (UBel) that defines the limit value. Optical sensor (1) according to claims 1 to 8, characterized in that the camera has an image sensor (11) and a lens (12), and / or that the control and evaluation unit (17) is formed by a microcontroller. Optical sensor (1) according to one of claims 1 to 9, characterized in that the camera operates with a frame-based global shutter imager chip or an event-based imager chip. Optical sensor (1) according to one of claims 1 to 10, characterized in that it is designed as a code reader, wherein 1D codes and / or 2D codes are detected with it.