Apparatus and method for in-water, out-of-water detection
Patent Information
- Application Number
- CN202610428129.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-04-08
- Filing Date
- 2026-04-02
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]申请人已经发现与使用压力传感器来检测设备处于水中还是处于水外相关联的许多技术挑战和困难
Smart Images

Figure CN122921431A_ABST
Abstract
Description
Technical Field
[0001] The exemplary embodiments of this disclosure generally relate to pressure sensors, and more specifically to using pressure sensors to detect whether a device is in water or out of water. Background Technology
[0002] Pressure sensors are commonly used in mobile and wearable devices such as mobile phones and smartwatches. These sensors are used to determine air pressure, which can then be used to determine the device's altitude (and therefore the user's altitude). As such mobile and wearable devices become increasingly waterproof, this means that waterproof pressure sensors are becoming more common.
[0003] Such waterproof pressure sensors can be used to determine whether a device (and therefore its user) is in or out of water. This can be referred to as "water in / water out (WI / WO) detection." This information can be used by the device to enable or disable applications; for example, if the device is detected to be in water, driving-related applications can be disabled and swimming-related applications enabled.
[0004] The applicant has identified numerous technical challenges and difficulties associated with using pressure sensors to detect whether a device is in water or out of water. Through effort, creativity, and innovation, the applicant has solved the problems related to using pressure sensors to detect whether a device is in water or out of water by developing the solution embodied in this disclosure and described in detail below. Summary of the Invention
[0005] The various embodiments described herein relate to methods and apparatus for detecting whether a device is in water or not.
[0006] According to various embodiments of this disclosure, methods for detecting whether a device is in water or not are provided. In some embodiments, the method includes: using pressure data from a pressure sensor to detect a pressure indicating whether the device is in water or not; transitioning between different states of the FSM based on the detected pressure; and determining a desired full-scale range of the pressure sensor based on the detected pressure.
[0007] In some embodiments, the method further includes: automatically changing from a first full-scale range of the pressure sensor to a second full-scale range of the pressure sensor, or automatically changing from a second full-scale range of the pressure sensor to a first full-scale range of the pressure sensor, based on a determined desired full-scale range of the pressure sensor.
[0008] In some embodiments, the method further includes adjusting pressure data from a pressure sensor to a baseline with zero bar. The adjusted pressure data is used by the FSM to detect pressure indicating whether the device is in water or not.
[0009] In some embodiments, adjusting pressure data from a pressure sensor to a baseline with zero bar includes calculating the integral of the derivative of the pressure data from the pressure sensor.
[0010] In some embodiments, the method further includes passing pressure data from a pressure sensor through a high-pass filter to obtain the derivative of the pressure data from the pressure sensor.
[0011] In some embodiments, the method further includes: comparing the absolute value of the derivative of the pressure data from the high-pass filter with a noise threshold; if the absolute value of the derivative of the pressure data from the high-pass filter exceeds the noise threshold, adding the derivative of the pressure data from the high-pass filter to the immediately preceding integral calculated from the derivative of the pressure data from the pressure sensor; and if the absolute value of the derivative of the pressure data from the high-pass filter does not exceed the noise threshold, resetting the integral of the derivative of the pressure data from the pressure sensor to zero.
[0012] In some embodiments, the different states of the FSM include: (i) Out of Water (WO) state, which indicates that the device is not in water; (ii) In Water (WI) state, which indicates that the device is in water; (iii) Out of Water to In Water (WO-WI) state, which indicates that the device is transitioning from not being in water to being in water; and (iv) In Water to Out of Water (WI-WO) state, which indicates that the device is transitioning from being in water to not being in water.
[0013] In some embodiments, switching between different states of the FSM based on detected pressure changes includes: comparing adjusted pressure data with a first threshold, and / or comparing adjusted pressure data with a second threshold.
[0014] In some embodiments, comparing the adjusted pressure data with a first threshold includes determining whether the adjusted pressure data is greater than the first threshold, and comparing the adjusted pressure data with a second threshold includes determining whether the adjusted pressure data is less than the second threshold.
[0015] In some embodiments, determining whether the adjusted pressure data is greater than a first threshold includes: determining whether the adjusted pressure data is greater than the first threshold for a first predetermined delay period, and determining whether the adjusted pressure data is less than a second threshold includes: determining whether the adjusted pressure data is less than the second threshold for a second predetermined delay period.
[0016] In some embodiments, the first predetermined delay period and the second predetermined delay period include the time period of the operation cycle or the number of operation cycles.
[0017] According to various embodiments of the present disclosure, an apparatus is provided. In some embodiments, the apparatus includes a finite state machine (FSM) configured to: use pressure data from a pressure sensor to detect a pressure indicating whether the apparatus is in water or not; transition between different states of the FSM based on the detected pressure; and determine the desired full-scale range of the pressure sensor based on the detected pressure.
[0018] The above description of the invention is provided merely to summarize some exemplary embodiments and to provide a basic understanding of some aspects of this disclosure. Therefore, it should be understood that the embodiments described above are merely examples and should not be construed as narrowing the scope or spirit of this disclosure in any way. It should also be understood that the scope of this disclosure covers many potential embodiments in addition to those summarized herein, some of which will be further described below. Attached Figure Description
[0019] The description of exemplary embodiments can be read in conjunction with the accompanying drawings. It should be understood that, unless otherwise stated, the elements illustrated in the drawings are not necessarily drawn to scale for the sake of brevity and clarity. For example, the dimensions of some elements may be exaggerated relative to others unless otherwise stated. Embodiments incorporating the teachings of this disclosure are shown and described with reference to the accompanying drawings presented herein, in which:
[0020] Figure 1 This is a block diagram of an example device for detecting whether a device is in water or not, according to some embodiments of this disclosure;
[0021] Figures 2A to 2C The illustration shows example pressure data from an example device for detecting whether a device is in water or not, according to some embodiments of the present disclosure.
[0022] Figures 3A to 3D The illustration shows example pseudocode for an example device for detecting whether a device is in water or not, according to some embodiments of the present disclosure; and
[0023] Figures 4A to 4C The illustration shows example result data from an example device for detecting whether a device is in water or not, according to some embodiments of the present disclosure. Detailed Implementation
[0024] Some embodiments of this disclosure will be described more fully below with reference to the accompanying drawings, in which some, but not all, embodiments of this disclosure are shown. In fact, these disclosures may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided to enable this disclosure to meet applicable legal requirements. Throughout this disclosure, the same reference numerals refer to the same elements.
[0025] As used herein, terms such as “front,” “rear,” “top,” etc., are used for explanatory purposes in the examples provided below to describe the relative positions of certain parts or portions of parts. Furthermore, as will be apparent to those skilled in the art from this disclosure, the terms “substantially” and “approximately” indicate that the referenced element or associated description is accurate within applicable engineering tolerances.
[0026] As used herein, the term “comprising” means including but not limited to, and should be interpreted in the manner commonly used in the patent context. The use of broader terms such as including, comprising, and having should be understood to support narrower terms such as consisting of, substantially consisting of, and substantially including.
[0027] The phrases “in one embodiment”, “according to one embodiment”, etc., generally mean that the specific feature, structure or characteristic following the phrase can be included in at least one embodiment of this disclosure, and can be included in more than one embodiment of this disclosure (importantly, such phrases do not necessarily refer to the same embodiment).
[0028] The terms “example” or “exemplary” are used in this document to mean “serving as an example, instance, or illustration.” Any implementation described as “exemplary” in this document is not necessarily to be construed as being better or more advantageous than other implementations.
[0029] If the specification states that a component or feature "may," "can," "possibly," "should," "will," "preferably," "possibly," "usually," "optionally," "for example," "often," or "maybe" (or other such language) include or have a characteristic, then that particular component or feature is not required to be included or must have that characteristic. Such a component or feature may be optionally included in some embodiments or may be excluded.
[0030] Various embodiments of this disclosure overcome the above-mentioned technical challenges and difficulties, and provide various technical improvements and advantages based on, for example, but not limited to, example devices and methods for detecting whether a device is in water or not. Various embodiments of this disclosure can be implemented in any suitable device, such as, but not limited to, mobile and wearable devices (e.g., mobile phones, smartwatches, etc.).
[0031] Various embodiments of this disclosure can be implemented within a device in any suitable manner. For example, various embodiments of this disclosure can be implemented in a microcontroller unit (MCU) of the device. In another example, various embodiments of this disclosure can be implemented in a pressure sensor, with pressure data from the pressure sensor being used to implement the various embodiments.
[0032] In various embodiments, a finite state machine (FSM) is used to monitor pressure data from one or more pressure sensors within the device and determine whether the device is in water or out of water. In various embodiments, the FSM switches between states based on the pressure data. In various embodiments, the FSM uses pressure data that has been adjusted to have a zero baseline (instead of the approximately one bar baseline due to atmospheric pressure when the device is out of water at sea level).
[0033] In various embodiments, the device includes a pressure sensor with two selectable full-scale ranges: a low full-scale (LFS) range and a high full-scale (HFS) range. For example, the LFS range of the pressure sensor can be up to + / - 1.26 bar (126 kPa), and the HFS range can be up to + / - 6 bar (600 kPa). For example, the low range may be desirable when the device is outside water because atmospheric pressure at sea level is typically approximately one bar, and the high range may be desirable when the device is in water because the pressure will increase and may exceed 1.26 bar as the user dives deeper.
[0034] In various embodiments, the FSM is capable of determining the desired full-scale range of the pressure sensor based on pressure data. In some embodiments, the FSM provides the desired full-scale range to another component (i.e., a component different from where the FSM resides), such as the device's MCU. In such embodiments, the device's MCU can communicate with the pressure sensor to select the full-scale range determined by the FSM.
[0035] In various embodiments, the FSM can automatically change the full-scale range of the pressure sensor from a first full-scale range to a second full-scale range (e.g., from LFS to HFS) and / or from the second full-scale range to the first full-scale range (e.g., from HFS to LFS) based on a determined desired full-scale range. In such embodiments, the FSM can communicate directly with the pressure sensor to select the determined full-scale range. In one example embodiment, the LFS range is + / - 1260 hPa (+ / - 1.26 bar), and the HFS range is + / - 6060 hPa (+ / - 6.06 bar).
[0036] A Functional Sense Model (FSM) is a computational model that can be implemented (and in various embodiments of this disclosure) using sequential logic circuitry. Typically, an FSM can be executed by dedicated hardware logic or an MCU. Such hardware logic is usually developed and specifically designed to execute such an FSM, and is therefore highly specialized and well-optimized. In contrast, an MCU typically executes compiled general-purpose code. Therefore, MCUs generally allow greater flexibility, but are typically less optimized than dedicated hardware logic and thus generally consume more power. For example, in some embodiments, the FSM is part of the hardware (e.g., a programmable core) of the pressure sensor and not part of any MCU controlling the device itself. In some alternative embodiments, the FSM is part of the MCU controlling the device itself. By using an FSM, embodiments of this disclosure provide a WI / WO detection method implemented entirely in hardware (e.g., in the programmable core of the pressure sensor), thereby providing a simpler, faster, and more robust method with extremely low power consumption compared to methods implemented in software / firmware executed by an MCU.
[0037] Figure 1 The illustration shows a block diagram of an example device according to an exemplary embodiment of the present disclosure for detecting conditions in water (i.e., the detection device is in water) or conditions outside water (i.e., the detection device is not in water). The example device may be, for example, a mobile phone or a smartwatch. Figure 1 Example device 100 includes an MCU 102, one or more pressure sensors 104, a high-pass filter (HPF) 106, and an FSM 110. In various embodiments, device 100 may include additional components to provide additional functionality unrelated to this disclosure. In one example embodiment, the cutoff frequency of the HPF is 2.5 Hz. In various embodiments, the high-pass filter (HPF) 106 is included within the FSM 110.
[0038] In various embodiments, MCU 102 is the same MCU (which may be referred to as the master MCU) that controls many or most of the processes of the mobile device, and the processes include one or more applications. Such processes of the mobile device may include applications that use information from FSM 110. Such applications may include, for example, applications used when the device is out of water and applications used when the device is in water. For applications used when the device is out of water, it is desirable to enable such an application using information from FSM when FSM determines that the device is out of water, and to disable such an application using information from FSM when FSM determines that the device is in water. For applications used when the device is in water, it is desirable to enable such an application using information from FSM when FSM determines that the device is in water, and to disable such an application using information from FSM when FSM determines that the device is out of water.
[0039] The microcontroller unit 102 can be embodied in several different ways. In various embodiments, the terms "MCU," "processor," "processing circuitry," "controller," or "controlling circuitry" should be understood to include single-core processors, multi-core processors, and multiple processors within device 100. In some example embodiments, MCU 102 may include one or more processing devices configured to perform independently. Alternatively or additionally, MCU 102 may include one or more processors configured in tandem via a bus to enable independent execution of operations, instructions, pipelined processing, and / or multithreaded processing.
[0040] In an example embodiment, MCU 102 may be configured to execute instructions stored in a processor-accessible memory circuitry (not shown). Alternatively or additionally, MCU 102 may be configured to perform hard-coded functions. Thus, whether configured by a hardware method, a software method, or a combination thereof, MCU 102 may represent an entity (e.g., physically embodied in a circuitry) capable of performing operations according to embodiments of this disclosure while being configured accordingly. Alternatively or additionally, MCU 102 may be embodied as an executor of software instructions, and when such instructions are executed, the instructions may specifically configure MCU 102 to perform various algorithms embodied in one or more operations described herein. In some embodiments, MCU 102 includes hardware, software, firmware, and / or combinations thereof for performing one or more operations described herein.
[0041] In various embodiments, the pressure sensors 104 may include any suitable type of pressure sensor having any suitable range. For example, the pressure sensors 104 may have two or more optional ranges as described above—an LFS range and an HFS range.
[0042] In various embodiments, multiple pressure sensors 104 detect the pressure around device 100. For example, if the device is at sea level and outside the water, the multiple pressure sensors 104 will detect a pressure of approximately one bar. If the device is placed in water, the multiple pressure sensors 104 will detect an increase in pressure, approximately one bar for every 10 meters of depth.
[0043] In various embodiments, raw pressure data (Praw) from pressure sensors(s) 104 is provided to HPF 106. Filtered pressure data (Phpf) from HPF 106 is provided to FSM 110. The output Phpf of HPF 106 is the derivative of the raw pressure data Praw. The integral of the output Phpf of HPF 106 is calculated by FSM 110 (depending on the current state of FSM).
[0044] Various embodiments of this disclosure are able to reproduce the original pressure data by applying the derivative (by HPF 106) and then integrating the original pressure data (by FSM 110), but the original pressure data has a zero-bar baseline (instead of the approximately one-bar baseline of the original pressure data when the device is out of water at sea level). The pressure data with a zero baseline allows the devices and methods of various embodiments to use a consistent threshold to determine the WO or WI state (the threshold is described below). This adjusted pressure data (i.e., derivative followed by integration) is used by the FSM to determine the appropriate state (described below).
[0045] Figures 2A to 2C The illustration shows example pressure data from an example device according to some embodiments of the present disclosure. Figure 2A The diagram illustrates raw pressure data Praw 200 from (multiple) pressure sensors 104. Figure 2A As shown, the raw pressure data 200 starts at about one bar (i.e., atmospheric pressure when the device is at sea level and outside the water) and increases significantly when the device is immersed in water (e.g., when a user wearing the device dives into the water). The exact value of the increased pressure is not included.
[0046] Figure 2B The figure shows filtered pressure data from HPF 106, Phpf 202. Figure 2B As shown, when Figure 2AWhen the raw pressure data Praw increases, the filtered pressure data Phpf 202 increases from the zero baseline. However, since the raw pressure data Praw remains stable, the filtered pressure data Phpf 202 subsequently falls back to the zero baseline.
[0047] Figure 2C The figure shows the adjusted pressure data Pint 206 after integrating the filtered pressure data Phpf 202. (Since the adjusted pressure data is derived from the integrated pressure data of HPF, it is referred to as Pint in this paper.) Figure 2C As shown, the adjusted pressure data Pint 206 essentially replicates the original pressure data Praw, but with a baseline of zero. In various embodiments, the adjusted pressure data, being integral, only increases or decreases when the original pressure data undergoes a relevant change.
[0048] Return to Figure 1 In various embodiments, the FSM 110 has four possible states: two stable states and two transition states. The first stable state includes an out-of-water (WO) state, indicating that the device is not in water. The second stable state includes an in-water (WI) state, indicating that the device is in water. The first transition state includes an out-of-water to in-water (WO-WI) state, indicating that the device is transitioning from not in water (WO) to in water (WI). The second transition state includes an in-water to out-of-water (WI-WO) state, indicating that the device is transitioning from in water (WI) to not in water (WO). Figure 1 As shown and further described below, the state of the FSM can transition from WO to WO-WI or WI, from WO-WI to WI or WO, from WI to WI-WO or WO, or from WI-WO to WO or WI.
[0049] As described above, in various embodiments, the FSM 110 is capable of determining the desired full-scale range of the pressure sensor based on pressure data. The determined full-scale range can be provided, for example, to the MCU 102, or directly to the pressure sensor(s) 104 (as illustrated by the dashed arrows between the FSM 110 and the pressure sensor(s) 104) to automatically select the full-scale range (e.g., LFS or HFS range). Figure 1 As shown, in various embodiments, the FSM 110 can determine the desired full-scale range when transitioning from one state to another. This is achieved by... Figure 1 The dashed boxes illustrating the LFS and HFS in FSM 110. Figure 1In the illustrated embodiment, when the state changes from WI-WO to WO and when the state changes from WO-WI to WO, the FSM 110 selects the LFS range, and when the state changes from WO to WO-WI, the FSM selects the HFS range.
[0050] As described above, FSM 110 may be part of the hardware of pressure sensor(s) 104. This is illustrated by the dashed boxes surrounding pressure sensor(s) 104, HPF 106, and FSM 110.
[0051] In various embodiments, information can be provided from FSM 110 to MCU 102. For example, as Figure 1 As shown, the current state of FSM 110 can be provided to MCU 102, an interrupt can be provided to MCU 102 whenever the state of FSM 110 changes, and / or an indication of the expected full-scale range of the pressure sensor can be sent to MCU 102.
[0052] In various embodiments, FSM operation begins when the FSM is in the WO state, as the WO state is the most likely state. In various embodiments, if the pressure integral is greater than a predetermined WI threshold, the FSM transitions from the WO state to either the WO-WI state or the WI state. In various embodiments, if the pressure integral is greater than a predetermined WI threshold, the FSM transitions from the WI-WO state to the WI state. In various embodiments, if the pressure integral is less than a predetermined WO threshold, the FSM transitions from the WI state to either the WI-WO state or the WO state. In various embodiments, if the pressure integral is less than a predetermined WO threshold, the FSM transitions from the WO-WI state to the WO state. In some embodiments, the WI threshold and the WO threshold are the same. In various embodiments, the WI threshold and the WO threshold range from 1 hPa (0.001 bar) to 10 hPa (0.01 bar). In one example embodiment, the WI threshold and the WO threshold are 5 hPa (0.005 bar). In various embodiments, hysteresis with respect to the WI threshold and the WO threshold may be used. In one example embodiment, the hysteresis range for the WI and WO thresholds is between 0.1 hPa (0.0001 bar) and 1 hPa (0.001 bar). In another example embodiment, the hysteresis for the WI and WO thresholds is 0.5 hPa (0.0005 bar).
[0053] In various embodiments, if the pressure integral is greater than a predetermined WI threshold for a predetermined time length, the FSM transitions from a WO-WI state to a WI state. The predetermined time length can be defined as a time quantity (e.g., 0.5 seconds) and can also be defined as the number of output cycles of the pressure sensor (e.g., 25 cycles, which is 0.5 seconds at a 50 Hz data output rate). In various embodiments, if the pressure integral is less than a predetermined WO threshold for a predetermined time length, the FSM transitions from a WI-WO state to a WO state (the predetermined time length can again be defined as a time quantity or the number of operating cycles). In various embodiments, the predetermined time length ranges from 0.1 seconds (5 cycles at 50 Hz) to 1.0 second (50 cycles at 50 Hz). In one example embodiment, the predetermined time length is 0.5 seconds (25 cycles at 50 Hz) for both WI-WO to WO and WO-WI to WI transitions.
[0054] Now for reference Figures 3A to 3D , Figures 3A to 3D Example pseudocode for an example device used to detect whether a device is in water or not is provided. The example pseudocode illustrates example steps, processes, procedures, and / or operations of an FSM according to various embodiments of this disclosure. In various embodiments, the Pint value is set to zero when the FSM is initialized.
[0055] Figure 3A Sample pseudocode is provided for the operation of the FSM when it is in the WO state. In various embodiments, the FSM determines whether the absolute value of the pressure data from the HPF (abs(Phpf)) is greater than a predefined noise threshold (THnoise). In various embodiments, the noise threshold is predefined based on experimental data. If abs(Phpf) > THnoise, the adjusted pressure value Pint is increased by the current Phpf value (Pint = Pint + Phpf). If abs(Phpf) <= THnoise, the adjusted pressure value Pint is reset to zero. The noise threshold 204 is... Figure 2B The noise threshold is illustrated in the figure. In various embodiments, the noise threshold ranges from 0.05 hPa (0.00005 bar) to 0.5 hPa (0.0005 bar). In one example embodiment, the noise threshold is 0.2 hPa (0.0002 bar).
[0056] In various embodiments, the FSM then determines whether the adjusted pressure value Pint is greater than a predefined WI threshold (THin). Figure 2CAn example predefined WI threshold 208 is illustrated. In various embodiments, if Pint>THin, the full scale of the pressure sensor is set to high (HFS). In various embodiments, the FSM then determines whether the delay timer or counter is enabled. Such a delay timer or counter is used to determine the duration for which the FSM is in a transition state (WO-WI or WI-WO), and as described above, the duration may be an amount of time or the number of operating cycles. (For the sake of simplicity, the delay timer or counter will be referred to as the delay counter hereinafter). In various embodiments, there may be a WI delay counter with a WI delay counter threshold (LATENCYin) and a WO delay counter with a WO delay counter threshold (LATENCYout). In some embodiments, the WI delay counter threshold and the WO delay counter threshold are the same.
[0057] If the FSM determines that the delay counter is disabled (LATENCYin == 0), the state transitions from WO to WI (i.e., without going to the WO-WI transition state). If the FSM determines that the delay counter is enabled, the state transitions from WO to WO-WI and the delay counter is reset to zero (n = 0).
[0058] Figure 3B Example pseudocode for the operation of the FSM when in the WO-WI state is provided. In various embodiments, the FSM continues to increment the adjusted pressure value Pint by the current Phpf value (Pint = Pint + Phpf). The FSM then determines whether the adjusted pressure value Pint is less than the predefined WO threshold THout. In some embodiments, if Pint<THout, the full scale of the pressure sensor is set to low (LFS) and the FSM transitions to the WO state. If the adjusted pressure value Pint is not less than the predefined WO threshold THout, the FSM increments the WI delay counter (n = n + 1) and determines whether the WI delay counter has reached the WI delay counter threshold (n>= LATENCYin). If so, the FSM transitions to the WI state.
[0059] Figure 3CExample pseudo-code for the operation of the FSM when in the WI state is provided. In various embodiments, the FSM continues to increment the adjusted pressure value Pint by the current Phpf value (Pint = Pint + Phpf). The FSM then determines whether the adjusted pressure value Pint is less than a predefined WO threshold THout. If Pint < THout, the FSM then determines whether a latency timer or counter is enabled. If the FSM determines that the latency counter is disabled (LATENCYin == 0), the state transitions from WI to WO (i.e., no transition to the WI-WO transition state is made). If the FSM determines that the latency counter is enabled, the state transitions from WI to WI-WO and the latency counter is reset to zero (n = 0).
[0060] Figure 3D Example pseudo-code for the operation of the FSM when in the WI-WO state is provided. In various embodiments, the FSM determines whether the absolute value of the pressure data from the HPF (abs(Phpf)) is greater than a predefined noise threshold (THnoise). If abs(Phpf) > THnoise, the adjusted pressure value Pint is incremented by the current Phpf value (Pint = Pint + Phpf). If abs(Phpf) <= THnoise, the adjusted pressure value Pint is reset to zero. In various embodiments, the FSM then determines whether the adjusted pressure value Pint is greater than a predefined WI threshold (THin). If Pint > THin or if abs(Phpf) > THnoise, the FSM transitions to the WI state. If neither of the above is true, the FSM increments the WO latency counter (n = n + 1) and determines whether the WO latency counter has reached a WO latency counter threshold (n >= LATENCYout). If so, in various embodiments, the full scale of the pressure sensor is set to low (LFS), and the FSM transitions to the WO state.
[0061] In various embodiments, the integration of the derivative is enabled in both the WO state and the WI state. In various embodiments, the integration reset logic prevents the reconstructed signal from diverging under the WO state. In various embodiments, the noise threshold is tuned based on scenarios in which the integration should not be incremented (e.g., taking a shower, riding an elevator, washing hands, etc.). In various embodiments, there is no integration reset logic during the WI state, to allow the reconstructed integrated signal shape to be the same as Praw.
[0062] Figures 4A to 4C The diagram illustrates example results generated by an example apparatus for detecting whether a device is in water or not in water according to some embodiments of the present disclosure. Figure 4A Example raw pressure data 402 is shown. Figure 4B Example adjusted pressure data 404 is shown. Figure 4C The FSM state 406 is shown (0 for WO and 1 for WI). For example... Figures 4A to 4C As shown, the adjusted pressure data 404 closely follows the original pressure data 402, and when the adjusted pressure data 404 is above the threshold (dashed line), state 406 changes from WO (0) to WI (1), and when the adjusted pressure data 404 is below the threshold, state 406 changes from WI (1) to WO (0).
[0063] in conclusion
[0064] Many modifications and other embodiments of the present disclosure set forth herein will come to mind for those skilled in the art after benefiting from the teachings presented in the foregoing description and the accompanying drawings. While the drawings show only certain components of the apparatus and systems described herein, it should be understood that various other components may be used in conjunction with the system. Therefore, it should be understood that the present disclosure is not limited to the specific embodiments disclosed, and that modifications and other embodiments are intended to be included within the scope of the appended claims. Furthermore, the steps in the methods described above do not necessarily occur in the order depicted in the drawings, and in some cases, one or more of the depicted steps may occur substantially simultaneously, or additional steps may be involved. Although specific terminology is used herein, such specific terminology is used only in a general and descriptive sense and is not intended to be limiting.
[0065] While various embodiments based on the principles disclosed herein have been shown and described above, modifications can be made to them by those skilled in the art without departing from the spirit and teachings of this disclosure. The embodiments described herein are merely representative and are not intended to be limiting. Many variations, combinations, and modifications are possible and are within the scope of this disclosure. Alternative embodiments resulting from combining, integrating, and / or omitting features of (multiple) embodiments are also within the scope of this disclosure. Therefore, the scope of protection is not limited by the description set forth above.
[0066] Furthermore, the section headings used herein are provided to maintain consistency with the recommendations under 37 CFR 1.77 or to otherwise provide organizational guidance. These headings should not limit or characterize the disclosure set forth in any of the claims that may arise from this disclosure.
[0067] While this detailed description has illustrated some embodiments of the present disclosure, the appended claims cover other embodiments of the present disclosure that differ from the described embodiments due to various modifications and improvements. For example, the appended claims may cover any form of device with a pressure sensor, including any form of mobile or wearable device.
[0068] Within the appended claims, unless the specific terms “means for…” or “steps for…” are used within a given claim, the claims are not intended to be interpreted in accordance with paragraph 6 of 35 USC 112.
Claims
1. A method for detecting whether a device is in water or not, the method comprising: The pressure is detected by a finite state machine (FSM) using pressure data from a pressure sensor, which indicates whether the device is in water or not. The FSM switches between different states based on the detected pressure; as well as The FSM determines the desired full-scale range of the pressure sensor based on the detected pressure.
2. The method according to claim 1, further comprising: Based on the determined desired full-scale range of the pressure sensor, the pressure sensor automatically changes from its first full-scale range to its second full-scale range, or from its second full-scale range to its first full-scale range.
3. The method according to claim 1, further comprising: The pressure data from the pressure sensor is adjusted to a baseline with zero bar. The adjusted pressure data is used by the FSM to detect pressure indicating whether the device is in water or not.
4. The method of claim 3, wherein adjusting the pressure data from the pressure sensor to a baseline having zero bar comprises: Calculate the integral of the derivative of the pressure data from the pressure sensor.
5. The method according to claim 4, further comprising: The pressure data from the pressure sensor is passed through a high-pass filter to obtain the derivative of the pressure data from the pressure sensor.
6. The method according to claim 5, further comprising: The absolute value of the derivative of the pressure data from the high-pass filter is compared with a noise threshold; If the absolute value of the derivative of the pressure data from the high-pass filter exceeds the noise threshold, then the derivative of the pressure data from the high-pass filter is added to the integral immediately preceding the derivative of the pressure data from the pressure sensor. as well as If the absolute value of the derivative of the pressure data from the high-pass filter does not exceed the noise threshold, then the integral of the derivative of the pressure data from the pressure sensor is reset to zero.
7. The method of claim 5, wherein the different states of the FSM include: (i) Out-of-water WO state, the WO state indicating that the device is not in water; (ii) In-water WI state, the WI state indicating that the device is in water; (iii) Out-of-water to in-water WO-WI state, the WO-WI state indicating that the device is transitioning from not being in water to being in water; and (iv) In-water to out-of-water WI-WO state, the WI-WO state indicating that the device is transitioning from being in water to not being in water.
8. The method of claim 5, wherein switching between different states of the FSM based on the detected pressure change comprises: The adjusted pressure data is compared with a first threshold, and / or the adjusted pressure data is compared with a second threshold.
9. The method of claim 8, wherein comparing the adjusted pressure data with the first threshold comprises: Determine whether the adjusted pressure data is greater than the first threshold; and The comparison of the adjusted pressure data with the second threshold includes: determining whether the adjusted pressure data is less than the second threshold.
10. The method of claim 9, wherein determining whether the adjusted pressure data is greater than the first threshold comprises: Determine whether the adjusted pressure data exceeds the first threshold for a first preset delay period; and Determining whether the adjusted pressure data is less than the second threshold includes: determining whether the adjusted pressure data is less than the second threshold for a second predetermined delay period.
11. An apparatus comprising: Finite state machine (FSM), wherein the FSM is configured as follows: Pressure data from a pressure sensor is used to detect pressure, which indicates whether the device is in water or not. Based on the detected pressure, the system transitions between different states of the FSM; and The desired full-scale range of the pressure sensor is determined based on the detected pressure.
12. The device of claim 11, wherein the FSM is further configured to: automatically change from a first full-scale range of the pressure sensor to a second full-scale range of the pressure sensor, or automatically change from the second full-scale range of the pressure sensor to the first full-scale range of the pressure sensor, based on the determined desired full-scale range of the pressure sensor.
13. The device of claim 11, wherein the FSM is further configured to adjust the pressure data from the pressure sensor to a baseline having zero bar; and The adjusted pressure data is used by the FSM to detect pressure indicating whether the device is in water or not.
14. The device of claim 13, wherein adjusting the pressure data from the pressure sensor to a baseline having zero bar comprises: Calculate the integral of the derivative of the pressure data from the pressure sensor.
15. The device of claim 14, wherein the FSM is further configured to pass the pressure data from the pressure sensor through a high-pass filter to obtain the derivative of the pressure data from the pressure sensor.
16. The device of claim 15, wherein the FSM is further configured to: The absolute value of the derivative of the pressure data from the high-pass filter is compared with a noise threshold; If the absolute value of the derivative of the pressure data from the high-pass filter exceeds the noise threshold, then the derivative of the pressure data from the high-pass filter is added to the integral immediately preceding the derivative of the pressure data from the pressure sensor. and If the absolute value of the derivative of the pressure data from the high-pass filter does not exceed the noise threshold, then the integral of the derivative of the pressure data from the pressure sensor is reset to zero.
17. The device of claim 15, wherein the different states of the FSM include: (i) Out-of-water WO state, the WO state indicating that the device is not in water; (ii) In-water WI state, the WI state indicating that the device is in water; (iii) Out-of-water to in-water WO-WI state, the WO-WI state indicating that the device is transitioning from not being in water to being in water; and (iv) In-water to out-of-water WI-WO state, the WI-WO state indicating that the device is transitioning from being in water to not being in water.
18. The device of claim 15, wherein switching between different states of the FSM based on detected pressure changes comprises: The adjusted pressure data is compared with a first threshold, and / or the adjusted pressure data is compared with a second threshold.
19. The device of claim 18, wherein comparing the adjusted pressure data with the first threshold comprises: Determine whether the adjusted pressure data is greater than the first threshold; and The comparison of the adjusted pressure data with the second threshold includes: determining whether the adjusted pressure data is less than the second threshold.
20. The device of claim 19, wherein determining whether the adjusted pressure data is greater than the first threshold comprises: Determine whether the adjusted pressure data exceeds the first threshold for a first preset delay period; and Determining whether the adjusted pressure data is less than the second threshold includes: determining whether the adjusted pressure data is less than the second threshold for a second predetermined delay period.