Dynamic detection method, device and printing equipment based on photoelectric sensor

By setting up a photoelectric receiver tube with adjustable sensitivity and a combined control method in the photoelectric sensor, the misjudgment problem of the photoelectric sensor under external sunlight interference is solved, and the detection accuracy and adaptability are improved.

CN112485838BActive Publication Date: 2024-12-20XIAMEN HANIN CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011095447.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-14
Publication Date
2024-12-20
Estimated Expiration
2040-10-14

AI Technical Summary

Technical Problem

During the detection process, existing photoelectric sensors are easily disturbed by external sunlight, resulting in misjudgment and cannot adapt to the dynamically changing external environment, affecting the accuracy of detection.

Method used

By setting a photoelectric receiving tube with adjustable sensitivity gear in the photoelectric sensor, controlling the sensitivity of the photoelectric receiving tube in combination with the arrangement and combination method, calculating the optimal amplifier area and resistance value, and determining the existence or absence of the object to be detected.

Benefits of technology

It improves the adaptation range and detection accuracy of the photoelectric sensor, and can better adapt to various dynamically changing consumables and external environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112485838B_ABST
    Figure CN112485838B_ABST
Patent Text Reader

Abstract

The present invention proposes a dynamic detection method, device and printing equipment based on a photoelectric sensor, wherein the method comprises: controlling a photoelectric transmitting tube to be powered off, and sequentially controlling a plurality of sensitivity gears of a photoelectric receiving tube to work according to an arrangement and combination mode to obtain a corresponding power-off output value of the photoelectric receiving tube; then sorting the output values ​​of the photoelectric receiving tube under each arrangement and combination mode to obtain an optimal amplification area; then controlling the photoelectric transmitting tube to be powered on, and obtaining a corresponding first power-off output value and a second power-off output value according to a first resistance value and a second resistance value corresponding to the optimal amplification area; then judging whether an object to be detected exists according to the first power-on output value, the first power-off output value, the second power-on output value, the second power-off output value and a preset threshold value; thereby, by adjusting the resistance value to change the sensitivity of the photoelectric receiving tube, the adaptability range of the photoelectric sensor is improved to adapt to various dynamically changing consumables and external environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent printing technology, and in particular to a dynamic detection method based on a photoelectric sensor, a dynamic detection device based on a photoelectric sensor, and a printing device. Background Art

[0002] In the related art, electronic products often use photoelectric sensors as detection devices. For example, photoelectric sensors are used in printers to detect whether there is paper at the corresponding position. However, since the detection results of the photoelectric sensors are easily interfered by external sunlight, it is easy to cause misjudgment. In order to solve this problem, the existing processing method is generally to first subtract the power-off output value of the photoelectric sensor from the power-on output value before making a judgment to offset the influence of external sunlight on the photoelectric sensor. However, this method still has problems with the detection effect when facing strong external light, which makes this method unable to adapt to various dynamically changing external environments, making the adaptation range small. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems in the above-mentioned technology to a certain extent. To this end, one object of the present invention is to provide a dynamic detection method based on a photoelectric sensor, by changing the sensitivity of a photoelectric receiving tube, thereby improving the adaptability range of the photoelectric sensor to adapt to various dynamically changing consumables and external environments.

[0004] The second objective of the present invention is to provide a dynamic detection device based on a photoelectric sensor.

[0005] A third object of the present invention is to provide a printing device.

[0006] To achieve the above-mentioned purpose, a first aspect of the present invention proposes a dynamic detection method based on a photoelectric sensor, wherein the photoelectric sensor is arranged corresponding to the object to be detected, the photoelectric sensor includes a photoelectric transmitting tube and a photoelectric receiving tube with multiple adjustable sensitivity gears, and the dynamic detection method includes the following steps: controlling the power on and off of the photoelectric transmitting tube, and sequentially controlling the multiple sensitivity gears of the photoelectric receiving tube to work according to the arrangement and combination mode, so as to obtain the power-off output value of the photoelectric receiving tube corresponding to each arrangement and combination mode; sorting the power-off output values ​​of the photoelectric receiving tube corresponding to each arrangement and combination mode, and calculating the optimal amplification area according to the sorted two power-off output values; obtaining the corresponding first power-off output value and the second power-off output value and the first power-off output value corresponding to the first power-off output value according to the optimal amplification area. the first resistance value and the second power-off output value corresponding to the first resistance value; control the photoelectric transmitting tube to be powered on, and control the photoelectric receiving tube to work in sequence according to the arrangement and combination mode corresponding to the first resistance value and the second resistance value, so as to obtain the first power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the first resistance value and the second power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the second resistance value; calculate a first judgment value according to the first power-on output value and the first power-off output value, and calculate a second judgment value according to the second power-on output value and the second power-off output value; judge whether the object to be detected exists according to the first judgment value, the second judgment value and a preset threshold value.

[0007] According to the dynamic detection method based on the photoelectric sensor of the embodiment of the present invention, the photoelectric transmitting tube is first controlled to be powered on and off, and the multiple sensitivity gears of the photoelectric receiving tube are controlled in sequence according to the arrangement and combination mode to work, so as to obtain the power-off output value and the corresponding resistance value of the photoelectric receiving tube corresponding to each arrangement and combination mode; then the power-off output value of the photoelectric receiving tube corresponding to each arrangement and combination mode is sorted, and the optimal amplification area is calculated according to the sorted two power-off output values; Then, the corresponding first power-off output value and the second power-off output value and the first resistance value corresponding to the first power-off output value and the second resistance value corresponding to the second power-off output value are obtained according to the optimal amplification area; then, the photoelectric transmitting tube is controlled to be powered on, and the photoelectric receiving tube is controlled to work in sequence according to the arrangement and combination mode corresponding to the first resistance value and the second resistance value, so as to obtain the first power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the first resistance value and the second power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the second resistance value; then, the first judgment value is calculated according to the first power-on output value and the first power-off output value, and the second judgment value is calculated according to the second power-on output value and the second power-off output value; finally, the existence of the object to be detected is judged according to the first judgment value, the second judgment value and the preset threshold value; thereby, by changing the sensitivity of the photoelectric receiving tube, the adaptability range of the photoelectric sensor is improved to adapt to various dynamically changing consumables and external environments.

[0008] In addition, the dynamic detection method based on the photoelectric sensor proposed in the above embodiment of the present invention may also have the following additional technical features:

[0009] Optionally, when the photoelectric emitting tube is controlled to be powered on, the luminous intensity of the photoelectric emitting tube is also set to a maximum luminous intensity.

[0010] Optionally, the arrangement and combination of the multiple sensitivity levels of the photoelectric receiving tube is calculated according to the following formula:

[0011]

[0012] Among them, there are n sensitivity levels in total. According to the above-mentioned arrangement and combination method, the n sensitivity levels can be combined into C types in total; n and C are positive integers greater than zero.

[0013] Optionally, sorting the power-off output values ​​of the photoelectric receiving tubes corresponding to each of the permutation and combination modes includes: sorting the power-off output values ​​of the photoelectric receiving tubes corresponding to each of the permutation and combination modes from large to small or from small to large.

[0014] Optionally, calculating the optimal amplification area according to the sorted power-off output values ​​spaced apart includes: calculating the corresponding slope value according to the sorted power-off output values ​​spaced apart apart; obtaining the maximum slope value among all the slope values ​​to find the corresponding optimal amplification area according to the maximum slope value.

[0015] Optionally, the first judgment value and the second judgment value are calculated by the following formula:

[0016] IERROR=abs(Voff-Von) / RES

[0017] Wherein, RES is the gear resistance value, Voff is the power-off output value of the photoelectric receiving tube when the photoelectric transmitting tube is powered off; Von is the power-on output value of the photoelectric receiving tube when the photoelectric transmitting tube is powered on.

[0018] Optionally, judging whether the object to be detected exists is based on the first judgment value, the second judgment value and a preset threshold, including: when the photoelectric transmitting tube and the photoelectric receiving tube are arranged on the same side, if any one of the first judgment value and the second judgment value is greater than the preset threshold, judging that the object to be detected exists; otherwise, judging that the object to be detected does not exist.

[0019] Optionally, judging whether the object to be detected exists is based on the first judgment value, the second judgment value and a preset threshold, including: when the photoelectric transmitting tube and the photoelectric receiving tube are arranged on different sides, if any one of the first judgment value and the second judgment value is less than the preset threshold, judging that the object to be detected exists; otherwise, judging that the object to be detected does not exist.

[0020] Optionally, the preset threshold is determined by the photoelectric sensor and required accuracy.

[0021] To achieve the above-mentioned purpose, the second aspect of the present invention proposes a dynamic detection device based on a photoelectric sensor, wherein the photoelectric sensor is arranged corresponding to the object to be detected, the photoelectric sensor includes a photoelectric transmitting tube and a photoelectric receiving tube with multiple adjustable sensitivity gears, and the dynamic detection device includes: a power on and off control module, used to control the power on and off of the photoelectric transmitting tube; a selection control module, used to control the multiple sensitivity gears of the photoelectric receiving tube to work according to the arrangement and combination mode; a calculation module, used to sort the power-off output values ​​of the photoelectric receiving tube corresponding to each arrangement and combination mode, and calculate the optimal amplification area according to the sorted two power-off output values; an acquisition module, used to obtain the power-on output value, power-off output value and corresponding resistance value of the photoelectric receiving tube corresponding to each arrangement and combination mode; and a judgment module, used to judge whether the object to be detected exists according to the power-on output value, power-off output value and corresponding resistance value corresponding to the optimal amplification area.

[0022] According to the dynamic detection device based on the photoelectric sensor of the embodiment of the present invention, the power-on and power-off control module is used to control the power-off of the photoelectric transmitting tube, and the selection control module is used to control the multiple sensitivity gears of the photoelectric receiving tube to work according to the arrangement and combination mode, so as to obtain the power-off output value of the photoelectric receiving tube corresponding to each arrangement and combination mode, and then the power-off output value of the photoelectric receiving tube corresponding to each arrangement and combination mode is sorted by the calculation module, and the optimal amplification area is calculated according to the sorted two power-off output values, and then the first power-off output value and the second power-off output value corresponding to the optimal amplification area and the first resistance value corresponding to the first power-off output value and the second resistance value corresponding to the second power-off output value are obtained by the acquisition module. Then, the power-on control module is used to control the power-on of the photoelectric transmitting tube, and the photoelectric receiving tube is controlled to work in sequence according to the arrangement and combination mode corresponding to the first resistance value and the second resistance value by the selection control module, so as to obtain the first power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the first resistance value and the second power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the second resistance value by the acquisition module, and finally, the first judgment value is calculated according to the first power-on output value and the first power-off output value by the calculation module, and the second judgment value is calculated according to the second power-on output value and the second power-off output value, so as to judge whether the object to be detected exists according to the first judgment value, the second judgment value and the preset threshold value by the judgment module; thereby, by changing the sensitivity of the photoelectric receiving tube, the adaptability range of the photoelectric sensor is improved to adapt to various dynamically changing consumables and external environments.

[0023] To achieve the above-mentioned object, a third aspect of the present invention provides a printing device, including the above-mentioned dynamic detection device based on the photoelectric sensor.

[0024] According to the printing device of the embodiment of the present invention, the sensitivity of the photoelectric receiving tube is changed by the above-mentioned dynamic detection device based on the photoelectric sensor, thereby improving the adaptability range of the photoelectric sensor to adapt to various dynamically changing consumables and external environments, thereby improving the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram of a flow chart of a dynamic detection method based on a photoelectric sensor according to an embodiment of the present invention;

[0026] Figure 2 A schematic circuit diagram of a photoelectric sensor according to a dynamic detection method based on a photoelectric sensor according to an embodiment of the present invention;

[0027] Figure 3 is a block diagram of a dynamic detection device based on a photoelectric sensor according to an embodiment of the present invention;

[0028] Figure 4 FIG. 4 is a block diagram of a printing device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0030] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0031] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0032] Figure 1 The figure is a flow chart of a dynamic detection method based on a photoelectric sensor according to an embodiment of the present invention, wherein the photoelectric sensor is arranged corresponding to the object to be detected, and the photoelectric sensor includes a photoelectric transmitting tube and a photoelectric receiving tube with multiple adjustable sensitivity levels.

[0033] like Figure 1 As shown, the dynamic detection method based on photoelectric sensor includes the following steps:

[0034] Step 101, control the photoelectric transmitting tube to be powered off, and control the multiple sensitivity gears of the photoelectric receiving tube to work in sequence according to the arrangement and combination mode, so as to obtain the power-off output value of the photoelectric receiving tube corresponding to each arrangement and combination mode.

[0035] That is to say, when the photoelectric transmitting tube is powered off, the photoelectric receiving tube is controlled to work in sequence according to the various combinations of the multiple sensitivity levels of the photoelectric receiving tube, so as to obtain the power-off output values ​​of the photoelectric receiving tube corresponding to the different combinations.

[0036] It should be noted that when controlling the photoelectric emitting tube to be powered on, the maximum luminous intensity corresponding to the photoelectric emitting tube is obtained according to the model of the photoelectric sensor, so as to set the luminous intensity of the photoelectric emitting tube to the maximum luminous intensity.

[0037] As an embodiment, the arrangement and combination of multiple sensitivity levels of the photoelectric receiving tube is calculated according to the following formula:

[0038]

[0039] Among them, there are n sensitivity levels in total. According to the above-mentioned arrangement and combination method, the n sensitivity levels can be combined into C types in total; n and C are positive integers greater than zero.

[0040] That is to say, assuming there are 3 sensitivity (resistance) levels, there are a total of There are permutations and combinations, and each permutation and combination corresponds to a corresponding power-on output value and a corresponding resistance value.

[0041] Step 102, sorting the power-off output values ​​of the photoelectric receiving tubes corresponding to each arrangement and combination, and calculating the best amplification area according to the sorted power-off output values ​​every two.

[0042] As an embodiment, the power-off output values ​​of the photoelectric receiving tubes corresponding to each arrangement and combination are sorted from large to small or from small to large.

[0043] As an embodiment, the optimal amplification area is calculated based on the sorted power-off output values, including: calculating the corresponding slope value based on the sorted power-off output values; obtaining the maximum slope value among all the slope values ​​to find the corresponding optimal amplification area based on the maximum slope value; and the number of slope values ​​is equal to the number of power-off output values ​​of the photoelectric receiving tube corresponding to each arrangement and combination minus one.

[0044] That is to say, assuming there are 7 permutations and combinations, there are 7 corresponding power-off output values ​​and corresponding resistance values ​​(sensitivity). A slope value is obtained between two power-off output values, and a total of 6 corresponding slope values ​​can be obtained.

[0045] Step 103 , obtaining the corresponding first power-off output value and the second power-off output value and the first resistance value corresponding to the first power-off output value and the second resistance value corresponding to the second power-off output value according to the optimal amplification region.

[0046] That is, the maximum slope value is selected from all the obtained slope values, the maximum slope value corresponds to the optimal amplification area, and the power-off output value and resistance value corresponding to the maximum slope value are obtained.

[0047] Step 104, controlling the photoelectric transmitting tube to be powered on, and controlling the photoelectric receiving tube to work in sequence according to the arrangement and combination of the first resistance value and the second resistance value, so as to obtain the first power-on output value of the photoelectric receiving tube under the arrangement and combination corresponding to the first resistance value and the second power-on output value of the photoelectric receiving tube under the arrangement and combination corresponding to the second resistance value.

[0048] That is to say, after the photoelectric transmitting tube is powered on, the photoelectric receiving tube is controlled to work in sequence according to the arrangement and combination of the two resistance values ​​corresponding to the optimal amplification area obtained above, thereby obtaining the power-on output values ​​of the two corresponding photoelectric receiving tubes.

[0049] Step 105 , calculating a first judgment value according to the first power-on output value and the first power-off output value, and calculating a second judgment value according to the second power-on output value and the second power-off output value.

[0050] As a specific embodiment, the first judgment value and the second judgment value are calculated by the following formula:

[0051] IERROR=abs(Voff-Von) / RES

[0052] Wherein, RES is the gear resistance value, Voff is the power-off output value of the photoelectric receiving tube when the photoelectric transmitting tube is powered off; Von is the power-on output value of the photoelectric receiving tube when the photoelectric transmitting tube is powered on.

[0053] It should be noted that the first power-off output value, the first power-on output value, the first power-off output value and the resistance values ​​corresponding to the first power-on output value are substituted into the above formula, that is, the first judgment value is obtained by subtracting the absolute value of the first power-on output value from the first power-off output value and dividing it by the resistance values ​​corresponding to the first power-off output value and the first power-on output value; the second power-off output value, the second power-on output value and the resistance values ​​corresponding to the second power-off output value and the second power-on output value are substituted into the above formula, that is, the second judgment value is obtained by subtracting the absolute value of the first power-on output value from the second power-off output value and dividing it by the resistance values ​​corresponding to the second power-off output value and the second power-on output value.

[0054] For further detailed description, the first judgment value and the second judgment value can also be obtained by the following specific formula:

[0055] current1=abs(OFF_AD_1-ON_AD_1)*VDD / FULL_SCALE / RES[RES_IDX_1]

[0056] current2=abs(OFF_AD_2-ON_AD_2)*VDD / FULL_SCALE / RES[RES_IDX_2]

[0057] Among them, current1 is the first judgment value, current2 is the second judgment value, OFF_AD_1 is the first power-off output value, ON_AD_1 is the first power-on output value, OFF_AD_2 is the second power-off output value, ON_AD_2 is the second power-on output value, VDD is the reference voltage of AD detection, FULL_SCALE is the range of AD detection, RES_IDX_1 is the first resistance value, and RES_IDX_2 is the second resistance value.

[0058] Step 106 , judging whether the object to be detected exists according to the first judgment value, the second judgment value and the preset threshold value.

[0059] As a specific embodiment, when the photoelectric transmitting tube and the photoelectric receiving tube are arranged on the same side, if any one of the first judgment value and the second judgment value is greater than a preset threshold, it is determined that the object to be detected exists, otherwise it is determined that the object to be detected does not exist.

[0060] That is to say, when the photoelectric transmitting tube and the photoelectric receiving tube are set on the same side of the paper, as long as one of the first judgment value and the second judgment value is greater than the preset threshold, it is judged that the object to be detected exists; if both the first judgment value and the second judgment value are greater than the preset threshold, it is judged that the object to be detected does not exist.

[0061] As a specific embodiment, when the photoelectric transmitting tube and the photoelectric receiving tube are arranged on different sides, if any one of the first judgment value and the second judgment value is smaller than a preset threshold, it is determined that the object to be detected exists, otherwise it is determined that the object to be detected does not exist.

[0062] That is to say, when the photoelectric transmitting tube and the photoelectric receiving tube are respectively arranged on both sides of the paper, as long as one of the first judgment value and the second judgment value is less than the preset threshold value, it is judged that the object to be detected exists; if both the first judgment value and the second judgment value are greater than the preset threshold value, it is judged that the object to be detected does not exist.

[0063] As an embodiment, the preset threshold is determined by a photoelectric sensor and a required accuracy, which is not specifically limited in the present invention.

[0064] In order to better understand the above technical solution, a specific embodiment is further described below:

[0065] Figure 2 A schematic circuit diagram of a photoelectric sensor of a dynamic detection method based on a photoelectric sensor according to an embodiment of the present invention is shown in FIG. Figure 2 As shown, the gate G of the photoelectric transmitting tube Q1 is connected to the control pin FETCH_S of the controller, so that the controller controls the photoelectric transmitting tube Q1 to turn on and off through the control pin FETCH_S; the drain D of the first photoelectric receiving tube Q2 is connected to the AD detection FETCH_SNS through the first current limiting resistor R1, the drain D of the second photoelectric receiving tube Q3 is connected to the AD detection FETCH_SNS through the second current limiting resistor R2, and the drain D of the third photoelectric receiving tube Q4 is connected to the AD detection FETCH_SNS through the third current limiting resistor R3; the gate G of the first photoelectric receiving tube Q2 is connected to the first control pin FETCH_T1 of the controller To control the first current limiting resistor R1 of the first photoelectric receiving tube Q2, the gate G of the second photoelectric receiving tube Q3 is connected to the second control pin FETCH_T2 of the controller to control the second current limiting resistor R2 of the second photoelectric receiving tube Q3, and the gate G of the third photoelectric receiving tube Q4 is connected to the third control pin FETCH_T3 of the controller to control the third current limiting resistor R1 of the third photoelectric receiving tube Q4; the sources of the first photoelectric receiving tube Q2, the second photoelectric receiving tube Q3 and the third photoelectric receiving tube Q4 are commonly connected to ADD.

[0066] That is to say, in this embodiment, there are three current limiting resistors (sensitivity) R1, R2 and R3, which can form There are permutations and combinations, among which, It means randomly selecting one of the three current limiting resistors. There are 3 selection methods in total. It means randomly selecting two from three current limiting resistors. There are three selection methods in total. It means that three current-limiting resistors are randomly selected from the three current-limiting resistors, and there is a total of 1 selection method, so there are a total of 7 permutations and combinations, corresponding to 7 resistance values ​​and output values; assuming R1 = 10KΩ, R2 = 5.1KΩ, R3 = 1KΩ, the corresponding 7 resistance values ​​RES are: {772Ω, 836Ω, 909Ω, 1000Ω, 5100Ω, 3377Ω, 10000Ω}.

[0067] It should be noted that, as a specific embodiment, AD adopts 12-bit precision and the range FULL_SCALE=4095.

[0068] The specific detection method is:

[0069] S1, controls FETCH_S to turn off the current of the photoelectric emitting tube Q1 of the photoelectric sensor, and sets the photoelectric emitting tube Q1 to the maximum luminous intensity.

[0070] S2, control FETCH_T1, FETCH_T2, FETCH_T3, adjust the resistance value from small to large, use a two-dimensional array to record the AD values ​​collected by FETCH_SNS under different resistances as the power-off output value, after all possible resistance combinations are collected, calculate the slopes of 2 points apart in sequence based on the collected AD values, and save the resistance index values ​​RES_IDX_1, RES_IDX_2 and corresponding AD values ​​ON_AD_VAULE_1, ON_AD_VALUE_2 of the 2 points with the largest slopes.

[0071] S3, controls FETCH_S to turn on the photoelectric transmitter current of the photoelectric sensor, sets the resistance value RES to the resistance indexed as RES_IDX_1, and then obtains the AD value of FETCH_SNS, recorded as OFF_AD_VALUE_1.

[0072] S4. Set the resistance value RES to the resistance with index RES_IDX_2, and then obtain the AD value of FETCH_SNS, which is recorded as OFF_AD_VALUE_2.

[0073] S5. Calculate the current difference under the two states:

[0074] current1=abs(OFF_AD_VALUE_1-ON_AD_VAULE_1)*VDD / FULL_SCALE / RES[RES_IDX_1];

[0075] current2=abs(OFF_AD_VALUE_2-ON_AD_VAULE_2)*VDD / FULL_SCALE / RES[RES_IDX_2];

[0076] S6. Compare current1 and current2 with a threshold value (the threshold value can be determined by the photoelectric sensor used and the required accuracy, and is set to 0.15 mA in this example) to determine whether the object to be detected exists.

[0077] S7, a new detection, repeating S1 to S6 to determine whether the object to be detected in a new cycle exists.

[0078] It should be noted that according to the dynamic detection method based on the photoelectric sensor of the embodiment of the present invention, the photoelectric transmitting tube is first controlled to be powered off, and the multiple sensitivity gears of the photoelectric receiving tube are controlled in sequence according to the arrangement and combination mode to work, so as to obtain the power-off output value and the corresponding resistance value of the photoelectric receiving tube corresponding to each arrangement and combination mode; then the power-off output values ​​of the photoelectric receiving tube corresponding to each arrangement and combination mode are sorted, and the optimal amplification area is calculated according to the sorted two power-off output values; then, the corresponding first power-off output value and the second power-off output value and the first resistance value and the second power-off output value corresponding to the first power-off output value are obtained according to the optimal amplification area. The first resistance value corresponding to the first resistance value is obtained; the photoelectric transmitting tube is then controlled to be powered on, and the photoelectric receiving tube is controlled to work in sequence according to the arrangement and combination mode corresponding to the first resistance value and the second resistance value, so as to obtain the first power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the first resistance value and the second power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the second resistance value; the first judgment value is then calculated according to the first power-on output value and the first power-off output value, and the second judgment value is calculated according to the second power-on output value and the second power-off output value; finally, the existence of the object to be detected is judged according to the first judgment value, the second judgment value and the preset threshold value; thus, by changing the sensitivity of the photoelectric receiving tube, the adaptability range of the photoelectric sensor is improved to adapt to various dynamically changing consumables and external environments.

[0079] in addition, Figure 3 is a block diagram of a dynamic detection device based on a photoelectric sensor according to an embodiment of the present invention; Figure 3 As shown, the dynamic detection device based on the photoelectric sensor according to the embodiment of the present invention includes: a power on / off control module 201 , a selection control module 202 , a calculation module 203 , an acquisition module 204 and a judgment module 205 .

[0080] Among them, the photoelectric sensor is set corresponding to the object to be detected, the photoelectric sensor includes a photoelectric transmitting tube and a photoelectric receiving tube with multiple adjustable sensitivity gears, the power on and off control module 201 is used to control the power on and off of the photoelectric transmitting tube; the selection control module 202 is used to control the multiple sensitivity gears of the photoelectric receiving tube to work according to the arrangement and combination mode; the calculation module 203 is used to sort the power-off output values ​​of the photoelectric receiving tube corresponding to each arrangement and combination mode, and calculate the optimal amplification area according to the sorted two power-off output values; the acquisition module 204 is used to obtain the power-on output value, power-off output value and corresponding resistance value of the photoelectric receiving tube corresponding to each arrangement and combination mode; the judgment module 205 is used to judge whether the object to be detected exists according to the power-on output value, power-off output value and corresponding resistance value corresponding to the optimal amplification area.

[0081] It should be noted that the above Figure 1The examples of the embodiment are also applicable to the dynamic detection device based on the photoelectric sensor of this embodiment, and will not be described in detail here.

[0082] In summary, according to the dynamic detection device based on the photoelectric sensor of the embodiment of the present invention, the power-on and power-off control module is used to control the power-off of the photoelectric transmitting tube, and the multiple sensitivity gears of the photoelectric receiving tube are controlled to work according to the arrangement and combination mode by the selection control module, so as to obtain the power-off output value and the corresponding resistance value of the photoelectric receiving tube corresponding to each arrangement and combination mode, and then the power-off output value of the photoelectric receiving tube corresponding to each arrangement and combination mode is sorted by the calculation module, and the optimal amplification area is calculated according to the sorted two power-off output values, and then the first power-off output value and the second power-off output value corresponding to the optimal amplification area and the first resistance value corresponding to the first power-off output value and the second resistance value corresponding to the second power-off output value are obtained by the acquisition module, and then the power-on and power-off control module is used to control the power-on of the photoelectric transmitting tube, and the photoelectric receiving tube is controlled to work in sequence according to the arrangement and combination mode corresponding to the first resistance value and the second resistance value by the selection control module. The first power-on output value of the photoelectric receiving tube in the arrangement and combination mode corresponding to the first resistance value and the second power-on output value of the photoelectric receiving tube in the arrangement and combination mode corresponding to the second resistance value are obtained by an acquisition module, and finally a first judgment value is calculated according to the first power-on output value and the first power-off output value by a calculation module, and a second judgment value is calculated according to the second power-on output value and the second power-off output value, so that the judgment module judges whether the object to be detected exists according to the first judgment value, the second judgment value and the preset threshold value; thereby, by changing the sensitivity of the photoelectric receiving tube, the adaptability range of the photoelectric sensor is improved to adapt to various dynamically changing consumables and external environments.

[0083] In addition, if Figure 4 As shown, the embodiment of the present invention further proposes a printing device 1000, including the above-mentioned dynamic detection device 100 based on the photoelectric sensor.

[0084] According to the printing device of the embodiment of the present invention, the sensitivity of the photoelectric receiving tube is changed by the above-mentioned dynamic detection device based on the photoelectric sensor, thereby improving the adaptability range of the photoelectric sensor to adapt to various dynamically changing consumables and external environments, thereby improving the accuracy of detection.

[0085] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0086] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0087] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0089] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0090] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0091] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

[0092] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0093] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0094] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0095] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms should not be understood as necessarily referring to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0096] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A dynamic detection method based on photoelectric sensor, It is characterized in that The photoelectric sensor is arranged corresponding to the object to be detected, and the photoelectric sensor includes a photoelectric transmitting tube and a photoelectric receiving tube with multiple adjustable sensitivity levels. The dynamic detection method includes the following steps: Controlling the photoelectric transmitting tube to be powered off, and sequentially controlling the multiple sensitivity gears of the photoelectric receiving tube to work according to the arrangement and combination mode, so as to obtain the power-off output value of the photoelectric receiving tube corresponding to each arrangement and combination mode; Sorting the power-off output values ​​of the photoelectric receiving tubes corresponding to each arrangement and combination, and calculating the best amplification area according to the sorted power-off output values ​​separated by two; Acquire a first power-off output value and a second power-off output value corresponding to the optimal amplification region, as well as a first resistance value corresponding to the first power-off output value and a second resistance value corresponding to the second power-off output value; Controlling the photoelectric transmitting tube to be powered on, and controlling the photoelectric receiving tube to work in sequence according to the arrangement and combination mode corresponding to the first resistance value and the second resistance value, so as to obtain a first power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the first resistance value and a second power-on output value of the photoelectric receiving tube under the arrangement and combination mode corresponding to the second resistance value; Calculating a first judgment value according to the first power-on output value and the first power-off output value, and calculating a second judgment value according to the second power-on output value and the second power-off output value; Determine whether the object to be detected exists according to the first judgment value, the second judgment value and a preset threshold; The arrangement and combination of the multiple sensitivity levels of the photoelectric receiving tube is calculated according to the following formula: There are n sensitivity levels in total. According to the above arrangement and combination method, the n sensitivity levels can be combined into C types in total; n and C are positive integers greater than zero; The power-off output values ​​of the photoelectric receiving tubes corresponding to each arrangement and combination are sorted, including: Sorting the power-off output values ​​of the photoelectric receiving tubes corresponding to each arrangement and combination from large to small or from small to large; The optimal amplification area is calculated according to the sorted two power-off output values, including: Calculate the corresponding slope value according to the sorted two power-off output values; The maximum slope value among all the slope values ​​is obtained to find the corresponding optimal amplification area according to the maximum slope value.

2. The dynamic detection method based on a photoelectric sensor as claimed in claim 1, It is characterized in that When the photoelectric emitting tube is controlled to be powered on, the luminous intensity of the photoelectric emitting tube is also set to the maximum luminous intensity.

3. The dynamic detection method based on photoelectric sensor as claimed in claim 1, It is characterized in that The first judgment value and the second judgment value are calculated by the following formula: IERROR=abs(Voff-Von) / RES Wherein, RES is the gear resistance value, Voff is the power-off output value of the photoelectric receiving tube when the photoelectric transmitting tube is powered off; Von is the power-on output value of the photoelectric receiving tube when the photoelectric transmitting tube is powered on.

4. The dynamic detection method based on a photoelectric sensor as claimed in claim 1, It is characterized in that Judging whether the object to be detected exists according to the first judgment value, the second judgment value and a preset threshold value includes: When the photoelectric transmitting tube and the photoelectric receiving tube are arranged on the same side, if any one of the first judgment value and the second judgment value is greater than a preset threshold, it is determined that the object to be detected exists; otherwise, it is determined that the object to be detected does not exist.

5. The dynamic detection method based on photoelectric sensor as claimed in claim 1, It is characterized in that Judging whether the object to be detected exists according to the first judgment value, the second judgment value and a preset threshold value includes: When the photoelectric transmitting tube and the photoelectric receiving tube are arranged on different sides, if any one of the first judgment value and the second judgment value is smaller than a preset threshold, it is judged that the object to be detected exists; otherwise, it is judged that the object to be detected does not exist.

6. The dynamic detection method based on a photoelectric sensor as claimed in any one of claims 4 or 5, It is characterized in that The preset threshold is determined by the photoelectric sensor and the required accuracy.

7. A dynamic detection device based on photoelectric sensor, It is characterized in that The photoelectric sensor is arranged corresponding to the object to be detected, and the photoelectric sensor includes a photoelectric transmitting tube and a photoelectric receiving tube with multiple adjustable sensitivity levels. The dynamic detection device includes: A power on / off control module, used for controlling the power on and off of the photoelectric transmitting tube; A selection control module is used to control the photoelectric receiving tube to work at multiple sensitivity levels according to the arrangement and combination mode; A calculation module, used for sorting the power-off output values ​​of the photoelectric receiving tubes corresponding to each arrangement and combination, and calculating the best amplification area according to the sorted power-off output values ​​separated by two power-off output values; An acquisition module, used for acquiring the power-on output value, power-off output value and corresponding resistance value of the photoelectric receiving tube corresponding to each arrangement and combination mode; A judgment module, used for judging whether the object to be detected exists according to the power-on output value, the power-off output value and the corresponding resistance value corresponding to the optimal amplification area; The arrangement and combination of the multiple sensitivity levels of the photoelectric receiving tube is calculated according to the following formula: There are n sensitivity levels in total. According to the above arrangement and combination method, the n sensitivity levels can be combined into C types in total; n and C are positive integers greater than zero; The power-off output values ​​of the photoelectric receiving tubes corresponding to each arrangement and combination are sorted, including: Sorting the power-off output values ​​of the photoelectric receiving tubes corresponding to each arrangement and combination from large to small or from small to large; The optimal amplification area is calculated according to the sorted two power-off output values, including: Calculate the corresponding slope value according to the sorted two power-off output values; The maximum slope value among all the slope values ​​is obtained to find the corresponding optimal amplification area according to the maximum slope value.

8. A printing device, It is characterized in that It comprises a dynamic detection device based on a photoelectric sensor as described in claim 7.

Citation Information

Patent Citations

  • Photosensor system and drive control method thereof

    US20020085109A1