Switch position detection method and switch position detection device
By dynamically updating the measurement value threshold range and preset limit value detection of the switch position, the problem of inaccurate position detection caused by switch wear and error is solved, extending the service life of the switch detection system and improving reliability.
Patent Information
- Application Number
- CN201910883586.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-18
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2039-09-18
AI Technical Summary
In the prior art, switches are difficult to accurately detect positions due to wear and measurement errors, resulting in erroneous operation and a shortened life cycle.
By dynamically updating the switch position measurement threshold range, adjusting the high and low thresholds based on wear, and combining preset limit values with proximity detection, the measured value is ensured to be within the updated threshold range, extending the lifecycle of the switch detection system.
It can accurately detect the switch position under wear and error conditions, extend the service life of the switch detection system, and promptly alarm or stop operation when wear is serious, thereby improving the reliability and efficiency of the system.
Smart Images

Figure CN112526330B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of detection, and more particularly, to a switch position detection method and a switch position detection device. Background Art
[0002] Currently, the application market for switches is quite broad, and market demand is also expanding. Switches are widely used in various fields, such as ignition switches, light combination switches (including light control switches, fog light switches, turn signal switches), wiper and washer switches, air conditioning control switches, window control switches, and door control switches in the automotive field.
[0003] These switches typically have two or more positions (switch positions). By switching the switch between these positions, different operations can be controlled. For example, in the case of an air conditioning control switch, different positions correspond to different degrees of cooling / heating operation. Therefore, it is necessary to detect the switch position to determine the operation to be performed at that time. Summary of the Invention
[0004] According to one aspect of the present disclosure, a switch position detection method is provided, wherein the switch has M switch positions, and each switch position has a corresponding measurement value threshold range, the method comprising obtaining a measurement value of the switch; determining the switch position of the switch based on the measurement value and the measurement value threshold range corresponding to each of the M switch positions; and updating the measurement value threshold range corresponding to the determined switch position based on the measurement value; wherein M is an integer greater than or equal to 2, the measurement value threshold ranges of different switch positions do not overlap with each other, and the measurement value threshold range includes a high threshold and a low threshold.
[0005] In an embodiment of the present disclosure, the switch is a sliding switch, which includes a conductive slider and M gaskets. The conductive slider slides between different gaskets to perform switch switching, and the M gaskets correspond to the M switch positions.
[0006] In an embodiment of the present disclosure, determining the switch position of the switch based on the measurement value and the measurement value threshold range corresponding to each of the M switch positions includes: for each of the M switch positions, comparing the measurement value with the measurement value threshold range corresponding to the switch position; and determining that the switch is in the switch position if the measurement value is within the measurement value threshold range of the switch position.
[0007] In an embodiment of the present disclosure, as the number of switch switching times increases, the degree of wear of the switch at each switch position gradually increases, and for each switch position of the M switch positions, the measurement value when the switch is at that switch position also gradually increases as the degree of wear at that switch position increases; wherein, updating the measurement value threshold range corresponding to the determined switch position according to the measurement value includes: dynamically updating the high threshold and the low threshold of the measurement value threshold range corresponding to the determined switch position according to the gradually increasing measurement value when the switch is at the determined switch position, so that the corresponding high threshold and the low threshold increase as the degree of wear at that switch position increases.
[0008] In an embodiment of the present disclosure, the method further includes storing the measurement value as a historical measurement value of the determined switch position, wherein a measurement value fitting curve of the determined switch position is determined based on the measurement value and other historical measurement values of the determined switch position; a measurement value high threshold curve and a measurement value low threshold curve of the determined switch position are determined based on the measurement value fitting curve; and a high threshold and a low threshold of an updated measurement value threshold range corresponding to the switch position are determined based on the measurement value high threshold curve and the measurement value low threshold curve to determine the updated measurement value threshold range corresponding to the switch position.
[0009] In an embodiment of the present disclosure, for each of the M switch positions, as the degree of wear at the switch position increases, the measurement value fitting curve of the switch position also shows a gradually rising trend.
[0010] In an embodiment of the present disclosure, the method further includes: reporting an error when the measurement value is outside a measurement value threshold range corresponding to each of the M switch positions.
[0011] In an embodiment of the present disclosure, the method further includes: comparing the measured value with a preset limit value; and determining that the degree of wear of the switch is excessive when the measured value exceeds the preset limit value.
[0012] In an embodiment of the present disclosure, the method further includes: after updating the measurement value threshold range of the determined switch position, determining the degree of proximity between the updated measurement value threshold range and the measurement value threshold ranges of other switch positions; and when the degree of proximity is less than a preset degree of proximity, determining that the degree of wear of the switch is excessive.
[0013] According to another aspect of the present disclosure, a switch position detection device is provided, wherein the switch switches between M positions, and each switch position has a corresponding measurement value threshold range. The device includes: a measurement module configured to output measurement values belonging to different measurement value threshold ranges when the switch is in each position; and a controller configured to execute the above-mentioned switch position detection method.
[0014] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other purposes, features, and advantages of the present disclosure will become more apparent through a more detailed description of the embodiments of the present disclosure in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and are not intended to limit the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
[0016] Figures 1A-1B Schematically illustrates an example structure of a switch detection system according to an embodiment of the present disclosure;
[0017] Figure 2 Schematically shows the Figure 1B An example of switch wear in the switch detection system shown in the figure after multiple switching operations.
[0018] Figure 3 Schematically shows the Figure 1B In the switch detection system shown, a curve showing a change in a measurement value threshold range and a measurement value at a switch position of the switch as the number of switch switching increases;
[0019] Figures 4A-4B The following schematically shows a flow chart of a switch position detection method according to an embodiment of the present disclosure;
[0020] Figures 5A-5B A schematic curve schematically illustrates that, when the switch position detection method according to an embodiment of the present disclosure is used, the measurement value threshold range increases with the increase in the number of switch switching times, and the measurement value threshold ranges corresponding to two switch positions become increasingly close;
[0021] Figure 6 Schematically illustrates a curve showing a change in the measured value threshold range and the measured value at two switch positions as the number of switch switching increases when the switch position detection method according to an embodiment of the present disclosure is used; and
[0022] Figures 7A-7BThe diagram schematically illustrates a curve showing a change in the measured value threshold range and the measured value at two switch positions as the number of switching times increases when a further switch position detection method according to an embodiment of the present disclosure is adopted. DETAILED DESCRIPTION
[0023] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0024] Figures 1A-1B The structure of a switch detection system according to an embodiment of the present disclosure is schematically shown. Figure 2 Schematically shows the Figure 1B An example of switch wear in a switch detection system shown after numerous switching operations. Figure 3 Schematically shows the Figures 1A-1B In the switch detection system shown, a curve showing a change in the measured value threshold range and the measured value at a switch position as the number of switch switching increases.
[0025] like Figure 1A As shown, the switch detection system includes a switch S1 and a switch position detection device 100 , wherein the switch position detection device 100 is composed of a measurement module 101 and a controller 102 .
[0026] The switch S1 can be switched between multiple switch positions. When the switch is in different switch positions, the measurement module 101 in the switch position detection device 100 outputs measurement values within different measurement value threshold ranges to the controller 102. The controller 102 determines the different switch positions of the switch based on the measurement values within the different measurement value threshold ranges. The controller includes, but is not limited to, a microcontroller unit (MCU).
[0027] More specifically, the controller 102 first pre-sets a measurement value threshold range corresponding to each switch position of the switch based on the structure, parameters, and empirical data of the measurement module, thereby obtaining multiple measurement value threshold ranges. The measurement value threshold ranges corresponding to different switch positions do not overlap with each other and have a predetermined gap. Each measurement value threshold range includes a high threshold and a low threshold. After each switching operation of the switch, the controller obtains the measurement value at that time. Since the controller composed of the MCU or other processing modules can usually only process digital signals, in order to facilitate the operation of the controller, it is usually necessary to additionally convert the obtained measurement value into a digital measurement value (hereinafter referred to as the measurement value for the sake of convenience). The measurement value is then compared with the multiple pre-set measurement value threshold ranges to determine which switch position the obtained measurement value falls within the measurement value threshold range corresponding to, thereby determining the switch position of the switch. In addition, if it is determined that the obtained measurement value does not fall within any of the pre-set multiple measurement value threshold ranges, that is, the controller 102 cannot determine which position the switch is switched to based on the obtained measurement value, then the controller 102 can determine that there is an error in the switch detection system, such as improper switching operation, switch short circuit, poor contact, external interference, etc., and optionally issue a reminder and / or stop the switch detection system from working.
[0028] In order to describe the present disclosure more clearly, Figure 1B The specific structure of the switch S1 and the switch position detection device 100 is also schematically shown. However, those skilled in the art will understand that other structures of the switch S1 and the switch position detection device 100 are also feasible, as long as the switch S1 has multiple switch positions and the measurement module 101 in the switch position detection device 100 can output measurement values belonging to different measurement value threshold ranges when the switch is in different switch positions. Figure 1B As shown, the switch S1 may include a conductive slider, multiple gaskets (two in the figure) physically spaced apart from each other, and a common grounding gasket. One gasket corresponds to one switch position. When the conductive slider stops at a gasket, it can connect the gasket to the grounding gasket. The path formed when the conductive slider is connected between the gasket and the grounding gasket has resistance (including the contact resistance between the conductive slider and the gasket and the on-resistance of the conductive slider itself), and the surface of the gasket has conductive grease to facilitate the sliding of the conductive slider. The measurement module 101 in the switch position detection device 100 includes a series resistance branch and an analog-to-digital conversion module ( Figure 1BThe analog-to-digital conversion part is omitted), one end of the series resistance branch is connected to the power supply, and the other end is grounded. Among the resistors in the series resistance branch, except for the first node from top to bottom as the output end of the measurement module 101 to output the measurement value, the remaining nodes are respectively connected to the two gaskets. When the conductive slider slides to different gaskets, the measurement module 101 can output to the controller a measurement value belonging to one of the two pre-set measurement value threshold ranges corresponding to the two gaskets (switch positions). When the conductive slider slides to different gaskets, the controller can receive the measurement values belonging to different measurement value threshold ranges output from the measurement module 101, and determine the different switch positions of the switch according to the measurement values belonging to different measurement value threshold ranges. It should be understood that the number of gaskets (switch positions) is not limited to Figure 1B The two shown in can be set according to actual conditions.
[0029] However, after the switch is subjected to many switching operations, the switch will wear out. Figure 1B As shown in the structure of switch S1, as the number of switching times increases, Figure 2 As shown, the degree of wear of the conductive slider and the gasket will gradually increase, resulting in a gradual increase in the contact resistance between them, and the particles brought by the wear will mix with the conductive grease on the surface of the gasket, which will also cause the contact resistance to increase. The increase in contact resistance will cause the measured value of the switch to gradually deviate from the theoretical value when the conductive slider is at the same gasket (switch position), where the theoretical value is the measured value of the switch when the contact resistance is 0 at that location. In addition, if the measurement value acquisition process also includes analog-to-digital conversion, factors such as resistance and the accuracy of the analog-to-digital converter will also cause analog-to-digital conversion / measurement errors (hereinafter referred to as measurement errors), which will also interfere with the measurement values obtained by the controller to a certain extent, so that when the conductive slider is at the same gasket, even if the contact resistance remains unchanged, the measured value of the switch may fluctuate slightly, but the impact is relatively small and will not affect the overall trend of the measured value changing with the contact resistance. As Figure 3 As shown in , for each switch position, as the number of switching times increases, the measured value also gradually increases due to the gradually increasing switch wear (contact resistance), with only small fluctuations.
[0030] Therefore, for each switch position, due to the increasing wear of the switch (contact resistance) and the influence of measurement errors, when the switch is in this switch position, Figure 3 The measured value obtained by the controller shown may deviate from the preset measurement value threshold range corresponding to the switch position (the high threshold and low threshold of the measurement threshold range are in Figure 3The switch may still be usable even though the measured value is FTH and FTL in the figure. As previously mentioned, the controller will determine that there is an error in the switch detection system in this situation, shortening the life of the switch detection system. Furthermore, the measured value may even erroneously fall within the threshold range of another measurement value corresponding to another switch position, causing the controller to detect an incorrect switch position and, consequently, erroneous operation.
[0031] Therefore, in order to solve the above problems, the present disclosure proposes an improved switch position detection method and device, which can correctly detect the switch position in the presence of switch wear (contact resistance) that gradually increases with the increase in the number of switch switching times and the influence of measurement errors, while extending the life cycle of the switch detection system. As a further improvement, it can also detect whether the switch wear is too large, thereby optionally stopping the switch detection system.
[0032] Reference below Figures 4A-4B The switch position detection method according to an embodiment of the present disclosure will be described. Figures 4A-4B A flow chart of a switch position detection method 400 according to an embodiment of the present disclosure is schematically shown, wherein the switch has M switch positions, M is an integer greater than or equal to 2, and each switch position has a corresponding measurement value threshold range.
[0033] Optionally, the switch position detection method 400 may use Figures 1A-1B The controller 102 in the switch position detection device 100 shown is executed.
[0034] Optionally, in the switch position detection method 400, the example is used to illustrate that at each switch position, the measured value of the switch (if fluctuations caused by measurement errors are not considered) increases as the degree of wear at that switch position increases. However, this is merely exemplary. By appropriately configuring the structure of the measurement module, the measured value of the switch can also decrease as the degree of wear at that switch position increases, and this disclosure is not limited to this.
[0035] refer to Figure 4A , in step 401, the measurement value of the switch is obtained.
[0036] Specifically, the measurement value of the switch is obtained by the measurement module, and for different switch positions, the measurement value of the switch output by the measurement module belongs to different measurement value threshold ranges.
[0037] Furthermore, as mentioned above, the measured value of the switch at each switching position is also correlated with the degree of wear of the switch at this switching position and the measurement error.
[0038] Optionally, the switch is a sliding switch comprising a conductive slider and M gaskets, the conductive slider slides between different gaskets to perform switching, and the M gaskets correspond to M switch positions.
[0039] In step 402 , the switch position of the switch is determined based on the measurement value and a measurement value threshold range corresponding to each of the M switch positions.
[0040] Specifically, for each of the M switch positions, the measurement value is compared with a measurement value threshold range corresponding to the switch position, and if the measurement value is within the measurement value threshold range corresponding to the switch position, it is determined that the switch is in the switch position.
[0041] Optionally, after obtaining the measurement value, decoding and anti-shake operations are first performed on the measurement value, so as to obtain a relatively stable value in a standard form.
[0042] In step 403, the measurement value threshold range corresponding to the determined switch position is updated according to the measurement value.
[0043] Specifically, as described above, as the number of switch switching times increases, the degree of wear of the switch gradually increases, and for each of the M switch positions, when the switch is at that switch position, the measurement value output by the measurement module also gradually increases as the degree of wear at that switch position increases. Therefore, the high threshold and the low threshold of the measurement value threshold range corresponding to the determined switch position are dynamically updated based on the gradually increasing measurement value when the switch is at the determined switch position, so that the corresponding high threshold and the low threshold increase as the degree of wear at that switch position increases.
[0044] Furthermore, the measurement value is stored as a historical measurement value of the determined switch position; then, based on the measurement value and other historical measurement values of the switch position, a measurement value fitting curve of the determined switch position is determined, wherein the measurement value fitting curve of the switch position can be generated by, for example, an adaptive algorithm; based on the measurement value fitting curve, a high threshold curve and a low threshold curve of the switch position are determined; based on the high threshold curve and the low threshold curve, an updated high threshold and a low threshold of the switch position are determined to determine an updated measurement value threshold range of the switch position. Optionally, the interval between the high threshold curve and the low threshold curve and the measurement value fitting curve can always be maintained at the high and low thresholds of the preset threshold range (such as Figure 3 The value of the difference between the fixed upper and lower thresholds FH1 and FL1 in the switch position is half of the absolute value of the difference between the fixed upper and lower thresholds FH1 and FL1 in the switch position. However, this is merely exemplary, and those skilled in the art may also use other methods to update the threshold range corresponding to the determined switch position based on the measured value, so that the measured value threshold range corresponding to the switch position increases as the measured value increases.
[0045] Through the above-mentioned switch position detection method, for each switch position, the measurement value threshold range corresponding to the switch position is iteratively updated according to the measurement value when the switch is switched to the switch position, so that the corresponding measurement value threshold range increases as the measurement value increases. In this way, even when the switch wear gradually increases, normal switch switching operations and switch position detection operations can continue, thereby extending the life cycle of the switch detection system.
[0046] Furthermore, in some embodiments, for each switch position, the measurement value threshold range corresponding to the switch position increases as the measurement value when the switch is in the switch position increases, so that the obtained measurement value almost falls within the measurement value threshold range corresponding to the switch position. Therefore, there may be a situation where the degree of wear of the switch at the switch position is already very large but the switch detection system is still working; in addition, the wear rate at each switch position will be different, so the change amplitude of the measurement value when the switch is in each switch position is different, which may cause the measurement value threshold ranges corresponding to each switch position to become closer and closer, and may even make it impossible to distinguish the switch positions or it may no longer be easy to distinguish the switch positions.
[0047] Usually, based on the usage and experience, after the switch has been used for a period of time, or after the user discovers a problem with the switch, or for some switches, it is determined from their appearance that they are excessively worn, the switch detection system can be manually stopped and the switch can be replaced.
[0048] However, such an approach is too user-dependent and may result in serious consequences if the switch is replaced only after a problem occurs, or may result in waste if the switch is replaced while still usable.
[0049] In this regard, the switch position detection method 400 of the embodiment of the present disclosure may further include the following steps: Figure 4B As shown, it is used to replace the above-mentioned common method.
[0050] After step 401, a step 4011 is added. In step 4011, the measured value is compared with a preset limit value, and if the measured value exceeds the preset limit value, the method goes to step 404 to determine whether the degree of wear of the switch is too great.
[0051] On the contrary, if the measured value does not exceed the preset limit value, then steps 402 and 403 are continued as described above.
[0052] Optionally, the preset limit value can be set based on experience or in the following manner: for a switch position having a measurement value threshold range with a maximum high threshold and a maximum low threshold when the measurement value threshold range is preset, based on various parameters of the switch detection system, the measurement value of the switch is pre-calculated assuming that there is a maximum allowable degree of wear at the switch position (for example, a known maximum allowable contact resistance), and the preset limit value is set to a value not less than the pre-calculated measurement value.
[0053] After the measurement value threshold range corresponding to the determined switch position is updated in step 403 , the proximity between the updated measurement value threshold range and the measurement value threshold ranges corresponding to other switch positions is determined in step 405 .
[0054] In step 406, the determined proximity is compared with a preset proximity. Figures 5A-5B The steps 405-406 are further explained.
[0055] Figures 5A-5B The schematic curve schematically shows that when the switch position detection method according to an embodiment of the present disclosure is adopted, the measurement value threshold range continues to increase with the increase in the number of switch switching times, and the measurement value threshold ranges corresponding to two switch positions are getting closer and closer.
[0056] Alternatively, as Figure 5A As shown, the difference between the updated measurement value threshold range corresponding to the determined switch position and the high threshold value of the measurement value threshold range corresponding to the adjacent switch position (such as Figure 5B The proximity between the adjacent switch positions is determined by measuring the difference between the second high threshold VH2 and the first high threshold VH1 (the difference between the second high threshold VH2 and the first high threshold VH1) or the difference between the low thresholds (the difference between the second low threshold VL2 and the first low threshold VL1), where the measurement value threshold range corresponding to the adjacent switch position has a larger high and low threshold than the updated measurement value threshold range, and comparing the obtained proximity with a preset proximity. In this case, the preset proximity can be a predetermined ratio (e.g., 70%) of the difference between the high threshold or the low threshold of the preset measurement value threshold range.
[0057] Alternatively, as Figure 5B As shown, the high threshold value (such as Figure 5B The first high threshold VH1 in the switch position and the lower threshold of the measurement value threshold range corresponding to the adjacent switch position (such as Figure 5BThe proximity between the adjacent switch positions is determined by comparing the difference between the upper and lower thresholds (VL2) in the second lower threshold (VL2) in the second lower threshold (VL3), where the measurement value threshold range corresponding to the adjacent switch position has a larger upper and lower threshold than the updated measurement value threshold range. In this case, the preset proximity can be a predetermined ratio (e.g., 20%) of the interval between the preset measurement value threshold ranges.
[0058] If it is determined in step 406 that the proximity is less than the preset proximity, the method proceeds to step 404 to determine that the switch is excessively worn. If it is determined in step 406 that the proximity is not less than the preset proximity, it is determined that the switch is still worn and can still switch normally.
[0059] The following describes the process of executing the above switch position detection method through a detailed example.
[0060] Assuming that the switch is new from the factory, all M switch positions are considered to be free of wear. At this time, each of the M switch positions has an initial measurement value threshold range (TH 11 ,TL 11 ), (TH 12 ,TL 12 )…(TH 1M ,TL 1M ), where each measurement value threshold range is pre-calculated and set based on various parameters of the switch detection system (for example, in FIG1 , the parameters may include power supply voltage, resistor connection mode, and resistance value) and empirical data.
[0061] After the switch performs a first switching operation, a first measurement value is acquired.
[0062] The first measurement value is respectively compared with the measurement value threshold range (TH) corresponding to all M switch positions. 11 ,TL 11 ), (TH 12 ,TL 12 )…(TH 1M ,TL 1M ) to determine whether the first measurement value falls within the M measurement value threshold range (TH 11 ,TL 11 ), (TH 12 ,TL 12 )…(TH 1M ,TL 1M ), and based on the correspondence between each measurement value threshold range and the switch position, determine the switch position to which the switch is first switched. For example, if it is determined that the first measurement value falls within the first measurement value threshold range (TH11, TL11), the switch position to which the switch is first switched is the first switch position.
[0063] Then, based on the first measurement value, the measurement value threshold range corresponding to the switch position to which the switch is switched for the first time (assuming that (TH 11 ,TL 11 ))Update to get (TH' 11 ,TL' 11 ), the measurement value threshold ranges corresponding to the other multiple switch positions remain unchanged, and then the updated measurement value threshold range (TH') corresponding to the switch position is obtained. 11 ,TL' 11 ) for use in the comparison process after the next switch switching operation.
[0064] Immediately or after a period of time, the switch is switched a second time, at which time a second measurement value is obtained.
[0065] The second measurement value is compared with the measurement value threshold range (TH' 11 ,TL' 11 ) to determine the switch position to which the switch is switched this time. Similarly, an update operation is performed on one of the current M measurement value threshold ranges based on the second measurement value.
[0066] Afterwards, the above operation is repeated, and a measurement value threshold range is updated each time for use in the comparison process after the next switching operation.
[0067] In addition, after each measurement value is obtained, the measurement value is compared with a preset limit value, and when a measurement value exceeds the preset limit value, it is determined that the switch has been worn too much, and an alarm is optionally issued and / or further switch detection operations are stopped.
[0068] Additionally, each time a measurement value threshold range corresponding to a switch position is updated for that switch position, the proximity of the updated measurement value threshold range to the measurement value threshold range corresponding to an adjacent switch position is determined. If two adjacent measurement value threshold ranges are determined to be too close, it indicates that the switch position can no longer be distinguished based on the measurement values, and an alarm may be issued and / or further switch detection operations may be stopped.
[0069] Reference below Figure 6 7 and 8 are schematic diagrams showing the effect of the switch position detection method according to an embodiment of the present disclosure.
[0070] Figure 6 The diagram schematically illustrates a curve showing a change in the measurement value threshold range and the measurement value at two adjacent switch positions of a switch as the number of switching times increases when the switch position detection method according to an embodiment of the present disclosure is adopted.
[0071] like Figure 6 As shown in the figure, for two adjacent switch positions of the switch, as the number of switching times increases, the increase in switch wear (contact resistance) at each switch position and the measurement error will cause the measured value to gradually increase. By using the reference Figures 4A-4B In the described switch position detection method, the measurement value threshold range corresponding to each switch position is gradually increased to accommodate increasing switch wear (contact resistance) and measurement errors. Therefore, when the switch is switched to any switch position, even if wear and measurement errors occur, the measured value will be within the updated measurement value threshold range corresponding to the switch position, allowing the controller to detect the current switch position. This can extend the lifecycle of the switch detection system.
[0072] Figures 7A-7B The diagram schematically illustrates a curve showing a change in the measurement value threshold range and the measurement value at two adjacent switch positions as the number of switching times increases when a further switch position detection method according to an embodiment of the present disclosure is adopted.
[0073] like Figures 7A-7B As shown, for any two switch positions of the switch, as mentioned above, as the number of switching times increases, the increase in switch wear (contact resistance) at each switch position and the measurement error will cause the measured value to also show a trend of gradual change (for example, becoming larger), and the wear rate at each switch position will be different, so the change amplitude of the measured value when the switch is in each switch position is different, which may cause the measurement value threshold range corresponding to each switch position to become closer and closer, and may even make it impossible to distinguish the switch positions.
[0074] By using reference Figures 4A-4B The switch position detection method described, such as Figure 7A As shown, since the preset limit value is set, even if the measurement threshold range corresponding to each switch position will gradually increase to adapt to the gradually increasing switch wear (contact resistance) and measurement error, as long as the measured value of the switch exceeds the preset limit value, it means that the degree of wear of the switch (at the switch position corresponding to the measured value) is already very large, and an alarm can be issued and / or the switch detection operation can be stopped.
[0075] In addition, by using the reference Figures 4A-4B The switch position detection method described, such as Figure 7BAs shown, the proximity of the measurement value threshold ranges corresponding to two adjacent switch positions is further compared. If the proximity is less than a preset proximity, it indicates that the wear levels at the two adjacent positions are very different, one of which is severely worn and can no longer distinguish between the two switch positions. An alarm can be issued and / or the switch detection operation can be stopped. This further improves the reliability of the switch detection system.
[0076] Although the present invention has been described in detail with respect to various specific example embodiments thereof, each example is provided by way of explanation rather than limitation of the present invention. Those skilled in the art, upon obtaining an understanding of the foregoing, can readily make variations, changes, and equivalents of such embodiments. Therefore, the present invention does not exclude the inclusion of such modifications, changes, and / or additions to the present invention that would be apparent to those of ordinary skill in the art. For example, a feature illustrated or described as part of one embodiment may be used in conjunction with another embodiment to produce yet another embodiment. Therefore, it is intended that the present invention cover such variations, changes, and equivalents.
[0077] Specifically, although the figures of the present disclosure describe steps performed in a specific order for the purposes of illustration and discussion, the method of the present disclosure is not limited to the order or arrangement of the specific illustrations. The various steps of the above method can be omitted, rearranged, combined and / or adjusted in various ways without departing from the scope of the present disclosure.
[0078] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. It should also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and should not be interpreted in an idealized or highly formal sense, unless explicitly defined as such herein.
[0079] The above is an illustration of the present disclosure and should not be considered as limiting thereof. Although several exemplary embodiments of the present disclosure have been described, it will be readily understood by those skilled in the art that many modifications may be made to the exemplary embodiments without departing from the scope of the present disclosure. Therefore, all such modifications are intended to be included within the scope of the present disclosure as defined by the claims. It should be understood that the above is an illustration of the present disclosure and should not be considered as limiting the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The present disclosure is defined by the claims and their equivalents.
Claims
1. A switch position detection device, wherein the switch has M switch positions, and each switch position has a corresponding measurement value threshold range, the device comprising: a measurement module configured to output measurement values belonging to different measurement value threshold ranges when the switch is in each switch position; The controller is configured as: obtaining a measurement value of the switch; determining a switch position of the switch according to the measurement value and a measurement value threshold range corresponding to each switch position of the M switch positions; as well as updating a measurement value threshold range corresponding to the determined switch position according to the measurement value; Wherein, M is an integer greater than or equal to 2, and the measurement value threshold ranges corresponding to different switch positions do not overlap with each other, and the measurement value threshold range includes a high threshold and a low threshold; storing the measured values as a measured value history of the determined switch positions, Wherein, updating the measurement value threshold range corresponding to the determined switch position according to the measurement value includes: determining a measurement value fitting curve for the determined switch position based on the measurement value and other historical measurement values of the determined switch position; Determining a measured value upper threshold curve and a measured value lower threshold curve for the determined switch position according to the measured value fitting curve; The high threshold value and the low threshold value of the updated measurement value threshold range corresponding to the switch position are determined according to the measurement value high threshold curve and the measurement value low threshold curve, so as to determine the updated measurement value threshold range corresponding to the switch position.
2. The switch position detection device according to claim 1, wherein: The switch is a sliding switch, which includes a conductive slider and M gaskets. The conductive slider slides between different gaskets to perform switching, and the M gaskets correspond to the M switch positions.
3. The switch position detection device according to claim 1, wherein: Determining the switch position of the switch according to the measurement value and a measurement value threshold range corresponding to each of the M switch positions includes: For each of the M switch positions, comparing the measured value to a threshold range of measured values corresponding to the switch position; and In a case where the measured value is within a measured value threshold range corresponding to the switch position, it is determined that the switch is in the switch position.
4. The switch position detection device according to claim 1, wherein: As the number of switch switching times increases, the degree of wear of the switch gradually increases, and for each of the M switch positions, when the switch is in the switch position, the measurement value output by the measurement module also gradually increases as the degree of wear at the switch position increases; Among them, updating the measurement value threshold range corresponding to the determined switch position according to the measurement value includes: dynamically updating the high threshold and low threshold of the measurement value threshold range corresponding to the determined switch position according to the gradually increasing measurement value when the switch is in the determined switch position, so that the corresponding high threshold and low threshold increase with the increase of the wear degree at the switch position.
5. The switch position detection device according to claim 1, wherein: For each of the M switch positions, as the degree of wear at the switch position increases, the measurement value fitting curve of the switch position also shows a gradually rising trend.
6. The switch position detection device according to claim 1, wherein the controller is further configured to: When the measured value is outside the measurement value threshold range corresponding to each of the M switch positions, an error is reported.
7. The switch position detection device according to claim 1, wherein the controller is further configured to: comparing the measured value with a preset limit value; In the event that the measured value exceeds the preset limit value, it is determined that the degree of wear of the switch is excessive.
8. The switch position detection device according to claim 7, wherein the controller is further configured to: After updating the measurement value threshold range corresponding to the determined switch position, determining the degree of proximity between the updated measurement value threshold range and the measurement value threshold ranges corresponding to other switch positions; When the proximity is less than a preset proximity, it is determined that the wear degree of the switch is too great.
9. A switch position detection method, wherein the switch has M switch positions, and each switch position has a corresponding measurement value threshold range, the method comprising: obtaining a measurement value of the switch; determining a switch position of the switch according to the measurement value and a measurement value threshold range corresponding to each switch position of the M switch positions; as well as updating a measurement value threshold range corresponding to the determined switch position according to the measurement value; Wherein, M is an integer greater than or equal to 2, and the measurement value threshold ranges corresponding to different switch positions do not overlap with each other, and the measurement value threshold range includes a high threshold and a low threshold. storing the measured values as a measured value history of the determined switch positions, Wherein, updating the measurement value threshold range corresponding to the determined switch position according to the measurement value includes: determining a measurement value fitting curve for the determined switch position based on the measurement value and other historical measurement values of the determined switch position; Determining a measured value upper threshold curve and a measured value lower threshold curve for the determined switch position according to the measured value fitting curve; According to the measured value high threshold curve and the measured value low threshold curve, the high threshold and the low threshold of the updated measured value threshold range corresponding to the determined switch position are determined to determine the updated measured value threshold range corresponding to the determined switch position.
10. The switch position detection method according to claim 9, wherein: The switch is a sliding switch, which includes a conductive slider and M gaskets. The conductive slider slides between different gaskets to perform switching, and the M gaskets correspond to the M switch positions.
11. The switch position detection method according to claim 9, wherein: Determining the switch position of the switch according to the measurement value and a measurement value threshold range corresponding to each of the M switch positions includes: For each of the M switch positions, comparing the measured value to a threshold range of measured values corresponding to the switch position; and In a case where the measured value is within a measured value threshold range corresponding to the switch position, it is determined that the switch is in the switch position.
12. The switch position detection method according to claim 9, wherein: As the number of switch switching times increases, the degree of wear of the switch at each switch position gradually increases, and for each switch position of the M switch positions, the measured value when the switch is at that switch position also gradually increases as the degree of wear at that switch position increases; Among them, updating the measurement value threshold range corresponding to the determined switch position according to the measurement value includes: dynamically updating the high threshold and the low threshold of the measurement value threshold range corresponding to the determined switch position according to the gradually increasing measurement value when the switch is in the determined switch position, so that the corresponding high threshold and the low threshold increase with the increase of the wear degree at the switch position.
13. The switch position detection method according to claim 9, wherein: For each of the M switch positions, as the degree of wear at the switch position increases, the measurement value fitting curve of the switch position also shows a gradually rising trend.
14. The switch position detection method according to claim 9, further comprising: When the measured value is outside the measurement value threshold range corresponding to each of the M switch positions, an error is reported.
15. The switch position detection method according to claim 9, further comprising: comparing the measured value with a preset limit value; In the event that the measured value exceeds the preset limit value, it is determined that the degree of wear of the switch is excessive.
16. The switch position detection method according to claim 15, further comprising: After updating the measurement value threshold range corresponding to the determined switch position, determining the degree of proximity between the updated measurement value threshold range and the measurement value threshold ranges corresponding to other switch positions; When the proximity is less than a preset proximity, it is determined that the wear degree of the switch is too great.
Citation Information
Patent Citations
Switching condition detecting device and automatic vending machine provided with switching condition detecting device
JP2001319538A