Pressure sampling components, electronic devices, pressure sampling methods, and pressure sampling apparatus
By using AC drive signals and IQ demodulation technology in the pressure sensor, the problem of low sampling accuracy of the pressure sensor is solved, and higher sampling accuracy and noise suppression effect are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, pressure sensors with a fixed DC bias voltage have low sampling accuracy and high noise, which affects the sampling performance of the pressure sensor.
A pressure sampling component is used. By controlling the on/off states of the first and second switching circuits, an AC drive signal is transmitted to the pressure sensing circuit. The phase and amplitude information of the AC output signal of the pressure sensing circuit is obtained through the control circuit. IQ demodulation is then performed to determine the pressure sampling value and reduce the noise bandwidth.
It effectively reduces the noise of the pressure sampling component, improves sampling accuracy, and provides better noise suppression capabilities.
Smart Images

Figure CN119469492B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic equipment technology, specifically relating to a pressure sampling component, electronic device, pressure sampling method, and pressure sampling apparatus. Background Technology
[0002] The pressure sensing principle of a stylus tip is usually implemented through a pressure sensor. A pressure sensor is a sensor that can sense external pressure and convert it into an electrical signal output.
[0003] In related technologies, pressure sensors are made of conductive materials, and their resistance changes when pressure is applied. By applying a fixed DC bias voltage to the sensor, the voltage across the two arms of a Wheatstone bridge changes when the resistance changes, thus determining the change in resistance and consequently the acquired pressure value. However, this method of acquiring pressure with a fixed DC bias voltage results in a wide circuit bandwidth and relatively high overall noise, affecting the sampling accuracy of the pressure sensor. Summary of the Invention
[0004] This application aims to provide a pressure sampling component, electronic device, pressure sampling method, and pressure sampling apparatus that can solve the problem of low sampling accuracy of pressure sensors in related technologies.
[0005] In a first aspect, embodiments of this application propose a pressure sampling component, comprising: a pressure sensing circuit; a first switching circuit, wherein a first terminal of the first switching circuit is connected to a power supply, a second terminal of the first switching circuit is grounded, and a third terminal of the first switching circuit is connected to the first terminal of the pressure sensing circuit; a second switching circuit, wherein a first terminal of the second switching circuit is connected to a power supply, a second terminal of the second switching circuit is grounded, and a third terminal of the second switching circuit is connected to the second terminal of the pressure sensing circuit; and a control circuit, wherein the output terminal of the control circuit is connected to the control terminals of the first and second switching circuits, the control circuit being used to control the on / off states of the first and second switching circuits to transmit an AC drive signal to the pressure sensing circuit, the input terminal of the control circuit being connected to the third and fourth terminals of the pressure sensing circuit, and the control circuit being further used to determine a pressure sampling value based on the phase information and amplitude information of the AC output signal of the pressure sensing circuit.
[0006] Secondly, embodiments of this application provide an electronic device, including: a pressure sampling component as described in the first aspect.
[0007] Thirdly, embodiments of this application propose a pressure sampling method applied to the pressure sampling component in the first aspect. The pressure sampling method includes: controlling the on / off state of a first switching circuit and a second switching circuit according to a preset frequency to transmit an AC drive signal to a pressure sensing circuit; acquiring phase information and amplitude information of the AC output signal output by the pressure sensing circuit; and determining a pressure sampling value based on the phase information and amplitude information.
[0008] Fourthly, embodiments of this application propose a pressure sampling device applied to the pressure sampling component in the first aspect. The pressure sampling device includes: a control module for controlling the on / off state of a first switching circuit and a second switching circuit according to a preset frequency to transmit an AC drive signal to a pressure sensing circuit; an acquisition module for acquiring phase information and amplitude information of the AC output signal output by the pressure sensing circuit; and a determination module for determining a pressure sampling value based on the phase information and amplitude information.
[0009] Fifthly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method as described in the third aspect.
[0010] In a sixth aspect, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method as described in the third aspect.
[0011] In a seventh aspect, embodiments of this application provide a chip including a processor and a communication interface coupled to the processor, the processor being used to run programs or instructions to implement the steps of the method as described in the third aspect.
[0012] Eighthly, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method as described in the third aspect.
[0013] In this embodiment, by connecting the first and second terminals of the pressure sensing circuit to the first and second switching circuits respectively, the first switching circuit can switch the on / off state of the first terminal of the pressure sensing circuit with the power supply and ground terminal, and the second switching circuit can also switch the on / off state of the second terminal of the pressure sensing circuit with the power supply and ground terminal. Therefore, AC drive signals can be transmitted to the pressure sensing circuit through the first and second switching circuits, enabling the control circuit to acquire AC output signals at the third and fourth terminals of the pressure sensing circuit, demodulate the AC output signals to obtain phase and amplitude information, and constrain the noise bandwidth to a relatively small area, thereby reducing the noise of the pressure sampling component and determining the pressure sampling value based on the phase and amplitude information. During the demodulation of the AC output signal, the real and imaginary parts of the AC output signal can be processed separately to separate the signal and noise, effectively separating the signal and noise, thereby providing better noise suppression capability.
[0014] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0015] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0016] Figure 1 The diagram shows a structural block diagram of a pressure sampling assembly provided in some embodiments of this application;
[0017] Figure 2 One of the circuit diagrams of the pressure sampling assembly provided in some embodiments of this application is shown;
[0018] Figure 3 A second circuit diagram of a pressure sampling component provided in some embodiments of this application is shown;
[0019] Figure 4 The following are AC modulation timing diagrams provided in some embodiments of this application;
[0020] Figure 5 A third circuit diagram of the pressure sampling component provided in some embodiments of this application is shown;
[0021] Figure 6 This illustration shows one of the structural block diagrams of an electronic device provided in some embodiments of this application;
[0022] Figure 7 A flowchart illustrating the pressure sampling method provided in some embodiments of this application is shown;
[0023] Figure 8 A schematic block diagram of a pressure sampling device provided in some embodiments of this application is shown;
[0024] Figure 9 A structural block diagram of an electronic device according to an embodiment of this application is shown;
[0025] Figure 10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0026] Figure label:
[0027] 100 Pressure sampling component, 102 Pressure sensing circuit, 104 First switching circuit, 106 Second switching circuit, 108 Control circuit, Q1 First MOSFET, Q2 Second MOSFET, Q3 Third MOSFET, Q4 Fourth MOSFET, T1 First switch, T2 Second switch, AMP amplifier sub-circuit, ADC sampling sub-circuit, MCU processor, R1 First resistor, R2 Second resistor, R3 Third resistor, R4 Fourth resistor, Ve power supply, GND ground terminal. Detailed Implementation
[0028] The embodiments of this application will now be described in detail. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0029] The terms "first" and "second" in the specification and claims of this application may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise stated, "multiple" means two or more. Furthermore, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0030] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0031] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0032] The following is combined with Figures 1 to 10 This application describes a pressure sampling component, electronic device, pressure sampling method, and pressure sampling apparatus according to embodiments thereof.
[0033] In some embodiments of this application, a pressure sampling component is provided. Figure 1 The diagram shows a structural block diagram of a pressure sampling assembly provided in some embodiments of this application. Figure 2 This paper shows one of the circuit diagrams of the pressure sampling assembly provided in some embodiments of this application. Figure 3 A second circuit diagram of a pressure sampling component provided in some embodiments of this application is shown, such as... Figure 1 , Figure 2 and Figure 3As shown, the pressure sampling assembly 100 includes: a pressure sensing circuit 102; a first switching circuit 104, the first terminal of which is connected to the power supply Ve, the second terminal of which is grounded, and the third terminal of which is connected to the first terminal of the pressure sensing circuit 102; and a second switching circuit 106, the first terminal of which is connected to the power supply Ve, the second terminal of which is grounded, and the third terminal of which is connected to the second terminal of the pressure sensing circuit 102. The control circuit 108 is connected to the control terminal of the first switch circuit 104 and the control terminal of the second switch circuit 106. The control circuit 108 is used to control the on / off state of the first switch circuit 104 and the second switch circuit 106 to transmit AC drive signals to the pressure sensing circuit 102. The input terminal of the control circuit 108 is connected to the third and fourth terminals of the pressure sensing circuit 102. The control circuit 108 is also used to determine the pressure sampling value based on the AC output signal of the pressure sensing circuit 102.
[0034] In this embodiment, the resistance of the pressure sensing circuit 102 can change according to the pressure change. The control circuit 108 can control the on / off state of the first switch circuit 104 and the second switch circuit 106, so that the power supply Ve transmits an AC drive signal to the pressure sensing circuit 102. The input terminal of the control circuit 108 is connected to the third and fourth terminals of the pressure sensing circuit 102. The control circuit 108 can acquire the AC output signals output from the third and fourth terminals of the pressure sensing circuit 102.
[0035] In this embodiment, the first and second terminals of the first switching circuit 104 are connected to the power supply Ve and the ground terminal GND, respectively. The third terminal of the first switching circuit 104 is connected to the first terminal of the pressure sensing circuit 102. The control circuit 108 can switch the on / off state between the first and third terminals of the first switching circuit 104, as well as the on / off state between the second and third terminals of the first switching circuit 104. Specifically, when the first and third terminals of the first switching circuit 104 are connected and the second and third terminals are disconnected, the first terminal of the pressure sensing circuit 102 is connected to the power supply Ve. When the second and third terminals of the first switching circuit 104 are connected and the first and third terminals are disconnected, the first terminal of the pressure sensing circuit 102 is grounded.
[0036] In this embodiment, the first and second terminals of the second switching circuit 106 are connected to the power supply Ve and the ground terminal GND, respectively. The third terminal of the second switching circuit 106 is connected to the second terminal of the pressure sensing circuit 102. The control circuit 108 can switch the on / off state of the first and third terminals of the second switching circuit 106, as well as the on / off state of the second and third terminals of the first switching circuit 104. Specifically, when the first and third terminals of the second switching circuit 106 are connected and disconnected, the first terminal of the pressure sensing circuit 102 is connected to the power supply Ve. When the second and third terminals of the second switching circuit 106 are connected and disconnected, the first terminal of the pressure sensing circuit 102 is grounded.
[0037] Specifically, the control circuit 108 controls the on / off states of the first switch circuit 104 and the second switch circuit 106 so that when the power supply Ve is connected to the first terminal of the pressure sensing circuit 102, the second terminal of the pressure sensing circuit 102 is grounded, and when the power supply Ve is connected to the second terminal of the pressure sensing circuit 102, the first terminal of the pressure sensing circuit 102 is grounded, thereby transmitting an AC drive signal to the pressure sensing circuit 102.
[0038] It should be noted that by adjusting the frequency of switching the on / off states of the first switch circuit 104 and the second switch circuit 106, the frequency of the AC drive signal transmitted to the pressure sensing circuit 102 can be adjusted.
[0039] In this embodiment, the control circuit 108 is connected to the third and fourth terminals of the pressure sensing circuit 102. The third and fourth terminals of the pressure sensing circuit 102 are the signal output terminals of the pressure sensing circuit 102. The AC output signal output by the pressure sensing circuit 102 is transmitted to the control circuit 108 through the third and fourth terminals. The control circuit 108 can obtain the phase information and amplitude information of the AC output signal and determine the pressure sampling value based on the phase information and amplitude information.
[0040] It should be noted that the control circuit 108 can perform single-frequency IQ (In-phase Quadrature) demodulation (a signal processing technique) on the AC output signal to obtain the amplitude information of the AC output signal at the AC excitation frequency, and constrain the noise bandwidth within a relatively small region, thereby reducing the noise of the pressure sampling component 100. Specifically, IQ demodulation is used to extract the original phase and amplitude information from the modulated signal. During IQ demodulation of the AC output signal, the AC output signal is treated as a complex signal composed of real and imaginary parts. This allows for separate processing of the real and imaginary parts, effectively separating the signal and noise, and thus providing better noise suppression capabilities.
[0041] In this embodiment, by connecting the first and second terminals of the pressure sensing circuit 102 to the first switching circuit 104 and the second switching circuit 106 respectively, the first switching circuit 104 can switch the on / off state of the first terminal of the pressure sensing circuit 102 with the power supply Ve and the ground terminal GND, and the second switching circuit 106 can also switch the on / off state of the second terminal of the pressure sensing circuit 102 with the power supply Ve and the ground terminal GND. Therefore, AC drive signals can be transmitted to the pressure sensing circuit 102 through the first switching circuit 104 and the second switching circuit 106, so that the control circuit 108 can collect AC output signals at the third and fourth terminals of the pressure sensing circuit 102, demodulate the AC output signals to obtain phase information and amplitude information, and constrain the noise bandwidth to a relatively small area, thereby reducing the noise of the pressure sampling component 100 and determining the pressure sampling value based on the phase information and amplitude information. During the demodulation of the AC output signal, the real part signal and the imaginary part signal of the AC output signal can be processed separately to separate the signal and noise, thereby effectively separating the signal and noise and providing better noise suppression capability.
[0042] In some embodiments of this application, the control circuit 108 is used to control the first terminal of the first switching circuit 104 to be connected to the third terminal, and the second terminal of the first switching circuit 104 to be disconnected from the third terminal; and to control the second terminal of the second switching circuit 106 to be connected to the third terminal, and the first terminal of the second switching circuit 106 to be disconnected from the third terminal; or
[0043] The control circuit 108 is used to control the second terminal and the third terminal of the first switch circuit 104 to be connected and the first terminal and the third terminal of the first switch circuit 104 to be disconnected; and to control the first terminal and the third terminal of the second switch circuit 106 to be connected and the second terminal and the third terminal of the second switch circuit 106 to be disconnected.
[0044] In this embodiment, since the first and second terminals of the first switching circuit 104 are respectively connected to the power supply Ve and the ground terminal GND, and the first and second terminals of the second switching circuit 106 are also respectively connected to the power supply Ve and the ground terminal GND, and the third terminals of the first switching circuit 104 and the second switching circuit 106 are respectively connected to the first and second terminals of the pressure sensing circuit 102, the control circuit 108 can control the on / off state of the first switching circuit 104 and the second switching circuit 106, thereby controlling the conduction state of the first terminal of the pressure sensing circuit 102 with the power supply Ve or the ground terminal GND, and controlling the conduction state of the second terminal of the pressure sensing circuit 102 with the power supply Ve or the ground terminal GND. By alternately controlling the first or second terminal of the pressure sensing circuit to conduct with the power supply Ve, an AC drive signal is transmitted to the pressure sensing circuit 102.
[0045] Specifically, the control circuit 108 controls the first switching circuit 104 and the second switching circuit 106 to switch between the first on / off state and the second on / off state according to a preset frequency, thereby transmitting an AC drive signal of the preset frequency to the pressure sensing circuit 102.
[0046] The first on / off state includes: when the first terminal to the third terminal of the first switching circuit 104 is on and the second terminal to the third terminal of the first switching circuit 104 is off, and when the second terminal to the third terminal of the second switching circuit 106 is on and the first terminal to the third terminal of the second switching circuit 106 is off, the first terminal of the pressure sensing circuit 102 is connected to the power supply Ve, and the second terminal of the pressure sensing circuit 102 is connected to the ground terminal GND.
[0047] The second on / off state includes: when the second terminal to the third terminal of the first switching circuit 104 is on and the first terminal to the third terminal of the first switching circuit 104 is off, and when the first terminal to the third terminal of the second switching circuit 106 is on and the second terminal to the third terminal of the second switching circuit 106 is off, the second terminal of the pressure sensing circuit 102 is connected to the power supply Ve, and the first terminal of the pressure sensing circuit 102 is connected to the ground terminal GND.
[0048] Figure 4 The following are AC modulation timing diagrams provided in some embodiments of this application, such as Figure 4 As shown, GPIO1 is the control signal transmitted to the first switching circuit 104, and GPIO2 is the control signal transmitted to the second switching circuit 106. When GPIO1 is 0 and GPIO2 is 1, the second and third terminals of the first switching circuit 104 are connected, and the first and third terminals of the second switching circuit 106 are connected. At this time, the first terminal of the pressure sensing circuit 102 is grounded, and the second terminal of the pressure sensing circuit 102 is connected to the power supply Ve. When GPIO1 is 1 and GPIO2 is 0, the first and third terminals of the first switching circuit 104 are connected, and the second and third terminals of the second switching circuit 106 are connected. At this time, the second terminal of the pressure sensing circuit 102 is grounded, and the first terminal of the pressure sensing circuit 102 is connected to the power supply Ve. The control circuit 108 transmits an AC drive signal to the pressure sensing circuit 102 by alternately adjusting the high and low levels of GPIO1 and GPIO2. The high level of the AC drive signal is +V0, and the low level is -V0.
[0049] In this embodiment, the control circuit 108 can control the on / off state of the first switch circuit 104 and the second switch circuit 106, and control the conduction state between the first and second terminals of the pressure sensing circuit 102 and the power supply Ve and the ground terminal GND, thereby transmitting corresponding AC drive signals to the pressure sensing circuit 102.
[0050] like Figure 2As shown, in some embodiments of this application, the first switching circuit 104 includes: a first MOSFET Q1, the source of which is connected to the power supply Ve, the drain of which is connected to the first terminal of the pressure sensing circuit 102, and the gate of which is connected to the control circuit 108; and a second MOSFET Q2, the source of which is grounded, the drain of which is connected to the first terminal of the pressure sensing circuit 102, and the gate of which is connected to the control circuit 108.
[0051] The second switching circuit 106 includes: a third MOSFET Q3, the source of which is connected to the power supply Ve, the drain of which is connected to the second terminal of the pressure sensing circuit 102, and the gate of which is connected to the control circuit 108; and a fourth MOSFET Q4, the source of which is grounded, the drain of which is connected to the second terminal of the pressure sensing circuit 102, and the gate of which is connected to the control circuit 108.
[0052] GPIO1 and GPIO2 are communication ports.
[0053] In this embodiment of the application, both the first switching circuit 104 and the second switching circuit 106 include two MOSFETs, and the AC drive signal is transmitted to the pressure sensing circuit by controlling the on and off states of the two MOSFETs.
[0054] Specifically, the first switching circuit 104 includes a first MOSFET Q1 and a second MOSFET Q2. The source of the first MOSFET Q1 is the first terminal of the first switching circuit 104, and the source of the second MOSFET Q2 is the second terminal of the first switching circuit 104. The drains of both the first MOSFET Q1 and the second MOSFET Q2 are connected to the first terminal of the pressure sensing circuit 102, i.e., the drains of the first MOSFET Q1 and the second MOSFET Q2 are the third terminals of the first switching circuit 104. The gates of the first MOSFET Q1 and the second MOSFET Q2 serve as the control terminals of the first switching circuit 104 and are connected to the control circuit 108. The first MOSFET Q1 is a PMOS, and the second MOSFET Q2 is an NMOS.
[0055] The second switching circuit 106 includes a third MOSFET Q3 and a fourth MOSFET Q4. The source of the third MOSFET Q3 is the first terminal of the second switching circuit 106, and the source of the fourth MOSFET Q4 is the second terminal of the second switching circuit 106. The drains of both the third MOSFET Q3 and the fourth MOSFET Q4 are connected to the second terminal of the pressure sensing circuit 102, i.e., the drains of the third MOSFET Q3 and the fourth MOSFET Q4 are the third terminals of the second switching circuit 106. The gates of the third MOSFET Q3 and the fourth MOSFET Q4 serve as the control terminals of the second switching circuit 106 and are connected to the control circuit 108. The third MOSFET Q3 is a PMOS, and the fourth MOSFET Q4 is an NMOS.
[0056] For example, GPIO1 is the control signal transmitted by the control circuit 108 to the first MOSFET Q1 and the second MOSFET Q2, and GPIO2 is the control signal transmitted by the control circuit 108 to the third MOSFET Q3 and the fourth MOSFET Q4. The process of controlling the on / off state of the first MOSFET Q1, the second MOSFET Q2, the third MOSFET Q3, and the fourth MOSFET Q4 to transmit AC drive signals to the pressure sensing circuit 102 is as follows: When GPIO1 is high, GPIO2 is low, the first MOSFET Q1 and the fourth MOSFET Q4 are off, the second MOSFET Q2 and the third MOSFET Q3 are on, the first terminal of the pressure sensing circuit 102 is negative, and the second terminal is positive. Conversely, when GPIO2 is high, GPIO1 is low, the first MOSFET Q1 and the fourth MOSFET Q4 are on, the second MOSFET Q2 and the third MOSFET Q3 are off, the first terminal of the pressure sensing circuit 102 is positive, and the second terminal is negative. By switching the high and low levels of GPIO1 and GPIO2 according to the preset frequency, an AC drive signal of the preset frequency can be transmitted to the pressure sensing circuit 102.
[0057] For example, the preset frequency ranges from 50Hz to 150Hz, and the preset frequency can be specifically selected as 100Hz.
[0058] In this embodiment, a first MOSFET Q1 and a second MOSFET Q2 are configured in the first switching circuit 104, and the first MOSFET Q1 and the second MOSFET Q2 are connected to the first terminal of the pressure sensing circuit 102. A third MOSFET Q3 and a fourth MOSFET Q4 are configured in the second switching circuit 106, and the third MOSFET Q3 and the fourth MOSFET Q4 are connected to the second terminal of the pressure sensing circuit 102. This enables the control circuit 108 to transmit AC drive signals to the pressure sensing circuit 102 by controlling the on / off states of the first MOSFET Q1, the second MOSFET Q2, the third MOSFET Q3, and the fourth MOSFET Q4.
[0059] like Figure 3As shown, in some embodiments of this application, the first switch circuit 104 includes: a first switch T1, the first stationary contact of the first switch T1 is connected to the power supply Ve, the second stationary contact of the first switch T1 is grounded, the moving contact of the first switch T1 is connected to the first end of the pressure sensing circuit 102, and the control end of the first switch T1 is connected to the control circuit 108.
[0060] The second switching circuit 106 includes: a second switching element T2, the first stationary contact of the second switching element T2 being connected to the power supply Ve, the second stationary contact of the second switching element T2 being grounded, the moving contact of the second switching element T2 being connected to the second terminal of the pressure sensing circuit 102, and the control terminal of the second switching element T2 being connected to the control circuit 108.
[0061] In this embodiment of the application, both the first switch circuit 104 and the second switch circuit 106 include single-pole double-throw switches. The first stationary contact and the second stationary contact of the first switch T1 in the first switch circuit 104 are respectively connected to the power supply Ve and the ground terminal GND. The first stationary contact and the second stationary contact of the second switch T2 in the second switch circuit 106 are also respectively connected to the power supply Ve and the ground terminal GND.
[0062] Specifically, the first stationary contact of the first switching element T1 is the first terminal of the first switching circuit 104, the second stationary contact of the first switching element T1 is the second terminal of the first switching circuit 104, and the moving contact of the first switching element T1 is the third terminal of the first switching circuit 104. Similarly, the first stationary contact of the second switching element T2 is the first terminal of the second switching circuit 106, the second stationary contact of the second switching element T2 is the second terminal of the second switching circuit 106, and the moving contact of the second switching element T2 is the third terminal of the second switching circuit 106.
[0063] For example, GPIO is the control signal transmitted by the control circuit 108 to the first switch T1 and the second switch T2. The process of controlling the on / off states of the first switch T1 and the second switch T2 to transmit an AC drive signal to the pressure sensing circuit 102 is as follows: When GPIO is low, the second stationary contact and the moving contact of the first switch T1 are connected, and the first stationary contact and the moving contact of the second switch T2 are connected. The first terminal of the pressure sensing circuit 102 is negative, and the second terminal is positive. Conversely, when GPIO is high, the second stationary contact and the moving contact of the second switch T2 are connected, and the first stationary contact and the moving contact of the first switch T1 are connected. The first terminal of the pressure sensing circuit 102 is positive, and the second terminal is negative. By switching the high and low levels of GPIO according to a preset frequency, an AC drive signal of a preset frequency can be transmitted to the pressure sensing circuit 102.
[0064] In this embodiment of the application, a first switch T1 and a second switch T2 with single-pole double-throw capability are respectively provided in the first switch circuit 104 and the second switch circuit 106. The moving contact of the first switch T1 and the moving contact of the second switch T2 are respectively connected to the first end and the second end of the pressure sensing circuit 102, so that the control circuit 108 can transmit AC drive signals to the pressure sensing circuit 102 by controlling the on / off state of the first switch T1 and the second switch T2.
[0065] Figure 5 The third example shows a circuit diagram of a pressure sampling component provided in some embodiments of this application, such as... Figure 5 As shown, in some embodiments of this application, the control circuit 108 includes: an amplifier sub-circuit AMP, the first input terminal of which is connected to the third terminal of the pressure sensing circuit 102, and the second input terminal of which is connected to the fourth terminal of the pressure sensing circuit 102; a sampling sub-circuit ADC, the input terminal of which is connected to the output terminal of the amplifier sub-circuit AMP; and a processor MCU, the input terminal of which is connected to the output terminal of the sampling sub-circuit ADC.
[0066] In this embodiment, the control circuit 108 includes an amplifier sub-circuit AMP. The first and second input terminals of the amplifier sub-circuit AMP are connected to the third and fourth terminals of the pressure sensing circuit 102, respectively, enabling the amplifier sub-circuit AMP to receive the AC output signal transmitted by the pressure sensing circuit 102 through the first and second input terminals. The amplifier sub-circuit AMP amplifies the AC output signal, and the amplified AC output signal is transmitted to the processor MCU for processing via the sampling sub-circuit ADC.
[0067] Specifically, the processor MCU is connected to the first switching circuit 104 and the second switching circuit 106. The processor MCU can control the switching frequency of the first switching circuit 104 and the second switching circuit 106, thereby transmitting an AC drive signal of a preset frequency to the pressure sensing circuit 102. Since the pressure sensing circuit 102 operates under AC excitation at the preset frequency, the output of the pressure sensing circuit 102 is shifted to the AC excitation frequency of the preset frequency. After receiving the voltage signal transmitted by the sampling sub-circuit ADC, the processor MCU performs single-frequency IQ demodulation on the voltage signal to obtain the amplitude information of the AC output signal at the preset frequency, i.e., the signal amplitude, thereby determining the corresponding pressure sampling value.
[0068] In this embodiment, by setting an amplification sub-circuit AMP and a sampling sub-circuit ADC in the control circuit 108, the AC output signal of the pressure sensing circuit 102 can be amplified and sampled. The AC output signal is demodulated by the processor MCU to obtain the phase information and amplitude information of the AC output signal. The pressure sampling value is obtained based on the phase information and amplitude information, and the noise bandwidth is constrained to a relatively small area, thereby reducing the circuit noise of the pressure sampling component 100 and improving the accuracy of the pressure sampling value collected by the pressure sampling component 100.
[0069] like Figure 2 , Figure 3 and Figure 5 As shown, in some embodiments of this application, the pressure sensing circuit 102 includes: a first resistor R1, the first end of which is connected to the third end of the first switching circuit 104, and the second end of which is connected to the input end of the control circuit 108; a second resistor R2, the first end of which is connected to the second end of the first resistor R1, and the second end of which is connected to the third end of the second switching circuit 106; a third resistor R3, the first end of which is connected to the second end of the second resistor R2, and the second end of which is connected to the input end of the control circuit 108; and a fourth resistor R4, the first end of which is connected to the second end of the third resistor R3, and the second end of which is connected to the first end of the first resistor R1, wherein at least one of the first resistor R1, the second resistor R2, the third resistor R3, and the fourth resistor R4 is a pressure-sensitive resistor.
[0070] In this embodiment of the application, the pressure sensing circuit 102 includes four resistors connected end to end. The common terminal of the first resistor R1 and the fourth resistor R4 is the first terminal of the pressure sensing circuit 102, the common terminal of the second resistor R2 and the third resistor R3 is the second terminal of the pressure sensing circuit 102, the common terminal of the first resistor R1 and the second resistor R2 is the third terminal of the pressure sensing circuit 102, and the common terminal of the third resistor R3 and the fourth resistor R4 is the fourth terminal of the pressure sensing circuit 102.
[0071] In this embodiment of the application, at least one of the first resistor R1, the second resistor R2, the third resistor R3 and the fourth resistor R4 in the pressure sensing circuit 102 is a pressure-sensitive resistor, that is, the resistance value of at least one of the four resistors will change according to the pressure change.
[0072] For example, the pressure sensing circuit 102 is a full-bridge pressure sensing circuit 102, and the first resistor R1, the second resistor R2, the third resistor R3 and the fourth resistor R4 are all piezoresistors.
[0073] For example, the pressure sensing circuit 102 is a half-bridge pressure sensing circuit 102, and the first resistor R1 and the third resistor R3 are piezoresistors, or the second resistor R2 and the fourth resistor R4 are piezoresistors.
[0074] For example, the pressure sensing circuit 102 is a quarter-bridge pressure sensing circuit 102, and any one of the first resistor R1, the second resistor R2, the third resistor R3 and the fourth resistor R4 is a piezoresistive resistor.
[0075] In this embodiment, by setting four resistors in the pressure sensing circuit 102, and at least one of the four resistors being a piezoresistive resistor, it can be ensured that the resistance value of the pressure sensing circuit 102 can change according to the pressure change. Since AC modulation can optimize the noise of the pressure sensing circuit 102 and improve the accuracy of the pressure sensing circuit 102, it is possible to select only some of the four resistors as piezoresistive resistors, which can reduce the circuit cost while meeting the pressure sampling accuracy.
[0076] In some embodiments of this application, an electronic device is provided. Figure 6 This application provides a block diagram of the structure of an electronic device, such as... Figure 6 As shown, the electronic device 600 includes a pressure sampling component 100, which is the pressure sampling component in any of the above embodiments, and therefore has all the beneficial technical effects of the pressure sampling component in any of the above embodiments, which will not be elaborated further here.
[0077] For example, the electronic device 600 can be a stylus.
[0078] In some embodiments of this application, a pressure sampling method is provided, applied to the pressure sampling component in any of the above embodiments. Figure 7 A flowchart illustrating the pressure sampling method provided in some embodiments of this application is shown. For example... Figure 7 As shown, the pressure sampling method includes:
[0079] Step 702: Control the on / off state of the first and second switching circuits according to a preset frequency to transmit an AC drive signal to the pressure sensing circuit.
[0080] In this embodiment of the application, the control circuit controls the on / off state of the first switch circuit and the second switch circuit so that when the power supply and the first terminal of the pressure sensing circuit are connected, the second terminal of the pressure sensing circuit is grounded, and when the power supply and the second terminal of the pressure sensing circuit are connected, the first terminal of the pressure sensing circuit is grounded, thereby realizing the transmission of AC drive signals to the pressure sensing circuit.
[0081] Specifically, the first and second terminals of the first switching circuit are connected to the power supply and ground, respectively. The third terminal of the first switching circuit is connected to the first terminal of the pressure sensing circuit. The control circuit can switch the on / off states of the first and third terminals of the first switching circuit, as well as the on / off states of the second and third terminals of the first switching circuit. When the first and third terminals of the first switching circuit are connected, and the second and third terminals are disconnected, the first terminal of the pressure sensing circuit is connected to the power supply. When the second and third terminals of the first switching circuit are connected, and the first and third terminals are disconnected, the first terminal of the pressure sensing circuit is grounded. Similarly, the first and second terminals of the second switching circuit are connected to the power supply and ground, respectively. The third terminal of the second switching circuit is connected to the second terminal of the pressure sensing circuit. The control circuit can switch the on / off states of the first and third terminals of the second switching circuit, as well as the on / off states of the second and third terminals of the first switching circuit. When the first and third terminals of the second switching circuit are connected and the second and third terminals are disconnected, the first terminal of the pressure sensing circuit is connected to the power supply. When the second and third terminals of the second switching circuit are connected and the first and third terminals are disconnected, the first terminal of the pressure sensing circuit is grounded.
[0082] Step 704: Obtain the phase and amplitude information of the AC output signal from the pressure sensing circuit;
[0083] Step 706: Determine the pressure sampling value based on the phase information and amplitude information.
[0084] In this embodiment, the control circuit is connected to the third and fourth terminals of the pressure sensing circuit. The third and fourth terminals of the pressure sensing circuit are the signal output terminals of the pressure sensing circuit. The AC output signal output by the pressure sensing circuit is transmitted to the control circuit through the third and fourth terminals. The control circuit can obtain the phase information and amplitude information of the AC output signal and determine the pressure sampling value based on the phase information and amplitude information.
[0085] It should be noted that the control circuit can perform single-frequency IQ demodulation on the AC output signal to obtain the amplitude information of the AC output signal at the AC excitation frequency, and confine the noise bandwidth to a relatively small area, thereby reducing the noise of the pressure sampling component. Specifically, IQ demodulation is used to extract the original phase and amplitude information from the modulated signal. During IQ demodulation of the AC output signal, the AC output signal is treated as a complex signal composed of real and imaginary parts. This allows for separate processing of the real and imaginary parts, effectively separating the signal and noise, and thus providing better noise suppression capabilities.
[0086] In this embodiment, by connecting the first and second terminals of the pressure sensing circuit to the first and second switching circuits respectively, the first switching circuit can switch the on / off state of the first terminal of the pressure sensing circuit with the power supply and ground terminal, and the second switching circuit can also switch the on / off state of the second terminal of the pressure sensing circuit with the power supply and ground terminal. Therefore, AC drive signals can be transmitted to the pressure sensing circuit through the first and second switching circuits, enabling the control circuit to acquire AC output signals at the third and fourth terminals of the pressure sensing circuit, demodulate the AC output signals to obtain phase and amplitude information, and constrain the noise bandwidth to a relatively small area, thereby reducing the noise of the pressure sampling component and determining the pressure sampling value based on the phase and amplitude information. During the demodulation of the AC output signal, the real and imaginary parts of the AC output signal can be processed separately to separate the signal and noise, effectively separating the signal and noise, thereby providing better noise suppression capability.
[0087] In some embodiments of this application, controlling the on / off state of the first switching circuit and the second switching circuit according to a preset frequency includes:
[0088] The first and second switching circuits are switched according to a preset frequency in the first on / off state and the second on / off state.
[0089] The first on / off state includes: the first terminal and the third terminal of the first switching circuit are connected, and the second terminal and the third terminal of the first switching circuit are disconnected; and the second terminal and the third terminal of the second switching circuit are connected, and the first terminal and the third terminal of the second switching circuit are disconnected.
[0090] The second on / off state includes: the second terminal and the third terminal of the first switching circuit are connected, and the first terminal and the third terminal of the first switching circuit are disconnected; and the first terminal and the third terminal of the second switching circuit are connected, and the second terminal and the third terminal of the second switching circuit are disconnected.
[0091] In this embodiment, since the first and second terminals of the first switching circuit are connected to the power supply and the ground terminal respectively, and the first and second terminals of the second switching circuit are also connected to the power supply and the ground terminal respectively, and the third terminals of both the first and second switching circuits are connected to the first and second terminals of the pressure sensing circuit respectively, the control circuit can control the on / off state of the first and second switching circuits, thereby controlling the conduction state of the first terminal of the pressure sensing circuit with the power supply or the ground terminal, and controlling the conduction state of the second terminal of the pressure sensing circuit with the power supply or the ground terminal. By alternately controlling the first or second terminal of the pressure sensing circuit to conduct with the power supply, an AC drive signal is transmitted to the pressure sensing circuit.
[0092] Specifically, the control circuit controls the first switching circuit and the second switching circuit to switch between the first on / off state and the second on / off state according to a preset frequency, thereby transmitting an AC drive signal of the preset frequency to the pressure sensing circuit.
[0093] The first on / off state includes: when the first terminal to the third terminal of the first switching circuit is on and the second terminal to the third terminal of the first switching circuit is off, and when the second terminal to the third terminal of the second switching circuit is on and the first terminal to the third terminal of the second switching circuit is off, the first terminal of the pressure sensing circuit is connected to the power supply, and the second terminal of the pressure sensing circuit is connected to the ground terminal.
[0094] The second on / off state includes: when the second terminal to the third terminal of the first switching circuit is on and the first terminal to the third terminal of the first switching circuit is off, and when the first terminal to the third terminal of the second switching circuit is on and the second terminal to the third terminal of the second switching circuit is off, the second terminal of the pressure sensing circuit is connected to the power supply, and the first terminal of the pressure sensing circuit is connected to the ground terminal.
[0095] In this embodiment, the control circuit can control the on / off state of the first switching circuit and the second switching circuit, and control the conduction state between the first and second terminals of the pressure sensing circuit and the power supply and ground terminals, thereby transmitting corresponding AC drive signals to the pressure sensing circuit.
[0096] In some embodiments of this application, obtaining the phase information and amplitude information of the AC output signal output by the pressure sensing circuit includes: determining a first output signal and a second output signal according to a preset frequency and the AC output signal; performing low-pass filtering on the first output signal and the second output signal respectively to obtain a real part signal and an imaginary part signal; and determining the phase information and amplitude information according to the real part signal and the imaginary part signal.
[0097] In this embodiment of the application, after the AC output signal is acquired, the AC output signal is demodulated by IQ to obtain the phase information and amplitude information of the AC output signal at a preset frequency. During the IQ demodulation process, the AC output signal is regarded as a complex signal composed of real part signal and imaginary part signal, so that the signal and noise can be processed separately. By processing the real part signal and the imaginary part signal independently, the signal and noise can be effectively separated, and the noise suppression capability can be improved.
[0098] Specifically, the complex expression (1) of the AC output signal is as follows:
[0099] s(t)=I(t)+jQ(t); (1)
[0100] Where s(t) is the AC output signal, I(t) is the real part signal, Q(t) is the imaginary part signal, j is the imaginary unit, and t is time.
[0101] The complex expression (2) of the filtered AC output signal is as follows:
[0102] s(t)=I(t)cos(2πfct)-Q(t)sin(2πfct); (2)
[0103] Where s(t) is the AC output signal, I(t) is the real part of the signal, Q(t) is the imaginary part of the signal, fc is the carrier frequency, and t is time.
[0104] The processor performs IQ demodulation on the filtered AC output signal using digital signal processing algorithms, as follows:
[0105] The AC output signal is multiplied by cos(2πfct) and sin(2πfct) respectively to obtain I(t)cos²(2πfct) and -Q(t)sin²(2πfct), where I(t)cos²(2πfct) is the first output signal and -Q(t)sin²(2πfct) is the second output signal. The first and second output signals are then low-pass filtered to remove high-frequency components, yielding I(t) and Q(t), where I(t) is the real part and Q(t) is the imaginary part. The phase and amplitude information of the original signal are then recovered from the real and imaginary parts, thus completing IQ demodulation.
[0106] In this embodiment, the filtered signal is demodulated using a data signal processing algorithm, thereby extracting the phase and amplitude information of the original AC output signal. This facilitates the subsequent determination of the pressure sampling value of the pressure sensor based on the phase and amplitude information, further improving the accuracy of the obtained pressure sampling value.
[0107] In some embodiments of this application, the pressure sampling value is determined based on phase information and amplitude information, including:
[0108] The pressure sampling value is determined based on the phase information, amplitude information, and target mapping relationship.
[0109] In this embodiment, the target mapping relationship is the mapping relationship between phase information, amplitude information and pressure sampling value. After obtaining the phase information and amplitude information of the AC output signal, the corresponding pressure sampling value can be determined through the target mapping relationship, thereby further improving the accuracy of the pressure sampling value.
[0110] For example, the target mapping relationship can be a computational expression or a mapping relationship table.
[0111] The pressure sampling method provided in this application can be executed by a pressure sampling device. This application uses an example of a pressure sampling device executing the pressure sampling method to illustrate the pressure sampling method provided in this application.
[0112] In some embodiments of this application, a pressure sampling device is provided, applied to the pressure sampling component in any of the above embodiments. Figure 8 Schematic block diagrams of pressure sampling devices provided in some embodiments of this application are shown. For example... Figure 8 As shown, the pressure sampling device 800 includes:
[0113] The control module 802 is used to control the on / off state of the first switching circuit and the second switching circuit according to a preset frequency, so as to transmit AC drive signals to the pressure sensing circuit.
[0114] The acquisition module 804 is used to acquire the phase information and amplitude information of the AC output signal output by the pressure sensing circuit;
[0115] The determination module 806 is used to determine the pressure sampling value based on the phase information and amplitude information.
[0116] In this embodiment, by connecting the first and second terminals of the pressure sensing circuit to the first and second switching circuits respectively, the first switching circuit can switch the on / off state of the first terminal of the pressure sensing circuit with the power supply and ground terminal, and the second switching circuit can also switch the on / off state of the second terminal of the pressure sensing circuit with the power supply and ground terminal. Therefore, AC drive signals can be transmitted to the pressure sensing circuit through the first and second switching circuits, enabling the control circuit to acquire AC output signals at the third and fourth terminals of the pressure sensing circuit, demodulate the AC output signals to obtain phase and amplitude information, and constrain the noise bandwidth to a relatively small area, thereby reducing the noise of the pressure sampling component and determining the pressure sampling value based on the phase and amplitude information. During the demodulation of the AC output signal, the real and imaginary parts of the AC output signal can be processed separately to separate the signal and noise, effectively separating the signal and noise, thereby providing better noise suppression capability.
[0117] In some embodiments of this application, the control module 802 is used to control the switching of the first switching circuit and the second switching circuit according to a preset frequency in the first on / off state and the second on / off state.
[0118] The first on / off state includes: the first terminal and the third terminal of the first switching circuit are connected, and the second terminal and the third terminal of the first switching circuit are disconnected; and the second terminal and the third terminal of the second switching circuit are connected, and the first terminal and the third terminal of the second switching circuit are disconnected.
[0119] The second on / off state includes: the second terminal and the third terminal of the first switching circuit are connected, and the first terminal and the third terminal of the first switching circuit are disconnected; and the first terminal and the third terminal of the second switching circuit are connected, and the second terminal and the third terminal of the second switching circuit are disconnected.
[0120] In this embodiment, the control circuit can control the on / off state of the first switching circuit and the second switching circuit, and control the conduction state between the first and second terminals of the pressure sensing circuit and the power supply and ground terminals, thereby transmitting corresponding AC drive signals to the pressure sensing circuit.
[0121] In some embodiments of this application, the determining module 806 is used to determine a first output signal and a second output signal based on a preset frequency and an AC output signal;
[0122] The pressure sampling device 800 also includes:
[0123] The filtering module is used to perform low-pass filtering on the first output signal and the second output signal respectively to obtain the real part signal and the imaginary part signal;
[0124] The determination module 806 is used to determine phase information and amplitude information based on the real part signal and the imaginary part signal.
[0125] In this embodiment, the filtered signal is demodulated using a data signal processing algorithm, thereby extracting the phase and amplitude information of the original AC output signal. This facilitates the subsequent determination of the pressure sampling value of the pressure sensor based on the phase and amplitude information, further improving the accuracy of the obtained pressure sampling value.
[0126] In some embodiments of this application, the determining module 806 is used to determine the pressure sampling value based on phase information, amplitude information and target mapping relationship.
[0127] In this embodiment, the target mapping relationship is the mapping relationship between phase information, amplitude information and pressure sampling value. After obtaining the phase information and amplitude information of the AC output signal, the corresponding pressure sampling value can be determined through the target mapping relationship, thereby further improving the accuracy of the pressure sampling value.
[0128] The pressure sampling device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. Exemplarily, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0129] The pressure sampling device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0130] The pressure sampling device provided in this application embodiment can realize the various processes implemented in the above method embodiments, and will not be described again here to avoid repetition.
[0131] Optionally, embodiments of this application also provide an electronic device, which includes a pressure sampling device as described in any of the above embodiments, and thus has all the beneficial effects of the pressure sampling method in any of the embodiments, which will not be elaborated further here.
[0132] Optionally, embodiments of this application also provide an electronic device. Figure 9 A structural block diagram of an electronic device according to an embodiment of this application is shown, such as... Figure 9 As shown, the electronic device 900 includes a processor 902, a memory 904, and a program or instructions stored in the memory 904 and executable on the processor 902. When the program or instructions are executed by the processor 902, they implement the various processes of the above-described pressure sampling method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0133] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.
[0134] Figure 10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0135] The electronic device 1000 includes, but is not limited to, components such as: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.
[0136] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0137] The processor 1010 is used to control the on / off state of the first switching circuit and the second switching circuit according to a preset frequency, so as to transmit AC drive signals to the pressure sensing circuit.
[0138] Processor 1010 is used to acquire the phase and amplitude information of the AC output signal from the pressure sensing circuit;
[0139] Processor 1010 is used to determine the pressure sample value based on phase information and amplitude information.
[0140] In this embodiment, by connecting the first and second terminals of the pressure sensing circuit to the first and second switching circuits respectively, the first switching circuit can switch the on / off state of the first terminal of the pressure sensing circuit with the power supply and ground terminal, and the second switching circuit can also switch the on / off state of the second terminal of the pressure sensing circuit with the power supply and ground terminal. Therefore, AC drive signals can be transmitted to the pressure sensing circuit through the first and second switching circuits, enabling the control circuit to acquire AC output signals at the third and fourth terminals of the pressure sensing circuit, demodulate the AC output signals to obtain phase and amplitude information, and constrain the noise bandwidth to a relatively small area, thereby reducing the noise of the pressure sampling component and determining the pressure sampling value based on the phase and amplitude information. During the demodulation of the AC output signal, the real and imaginary parts of the AC output signal can be processed separately to separate the signal and noise, effectively separating the signal and noise, thereby providing better noise suppression capability.
[0141] Furthermore, the processor 1010 is used to control the switching of the first switching circuit and the second switching circuit according to a preset frequency in the first on / off state and the second on / off state.
[0142] The first on / off state includes: the first terminal and the third terminal of the first switching circuit are connected, and the second terminal and the third terminal of the first switching circuit are disconnected; and the second terminal and the third terminal of the second switching circuit are connected, and the first terminal and the third terminal of the second switching circuit are disconnected.
[0143] The second on / off state includes: the second terminal and the third terminal of the first switching circuit are connected, and the first terminal and the third terminal of the first switching circuit are disconnected; and the first terminal and the third terminal of the second switching circuit are connected, and the second terminal and the third terminal of the second switching circuit are disconnected.
[0144] In this embodiment, the control circuit can control the on / off state of the first switching circuit and the second switching circuit, and control the conduction state between the first and second terminals of the pressure sensing circuit and the power supply and ground terminals, thereby transmitting corresponding AC drive signals to the pressure sensing circuit.
[0145] Furthermore, the processor 1010 is used to determine the first output signal and the second output signal based on the preset frequency and the AC output signal;
[0146] Processor 1010 is used to perform low-pass filtering on the first output signal and the second output signal respectively to obtain the real part signal and the imaginary part signal;
[0147] Processor 1010 is used to determine phase information and amplitude information based on the real part signal and the imaginary part signal.
[0148] In this embodiment, the filtered signal is demodulated using a data signal processing algorithm, thereby extracting the phase and amplitude information of the original AC output signal. This facilitates the subsequent determination of the pressure sampling value of the pressure sensor based on the phase and amplitude information, further improving the accuracy of the obtained pressure sampling value.
[0149] Furthermore, the processor 1010 is used to determine the pressure sample value based on the phase information, amplitude information, and target mapping relationship.
[0150] In this embodiment, the target mapping relationship is the mapping relationship between phase information, amplitude information and pressure sampling value. After obtaining the phase information and amplitude information of the AC output signal, the corresponding pressure sampling value can be determined through the target mapping relationship, thereby further improving the accuracy of the pressure sampling value.
[0151] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or motion files obtained by an image capture device (such as a camera) in motion file capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.
[0152] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1009 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0153] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.
[0154] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0155] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0156] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described pressure sampling method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0157] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0158] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the pressure sampling method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0159] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or device that includes that element. Furthermore, it should be noted that the scope of the apparatus and devices in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described apparatus may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0160] Through the above description of the embodiments, those skilled in the art can clearly understand that the apparatus of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platform, and of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the apparatus of the various embodiments of this application.
[0161] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A pressure sampling assembly, characterized by, The pressure sampling assembly comprises: a pressure sensing circuit; a first switch circuit, a first end of the first switch circuit being connected with a power supply, a second end of the first switch circuit being grounded, and a third end of the first switch circuit being connected with a first end of the pressure sensing circuit; a second switch circuit, a first end of the second switch circuit being connected with the power supply, a second end of the second switch circuit being grounded, and a third end of the second switch circuit being connected with a second end of the pressure sensing circuit; a control circuit, an output end of the control circuit being connected with control ends of the first switch circuit and the second switch circuit, the control circuit being configured to control on-off states of the first switch circuit and the second switch circuit to transmit an alternating current driving signal to the pressure sensing circuit, input ends of the control circuit being connected with third and fourth ends of the pressure sensing circuit, the control circuit being capable of acquiring alternating current output signals output by the third and fourth ends of the pressure sensing circuit, and the control circuit being further configured to determine a pressure sampling value according to phase information and amplitude information of the alternating current output signals of the pressure sensing circuit; by adjusting a frequency of switching of the on-off states of the first switch circuit and the second switch circuit, a frequency of the alternating current driving signal transmitted to the pressure sensing circuit can be adjusted; the pressure sensing circuit comprises a first resistor, a second resistor, a third resistor, and a fourth resistor; a first end of the first resistor is connected with the third end of the first switch circuit, and a second end of the first resistor is connected with the input end of the control circuit; a first end of the second resistor is connected with the second end of the first resistor, and a second end of the second resistor is connected with the third end of the second switch circuit; a first end of the third resistor is connected with the second end of the second resistor, and a second end of the third resistor is connected with the input end of the control circuit; a first end of the fourth resistor is connected with the second end of the third resistor, and a second end of the fourth resistor is connected with the first end of the first resistor; at least one of the first resistor, the second resistor, the third resistor, and the fourth resistor is a pressure-sensitive resistor.
2. The pressure sampling assembly according to claim 1, wherein the control circuit is configured to control the first end and the third end of the first switch circuit to be turned on, and the second end and the third end of the first switch circuit to be turned off, and control the second end and the third end of the second switch circuit to be turned on, and the first end and the third end of the second switch circuit to be turned off; or the control circuit is configured to control the second end and the third end of the first switch circuit to be turned on, and the first end and the third end of the first switch circuit to be turned off, and control the first end and the third end of the second switch circuit to be turned on, and the second end and the third end of the second switch circuit to be turned off.
3. The pressure sampling assembly of claim 1, wherein, the first switch circuit comprises: a first MOS transistor, a source of the first MOS transistor being connected with the power supply, a drain of the first MOS transistor being connected with a first end of the pressure sensing circuit, a gate of the first MOS transistor being connected with the control circuit; a second MOS transistor, a source of the second MOS transistor being grounded, a drain of the second MOS transistor being connected with the first end of the pressure sensing circuit, a gate of the second MOS transistor being connected with the control circuit; the second switch circuit comprises: a third MOS transistor, a source of the third MOS transistor being connected with the power supply, a drain of the third MOS transistor being connected with a second end of the pressure sensing circuit, a gate of the third MOS transistor being connected with the control circuit; a fourth MOS transistor, a source of the fourth MOS transistor being grounded, a drain of the fourth MOS transistor being connected with the second end of the pressure sensing circuit, a gate of the fourth MOS transistor being connected with the control circuit.
4. The pressure sampling assembly of claim 1, wherein, the first switch circuit comprises: a first switch element, a first static contact of the first switch element being connected with the power supply, a second static contact of the first switch element being grounded, a moving contact of the first switch element being connected with the first end of the pressure sensing circuit, a control end of the first switch element being connected with the control circuit; the second switch circuit comprises: a second switch element, a first static contact of the second switch element being connected with the power supply, a second static contact of the second switch element being grounded, a moving contact of the second switch element being connected with the second end of the pressure sensing circuit, a control end of the second switch element being connected with the control circuit.
5. The pressure sampling assembly of any one of claims 1 to 4, wherein, the control circuit comprises: an amplification sub-circuit, a first input end of the amplification sub-circuit being connected with a third end of the pressure sensing circuit, a second input end of the amplification sub-circuit being connected with a fourth end of the pressure sensing circuit; a sampling sub-circuit, an input end of the sampling sub-circuit being connected with an output end of the amplification sub-circuit; a processor, an input end of the processor being connected with an output end of the sampling sub-circuit.
6. An electronic device, comprising: comprises: the pressure sampling assembly of any one of claims 1 to 5.
7. A method of pressure sampling, characterized by, applied to the pressure sampling assembly of any one of claims 1 to 5, the pressure sampling method comprises: controlling on-off states of the first switch circuit and the second switch circuit according to a preset frequency, to transmit an alternating current driving signal to the pressure sensing circuit; obtaining phase information and amplitude information of an alternating current output signal output by the pressure sensing circuit; determining a pressure sampling value according to the phase information and the amplitude information.
8. The pressure sampling method of claim 7, wherein, the controlling on-off states of the first switch circuit and the second switch circuit according to the preset frequency comprises: controlling the first switch circuit and the second switch circuit to switch between a first on-off state and a second on-off state according to the preset frequency; wherein the first on-off state comprises: the first end and the third end of the first switch circuit being turned on, and the second end and the third end of the first switch circuit being turned off; and the second end of the second switch circuit and the third end being turned on, and the first end of the second switch circuit and the third end being turned off; The second on-off state includes: the second end and the third end of the first switch circuit are turned on, and the first end and the third end of the first switch circuit are turned off; and the first end and the third end of the second switch circuit are turned on, and the second end and the third end of the second switch circuit are turned off.
9. The pressure sampling method of claim 7, wherein, The phase information and the amplitude information of the alternating output signal output by the pressure sensing circuit are acquired, including: According to the preset frequency and the alternating output signal, a first output signal and a second output signal are determined; The first output signal and the second output signal are respectively low-pass filtered to obtain a real part signal and an imaginary part signal; According to the real part signal and the imaginary part signal, the phase information and the amplitude information are determined.
10. The pressure sampling method according to any one of claims 7 to 9, characterized in that, According to the phase information and the amplitude information, a pressure sampling value is determined, including: According to the phase information, the amplitude information and a target mapping relationship, the pressure sampling value is determined.
11. A pressure sampling device, characterized by The pressure sampling device is applied to the pressure sampling assembly in any one of claims 1 to 5, and the pressure sampling device includes: A control module is configured to control the on-off state of the first switch circuit and the second switch circuit according to a preset frequency, so as to transmit an alternating driving signal to the pressure sensing circuit; An acquisition module is configured to acquire the phase information and the amplitude information of the alternating output signal output by the pressure sensing circuit; A determination module is configured to determine a pressure sampling value according to the phase information and the amplitude information.
Citation Information
Patent Citations
Circuit for feeding a Wheatstone Bridge with a rectangular waveform voltage
US5804978A