An adaptive photoelectric signal acquisition circuit and signal acquisition method
Patent Information
- Application Number
- CN202211343669.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-10-31
AI Technical Summary
[0005]本发明所要解决的技术问题:目前缺乏低成本高准确度的流体计量取信装置的技术问题
[0033]本发明的有益技术效果包括:通过反射轮结合红外发射接收装置,实现流体计量表计旋转件的检测取信,不存在接触式的机械结构,元器件数量少,降低了取信电路的成本;通过自适应光电取信方法,借助软件自适应调节,有效消除了硬件产生的误差,提高了取信准确度;借助自适应取信周期T调节,降低了取信过程的功耗。
Smart Images

Figure CN115900867B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fluid metering technology, specifically to an adaptive photoelectric signal acquisition circuit and signal acquisition method. Background Technology
[0002] Currently, the commonly used metering and data acquisition methods for gas meters mainly include dual reed switches, dual Hall effect sensors, and photoelectric sensing. Among these, dual reed switches and dual Hall effect sensors use pulse-type sensing, and the current resolution is generally around 10L. Photoelectric direct reading is based on a mechanical digit wheel, and none of the above methods can eliminate the mechanical digit wheel. For diaphragm gas meters to achieve a mechanical digit wheel-free operation, a resolution of 0.2L or higher is required.
[0003] For example, the applicant's earlier patent application, publication number CN111854877A, disclosed a light signal sampling device and processing method for a diaphragm gas meter. It uses photoelectric signal acquisition to achieve gas metering. However, the described technical solution has the following problems: 1. Complex circuitry and a large number of components lead to high costs; 2. Signal fluctuations can easily cause false counting, especially at low flow rates, resulting in inaccurate measurement; 3. It is sensitive to the distance between the photosensitive element and the rotating disk, requiring high assembly consistency.
[0004] Therefore, it remains necessary to research new, low-cost, and highly accurate sampling and data acquisition techniques suitable for fluid measurement. Summary of the Invention
[0005] The technical problem this invention aims to solve is the current lack of low-cost, high-accuracy fluid metering and signal acquisition devices. This invention proposes an adaptive photoelectric signal acquisition circuit and method, reducing the number of components and offering an improved method, thereby achieving both reduced device cost and increased accuracy.
[0006] To solve the above technical problems, the present invention adopts the following technical solution: an adaptive photoelectric signal acquisition circuit for detecting and acquiring the rotation angle of a rotating component, comprising a reflective wheel, an infrared transmitting and receiving circuit, and an MCU.
[0007] The reflector wheel is driven to rotate by the rotating component. The end face of the reflector wheel has alternating color blocks. The infrared transmitting and receiving circuit includes a control line CON, an infrared emitting tube IR2, an infrared receiving tube IR1, an infrared receiving tube IR3, a current-limiting resistor R1, and capacitors C1 and C2. The infrared emitting tube IR2 emits infrared light towards the end face of the reflector wheel. The infrared receiving tubes IR1 and IR3 face the end face of the reflector wheel at a preset angle. The anode of the infrared emitting tube IR2, the cathode of the infrared receiving tube IR1, and the cathode of the infrared receiving tube IR3 are all connected to the control line CON. The control line CON is connected to the MCU. The cathode of the infrared emitting tube IR2 is grounded through resistor R1. The anode of the infrared receiving tube IR1 is grounded through capacitor C1. The anode of the infrared receiving tube IR3 is grounded through capacitor C2. The anode of the infrared receiving tube IR1 is connected to the sampling pin of the MCU as the first sampling point AD1. The anode of the infrared receiving tube IR3 is connected to the sampling pin of the MCU as the second sampling point AD2.
[0008] Preferably, the infrared receiving tubes IR1 and IR3 are distributed at a predetermined angle on both sides of the infrared emitting tube IR2.
[0009] Preferably, the reflector wheel end face is evenly distributed with two color blocks, and the included angle between the infrared receiver tube IR1 and the infrared receiver tube IR3 matches the central angle occupied by the color blocks.
[0010] Preferably, the reflector wheel end face has black and white blocks evenly and alternately distributed.
[0011] Preferably, the control line CON is connected to the IO pin of the MCU, and the first sampling point AD1 and the second sampling point AD2 are respectively connected to the two AD sampling pins of the MCU.
[0012] An adaptive photoelectric signal acquisition method, executed in an MCU of an adaptive photoelectric signal acquisition circuit as described above, includes the following steps:
[0013] Set the retrieval period T and retrieval duration t, where T>t;
[0014] Set a high-level threshold U0. If the voltage detection value is greater than the threshold U0+Δu, the sampling value is 1. Otherwise, if the voltage detection value is greater than the threshold U0, the sampling value is 0. If the voltage detection value is between U0 and U0+Δu, the sampling value is the previous sampling value, where Δu is a preset value.
[0015] Perform the following steps over a trust period T:
[0016] At the beginning of period T, the control line CON is set to high level;
[0017] When the signal acquisition time t is reached, the MCU reads the voltage detection value U1 of the first sampling point AD1 and the voltage detection value U2 of the second sampling point AD2;
[0018] Obtain the current signal acquisition result (W1, W2), where W1 is the sampled value corresponding to the first sampling point AD1 and W2 is the sampled value corresponding to the second sampling point AD2;
[0019] The control line CON is kept low until the end of the current signaling cycle T.
[0020] Preferably, the method also includes an adaptive adjustment of the confidence period T, wherein after executing several confidence periods T, the adaptive adjustment of the confidence period T is performed once. The adaptive adjustment of the confidence period T includes:
[0021] The number of consecutive credit periods T with the same credit results is counted and recorded as the count value;
[0022] If the count value exceeds the preset upper threshold, the signal retrieval period T is increased; if the count value is lower than the preset lower threshold, the signal retrieval period T is decreased.
[0023] Preferably, if the confidence result of two consecutive confidence periods T changes from (0,0) to (1,1), then the confidence period T is directly adjusted to the preset minimum value T0.
[0024] Preferably, an adaptive threshold adjustment method is also included, wherein the adaptive threshold adjustment method is executed once after several confidence periods T, and the adaptive threshold adjustment method includes:
[0025] If the number of state changes of the confidence result (W1,W2) from (0,0) to (0,1) is greater than the number of state changes from (1,1) to (1,0), and the difference exceeds the preset threshold, then the threshold U0 corresponding to the first sampling point AD1 will be increased.
[0026] If the number of state changes of the confidence result (W1,W2) from (0,0) to (0,1) is less than the number of state changes from (1,1) to (1,0), and the difference exceeds the preset threshold, then the threshold U0 corresponding to the first sampling point AD1 will be lowered.
[0027] If the number of state changes from (0,1) to (1,1) in the confidence result (W1,W2) is greater than the number of state changes from (1,0) to (0,0), then the threshold U0 corresponding to the second sampling point AD2 will be increased.
[0028] If the number of state changes from (0,1) to (1,1) in the confidence result (W1,W2) is less than the number of state changes from (1,0) to (0,0), then the threshold U0 corresponding to the second sampling point AD2 will be lowered.
[0029] Preferably, the method also includes adaptive adjustment of the signal acquisition duration t, wherein after executing several signal acquisition cycles T, the adaptive adjustment of the signal acquisition duration t is performed once. The adaptive adjustment of the signal acquisition duration t includes:
[0030] Record the maximum and minimum values of voltage detection values U1 and U2 collected in each signal acquisition cycle, and use them as the maximum and minimum voltage values of the signal acquisition cycle, respectively.
[0031] If the maximum and minimum voltage values for a number of consecutive signaling periods T are less than the first and second preset reference values, respectively, then the signaling duration t is increased.
[0032] If the maximum and minimum voltage values for a consecutive preset signaling period T are greater than the third preset reference value and the fourth preset reference value, respectively, then the signaling duration t is reduced. The third preset reference value is greater than the first preset reference value, and the fourth preset reference value is greater than the second preset reference value.
[0033] The beneficial technical effects of this invention include: by combining a reflector wheel with an infrared transmitting and receiving device, the detection and signal acquisition of the rotating part of the fluid meter is realized, eliminating the need for contact-type mechanical structures, reducing the number of components, and lowering the cost of the signal acquisition circuit; by using an adaptive photoelectric signal acquisition method and software adaptive adjustment, hardware-generated errors are effectively eliminated, improving signal acquisition accuracy; and by adjusting the adaptive signal acquisition period T, the power consumption of the signal acquisition process is reduced.
[0034] Other features and advantages of the present invention will be disclosed in detail in the following detailed description and accompanying drawings. Attached Figure Description
[0035] The invention will be further described below with reference to the accompanying drawings:
[0036] Figure 1 This is a schematic diagram of the photoelectric signal acquisition circuit structure in an embodiment of the present invention.
[0037] Figure 2 This is a schematic diagram of the photoelectric signal acquisition circuit in an embodiment of the present invention.
[0038] Figure 3 This is a schematic diagram of the sampling values of the electrical signal acquisition circuit in an embodiment of the present invention.
[0039] Figure 4 This is a schematic diagram of the photoelectric signal acquisition method according to an embodiment of the present invention.
[0040] Figure 5 This is a schematic diagram of the adaptive adjustment of the signal acquisition time t method according to an embodiment of the present invention.
[0041] Figure 6 A schematic diagram showing the addition of a signal acquisition time t in an embodiment of the present invention.
[0042] Figure 7 This is a schematic diagram illustrating the reduction of signal acquisition time t in an embodiment of the present invention.
[0043] Among them: 10. Reflecting wheel. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be explained and described below with reference to the accompanying drawings. However, the following embodiments are only preferred embodiments of the present invention and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments in the implementation methods without creative effort are all within the protection scope of the present invention.
[0045] In the following description, terms such as “inner,” “outer,” “upper,” “lower,” “left,” and “right” are used only to indicate orientation or positional relationship for the convenience of describing the embodiments and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention.
[0046] An adaptive photoelectric signal acquisition circuit is used for detecting and acquiring the rotation angle of a rotating component. Please refer to the attached document. Figure 1 The system includes a reflector wheel 10, an infrared transmitting and receiving circuit, and an MCU. The reflector wheel 10 is driven to rotate by a rotating component. The end face of the reflector wheel 10 has alternating colored blocks. The infrared transmitting and receiving circuit includes a control line CON, an infrared emitting tube IR2, an infrared receiving tube IR1, an infrared receiving tube IR3, a current-limiting resistor R1, and capacitors C1 and C2. The infrared emitting tube IR2 emits infrared light towards the end face of the reflector wheel 10, and the infrared receiving tubes IR1 and IR3 are at a preset angle towards the end face of the reflector wheel 10. Please refer to the appendix. Figure 2 The anode of infrared emitting diode IR2, the cathode of infrared receiving diode IR1, and the cathode of infrared receiving diode IR3 are all connected to the control line CON, which is connected to the MCU. The cathode of infrared emitting diode IR2 is grounded through resistor R1, the anode of infrared receiving diode IR1 is grounded through capacitor C1, and the anode of infrared receiving diode IR3 is grounded through capacitor C2. The anode of infrared receiving diode IR1 serves as the first sampling point AD1 and is connected to the sampling pin of the MCU, and the anode of infrared receiving diode IR3 serves as the first sampling point AD2 and is connected to the sampling pin of the MCU. The control line CON is connected to the MCU's I / O pin, and the first sampling point AD1 and the second sampling point AD2 are respectively connected to the two AD sampling pins of the MCU.
[0047] Infrared receivers IR1 and IR3 are positioned at a predetermined angle on either side of infrared emitter IR2. Two color blocks are evenly distributed alternately on the end face of reflector 10, with the angle between IR1 and IR3 matching the central angle occupied by each color block. The optimal color block combination is a mix of black and white blocks. A combination of red and black blocks can also be used.
[0048] The working process of the photoelectric signal acquisition circuit described in this embodiment is as follows: When no signal is acquired, the pins connected to CON, AD1 and AD2 are all configured to output low level, the infrared emitting tube IR2 does not emit light, the capacitors C1 and C2 are not charged and the voltage at both ends is 0, and the entire circuit consumes no current.
[0049] When signal acquisition is required, the pins connected to AD1 and AD2 are configured as analog inputs, and CON is configured to output a high level. At this time, the infrared emitting tube IR2 emits light, and the infrared receiving tubes IR1 and IR3 receive infrared light of different intensities reflected by the reflecting wheel 10, presenting different impedances. The energy storage capacitors C1 and C2 are charged through the infrared receiving tubes IR1 and IR3, respectively.
[0050] After a delay of a certain period, i.e., the signal acquisition time t, the MCU starts the AD conversion to acquire the voltage of energy storage capacitors C1 and C2. After the acquisition is completed, the pins connected to CON, AD1, and AD2 are immediately configured to low level to avoid further current consumption. At the same time, capacitors C1 and C2 are discharged through infrared emitting diode IR2, and the voltage across them gradually decreases to 0, preparing for the next acquisition.
[0051] This embodiment describes a photoelectric signal acquisition circuit. By analyzing the results of multiple signal acquisitions, the rotation angle detection result of the rotating component is obtained.
[0052] Please see the appendix Figure 3Specifically, when the white area of the reflector wheel 10 is directly facing the infrared emitting tube IR2, the reflected infrared light received by the two infrared receiving tubes IR1 and IR3 is relatively strong, the energy storage capacitors C1 and C2 charge quickly, and the voltages collected by AD1 and AD2 are both greater than the threshold U0 + Δu. The signal acquisition results of AD1 and AD2 are 11. As the reflector wheel 10 continues to rotate, the black area below the infrared receiving tube IR1 decreases, the white area increases, the received reflected infrared light strengthens, the charging speed of the energy storage capacitor C1 accelerates, the white area below the infrared receiving tube IR3 decreases, the black area increases, the received reflected infrared light weakens, the charging speed of the energy storage capacitor C2 slows down, the voltage collected by AD1 is greater than the threshold U0 + Δu, and the voltage collected by AD2 is lower than the threshold U0. The signal acquisition result is 11. 10; The reflector wheel 10 continues to rotate. At this time, the black area is directly facing the infrared emitting tube IR2. The reflected infrared light received by the two infrared receiving tubes IR1 and IR3 is weak. The energy storage capacitors C1 and C2 charge slowly. The voltages collected by the AD1 and AD2 channels are both less than the threshold U0, and the signal acquisition result is 00. The reflector wheel 10 continues to rotate. The black area below the infrared receiving tube IR1 increases and the white area decreases. The received reflected infrared light weakens, and the energy storage capacitor C1 charges slowly. The white area below the infrared receiving tube IR3 increases and the black area decreases. The received reflected infrared light strengthens, and the energy storage capacitor C2 charges quickly. The voltage collected by the AD1 channel is lower than the threshold U0, and the voltage collected by the AD2 channel is higher than the threshold U0 + Δu. The signal acquisition result is 01.
[0053] Through the above technical solution, this embodiment achieves fluid metering accuracy with simple components. The hardware used has no contact moving parts, which has the advantages of stable operation and low cost.
[0054] On the other hand, this embodiment also provides a supporting control method for the signal acquisition circuit, further improving the accuracy of signal acquisition. Specifically, this embodiment provides an adaptive photoelectric signal acquisition method, executed in an MCU of an adaptive photoelectric signal acquisition circuit as described above. Please refer to the appendix. Figure 4 This includes the following steps:
[0055] Step A01) Set the retrieval period T and retrieval duration t, where T > t;
[0056] Step A02) Set the high-level threshold U0+△u. If the voltage detection value is greater than the threshold U0, the sampling value is 1. Otherwise, if the voltage detection value is greater than the threshold U0, the sampling value is 0. If the voltage detection value is between U0 and U0+△u, the sampling value is the previous sampling value. △u is a preset value.
[0057] Perform the following steps over a trust period T:
[0058] Step A03) At the beginning of period T, the control line CON is set to high level;
[0059] Step A04) When the signal acquisition time t is reached, the MCU reads the voltage detection value U1 of the first sampling point AD1 and the voltage detection value U2 of the second sampling point AD2;
[0060] Step A05) Obtain the current signal acquisition result (W1, W2), where W1 is the sampled value corresponding to the first sampling point AD1 and W2 is the sampled value corresponding to the second sampling point AD2;
[0061] Step A06) Set the control line CON to low level until the end of this signaling cycle T.
[0062] In this embodiment, multiple samples are taken for the same color block to improve the accuracy of signal acquisition. That is, the signal acquisition period T is sufficiently smaller than the rotation period of the reflector wheel 10. Several signal acquisition results are collected for each color block. When the signal acquisition result changes, it indicates that the rotating component has rotated by the angle corresponding to one color block. For example, the moment the signal acquisition result changes from (0,0) to (1,0) is recorded as the starting moment. When the signal acquisition result changes from (1,0) to (1,1), it indicates that both infrared receivers are under the same color block. After a period of time, the time interval between the moment the signal acquisition result changes from (1,1) to (0,1) and the starting moment represents the time taken for the rotating component to rotate by the angle corresponding to one color block. The sum of the times for all color blocks is the time taken for the rotating component to rotate one revolution.
[0063] On the other hand, this embodiment also provides an adaptive credit acquisition period T adjustment method. After executing several credit acquisition periods T, the adaptive credit acquisition period T adjustment method is executed once. The adaptive credit acquisition period T adjustment method includes: counting the number of consecutive credit acquisition periods T with the same credit acquisition result, and recording it as a count value; if the count value exceeds a preset upper threshold, the credit acquisition period T is increased; if the count value is lower than a preset lower threshold, the credit acquisition period T is decreased.
[0064] Set the preset upper threshold to 5. After executing 10 signal retrieval cycles T, execute an adaptive signal retrieval cycle T adjustment method once.
[0065] If the signal retrieval result is 1 for the first 6 retrieval cycles, the count is 6. The retrieval cycle T is then increased. If there are 4 consecutive retrieval cycles with a signal retrieval result of 1, the count is 4, and the retrieval cycle T is then decreased. Only when the number of retrieval cycles T with a consecutive signal retrieval result of 1 is exactly 5, the retrieval cycle T is maintained. At this point, the number of consecutive retrieval cycles with a signal retrieval result of 0 is also exactly 5.
[0066] When each signal acquisition result appears consecutively a large number of times, it indicates that the sampling frequency is too high. In this case, the sampling rate should be reduced to decrease power consumption. When the signal acquisition result appears consecutively a small number of times, it indicates that the sampling frequency is too low. The sampling frequency should be increased.
[0067] If the sampling result changes from (0,0) to (1,1) for two consecutive sampling periods T, then directly adjust the sampling period T to the preset minimum value T0. When a jump occurs, such as from 00 to 11, it indicates a rapid increase in traffic. In this case, directly adjust the sampling rate to the maximum, and the total count will not be incorrect.
[0068] To prevent sampling jitter, this embodiment sets a high-level threshold range, which is (U0, U0+Δu). When the voltage detection value is higher than U0+Δu, the sampling value is 1. If the voltage detection value is lower than U0 again, the sampling value is 0. If the voltage detection value is still within the threshold range when it is read again, the sampling value is the previous sampling value.
[0069] On the other hand, this embodiment also provides a method for adaptively adjusting the signal acquisition duration t. After executing several signal acquisition cycles T, the method for adaptively adjusting the signal acquisition duration t is executed once. Please refer to the appendix. Figure 5 Methods for adaptively adjusting the signal acquisition duration t include:
[0070] Step B01) Record the maximum and minimum values of the voltage detection values U1 and U2 collected in each signal acquisition cycle, and use them as the maximum and minimum voltage values of the signal acquisition cycle, respectively.
[0071] Step B02) If the maximum and minimum voltage values of a series of consecutive signal acquisition periods T are less than the first preset reference value and the second preset reference value, then increase the signal acquisition time t.
[0072] Step B03) If the maximum and minimum voltage values of a consecutive preset signaling period T are greater than the third preset reference value and the fourth preset reference value, respectively, then reduce the signaling duration t, wherein the third preset reference value is greater than the first preset reference value and the fourth preset reference value is greater than the second preset reference value.
[0073] Please see the appendix Figure 6 Increasing the signal acquisition time t increases the charging time of capacitors C1 and C2, thus increasing the voltage detection values U1 and U2. (See attached diagram.) Figure 6 In the middle, U1 increases to U1', and U2 increases to U2'.
[0074] Please see the appendix Figure 7 When the signal acquisition time t is reduced, the charging time of capacitors C1 and C2 is reduced, resulting in a decrease in the voltage detection values U1 and U2. (See attached...) Figure 7In the middle, U1 decreases to U1', and U2 decreases to U2'.
[0075] When the maximum values of voltage detection values U1 and U2 are small, the signal acquisition time t is increased; conversely, the sampling delay t is decreased.
[0076] On the other hand, this embodiment also provides an adaptive adjustment scheme for thresholds U0 and Δu. When the acquired signal results show a significantly greater change from 00 to 01 than from 11 to 10, it indicates that the low-level time of AD1 is longer than the high-level time, and the threshold U0 corresponding to AD1 is increased; when the acquired 00 to 01 state changes are significantly less than the 11 to 10 state changes, it indicates that the low-level time of AD1 is shorter than the high-level time, and the threshold U0 corresponding to AD1 is decreased; when the acquired 01 to 11 state changes are significantly more than the 10 to 00 state changes, it indicates that the high-level time of AD2 channel is longer than the low-level time, and the threshold U0 corresponding to AD2 is increased; when the acquired 01 to 11 state changes are significantly less than the 10 to 00 state changes, it indicates that the low-level time of AD2 is longer than the high-level time, and the threshold U0 corresponding to AD2 is decreased.
[0077] The beneficial technical effects of this embodiment include: by combining the reflector wheel 10 with the infrared transmitting and receiving device, the detection and signal acquisition of the rotating part of the fluid meter is realized, the number of components is small, and the cost of the signal acquisition circuit is reduced; by using the adaptive photoelectric signal acquisition method, the error generated by the hardware is effectively eliminated and the signal acquisition accuracy is improved by using software adaptive adjustment; by using the adaptive signal acquisition period T adjustment, the power consumption of the signal acquisition process is reduced while achieving high resolution.
[0078] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Those skilled in the art should understand that the present invention includes, but is not limited to, the contents described in the accompanying drawings and the specific embodiments above. Any modifications that do not depart from the functional and structural principles of the present invention will be included within the scope of the claims.
Claims
1. An adaptive opto-electronic detection method, characterized in that, The signal acquisition method is executed in an MCU with an adaptive photoelectric signal acquisition circuit; The adaptive photoelectric signal acquisition circuit includes a reflector wheel, an infrared transmitting and receiving circuit, and an MCU. The reflector wheel is driven to rotate by a rotating component, and the end face of the reflector wheel has alternating colored blocks. The infrared transmitting and receiving circuit includes a control line CON, an infrared emitting tube IR2, an infrared receiving tube IR1, an infrared receiving tube IR3, a current-limiting resistor R1, and capacitors C1 and C2. The infrared emitting tube IR2 emits infrared light towards the end face of the reflector wheel, and the infrared receiving tubes IR1 and IR3 face the end face of the reflector wheel at a preset angle. The anode of the infrared emitting tube IR2, the cathode of the infrared receiving tube IR1, and the cathode of the infrared receiving tube IR3 are all connected to the control line CON, which is connected to the MCU. The cathode of the infrared emitting tube IR2 is grounded through resistor R1, the anode of the infrared receiving tube IR1 is grounded through capacitor C1, and the anode of the infrared receiving tube IR3 is grounded through capacitor C2. The anode of the infrared receiving tube IR1 is connected to the sampling pin of the MCU as the first sampling point AD1, and the anode of the infrared receiving tube IR3 is connected to the sampling pin of the MCU as the second sampling point AD2. The trust acquisition method includes the following steps: Set the retrieval period T and retrieval duration t, where T>t; Set a high-level threshold U0. If the voltage detection value is greater than the threshold U0+Δu, the sample value is 1. If the voltage detection value is less than the threshold U0, the sample value is 0. If the voltage detection value is between U0 and U0+Δu, the sample value is the previous sample value. Δu is a preset value. Perform the following steps over a trust period T: At the beginning of period T, the control line CON is set to high level; When the signal acquisition time t is reached, the MCU reads the voltage detection value U1 of the first sampling point AD1 and the voltage detection value U2 of the second sampling point AD2; Obtain the current signal acquisition result (W1, W2), where W1 is the sampled value corresponding to the first sampling point AD1 and W2 is the sampled value corresponding to the second sampling point AD2; The control line CON is kept low until the end of the current signaling cycle T. The method further includes an adaptive threshold adjustment method, which is performed once after several confidence periods T. The adaptive threshold adjustment method includes: If the number of state changes of the confidence result (W1,W2) from (0,0) to (0,1) is greater than the number of state changes from (1,1) to (1,0), and the difference exceeds the preset threshold, then the threshold U0 corresponding to the first sampling point AD1 will be increased. If the number of state changes of the confidence result (W1,W2) from (0,0) to (0,1) is less than the number of state changes from (1,1) to (1,0), and the difference exceeds the preset threshold, then the threshold U0 corresponding to the first sampling point AD1 will be lowered. If the number of state changes from (0,1) to (1,1) in the confidence result (W1,W2) is greater than the number of state changes from (1,0) to (0,0), then the threshold U0 corresponding to the second sampling point AD2 will be increased. If the number of state changes from (0,1) to (1,1) in the confidence result (W1,W2) is less than the number of state changes from (1,0) to (0,0), then the threshold U0 corresponding to the second sampling point AD2 will be lowered.
2. The adaptive photoelectric signal acquisition method according to claim 1, characterized in that, It also includes a method for adaptively adjusting the signal retrieval period T. After executing several signal retrieval periods T, the method for adaptively adjusting the signal retrieval period T is executed once. The method for adaptively adjusting the signal retrieval period T includes: The number of consecutive credit periods T with the same credit results is counted and recorded as the count value; If the count value exceeds the preset upper threshold, the signal retrieval period T is increased; if the count value is lower than the preset lower threshold, the signal retrieval period T is decreased.
3. The adaptive photoelectric signal acquisition method according to claim 1, characterized in that, If the crediting result changes from (0,0) to (1,1) for two consecutive crediting periods T, then the crediting period T is directly adjusted to the preset minimum value T0.
4. The adaptive photoelectric signal acquisition method according to claim 1, characterized in that, It also includes a method for adaptively adjusting the signal retrieval duration t. After executing several signal retrieval cycles T, the method for adaptively adjusting the signal retrieval duration t is executed once. The method for adaptively adjusting the signal retrieval duration t includes: Record the maximum and minimum values of voltage detection values U1 and U2 collected in each signal acquisition cycle, and use them as the maximum and minimum voltage values of the signal acquisition cycle, respectively. If the maximum and minimum voltage values for a number of consecutive signaling periods T are less than the first and second preset reference values, respectively, then the signaling duration t is increased. If the maximum and minimum voltage values for a consecutive preset signaling period T are greater than the third preset reference value and the fourth preset reference value, respectively, then the signaling duration t is reduced. The third preset reference value is greater than the first preset reference value, and the fourth preset reference value is greater than the second preset reference value.
Citation Information
Patent Citations
Signal sampling treatment circuit
CN108490817A
Optical signal sampling device of diaphragm gas meter and processing method
CN111854877A
Gradient color turntable signal acquisition device, meter and signal acquisition method
CN113819961A