Light receiving unit and photoelectric sensor
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- PANASONIC INTELLECTUAL PROPERTY MANAGEMENT CO LTD
- Filing Date
- 2022-06-27
- Publication Date
- 2026-06-26
Smart Images

Figure 0007880536000001 
Figure 0007880536000002 
Figure 0007880536000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to a light receiving unit and a photoelectric sensor.
Background Art
[0002] A photoelectric sensor is known that includes a light projecting unit and a light receiving unit disposed to face each other with a predetermined detection interval therebetween, and determines whether an object exists in the detection interval based on the amount of light received from the light projecting unit. Also known is a photoelectric sensor provided with a volume for a user to adjust the light receiving sensitivity in the light receiving unit (Patent Document 1).
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In the light receiving unit, a voltage value corresponding to the operation of the volume is input, and the light receiving sensitivity is changed based on the voltage value. However, in the conventional light receiving unit, even though the volume is not operated, an unintended voltage value may be input due to electrical noise, backlash of the volume, physical vibration, etc., and there is a risk that the light receiving sensitivity may change. [[ID=?]]
[0005] An object of the present disclosure is to provide a technique for suppressing the unintentional change in the light receiving sensitivity due to a cause different from the operation of the volume.
Means for Solving the Problems
[0006] Note: There seem to be some tags with "?" in the original text which might be incorrect or incomplete. I've translated it as is while keeping those tags as they are. If you can correct the original text, it would be possible to provide a more accurate translation.One aspect of the present disclosure provides a light receiving unit comprising: an amplifier that amplifies a light receiving signal based on a set gain setting value; a difference calculation unit that calculates the difference between an input value based on the operation of a volume and a gain setting value set in the amplifier; a filter unit that is set to pass or block the input value; a filter setting unit that sets the pass or block in the filter unit based on the difference value; and a gain setting unit that sets the gain setting value in the amplifier according to the input value that has passed through the filter unit.
[0007] One aspect of the present disclosure provides a photoelectric sensor comprising: a light-emitting means for emitting pulsed light; and a light-receiving means for receiving the emitted pulsed light, wherein the light-receiving means includes: an amplifier for amplifying a received light signal based on the received pulsed light based on a set gain setting value; a difference calculation unit for calculating a difference between an input value based on the operation of a volume and a gain setting value set for the amplifier; a filter unit for setting whether to pass or block the input value; a filter setting unit for setting whether to pass or block the filter unit based on the difference value; and a gain setting unit for setting the amplifier a gain setting value corresponding to the input value that has passed through the filter unit. [Effects of the Invention]
[0008] According to this disclosure, it is possible to suppress unintended changes in light sensitivity due to causes other than volume control. [Brief explanation of the drawing]
[0009] [Figure 1] A block diagram showing an example configuration of a photoelectric sensor in Embodiment 1. [Figure 2] A block diagram showing an example of components related to the VGA circuit in the light receiving unit in Embodiment 1. [Figure 3] A flowchart illustrating an example of the process for changing the gain setting value of the VGA circuit by operating a volume control, relating to Embodiment 1. [Figure 4]A timing chart illustrating a specific example of the process of changing the filter section from blocking to passing, relating to Embodiment 1. [Figure 5] A timing chart illustrating a specific example of the process of extending the timer for the passage period in Embodiment 1. [Figure 6] A timing chart illustrating a method for changing the filter section from pass-through to blockage in Embodiment 2. [Figure 7] A timing chart illustrating a first method for changing the threshold for the number of consecutive matches according to the environment, relating to Embodiment 3. [Figure 8] A timing chart illustrating a second method for changing the threshold for the number of consecutive matches according to the environment, relating to Embodiment 3. [Figure 9] A diagram illustrating a first method for limiting the pass-through range of the input value in the filter section according to the operation of the volume control, relating to Embodiment 4. [Figure 10] A diagram illustrating a second method for limiting the pass-through range of the input value in the filter section according to the operation of the volume control, relating to Embodiment 4. [Figure 11] A diagram illustrating a method for detecting an inflection position where the input value changes from decreasing to increasing, relating to Embodiment 4. [Figure 12] The diagram illustrates a method for detecting an inflection point where the input value changes from increasing to decreasing, relating to Embodiment 4. [Modes for carrying out the invention]
[0010] Embodiments of the present disclosure will be described in detail below, with appropriate reference to the drawings. However, unnecessary details may be omitted. For example, detailed explanations of already well-known matters and redundant explanations of substantially identical configurations may be omitted. This is to avoid the following explanation becoming unnecessarily verbose and to facilitate understanding by those skilled in the art. The accompanying drawings and the following explanation are provided to enable those skilled in the art to fully understand the present disclosure and are not intended to limit the subject matter of the claims.
[0011] (Embodiment 1) <Configuration of Photoelectric Sensor> FIG. 1 is a block diagram showing a configuration example of a photoelectric sensor 1 according to Embodiment 1.
[0012] The photoelectric sensor 1 includes a light projecting unit 10 and a light receiving unit 20 disposed opposite to the light projecting unit 10. The photoelectric sensor 1 may be a transmissive photoelectric sensor 1. The photoelectric sensor 1 projects pulsed light from the light projecting unit 10 and receives the pulsed light by the light receiving unit 20, thereby detecting whether an object exists in a space region (hereinafter referred to as an object detection region) between the light projecting unit 10 and the light receiving unit 20.
[0013] Alternatively, the photoelectric sensor 1 may be an integral reflection type photoelectric sensor 1 in which the light projecting unit 10 and the light receiving unit 20 are integrated. In this case, the photoelectric sensor 1 projects pulsed light from the light projecting unit 10 and receives the pulsed light reflected by the object by the light receiving unit 20, thereby detecting whether an object exists in the object detection region. Note that the light projecting unit 10 may be read as a light projecting means, and the light receiving unit 20 may be read as a light receiving means.
[0014] The light projecting unit 10 includes an oscillation circuit 11, a modulation circuit 12, a drive circuit 13, and a light projecting element 14. Note that the functions of the blocks expressed as circuits in the present embodiment may be realized by a physical IC (for example, LSI (Large Scale Integrated Circuit), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array), etc.), or may be realized by a general-purpose processor executing a computer program.
[0015] The oscillation circuit 11 generates a clock signal having a predetermined frequency.
[0016] The modulation circuit 12 modulates the clock signal output from the oscillation circuit 11 to output a pulse signal so that the pulsed light is emitted from the light-emitting element 14 at a predetermined period.
[0017] The drive circuit 13 supplies a pulse current corresponding to the pulse signal output from the modulation circuit 12 to the light-emitting element 14.
[0018] The light-emitting element 14 is constituted by, for example, an LED (Light Emitting Diode), and emits light according to the pulse current output from the drive circuit 13. Thereby, pulsed light is emitted from the light-emitting element 14 at a predetermined period.
[0019] The light-receiving unit 20 includes a light-receiving element 21, an IV conversion circuit 22, a VGA (Variable Gain Amplifier) circuit 23, an ADC (Analog-to-Digital Conversion) circuit 24, a filter circuit 25, a comparison circuit 26, a determination circuit 27, and a gain setting unit 37.
[0020] The light-receiving element 21 is constituted by, for example, a photodiode, and outputs an electrical signal (current) at a level corresponding to the amount of received light of the received light.
[0021] The IV conversion circuit 22 converts the current input from the light-receiving element 21 into a voltage. The IV conversion circuit 22 outputs a pulse signal (voltage signal) converted into a voltage.
[0022] The VGA circuit 23 determines a gain (amplification factor) based on the gain setting value set from the gain setting unit 37 described later. The VGA circuit 23 amplifies the pulse signal (signal voltage) input from the IV conversion circuit 22 at the determined amplification factor and outputs it.
[0023] The ADC circuit 24 converts the analog signal input from the VGA circuit 23 into a digital signal and outputs it.
[0024] The filter circuit 25 applies a predetermined filter to the pulse signal input from the ADC circuit 24 and outputs the signal that has passed through the filter. The filter may be a high-pass filter, a low-pass filter, or a combination thereof.
[0025] The comparison circuit 26 outputs an ON signal (for example, outputs a signal of a predetermined magnitude) when the magnitude of the signal output from the filter circuit 25 is greater than or equal to a predetermined threshold Th, and outputs an OFF signal (for example, does not output a signal) when the magnitude of the filtered signal is less than a predetermined threshold Th.
[0026] The determination circuit 27 determines whether an ON signal or an OFF signal has been input from the comparison circuit 26 for each period in which pulse light is emitted. For example, if an ON signal is input from the comparison circuit 26 a predetermined number of times or more (e.g., 8 times or more), the determination circuit 27 determines that there is no object in the object detection area, and if an OFF signal is input a predetermined number of times or more (e.g., 8 times or more), the determination circuit 27 determines that there is an object in the object detection area. If the determination circuit 27 determines that there is no object in the object detection area, it outputs an ON signal (e.g., an output of a predetermined magnitude), and if it determines that there is an object in the object detection area, it may output an OFF signal (e.g., no signal). In this way, by determining whether or not an object is present based on whether or not the same type of signal has been input a predetermined number of times or more consecutively, it is possible to suppress the determination circuit 27 from making a false determination of object detection when the signal input from the comparison circuit 26 is temporarily switched on or off due to temporary ambient light.
[0027] The gain setting unit 37 sets the gain setting value for the VGA circuit 23. Details of the gain setting unit 37 will be described later.
[0028] <Configuration of the light receiving unit> Figure 2 is a block diagram showing an example of components related to the VGA circuit 23 in the light receiving unit 20, relating to Embodiment 1.
[0029] The light receiving unit 20 includes, as components related to the VGA circuit 23, a VR terminal 31, an ADC circuit 32, an input value calculation unit 33, a difference calculation unit 34, a filter unit 35, a filter setting unit 36, a gain setting unit 37, and the VGA circuit 23. In this embodiment, the functions of the blocks referred to as "units" may be realized by physical ICs or by a general-purpose processor executing a computer program.
[0030] A volume control (variable resistor) 30, which can be manually operated by user 2, is connected to the VR terminal 31. The volume control 30 may be provided at any location on the photoelectric sensor 1. A voltage value corresponding to the operation of the volume control 30 is input to the VR terminal 31. In the light receiving unit 20 according to this embodiment, when user 2 rotates the volume control 30 to the right, the voltage value input to the VR terminal 31 increases, and when user 2 rotates the volume control 30 to the left, the voltage value input to the VR terminal 31 decreases. However, the light receiving unit 20 may be configured such that when user 2 rotates the volume control 30 to the left, the voltage value input to the VR terminal 31 increases, and when user 2 rotates the volume control 30 to the right, the voltage value input to the VR terminal 31 decreases.
[0031] The ADC circuit 32 converts the analog voltage value input from the VR terminal 31 into a digital voltage value and outputs the converted voltage value.
[0032] The input value calculation unit 33 calculates an input value based on the voltage value input from the ADC circuit 32 and outputs the calculated input value. For example, the input value calculation unit 33 calculates a moving average value based on the voltage value input from the ADC circuit 32 over a certain period and outputs the calculated moving average value as the input value. However, the input value may be a value calculated by a method other than the moving average.
[0033] The difference calculation unit 34 calculates a difference value by subtracting the gain setting value set in the VGA circuit 23 from the input value input from the input value calculation unit 33, and outputs the calculated difference value. The gain setting value used here may be a gain setting value acquired at a sampling timing (or sampling period) one step earlier than the sampling timing (or sampling period) in which the input value was acquired and stored in the buffer 38.
[0034] The filter unit 35 is set to either "pass" or "block". When "pass" is set, the filter unit 35 passes the input value input from the input value calculation unit 33 and outputs it to the gain setting unit 37. When "block" is set, the filter unit 35 blocks the input value input from the input value calculation unit 33 and does not output it to the gain setting unit 37.
[0035] The filter setting unit 36 sets the filter unit 35 to pass or block based on the difference value input from the difference calculation unit 34. Details of how the filter setting unit 36 sets the filter unit 35 to pass or block will be described later.
[0036] The gain setting unit 37 determines or calculates a gain setting value according to the input value that has passed through the filter unit 35, and sets the determined or calculated gain setting value to the VGA circuit 23. The input value and the gain setting value may be the same or different. This changes the gain setting value of the VGA circuit 23. However, if no input value is received from the filter unit 35, the gain setting unit 37 does not need to set a new gain setting value for the VGA circuit 23. In this case, the gain setting value of the VGA circuit 23 is not changed.
[0037] <Gain setting value change process> Figure 3 is a flowchart illustrating an example of the process for changing the gain setting value of the VGA circuit 23 by operating the volume 30, relating to Embodiment 1.
[0038] When user 2 operates the volume control 30, a voltage value corresponding to the operated volume control 30 is input to the VR terminal 31 (S101).
[0039] The input value calculation unit 33 calculates a moving average value over a certain period using the voltage value input in step S101 and digitized by the ADC circuit 32 (S102). The input value calculation unit 33 outputs the calculated moving average value as the input value.
[0040] The difference calculation unit 34 subtracts the gain setting value for the sampling timing one step prior to the sampling timing (see Figure 4) in which the input value was acquired (stored in the buffer 38) from the input value input from the input value calculation unit 33 (S103). The difference calculation unit 34 outputs the difference value obtained by this subtraction to the filter setting unit 36.
[0041] The filter setting unit 36 determines whether the filter unit 35 is in a pass-through period (S104). If the filter unit 35 is in a pass-through period (S104: YES), the process proceeds to step S110, which will be described later. If the filter unit 35 is not in a pass-through period (S104: NO), the process proceeds to the next step S105.
[0042] The filter setting unit 36 determines whether the absolute value of the difference value input from the difference calculation unit 34 (hereinafter referred to as the absolute difference value) is greater than or equal to a predetermined first threshold (S105).
[0043] If the absolute difference is less than the first threshold (S105: NO), the filter setting unit 36 resets the continuous judgment counter (S106). Then, the process returns to step S101.
[0044] If the absolute difference is greater than or equal to the first threshold (S105: YES), the filter setting unit 36 adds 1 to the continuous judgment counter (S107). Then, the process proceeds to the next step S108.
[0045] The filter setting unit 36 determines whether the continuous determination counter is equal to or greater than a predetermined counter threshold (for example, 2) (S108). In other words, the filter setting unit 36 determines whether the absolute difference value is equal to or greater than the first threshold for a predetermined number of consecutive times or more. In other words, the filter setting unit 36 determines whether the state in which the absolute difference value is equal to or greater than the predetermined first threshold has continued for a predetermined first period (for example, a period in which the difference value is acquired twice). This prevents the filter unit 35 from changing from blocking to passing due to sudden large changes in the input value and difference value caused by electrical noise, backlash of the volume control, or physical vibration, rather than by the user 2 operating the volume control 30, and prevents the input value from being set in the VGA circuit 23 as a gain setting value unintended by the user 2.
[0046] If the continuous judgment counter is less than the counter threshold (S108: NO), the process returns to step S101.
[0047] If the continuous judgment counter is equal to or greater than the counter threshold (S108: YES), the filter setting unit 36 changes the filter unit 35 from blocking to passing and starts the timer for the passing period (S109).
[0048] The filter setting unit 36 determines whether the absolute difference value is greater than or equal to the first threshold (S110). However, the threshold used for the determination in step S110 may be a predetermined threshold different from the first threshold.
[0049] If the absolute difference is less than the first threshold (S110:NO), the process proceeds to step S112, which will be described later.
[0050] If the absolute difference is greater than or equal to the first threshold (S110: YES), the filter setting unit 36 extends the pass-through period timer (S111). For example, the filter setting unit 36 starts the pass-through period timer from the beginning. This prevents the pass-through period timer from running out and the filter unit 35 from changing from pass-through to block-through while user 2 is operating the volume 30. Then the process proceeds to step S112.
[0051] The filter setting unit 36 determines whether the timer for the passage period has ended (S112).
[0052] If the timer for the transit period has not yet finished (S112:NO), the process returns to step S101.
[0053] When the pass-through timer ends (S112: YES), the filter setting unit 36 changes the filter unit 35 from pass-through to block-through and resets the continuous judgment counter (S113). Then, the process returns to step S101. This prevents an unintended gain setting value from being set in the VGA circuit 23 after the user 2 has finished operating the volume 30.
[0054] <Specific example of a process to change the filter section from blocking to passing> Figure 4 is a timing chart illustrating a specific example of the process of changing the filter section 35 from blocking to passing, in the first embodiment. Hereinafter, with reference to Figure 4, a part of the process shown in Figure 3 will be explained using a specific example.
[0055] A voltage value corresponding to the rotation position of the volume control 30 is input to the VR terminal 31 at a predetermined sampling timing. The input value calculation unit 33 calculates the input value using the voltage value input at the current sampling timing "n" (where n is an integer), and outputs the calculated input value.
[0056] The difference calculation unit 34 obtains a difference value of "0" by subtracting the gain setting value "100", which was obtained at the previous sampling timing "n-1" and stored in the buffer 38 for the current sampling timing "n", from the input value "100" obtained at the current sampling timing "n". In this case, the absolute value of the difference value "0" is less than the predetermined first threshold value "3", so the filter setting unit 36 determines step S105 as NO and resets the continuous determination counter in step S106.
[0057] If user 2 starts operating volume 30 immediately before sampling timing "n+1", the following process will occur.
[0058] The difference calculation unit 34 obtains a difference value of "5" by subtracting the gain setting value "100", which was obtained at the previous sampling timing "n" and stored in the buffer 38 for the current sampling timing "n+1", from the input value "105" obtained at the current sampling timing "n+1". In this case, the absolute value of the difference value "5" is greater than or equal to the first threshold value "3", so the filter setting unit 36 determines step S105 as YES and adds "1" to the continuous judgment counter in step S107.
[0059] Next, the difference calculation unit 34 obtains a difference value of "8" by subtracting the gain setting value "100", which was obtained at the previous sampling timing "n+1" and stored in the buffer 38 for the current sampling timing "n+2", from the input value "108" obtained at the current sampling timing "n+2". In this case, the absolute value of the difference value "8" is greater than or equal to the first threshold "3", so the filter setting unit 36 determines step S105 as YES and adds "1" to the continuous judgment counter in step S107. The continuous judgment counter now becomes "2", and since the continuous judgment counter is greater than or equal to the counter threshold "2", the filter setting unit 36 determines step S108 as YES and changes the filter unit 35 from blocking to passing in step S109, and starts the timer for the passing period "(for example) 8 counts". At this time, the gain setting unit 37 reflects the input value "108" that passed through the filter unit 35 at sampling timing "n+2" in the gain setting value.
[0060] As a result, the filter unit 35 enters a "pass" state for the duration of the pass-through period timer "8 counts," allowing the input value corresponding to the user 2's operation of the volume 30 to pass through and input it to the gain setting unit 37. For example, as shown in Figure 4, the filter unit 35 passes through and outputs the input values obtained at each of the sampling timings "n+2," "n+3," "n+4," and "n+5" included in the pass-through period. The gain setting unit 37 determines the gain setting value for each of the input values obtained at each of the sampling timings "n+2," "n+3," "n+4," and "n+5," and sets it in the VGA circuit 23.
[0061] Thus, according to this embodiment, when user 2 operates the volume 30, the input value corresponding to that operation of the volume 30 is reflected in the VGA circuit 23. However, if the input value changes suddenly due to electrical noise, volume backlash, or physical vibration, etc., rather than when user 2 operates the volume 30, the receiving unit 20 can be realized in which that input value is not reflected in the VGA circuit 23.
[0062] <Specific example of a process to extend the timer for the transit period> Figure 5 is a timing chart illustrating a specific example of the process of extending the timer for the passage period in Embodiment 1. Hereinafter, with reference to Figure 5, a part of the process shown in Figure 3 will be explained using a specific example.
[0063] During the pass-through period, the difference calculation unit 34 obtains a difference value of "1" by subtracting the gain setting value "100", which was obtained at the previous sampling timing "n+2" and stored in the buffer 38 for the current sampling timing "n+3", from the input value "101" obtained at the current sampling timing "n+3". In this case, since the absolute value of the difference value "1" is less than the first threshold "3", the filter setting unit 36 determines step S110 as NO and does not extend the pass-through period.
[0064] Next, during the pass-through period, the difference calculation unit 34 obtains a difference value of "5" by subtracting the gain setting value "101", which was obtained at the previous sampling timing "n+3" and stored in the buffer 38 for the current sampling timing "n+4", from the input value "106" obtained at the current sampling timing "n+4". In this case, the absolute value of the difference value "5" is greater than or equal to the first threshold "3", so the filter setting unit 36 determines step S110 as YES, and in step S111, starts the pass-through period timer from the first "8 counts". In other words, the filter setting unit 36 extends the pass-through period of the filter unit 35.
[0065] This prevents the filter section 35 from changing from pass-through to block-through when the pass-through timer runs out while user 2 is operating the volume 30.
[0066] (Embodiment 2) Embodiment 2 describes a method different from Embodiment 1, in which the filter section 35 is changed from passing through to blocking. Note that the configuration of the light receiving unit 20 according to Embodiment 2 may be as shown in Figure 2.
[0067] Figure 6 is a timing chart illustrating a method for changing the filter section 35 from pass-through to blockage, relating to Embodiment 2.
[0068] The filter setting unit 36 changes the filter unit 35 from pass-through to block-off if, while the filter unit 35 is set to pass-through, the amount of change in the gain setting value during a predetermined second period is less than or equal to a predetermined threshold. This is because, when the amount of change in the gain setting value during the second period is less than or equal to a predetermined threshold, it can be presumed that the user 2 has finished operating the volume 30. In other words, the filter setting unit 36 changes the filter unit 35 from pass-through to block-off if, while the filter unit 35 is set to pass-through, the amount of change in the gain setting value remains within a predetermined range for a predetermined second period.
[0069] The amount of change in the gain setting value may be the difference between the first and last gain setting values obtained in the second period. Alternatively, the amount of change in the gain setting value may be the difference between the maximum and minimum gain setting values obtained in the second period.
[0070] For example, the second period is defined as "3 sampling timings," and the predetermined threshold is set to "2." The amount of change in the gain setting value is defined as the difference between the first and last gain setting values acquired during the second period. As shown in Figure 6, suppose the gain setting values at sampling timings "n," "n+1," and "n+2" were "100," "101," and "102," respectively. In this case, the amount of change in the gain setting value during the second period (3 sampling timings) is "2," which is less than or equal to the threshold of "2." Therefore, the filter setting unit 36 changes the filter unit 35 from pass-through to block-through.
[0071] According to Embodiment 2, compared to Embodiment 1, in which the filter section 35 is changed from pass-through to block-off when the timer for the pass-through period ends, the filter section 35 can be changed from pass-through to block-off in a shorter time after the user 2 finishes operating the volume 30.
[0072] (Embodiment 3) The photoelectric sensor 1 may be installed in an environment where vibrations are likely to occur, and / or in an environment where backlash of the volume 30 is likely to occur. Embodiment 3 discloses a light receiving unit 20 that, even when the photoelectric sensor 1 is installed in such an environment, is less likely to reflect unintended changes in the input value caused by backlash, etc., in the VGA circuit 23. The configuration of the light receiving unit 20 according to Embodiment 3 may be the configuration shown in Figure 2.
[0073] <Method 1> Figure 7 is a timing chart illustrating a first method for changing the threshold for the number of consecutive matches according to the environment, relating to Embodiment 3. The threshold for the number of consecutive matches may be used instead of the counter threshold in Embodiment 1. Next, the processing of the filter setting unit 36 when the first method is adopted will be explained with reference to Figure 7.
[0074] The first method involves setting a fluctuation measurement period only once when the filter unit 35 switches from passing to blocking, calculating the absolute value of the fluctuation amount of the input value during that fluctuation measurement period, and determining the threshold number of consecutive matches based on that absolute value of the fluctuation amount of the input value. This will be explained in detail below.
[0075] The filter setting unit 36 defines a certain period after changing the filter unit 35 from pass-through to block-through as the fluctuation measurement period. The filter unit 35 acquires the input value at each sampling timing included in the fluctuation measurement period. If the absolute value of the fluctuation amount of the input value during the fluctuation measurement period is greater than or equal to a predetermined second threshold, the filter setting unit 36 changes the threshold for the number of consecutive matches to a predetermined value that is greater than the default threshold for the number of consecutive matches. This is because if the absolute value of the fluctuation amount of the input value during the fluctuation measurement period is greater than or equal to a predetermined second threshold, it can be estimated that the environment is prone to vibration, backlash, etc. By increasing the threshold for the number of consecutive matches, the unintended changes in the input value due to vibration, backlash, etc., are suppressed from being reflected in the VGA circuit 23.
[0076] The absolute value of the input value variation may be the absolute value of the difference between the first input value and the last input value obtained during the variation measurement period. Alternatively, the absolute value of the input value variation may be the absolute value of the difference between the maximum value and the minimum value obtained during the variation measurement period.
[0077] For example, the variation measurement period is set to "4 sampling timings," and the predetermined threshold is set to "4." The amount of variation in the input value is defined as the difference between the first input value and the last input value acquired during the variation measurement period. Then, as shown in Figure 7, suppose the absolute value of the amount of variation in the input value at sampling timings "n" and "n+3" was "6."
[0078] In this case, the absolute value of the amount of change in the input value during the change measurement period is "6", which is greater than or equal to the threshold of "4". Therefore, the filter setting unit 36 changes the threshold for the number of consecutive matches to a predetermined value of "4", which is greater than the default threshold for the number of consecutive matches of "3".
[0079] As a result, in the process shown in Figure 3, the threshold for the number of consecutive matches used in the determination in step S108 becomes "4," and even if there are a few consecutive unintended changes in the input value due to vibration or backlash, step S108 will not be judged as YES. Therefore, it is possible to suppress the reflection of unintended changes in the input value due to vibration or backlash in the VGA circuit 23.
[0080] The change in the threshold for the number of consecutive matches using the first method is performed only once, at the first time the filter unit 35 changes from pass-through to block-through, and thereafter the changed threshold for the number of consecutive matches may be used until the power to the photoelectric sensor 1 is turned off. Alternatively, the photoelectric sensor 1 may discard the changed threshold for the number of consecutive matches when the power is turned off. In that case, the photoelectric sensor 1 may use the default threshold for the number of consecutive matches when the power is turned on.
[0081] <Second Method> Figure 8 is a timing chart illustrating a second method for changing the threshold for the number of consecutive matches according to the environment, relating to Embodiment 3. Next, the processing of the filter setting unit 36 when the second method is adopted will be explained with reference to Figure 8.
[0082] The second method involves repeatedly measuring fluctuations from the moment the filter unit 35 switches from passing to blocking until backlash and other factors subside, calculating the absolute value of the input value fluctuation during each fluctuation measurement period, and determining a threshold for the number of consecutive matches based on that absolute value of the input value fluctuation. This will be explained in detail below.
[0083] The filter setting unit 36 changes the filter unit 35 from pass-through to block-through and then repeatedly sets the fluctuation measurement period until backlash and other issues subside. The filter unit 35 acquires the input value at each sampling timing included in the fluctuation measurement period. In each fluctuation measurement period, if the absolute value of the fluctuation amount of the input value is greater than or equal to a predetermined second threshold, the filter setting unit 36 changes the threshold for the number of consecutive matches to a predetermined value greater than the default threshold for the number of consecutive matches. In each fluctuation measurement period, if the absolute value of the fluctuation amount of the input value is less than the predetermined second threshold, the filter setting unit 36 changes the threshold for the number of consecutive matches to the default value and terminates the setting of the fluctuation measurement period.
[0084] The absolute value of the change in the input value may be the absolute value of the difference between the first input value and the last input value obtained during the change measurement period. Alternatively, the absolute value of the change in the input difference value may be the absolute value of the difference between the maximum value and the minimum value obtained during the change measurement period.
[0085] For example, the variation measurement period is set to "two" sampling timings, and the predetermined threshold is set to "4". The amount of variation in the input value is defined as the difference between the first input value and the last input value acquired during the variation measurement period. Then, as shown in Figure 8, suppose the absolute values of the variation in the input value at sampling timings "n+1", "n+2", and "n+3" were "5", "5", and "2", respectively.
[0086] In this case, the absolute value of the input value fluctuation during the first fluctuation measurement period is "5," which is greater than the threshold "4." Therefore, the filter setting unit 36 changes the threshold for the number of consecutive matches to a predetermined value "5," which is greater than the default threshold for the number of consecutive matches "3," and continues the fluctuation measurement period.
[0087] Furthermore, the absolute value of the input value fluctuation during the second fluctuation measurement period is "5," which is greater than the threshold of "4." Therefore, the filter setting unit 36 changes the threshold for the number of consecutive matches to "5." As a result, the threshold for the number of consecutive matches used in the determination in step S108 becomes "5," and even if unintended changes in the input value due to vibration, backlash, etc. occur continuously, the determination in step S108 will not be "YES." Thus, it is possible to suppress the reflection of unintended changes in the input value due to vibration, backlash, etc., in the VGA circuit 23.
[0088] Furthermore, since the absolute value of the input value fluctuation during the third fluctuation measurement period is "2" and is less than or equal to the threshold of "4", the filter setting unit 36 changes the threshold for the number of consecutive matches to the default value of "3" and ends the fluctuation measurement period. As a result, when vibrations, backlash, etc. subside, the threshold for the number of consecutive matches used in the determination in step S108 returns to the default value of "3", and the responsiveness to the user 2's operation of the volume 30 returns to normal.
[0089] The photoelectric sensor 1 may be pre-configured to employ either the first method shown in Figure 7 or the second method shown in Figure 8. Alternatively, the photoelectric sensor 1 may be provided with a function (e.g., a switch) for selecting either the first method shown in Figure 7 or the second method shown in Figure 8.
[0090] Furthermore, the contents of Embodiment 3 may be implemented in conjunction with the contents of Embodiment 1 or 2.
[0091] (Embodiment 4) Embodiment 4 discloses a light receiving unit 20 that limits the pass-through range of the input value in the filter section 35 in response to the operation of the volume 30. The configuration of the light receiving unit 20 according to Embodiment 4 may be as shown in Figure 2.
[0092] <First method for limiting the pass-through range of the filter section> Figure 9 illustrates a first method for limiting the pass-through range of the input value in the filter section 35 according to the operation of the volume control 30, relating to Embodiment 4. Figure 9(a) illustrates an example of operation when user 2 rotates the volume control 30 in a direction that increases the input value (for example, rotating to the right). Figure 9(b) illustrates an example of operation when user 2 rotates the volume control 30 in a direction that decreases the input value (for example, rotating to the left).
[0093] As shown in Figure 9(a), when User 2 rotates the volume 30 by a predetermined amount (clockwise) in the direction that increases the input value, the filter setting unit 36 changes the filter unit 35 from blocking to passing. The filter setting unit 36 then sets the filter unit 35 as the input value passing range, from the input value corresponding to the initial position when the volume 30 was first rotated (100 in Figure 9(a)) to the maximum possible input value (200 in Figure 9(a)). At the same time, the filter unit 35 sets the input value blocking range, from the input value corresponding to the initial position when the volume 30 was first rotated (100 in Figure 9(a)) to the minimum possible input value (200 in Figure 9(a)).
[0094] Subsequently, when user 2 rotates the volume 30 to the target position (clockwise), the input value corresponding to the target position (150 in Figure 9(a)) passes through the filter section 35 and is reflected in the VGA circuit 23.
[0095] As shown in Figure 9(b), when User 2 rotates the volume 30 by a predetermined amount (counterclockwise) in the direction of decreasing input value, the filter setting unit 36 changes the filter unit 35 from blocking to passing. The filter setting unit 36 then sets the filter unit 35 as the input value passing range, from the input value corresponding to the initial position when the volume 30 was first rotated (100 in Figure 9(b)) to the minimum possible input value (0 in Figure 9(b)). At the same time, the filter unit 35 sets the input value blocking range, from the input value corresponding to the initial position when the volume 30 was first rotated (100 in Figure 9(b)) to the maximum possible input value (200 in Figure 9(b)).
[0096] Subsequently, when user 2 rotates the volume 30 to the target position (counterclockwise), the input value corresponding to the target position (50 in Figure 9(b)) passes through the filter section 35 and is reflected in the VGA circuit 23.
[0097] According to the first method described above, it is possible to suppress the unintended input values being reflected in the VGA circuit 23 due to vibration, backlash, etc.
[0098] <Second method for limiting the pass-through range of the filter section> Figure 10 is a diagram illustrating a second method relating to Embodiment 4, which limits the pass range of the input value in the filter section 35 according to the operation of the volume control 30. Figure 10(a) is a diagram illustrating an example of operation when user 2 rotates the volume control 30 by a predetermined amount in the direction of decreasing input value (for example, left rotation), and then rotates the volume control 30 in the direction of increasing input value (for example, right rotation). Figure 10(b) is a diagram illustrating an example of operation when user 2 rotates the volume control 30 by a predetermined amount in the direction of increasing input value (for example, right rotation), and then rotates the volume control 30 in the direction of decreasing input value (for example, left rotation).
[0099] As shown in Figure 10(a), if User 2 rotates the volume 30 by a predetermined amount in the direction of decreasing the input value (for example, counterclockwise), and then starts rotating the volume 30 in the direction of increasing the input value (for example, clockwise), the filter setting unit 36 changes the filter unit 35 from blocking to passing. The filter setting unit 36 then identifies the inflection position, which is the position of the volume 30 where the input value has changed from decreasing to increasing. In other words, the inflection position corresponds to the position where the volume 30 has changed from counterclockwise rotation to clockwise rotation. The filter setting unit 36 then sets the range from the input value corresponding to the inflection position (70 in Figure 10(a)) to the maximum possible input value (200 in Figure 10(a)) as the input value passing range for the filter unit 35. At the same time, the filter unit 35 sets the range from the input value corresponding to the inflection position (70 in Figure 10(a)) to the minimum possible input value (0 in Figure 10(a)) as the input value blocking range for the filter unit 35.
[0100] Subsequently, when user 2 rotates the volume 30 to the target position (clockwise), the input value corresponding to the target position (150 in Figure 10(a)) passes through the filter section 35 and is reflected in the VGA circuit 23.
[0101] As shown in Figure 10(b), if User 2 rotates the volume 30 by a predetermined amount in the direction of increasing the input value (for example, clockwise), and then starts rotating the volume 30 in the direction of decreasing the input value (for example, counterclockwise), the filter setting unit 36 changes the filter unit 35 from blocking to passing. The filter setting unit 36 then identifies the inflection position, which is the position of the volume 30 where the input value has changed from increasing to decreasing. In other words, the inflection position corresponds to the position where the volume 30 has changed from clockwise rotation to counterclockwise rotation. The filter setting unit 36 then sets the range from the input value corresponding to the inflection position (130 in Figure 10(b)) to the minimum possible input value (0 in Figure 10(b)) as the input value passing range for the filter unit 35. At the same time, the filter unit 35 sets the input value cutoff range to the input value, which is the range from the input value corresponding to the inflection position (130 in Figure 10(b)) to the minimum value that the input value can take (0 in Figure 10(b)).
[0102] Subsequently, when user 2 rotates the volume 30 to the target position (counterclockwise), the input value corresponding to the target position (50 in Figure 10(b)) passes through the filter section 35 and is reflected in the VGA circuit 23.
[0103] According to the second method described above, the operation that user 2 often performs when making fine adjustments—rotating the volume 30 in the opposite direction to the target position—can be assigned to the operation of changing the filter section 35 from blocking to passing. Therefore, it is possible to suppress the filter section 35 from changing from blocking to passing on its own due to vibration, backlash, etc., and the reflection of unintended input values in the VGA circuit 23.
[0104] <Method for detecting inflection position> Next, an example of the inflection position detection method shown in Figure 9 will be described with reference to Figures 11 and 12. Figure 11 is a diagram illustrating the method for detecting an inflection position in which the input value changes from decreasing to increasing, relating to Embodiment 4. Figure 12 is a diagram illustrating the method for detecting an inflection position in which the input value changes from increasing to decreasing, relating to Embodiment 4.
[0105] The filter setting unit 36 obtains an input difference value by subtracting the input value obtained at the previous sampling timing from the input value obtained at the current sampling timing.
[0106] As shown in Figure 11, the filter setting unit 36 detects the position where the input difference value changes from below the first lower threshold to above the first upper threshold as an inflection position if the input difference value is below the first lower threshold for a predetermined number of consecutive times (e.g., 3 times) or more, and thereafter the input difference value is above the first upper threshold for a predetermined number of consecutive times (e.g., 3 times) or more.
[0107] As shown in Figure 12, the filter setting unit 36 detects the position where the input difference value changes from above the second rising threshold to below the second falling threshold as an inflection position if the input difference value is above the second rising threshold (e.g., +10) for a predetermined number of consecutive times (e.g., 3 times) or more, and thereafter the input difference value is below the second falling threshold (e.g., -5) for a predetermined number of consecutive times (e.g., 3 times) or more.
[0108] The first downward threshold and the second downward threshold may be the same value or different values. The first upward threshold and the second upward threshold may be the same value or different values.
[0109] Through the above process, the filter setting unit 36 can detect the inflection position as explained in Figure 9.
[0110] Furthermore, the contents of Embodiment 4 may be implemented in conjunction with the contents of Embodiments 1, 2, or 3.
[0111] (Summary of this disclosure) The contents of this disclosure can be expressed as follows: <Item 1> The light receiving unit (20) includes an amplifier (e.g., a VGA circuit 23) that amplifies the light receiving signal based on a set gain setting value, a difference calculation unit (34) that calculates the difference between the input value based on the operation of the volume (30) and the gain setting value set for the amplifier, a filter unit (35) that sets whether to pass or block the input value, a filter setting unit (36) that sets whether to pass or block the filter unit based on the difference value, and a gain setting unit (37) that sets a gain setting value for the amplifier according to the input value that has passed through the filter unit. This allows the reflection of the gain setting value to the amplifier, based on the difference value that changes with the volume control, to be controlled according to the input value. This prevents the amplifier's gain setting value from changing unintentionally due to reasons other than volume control operation.
[0112] <Item 2> In the light receiving unit (20) described in item 1, the filter setting unit (36) sets the filter unit (35) to pass for a predetermined pass period if the absolute value of the difference value is equal to or greater than a predetermined first threshold for a predetermined first period. As a result, if the absolute value of the difference remains large for a predetermined period, it is presumed that the user (2) has started operating the volume control, and the gain setting value corresponding to the input value based on the volume control is reflected in the amplifier.
[0113] <Item 3> In the light receiving unit (20) described in item 2, the filter setting unit (36) extends the pass-through period if, during the pass-through period, the absolute value of the difference is greater than or equal to the first threshold or a predetermined threshold different from the first threshold. As a result, if a large absolute value of the difference occurs during the pass-through period, it is assumed that the user is still operating the volume control, and the gain setting value corresponding to the input value based on the volume control continues to be reflected in the amplifier.
[0114] <Item 4> In the light receiving unit (20) described in item 1, the filter setting unit (36) sets the filter unit (35) to block if, while the filter unit (35) is set to pass through, the amount of change in the gain setting value remains within a predetermined range for a predetermined second period. As a result, when the filter is set to pass through, if the amount of change in the gain setting value remains within a predetermined range, it is assumed that the user has finished operating the volume control, and the gain setting value corresponding to the input value is no longer reflected in the amplifier. Therefore, it is possible to prevent the amplifier's gain setting value from changing unintentionally due to reasons other than volume control operation.
[0115] <Item 5> In the light receiving unit (20) described in item 2, the filter setting unit (36) lengthens the first period if the amount of variation, which is the difference in input values during the variation measurement period, is greater than or equal to a predetermined second threshold. This prevents unintended changes in the amplifier's gain setting due to causes other than volume control operation, in environments where input value fluctuations due to physical vibration or backlash are likely to occur.
[0116] <Item 6> In the light receiving unit (20) described in item 2 or 5, the filter setting unit (36) shortens the first period if the amount of variation, which is the difference within the variation measurement period, is less than a predetermined second threshold. This improves responsiveness to user volume control in environments where fluctuations in input values due to physical vibration or backlash are less likely to occur.
[0117] <Item 7> In the light receiving unit (20) described in any one of items 1 to 6, the filter setting unit (36) is configured such that when the volume (30) is operated in a direction that increases the input value, the filter unit (35) is configured to allow input values greater than the current input value to pass through and to block input values less than or equal to the current input value, and when the volume is operated in a direction that decreases the input value, the filter unit is configured to allow input values smaller than the current input value to pass through and to block input values greater than or equal to the current input value. This reduces the possibility of the amplifier's gain setting being unintentionally changed due to reasons other than volume control operation.
[0118] <Item 8> In the light receiving unit (20) described in any one of items 1 to 6, the filter setting unit (36) is configured such that, if the volume (30) is operated in a direction that decreases the input value, and then the volume is operated in a direction that increases the input value, the filter unit (35) is configured to allow input values greater than the first input value, which is the input value at the position where the volume operation changes from a direction that decreases the input value, to pass through, and to block input values less than or equal to the first input value. If the volume is operated in a direction that increases the input value, and then the volume is operated in a direction that decreases the input value, the filter unit is configured to allow input values less than the second input value, which is the input value at the position where the volume operation changes from a direction that increases the input value to a direction that decreases, to pass through, and to block input values greater than or equal to the second input value. This reduces the possibility of the amplifier's gain setting being unintentionally changed due to reasons other than volume control operation.
[0119] <Item 9> The photoelectric sensor (1) includes a light-emitting means (e.g., a light-emitting unit 10) that emits pulsed light, and a light-receiving means (e.g., a light-receiving unit 20) that receives the emitted pulsed light. The light-receiving means includes an amplifier (e.g., a VGA circuit 23) that amplifies the received light signal based on the received pulsed light based on a set gain setting value, a difference calculation unit (34) that calculates the difference between an input value based on the operation of a volume (30) and a gain setting value set in the amplifier, a filter unit (35) that is set to pass or block the input value, a filter setting unit (36) that sets the filter unit to pass or block based on the difference value, and a gain setting unit (37) that sets a gain setting value in the amplifier according to the input value that has passed through the filter unit. This allows the reflection of the gain setting value to the amplifier, based on the difference value that changes with the volume control, to be controlled according to the input value. This prevents the amplifier's gain setting value from changing unintentionally due to reasons other than volume control operation.
[0120] While embodiments have been described above with reference to the attached drawings, this disclosure is not limited to such examples. It is clear to those skilled in the art that various modifications, alterations, substitutions, additions, deletions, and equivalents can be conceived within the scope of the claims, and these are also understood to fall within the technical scope of this disclosure. Furthermore, the components of the embodiments described above can be combined in any way without departing from the spirit of the invention. [Industrial applicability]
[0121] The technology disclosed herein is useful for sensors that detect objects by emitting and receiving light. [Explanation of Symbols]
[0122] 1. Photoelectric sensor 2 users 10 Floodlight Units 11. Oscillator Circuit 12 Modulation Circuit 13 Drive Circuit 14 light-emitting elements 20 Light receiving unit 21 Photodetector 22 IV conversion circuit 23 VGA Circuits 24 ADC circuit 25 Filter Circuits 26 Comparison circuit 27 Judgment circuit 30 volume 31 VR terminal 32 ADC circuit 33 Input Value Calculation Unit 34 Difference calculation part 35 Filter section 36 Filter setting section 37 Gain setting section 38 buffers
Claims
1. An amplifier that amplifies the received light signal based on a set gain value, A difference calculation unit calculates the difference between the input value based on the operation of the volume control and the gain setting value set in the amplifier. A filter unit that is set to allow or block the input value, A filter setting unit sets the filter unit to pass or block based on the difference value, The system includes a gain setting unit that sets the gain setting value in the amplifier according to the input value that has passed through the filter unit. Light receiving unit.
2. The filter setting unit, if the absolute value of the difference value is equal to or greater than a predetermined first threshold for a predetermined first period, sets the filter unit to pass for a predetermined pass period. The light receiving unit according to claim 1.
3. The filter setting unit extends the passage period if, during the passage period, the absolute value of the difference is greater than or equal to the first threshold or a predetermined threshold different from the first threshold. The light receiving unit according to claim 2.
4. The filter setting unit, while the filter unit is set to pass through, sets the filter unit to block if the amount of change in the gain setting value remains within a predetermined range for a predetermined second period of time. The light receiving unit according to claim 1.
5. The filter setting unit extends the first period if the amount of variation, which is the difference in input values within the variation measurement period, is greater than or equal to a predetermined second threshold. The light receiving unit according to claim 2.
6. The filter setting unit shortens the first period if the amount of variation, which is the difference in input values within the variation measurement period, is less than a predetermined second threshold. The light receiving unit according to claim 2 or 5.
7. The filter setting unit is, When the volume is operated in a direction that increases the input value, the filter unit is set to allow input values greater than the current input value to pass through and to block input values less than or equal to the current input value. When the volume is operated in a direction that decreases the input value, the filter unit is set to allow input values smaller than the current input value to pass through and to block input values greater than or equal to the current input value. The light receiving unit according to claim 1.
8. The filter setting unit is, If the volume is operated in a direction that decreases the input value, and then the volume is operated in a direction that increases the input value, the filter unit is set to allow input values greater than the first input value, which is the input value at the position where the volume operation changed from the direction that decreases the input value to the direction that increases, to pass through, and to block input values less than or equal to the first input value. If the volume is operated in a direction that increases the input value, and then the volume is operated in a direction that decreases the input value, the filter unit is set to allow input values smaller than the second input value, which is the input value at the point where the volume operation changed from the direction that increases the input value to the direction that decreases the input value, to pass through, and to block input values equal to or greater than the second input value. The light receiving unit according to claim 1.
9. A photoelectric sensor comprising a light-emitting means for emitting pulsed light and a light-receiving means for receiving the emitted pulsed light, The light receiving means is An amplifier that amplifies the received light signal based on the received pulse light based on a set gain setting, A difference calculation unit calculates the difference between the input value based on the operation of the volume control and the gain setting value set in the amplifier. A filter unit that is set to allow or block the input value, A filter setting unit sets the filter unit to pass or block based on the difference value, The system includes a gain setting unit that sets the gain setting value in the amplifier according to the input value that has passed through the filter unit. Photoelectric sensor.