Pressure sampling assembly, electronic equipment, pressure sampling method and pressure sampling device
By designing a pressure sampling component, using a switching circuit to transmit an AC drive signal to the pressure sensing circuit, and determining the sampling value based on the phase information and amplitude information of the output signal, the problem of low sampling accuracy of pressure sensors in the prior art is solved. Higher noise suppression and sampling accuracy are achieved.
Patent Information
- Application Number
- CN202411542290.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-31
AI Technical Summary
In the prior art, the sampling accuracy of pressure sensors is low, mainly due to the wide circuit bandwidth and the overall noise is high.
A pressure sampling assembly is designed, by connecting the first and second ends of the pressure sensing circuit to the first switching circuit and the second switching circuit respectively, the control circuit is used to control the on-off state of the switching circuit and toward the pressure. The sensing circuit transmits an AC drive signal and determines the pressure sampling value based on the phase information and amplitude information of the output signal.
By constraining the noise bandwidth in a smaller area, the noise of the pressure sampling assembly is reduced and the accuracy of the collected pressure sampling values is improved.
Smart Images

Figure CN119469492A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a pressure sampling component, electronic equipment, a pressure sampling method and a pressure sampling device. Background Art
[0002] The pressure sensing principle of the stylus tip is usually realized 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 the related art, the pressure sensor is made of conductive materials, and when pressure is applied, the resistance value will change. By applying a fixed DC bias voltage to the sensor, when the resistance changes, the voltage values of the two bridge arms of the Wheatstone bridge change, thereby determining the change in the resistance value to determine the collected pressure value. However, in the collection mode of applying a fixed DC bias voltage, the circuit bandwidth is wide and the overall noise is large, which affects the sampling accuracy of the pressure sensor. Summary of the invention
[0004] The present application aims to provide a pressure sampling component, an electronic device, a pressure sampling method and a pressure sampling device, which can solve the problem of low sampling accuracy of pressure sensors in related technologies.
[0005] In a first aspect, an embodiment of the present application proposes a pressure sampling component, which includes: a pressure sensing circuit; a first switch circuit, wherein a first end of the first switch circuit is connected to a power supply, a second end of the first switch circuit is grounded, and a third end of the first switch circuit is connected to the first end of the pressure sensing circuit; a second switch circuit, wherein a first end of the second switch circuit is connected to a power supply, a second end of the second switch circuit is grounded, and a third end of the second switch circuit is connected to the second end of the pressure sensing circuit; a control circuit, wherein an output end of the control circuit is connected to a control end of the first switch circuit and a control end of the second switch circuit, the control circuit is used to control the on-off state of the first switch circuit and the second switch circuit to transmit an AC drive signal to the pressure sensing circuit, an input end of the control circuit is connected to a third end and a fourth end of the pressure sensing circuit, and the control circuit is also used to determine a pressure sampling value according to phase information and amplitude information of an AC output signal of the pressure sensing circuit.
[0006] In a second aspect, an embodiment of the present application proposes an electronic device, including: the pressure sampling component of the first aspect.
[0007] In the third aspect, an embodiment of the present application proposes a pressure sampling method, which is applied to the pressure sampling component in the first aspect. The pressure sampling method includes: controlling the on and off states of the first switching circuit and the second switching circuit according to a preset frequency to transmit an AC drive signal to the pressure sensing circuit; obtaining the phase information and amplitude information of the AC output signal output by the pressure sensing circuit; and determining the pressure sampling value based on the phase information and the amplitude information.
[0008] In a fourth aspect, an embodiment of the present application proposes a pressure sampling device, which is applied to the pressure sampling component in the first aspect. The pressure sampling device includes: a control module, which is used to control the on-off state of the first switching circuit and the second switching circuit according to a preset frequency to transmit an AC drive signal to the pressure sensing circuit; an acquisition module, which is used to acquire the phase information and amplitude information of the AC output signal output by the pressure sensing circuit; and a determination module, which is used to determine the pressure sampling value based on the phase information and the amplitude information.
[0009] In a fifth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the third aspect are implemented.
[0010] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the third aspect are implemented.
[0011] In the seventh aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the method of the third aspect.
[0012] In an eighth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the third aspect.
[0013] In an embodiment of the present application, by connecting the first end and the second end of the pressure sensing circuit to the first switching circuit and the second switching circuit respectively, the first switching circuit can switch and control the on-off state of the first end of the pressure sensing circuit and the power supply and the ground end, and the second switching circuit can also switch and control the on-off state of the second end of the pressure sensing circuit and the power supply and the ground end, so that an AC drive signal can be transmitted to the pressure sensing circuit through the first switching circuit and the second switching circuit, so that the control circuit can collect the AC output signal at the third end and the fourth end of the pressure sensing circuit, demodulate the AC output signal 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 and determining the pressure sampling value based on the phase information and amplitude information. In the process of demodulating the AC output signal, the real signal and the imaginary signal of the AC output signal can be processed separately. Signal and noise can be effectively separated, thereby providing better noise suppression capability.
[0014] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0016] Figure 1 A structural block diagram of a pressure sampling component provided in some embodiments of the present application is shown;
[0017] Figure 2 One of the circuit diagrams of the pressure sampling assembly provided in some embodiments of the present application is shown;
[0018] Figure 3 A second circuit diagram of a pressure sampling assembly provided in some embodiments of the present application is shown;
[0019] Figure 4 shows an AC modulation timing diagram provided in some embodiments of the present application;
[0020] Figure 5 A third circuit diagram of a pressure sampling assembly provided in some embodiments of the present application is shown;
[0021] Figure 6 One of the structural block diagrams of an electronic device provided in some embodiments of the present application is shown;
[0022] Figure 7 A schematic diagram showing a flow chart of a pressure sampling method provided in some embodiments of the present application is shown;
[0023] Figure 8 A schematic block diagram of a pressure sampling device provided in some embodiments of the present application is shown;
[0024] Fig. 9 A structural block diagram of an electronic device according to an embodiment of the present application is shown;
[0025] Fig.10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0026] Reference numerals:
[0027] 100 pressure sampling component, 102 pressure sensing circuit, 104 first switch circuit, 106 second switch circuit, 108 control circuit, Q1 first MOS tube, Q2 second MOS tube, Q3 third MOS tube, Q4 fourth MOS tube, T1 first switch element, T2 second switch element, AMP amplification sub-circuit, ADC sampling sub-circuit, MCU processor, R1 first resistor, R2 second resistor, R3 third resistor, R4 fourth resistor, Ve power supply, GND grounding terminal. DETAILED DESCRIPTION
[0028] The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and should not be construed as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0029] The term "first" or "second" in the specification and claims of this application may include one or more of the features explicitly or implicitly. In the description of this application, unless otherwise specified, "plurality" means two or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the objects connected before and after are in an "or" relationship.
[0030] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0031] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0032] Combine the following Figures 1 to 10 A pressure sampling assembly, an electronic device, a pressure sampling method and a pressure sampling device according to embodiments of the present application are described.
[0033] In some embodiments of the present application, a pressure sampling assembly is provided. Figure 1 shows a structural block diagram of a pressure sampling component provided in some embodiments of the present application, Figure 2 One of the circuit diagrams of the pressure sampling assembly provided in some embodiments of the present application is shown. Figure 3 FIG. 2 shows a circuit diagram of a pressure sampling assembly provided in some embodiments of the present application. Figure 1 , Figure 2 and Figure 3As shown, the pressure sampling component 100 includes: a pressure sensing circuit 102; a first switch circuit 104, wherein a first end of the first switch circuit 104 is connected to a power source Ve, a second end of the first switch circuit 104 is grounded, and a third end of the first switch circuit 104 is connected to a first end of the pressure sensing circuit 102; a second switch circuit 106, wherein a first end of the second switch circuit 106 is connected to a power source Ve, a second end of the second switch circuit 106 is grounded, and a third end of the second switch circuit 106 is connected to a second end of the pressure sensing circuit 102. connected; a control circuit 108, an output end of the control circuit 108 is connected to a control end of the first switch circuit 104 and a control end 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 an AC drive signal to the pressure sensing circuit 102, an input end of the control circuit 108 is connected to a third end and a fourth end of the pressure sensing circuit 102, and the control circuit 108 is also used to determine a pressure sampling value according to the AC output signal of the pressure sensing circuit 102.
[0034] In an embodiment of the present application, the resistance of the pressure sensing circuit 102 can change according to the pressure applied, and the control circuit 108 can control the on and off states 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, and the input end of the control circuit 108 is connected to the third end and the fourth end of the pressure sensing circuit 102, and the control circuit 108 can obtain the AC output signal output by the third end and the fourth end of the pressure sensing circuit 102.
[0035] In the embodiment of the present application, the first end and the second end of the first switch circuit 104 are connected to the power supply Ve and the ground terminal GND respectively, and the third end of the first switch circuit 104 is connected to the first end of the pressure sensing circuit 102. The control circuit 108 can switch the on-off state from the first end to the third end of the first switch circuit 104, and the on-off state from the second end to the third end of the first switch circuit 104. When the first end of the first switch circuit 104 is connected to the third end and the second end is disconnected from the third end, the first end of the pressure sensing circuit 102 is connected to the power supply Ve, and when the second end of the first switch circuit 104 is connected to the third end and the first end is disconnected from the third end, the first end of the pressure sensing circuit 102 is grounded.
[0036] In the embodiment of the present application, the first end and the second end of the second switch circuit 106 are connected to the power supply Ve and the ground terminal GND respectively, and the third end of the second switch circuit 106 is connected to the second end of the pressure sensing circuit 102. The control circuit 108 can switch the on-off state from the first end to the third end of the second switch circuit 106, and the on-off state from the second end to the third end of the first switch circuit 104. Among them, when the first end of the second switch circuit 106 is connected to the third end, and the second end is disconnected from the third end, the first end of the pressure sensing circuit 102 is connected to the power supply Ve, and when the second end of the second switch circuit 106 is connected to the third end, and the first end is disconnected from the third end, the first end of the pressure sensing circuit 102 is grounded.
[0037] Specifically, the control circuit 108 controls the on and off states of the first switch circuit 104 and the second switch circuit 106 so that when the power supply Ve and the first end of the pressure sensing circuit 102 are connected, the second end of the pressure sensing circuit 102 is grounded, and when the power supply Ve and the second end of the pressure sensing circuit 102 are connected, the first end 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 and 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 an embodiment of the present application, the control circuit 108 is connected to the third end and the fourth end of the pressure sensing circuit 102. The third end and the fourth end of the pressure sensing circuit 102 are signal output ends 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 end and the fourth end. 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 the amplitude information.
[0040] It should be noted that the control circuit 108 can perform single-frequency IQ (In-phase Quadrature) demodulation (a signal processing technology) on the AC output signal, thereby obtaining the amplitude information of the AC output signal at the AC excitation frequency, and constraining the noise bandwidth to a relatively small area, thereby reducing the noise of the pressure sampling component 100. Among them, IQ demodulation is used to extract the original phase information and amplitude information from the modulated signal. In the process of IQ demodulation of the AC output signal, the AC output signal is regarded as a complex signal composed of a real signal and an imaginary signal. The real signal and the imaginary signal can be processed separately. Signals and noise can be effectively separated, thereby providing better noise suppression capabilities.
[0041] In the embodiment of the present application, by connecting the first end and the second end of the pressure sensing circuit 102 to the first switch circuit 104 and the second switch circuit 106 respectively, the first switch circuit 104 can switch and control the on-off state of the first end of the pressure sensing circuit 102 with the power supply Ve and the ground terminal GND, and the second switch circuit 106 can also switch and control the on-off state of the second end of the pressure sensing circuit 102 with the power supply Ve and the ground terminal GND, so that the AC drive signal can be transmitted to the pressure sensing circuit 102 through the first switch circuit 104 and the second switch circuit 106, so that the control circuit 108 can collect the AC output signal at the third end and the fourth end of the pressure sensing circuit 102, demodulate the AC output signal 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. In the process of demodulating the AC output signal, the real signal and the imaginary signal of the AC output signal can be processed respectively. The signal and noise can be effectively separated, thereby providing better noise suppression capability.
[0042] In some embodiments of the present application, the control circuit 108 is used to control the first terminal of the first switch circuit 104 to be conductive with the third terminal, and the second terminal of the first switch circuit 104 to be disconnected from the third terminal; and control the second terminal of the second switch circuit 106 to be conductive with the third terminal, and the first terminal of the second switch circuit 106 to be disconnected from the third terminal; or
[0043] The control circuit 108 is used to control the second end and the third end of the first switch circuit 104 to be conductive, and the first end and the third end of the first switch circuit 104 to be disconnected; and to control the first end and the third end of the second switch circuit 106 to be conductive, and the second end and the third end of the second switch circuit 106 to be disconnected.
[0044] In the embodiment of the present application, since the first end and the second end of the first switch circuit 104 are respectively connected to the power supply Ve and the ground terminal GND, the first end and the second end of the second switch circuit 106 are also respectively connected to the power supply Ve and the ground terminal GND, and the third end of the first switch circuit 104 and the third end of the second switch circuit 106 are respectively connected to the first end and the second end of the pressure sensing circuit 102, the control circuit 108 can control the on-off state of the first switch circuit 104 and the second switch circuit 106, thereby controlling the conduction state of the first end of the pressure sensing circuit 102 and the power supply Ve or the ground terminal GND, and controlling the conduction state of the second end of the pressure sensing circuit 102 and the power supply Ve or the ground terminal GND, and transmitting an AC drive signal to the pressure sensing circuit 102 by alternately controlling the first end or the second end of the pressure sensing circuit to be conductive with the power supply Ve.
[0045] Specifically, the control circuit 108 controls the first switch circuit 104 and the second switch circuit 106 to switch between a first on-off state and a second on-off state according to a preset frequency, thereby transmitting an AC drive signal of a preset frequency to the pressure sensing circuit 102 .
[0046] Among them, the first on-off state includes: when the first end to the third end of the first switch circuit 104 is turned on and the second end to the third end of the first switch circuit 104 is turned off, and when the second end to the third end of the second switch circuit 106 is turned on and the first end to the third end of the second switch circuit 106 is turned off, the first end of the pressure sensing circuit 102 is connected to the power supply Ve, and the second end of the pressure sensing circuit 102 is connected to the ground terminal GND.
[0047] The second on-off state includes: when the second end to the third end of the first switch circuit 104 is turned on and the first end to the third end of the first switch circuit 104 is turned off, and when the first end to the third end of the second switch circuit 106 is turned on and the second end to the third end of the second switch circuit 106 is turned off, the second end of the pressure sensing circuit 102 is connected to the power supply Ve, and the first end of the pressure sensing circuit 102 is connected to the ground terminal GND.
[0048] Figure 4 shows an AC modulation timing diagram provided in some embodiments of the present application, such as Figure 4 As shown, GPIO1 is a control signal transmitted to the first switch circuit 104, and GPIO2 is a control signal transmitted to the second switch circuit 106. When GPIO1 is 0 and GPIO2 is 1, the second end of the first switch circuit 104 is connected to the third end, and the first end of the second switch circuit 106 is connected to the third end. At this time, the first end of the pressure sensing circuit 102 is grounded, and the second end of the pressure sensing circuit 102 is connected to the power supply Ve. When GPIO1 is 1 and GPIO2 is 0, the first end of the first switch circuit 104 is connected to the third end, and the second end of the second switch circuit 106 is connected to the third end. At this time, the second end of the pressure sensing circuit 102 is grounded, and the first end 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 level states of GPIO1 and GPIO2. The high level of the AC drive signal is +V0, and the low level is -V0.
[0049] In the embodiment of the present application, the control circuit 108 can control the on-off state of the first switch circuit 104 and the on-off state of the second switch circuit 106, and control the conduction state between the first and second ends of the pressure sensing circuit 102 and the power supply Ve and the ground end GND, thereby transmitting a corresponding AC drive signal to the pressure sensing circuit 102.
[0050] like Figure 2As shown, in some embodiments of the present application, the first switch circuit 104 includes: a first MOS transistor Q1, the source of the first MOS transistor Q1 is connected to the power supply Ve, the drain of the first MOS transistor Q1 is connected to the first end of the pressure sensing circuit 102, and the gate of the first MOS transistor Q1 is connected to the control circuit 108; a second MOS transistor Q2, the source of the second MOS transistor Q2 is grounded, the drain of the second MOS transistor Q2 is connected to the first end of the pressure sensing circuit 102, and the gate of the second MOS transistor Q2 is connected to the control circuit 108;
[0051] The second switch circuit 106 includes: a third MOS tube Q3, the source of the third MOS tube Q3 is connected to the power supply Ve, the drain of the third MOS tube Q3 is connected to the second end of the pressure sensing circuit 102, and the gate of the third MOS tube Q3 is connected to the control circuit 108; a fourth MOS tube Q4, the source of the fourth MOS tube Q4 is grounded, the drain of the fourth MOS tube Q4 is connected to the second end of the pressure sensing circuit 102, and the gate of the fourth MOS tube Q4 is connected to the control circuit 108.
[0052] Among them, GPIO1 and GPIO2 are communication ports.
[0053] In the embodiment of the present application, the first switch circuit 104 and the second switch circuit 106 each include two MOS transistors, and the on-off states of the two MOS transistors are controlled to transmit an AC drive signal to the pressure sensing circuit.
[0054] Specifically, the first switch circuit 104 includes a first MOS transistor Q1 and a second MOS transistor Q2, wherein the source of the first MOS transistor Q1 is the first end of the first switch circuit 104, the source of the second MOS transistor Q2 is the second end of the first switch circuit 104, the drain of the first MOS transistor Q1 and the drain of the second MOS transistor Q2 are both connected to the first end of the pressure sensing circuit 102, that is, the drain of the first MOS transistor Q1 and the drain of the second MOS transistor Q2 are the third end of the first switch circuit 104, and the gate of the first MOS transistor Q1 and the gate of the second MOS transistor Q2 are connected to the control circuit 108 as the control end of the first switch circuit 104. The first MOS transistor Q1 is a PMOS, and the second MOS transistor Q2 is an NMOS.
[0055] The second switch circuit 106 includes a third MOS transistor Q3 and a fourth MOS transistor Q4, wherein the source of the third MOS transistor Q3 is the first end of the second switch circuit 106, the source of the fourth MOS transistor Q4 is the second end of the second switch circuit 106, the drain of the third MOS transistor Q3 and the drain of the fourth MOS transistor Q4 are both connected to the second end of the pressure sensing circuit 102, that is, the drain of the third MOS transistor Q3 and the drain of the fourth MOS transistor Q4 are the third end of the second switch circuit 106, and the gate of the third MOS transistor Q3 and the gate of the fourth MOS transistor Q4 are connected to the control circuit 108 as the control end of the second switch circuit 106. The third MOS transistor Q3 is a PMOS, and the fourth MOS transistor Q4 is an NMOS.
[0056] Exemplarily, GPIO1 is a control signal transmitted by the control circuit 108 to the first MOS transistor Q1 and the second MOS transistor Q2, and GPIO2 is a control signal transmitted by the control circuit 108 to the third MOS transistor Q3 and the fourth MOS transistor Q4. The process of controlling the on-off state of the first MOS transistor Q1, the second MOS transistor Q2, the third MOS transistor Q3 and the fourth MOS transistor Q4 to transmit an AC drive signal to the pressure sensing circuit 102 is as follows: when GPIO1 is at a high level, GPIO2 is at a low level, the first MOS transistor Q1 and the fourth MOS transistor Q4 are turned off, the second MOS transistor Q2 and the third MOS transistor Q3 are turned on, and the first end of the pressure sensing circuit 102 is negative and the second end is positive. Conversely, when GPIO2 is at a high level, GPIO1 is at a low level, the first MOS transistor Q1 and the fourth MOS transistor Q4 are turned on, the second MOS transistor Q2 and the third MOS transistor Q3 are turned off, and the first end of the pressure sensing circuit 102 is positive and the second end is negative. By switching the high and low level states of GPIO1 and GPIO2 according to the preset frequency control, an AC driving signal of the preset frequency can be transmitted to the pressure sensing circuit 102 .
[0057] Exemplarily, the preset frequency ranges from 50 Hz to 150 Hz, and the preset frequency can be specifically selected as 100 Hz.
[0058] In the embodiment of the present application, a first MOS transistor Q1 and a second MOS transistor Q2 are provided in the first switch circuit 104, and the first MOS transistor Q1 and the second MOS transistor Q2 are connected to the first end of the pressure sensing circuit 102, and a third MOS transistor Q3 and a fourth MOS transistor Q4 are provided in the second switch circuit 106, and the third MOS transistor Q3 and the fourth MOS transistor Q4 are connected to the second end of the pressure sensing circuit 102, so that the control circuit 108 can transmit an AC drive signal to the pressure sensing circuit 102 by controlling the on and off states of the first MOS transistor Q1, the second MOS transistor Q2, the third MOS transistor Q3 and the fourth MOS transistor Q4.
[0059] like Figure 3As shown, in some embodiments of the present application, the first switch circuit 104 includes: a first switch element T1, a first static contact of the first switch element T1 is connected to the power source Ve, a second static contact of the first switch element T1 is grounded, a moving contact of the first switch element T1 is connected to the first end of the pressure sensing circuit 102, and a control end of the first switch element T1 is connected to the control circuit 108;
[0060] The second switch circuit 106 includes: a second switch element T2, a first static contact of the second switch element T2 is connected to the power supply Ve, a second static contact of the second switch element T2 is grounded, a moving contact of the second switch element T2 is connected to the second end of the pressure sensing circuit 102, and a control end of the second switch element T2 is connected to the control circuit 108.
[0061] In the embodiment of the present application, the first switch circuit 104 and the second switch circuit 106 both include single-pole double-throw switch elements, and the first static contact and the second static contact of the first switch element T1 in the first switch circuit 104 are respectively connected to the power supply Ve and the ground terminal GND, and the first static contact and the second static contact of the second switch element 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 static contact of the first switch element T1 is the first end of the first switch circuit 104, the second static contact of the first switch element T1 is the second end of the first switch circuit 104, and the moving contact of the first switch element T1 is the third end of the first switch circuit 104. The first static contact of the second switch element T2 is the first end of the second switch circuit 106, the second static contact of the second switch element T2 is the second end of the second switch circuit 106, and the moving contact of the second switch element T2 is the third end of the second switch circuit 106.
[0063] Exemplarily, GPIO is a control signal transmitted by the control circuit 108 to the first switch element T1 and the second switch element T2. The process of controlling the on-off state of the first switch element T1 and the second switch element T2 to transmit an AC drive signal to the pressure sensing circuit 102 is as follows: when GPIO is at a low level, the second static contact of the first switch element T1 is connected to the moving contact, and the first static contact of the second switch element T2 is connected to the moving contact, and the first end of the pressure sensing circuit 102 is negative and the second end is positive. Conversely, when GPIO is at a high level, the second static contact of the second switch element T2 is connected to the moving contact, and the first static contact of the first switch element T1 is connected to the moving contact, and the first end of the pressure sensing circuit 102 is positive and the second end is negative. By switching the high and low level states of GPIO according to a preset frequency control, an AC drive signal of a preset frequency can be transmitted to the pressure sensing circuit 102.
[0064] In the embodiment of the present application, a single-pole double-throw first switch element T1 and a second switch element T2 are respectively provided in the first switch circuit 104 and the second switch circuit 106, and the moving contact of the first switch element T1 and the moving contact of the second switch element 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 an AC drive signal to the pressure sensing circuit 102 by controlling the on and off states of the first switch element T1 and the second switch element T2.
[0065] Figure 5 FIG. 3 shows a circuit diagram of a pressure sampling assembly provided in some embodiments of the present application. Figure 5 As shown, in some embodiments of the present application, the control circuit 108 includes: an amplifier sub-circuit AMP, a first input terminal of the amplifier sub-circuit AMP is connected to the third terminal of the pressure sensing circuit 102, and a second input terminal of the amplifier sub-circuit AMP is connected to the fourth terminal of the pressure sensing circuit 102; a sampling sub-circuit ADC, an input terminal of the sampling sub-circuit ADC is connected to an output terminal of the amplifier sub-circuit AMP; and a processor MCU, an input terminal of the processor MCU is connected to an output terminal of the sampling sub-circuit ADC.
[0066] In the embodiment of the present application, the control circuit 108 includes an amplifier sub-circuit AMP, and the first input terminal and the second input terminal of the amplifier sub-circuit AMP are respectively connected to the third terminal and the fourth terminal of the pressure sensing circuit 102, so that the amplifier sub-circuit AMP can receive the AC output signal transmitted by the pressure sensing circuit 102 through the first input terminal and the second input terminal. The amplifier sub-circuit AMP can amplify the AC output signal, and the amplified AC output signal is transmitted to the processor MCU through the sampling sub-circuit ADC for processing.
[0067] Specifically, the processor MCU is connected to the first switch circuit 104 and the second switch circuit 106, and the processor MCU can control the on-off frequency of the first switch circuit 104 and the second switch circuit 106, so as to transmit an AC drive signal of a preset frequency to the pressure sensing circuit 102. Since the pressure sensing circuit 102 operates under the AC excitation of the preset frequency, the output of the pressure sensing circuit 102 is moved to the AC excitation frequency of the preset frequency. After receiving the voltage signal transmitted by the sampling subcircuit 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, that is, the signal amplitude, so as to determine the corresponding pressure sampling value.
[0068] In the embodiment of the present application, 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, and the AC output signal is demodulated by the processor MCU to obtain the phase information and amplitude information of the AC output signal, and 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 the present application, the pressure sensing circuit 102 includes: a first resistor R1, a first end of the first resistor R1 is connected to the third end of the first switch circuit 104, and a second end of the first resistor R1 is connected to the input end of the control circuit 108; a second resistor R2, a first end of the second resistor R2 is connected to the second end of the first resistor R1, and a second end of the second resistor R2 is connected to the third end of the second switch circuit 106; a third resistor R3, a first end of the third resistor R3 is connected to the second end of the second resistor R2, and a second end of the third resistor R3 is connected to the input end of the control circuit 108; a fourth resistor R4, a first end of the fourth resistor R4 is connected to the second end of the third resistor R3, and a second end of the fourth resistor R4 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 varistor.
[0070] In the embodiment of the present application, the pressure sensing circuit 102 includes four resistors, and the four resistors are connected end to end, wherein the common end of the first resistor R1 and the fourth resistor R4 is the first end of the pressure sensing circuit 102, the common end of the second resistor R2 and the third resistor R3 is the second end of the pressure sensing circuit 102, the common end of the first resistor R1 and the second resistor R2 is the third end of the pressure sensing circuit 102, and the common end of the third resistor R3 and the fourth resistor R4 is the fourth end of the pressure sensing circuit 102.
[0071] In the embodiment of the present 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 varistor, that is, the resistance value of at least one of the four resistors will change according to the pressure applied.
[0072] Exemplarily, 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] Exemplarily, the pressure sensing circuit 102 is a half-bridge pressure sensing circuit 102, the first resistor R1 and the third resistor R3 are varistors, or the second resistor R2 and the fourth resistor R4 are varistors.
[0074] Exemplarily, 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 varistor.
[0075] In the embodiment of the present application, by setting four resistors in the pressure sensing circuit 102, and at least one of the four resistors is a piezoresistor, it can be ensured that the resistance value of the pressure sensing circuit 102 can change according to the pressure applied. 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 choose to set only some of the four resistors as piezoresistors, thereby reducing the circuit cost while meeting the pressure sampling accuracy.
[0076] In some embodiments of the present application, an electronic device is provided. Figure 6 One of the structural block diagrams of the electronic device provided in some embodiments of the present application is shown, such as Figure 6 As shown, the electronic device 600 includes a pressure sampling component 100. The pressure sampling component 100 is the pressure sampling component in any of the above embodiments, and thus has all the beneficial technical effects of the pressure sampling component in any of the above embodiments, which will not be described in detail herein.
[0077] Exemplarily, the electronic device 600 may be a stylus pen.
[0078] In some embodiments of the present application, a pressure sampling method is provided, which is applied to the pressure sampling component in any of the above embodiments. Figure 7 FIG. 2 shows a schematic flow chart of a pressure sampling method provided in some embodiments of the present application. Figure 7 As shown, the pressure sampling method comprises:
[0079] Step 702, controlling the on / off state of the first switch circuit and the second switch circuit according to a preset frequency to transmit an AC drive signal to the pressure sensing circuit;
[0080] In the embodiment of the present application, the control circuit controls the on-off state of the first switching circuit and the second switching circuit so that when the power supply and the first end of the pressure sensing circuit are connected, the second end of the pressure sensing circuit is grounded, and when the power supply and the second end of the pressure sensing circuit are connected, the first end of the pressure sensing circuit is grounded, thereby realizing the transmission of an AC drive signal to the pressure sensing circuit.
[0081] Specifically, the first end and the second end of the first switch circuit are connected to the power supply and the ground end respectively, the third end of the first switch circuit is connected to the first end of the pressure sensing circuit, and the control circuit can switch the on-off state from the first end to the third end of the first switch circuit, and the on-off state from the second end to the third end of the first switch circuit. Wherein, when the first end of the first switch circuit is connected to the third end, and the second end is disconnected from the third end, the first end of the pressure sensing circuit is connected to the power supply, and when the second end of the first switch circuit is connected to the third end, and the first end is disconnected from the third end, the first end of the pressure sensing circuit is grounded. The first end and the second end of the second switch circuit are connected to the power supply and the ground end respectively, and the third end of the second switch circuit is connected to the second end of the pressure sensing circuit, and the control circuit can switch the on-off state from the first end to the third end of the second switch circuit, and the on-off state from the second end to the third end of the first switch circuit. Among them, when the first end of the second switch circuit is connected to the third end and the second end is disconnected from the third end, the first end of the pressure sensing circuit is connected to the power supply; when the second end of the second switch circuit is connected to the third end and the first end is disconnected from the third end, the first end of the pressure sensing circuit is grounded.
[0082] Step 704, obtaining phase information and amplitude information of the AC output signal output by the pressure sensing circuit;
[0083] Step 706: Determine the pressure sampling value according to the phase information and the amplitude information.
[0084] In an embodiment of the present application, the control circuit is connected to the third end and the fourth end of the pressure sensing circuit, the third end and the fourth end of the pressure sensing circuit are the signal output ends of the pressure sensing circuit, and the AC output signal output by the pressure sensing circuit is transmitted to the control circuit through the third end and the fourth end. 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 the amplitude information.
[0085] It should be noted that the control circuit can perform single-frequency IQ demodulation on the AC output signal, thereby obtaining the amplitude information of the AC output signal at the AC excitation frequency, and constraining the noise bandwidth within a relatively small area, thereby reducing the noise of the pressure sampling component. Among them, IQ demodulation is used to extract the original phase information and amplitude information from the modulated signal. In the process of IQ demodulation of the AC output signal, the AC output signal is regarded as a complex signal composed of a real signal and an imaginary signal. The real signal and the imaginary signal can be processed separately. Signals and noise can be effectively separated, thereby providing better noise suppression capabilities.
[0086] In an embodiment of the present application, by connecting the first end and the second end of the pressure sensing circuit to the first switching circuit and the second switching circuit respectively, the first switching circuit can switch and control the on-off state of the first end of the pressure sensing circuit and the power supply and the ground end, and the second switching circuit can also switch and control the on-off state of the second end of the pressure sensing circuit and the power supply and the ground end, so that an AC drive signal can be transmitted to the pressure sensing circuit through the first switching circuit and the second switching circuit, so that the control circuit can collect the AC output signal at the third end and the fourth end of the pressure sensing circuit, demodulate the AC output signal 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 and determining the pressure sampling value based on the phase information and amplitude information. In the process of demodulating the AC output signal, the real signal and the imaginary signal of the AC output signal can be processed separately. Signal and noise can be effectively separated, thereby providing better noise suppression capability.
[0087] In some embodiments of the present application, controlling the on / off state of the first switch circuit and the second switch circuit according to a preset frequency includes:
[0088] Controlling the first switch circuit and the second switch circuit to switch between the first on-off state and the second on-off state according to a preset frequency;
[0089] The first on-off state includes: the first end of the first switch circuit is connected to the third end, and the second end of the first switch circuit is disconnected from the third end; and the second end of the second switch circuit is connected to the third end, and the first end of the second switch circuit is disconnected from the third end;
[0090] The second on-off state includes: the second end and the third end of the first switch circuit are connected, and the first end and the third end of the first switch circuit are disconnected; and the first end and the third end of the second switch circuit are connected, and the second end and the third end of the second switch circuit are disconnected.
[0091] In the embodiment of the present application, since the first end and the second end of the first switch circuit are respectively connected to the power supply and the ground terminal, the first end and the second end of the second switch circuit are also respectively connected to the power supply and the ground terminal, and the third end of the first switch circuit and the third end of the second switch circuit are respectively connected to the first end and the second end of the pressure sensing circuit, the control circuit can control the on-off state of the first switch circuit and the second switch circuit, thereby controlling the conduction state between the first end of the pressure sensing circuit and the power supply or the ground terminal, and controlling the conduction state between the second end of the pressure sensing circuit and the power supply or the ground terminal, and transmitting an AC drive signal to the pressure sensing circuit by alternately controlling the first end or the second end of the pressure sensing circuit to be conductive with the power supply.
[0092] Specifically, the control circuit controls 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 a preset frequency, thereby transmitting an AC drive signal of a preset frequency to the pressure sensing circuit.
[0093] Among them, the first on-off state includes: when the first end to the third end of the first switch circuit is turned on and the second end to the third end of the first switch circuit is turned off, and when the second end to the third end of the second switch circuit is turned on and the first end to the third end of the second switch circuit is turned off, the first end of the pressure sensing circuit is connected to the power supply, and the second end of the pressure sensing circuit is connected to the ground end.
[0094] The second on-off state includes: when the second end to the third end of the first switch circuit is turned on and the first end to the third end of the first switch circuit is turned off, and when the first end to the third end of the second switch circuit is turned on and the second end to the third end of the second switch circuit is turned off, the second end of the pressure sensing circuit is connected to the power supply and the first end of the pressure sensing circuit is turned on to the ground.
[0095] In an embodiment of the present application, the control circuit can control the on-off state of the first switching circuit and the on-off state of the second switching circuit, and control the conduction state between the first and second ends of the pressure sensing circuit and the power supply and ground ends, thereby transmitting a corresponding AC drive signal to the pressure sensing circuit.
[0096] In some embodiments of the present application, the phase information and amplitude information of the AC output signal output by the pressure sensing circuit are obtained, including: determining a first output signal and a second output signal based on a preset frequency and the AC output signal; low-pass filtering the first output signal and the second output signal respectively to obtain a real signal and an imaginary signal; and determining the phase information and amplitude information based on the real signal and the imaginary signal.
[0097] In an embodiment of the present application, after acquiring the AC output signal, IQ demodulation is performed on the AC output signal to obtain 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 a real signal and an imaginary signal, so that the signal and noise can be processed separately. By independently processing the real signal and the imaginary signal, the signal and noise can be effectively separated, thereby improving the noise suppression capability.
[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 signal, Q(t) is the imaginary 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] Among them, s(t) is the AC output signal, I(t) is the real signal, Q(t) is the imaginary signal, fc is the carrier frequency, and t is time.
[0104] The processor performs IQ demodulation on the filtered AC output signal through a digital signal processing algorithm. The process is as follows:
[0105] The AC output signal is multiplied by cos(2πfct) and sin(2πfct) respectively to obtain I(t)cos^2(2πfct) and -Q(t)sin^2(2πfct), where I(t)cos^2(2πfct) is the first output signal and -Q(t)sin^2(2πfct) is the second output signal. The first output signal and the second output signal are low-pass filtered to remove high-frequency components to obtain I(t) and Q(t), where I(t) is the real signal and Q(t) is the imaginary signal. The phase information and amplitude information of the original signal are restored according to the real signal and the imaginary signal, thereby completing IQ demodulation.
[0106] In an embodiment of the present application, the filtered signal is demodulated by a data signal processing algorithm, so that the phase information and amplitude information of the original AC output signal can be extracted, which facilitates the subsequent determination of the pressure sampling value of the pressure sensor based on the phase information and amplitude information, and further improves the accuracy of the acquired pressure sampling value.
[0107] In some embodiments of the present application, determining the pressure sampling value according to the phase information and the amplitude information includes:
[0108] The pressure sampling value is determined according to the phase information, amplitude information and target mapping relationship.
[0109] In an embodiment of the present application, the target mapping relationship is a mapping relationship between phase information, amplitude information and pressure sampling value. After acquiring 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] Exemplarily, the target mapping relationship may be a calculation relationship expression or a mapping relationship table.
[0111] The pressure sampling method provided in the embodiment of the present application can be executed by a pressure sampling device. In the embodiment of the present application, the pressure sampling method provided in the embodiment of the present application is described by taking the pressure sampling device executing the pressure sampling method as an example.
[0112] In some embodiments of the present application, a pressure sampling device is provided, which is applied to the pressure sampling assembly in any of the above embodiments. Figure 8 FIG. 2 shows a schematic block diagram of a pressure sampling device provided in some embodiments of the present application. Figure 8 As shown, the pressure sampling device 800 includes:
[0113] A control module 802, 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 AC drive signal to the pressure sensing circuit;
[0114] An acquisition module 804 is used to acquire phase information and amplitude information of an AC output signal output by the pressure sensing circuit;
[0115] The determination module 806 is used to determine the pressure sampling value according to the phase information and the amplitude information.
[0116] In an embodiment of the present application, by connecting the first end and the second end of the pressure sensing circuit to the first switching circuit and the second switching circuit respectively, the first switching circuit can switch and control the on-off state of the first end of the pressure sensing circuit and the power supply and the ground end, and the second switching circuit can also switch and control the on-off state of the second end of the pressure sensing circuit and the power supply and the ground end, so that an AC drive signal can be transmitted to the pressure sensing circuit through the first switching circuit and the second switching circuit, so that the control circuit can collect the AC output signal at the third end and the fourth end of the pressure sensing circuit, demodulate the AC output signal 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 and determining the pressure sampling value based on the phase information and amplitude information. In the process of demodulating the AC output signal, the real signal and the imaginary signal of the AC output signal can be processed separately. Signal and noise can be effectively separated, thereby providing better noise suppression capability.
[0117] In some embodiments of the present application, the control module 802 is used to control the first switch circuit and the second switch circuit to switch between the first on-off state and the second on-off state according to a preset frequency;
[0118] The first on-off state includes: the first end of the first switch circuit is connected to the third end, and the second end of the first switch circuit is disconnected from the third end; and the second end of the second switch circuit is connected to the third end, and the first end of the second switch circuit is disconnected from the third end;
[0119] The second on-off state includes: the second end and the third end of the first switch circuit are connected, and the first end and the third end of the first switch circuit are disconnected; and the first end and the third end of the second switch circuit are connected, and the second end and the third end of the second switch circuit are disconnected.
[0120] In an embodiment of the present application, the control circuit can control the on-off state of the first switching circuit and the on-off state of the second switching circuit, and control the conduction state between the first and second ends of the pressure sensing circuit and the power supply and ground ends, thereby transmitting a corresponding AC drive signal to the pressure sensing circuit.
[0121] In some embodiments of the present application, the determination module 806 is used to determine the first output signal and the second output signal according to the preset frequency and the AC output signal;
[0122] The pressure sampling device 800 further includes:
[0123] A filtering module, used to perform low-pass filtering on the first output signal and the second output signal respectively to obtain a real signal and an imaginary signal;
[0124] The determination module 806 is used to determine phase information and amplitude information according to the real signal and the imaginary signal.
[0125] In an embodiment of the present application, the filtered signal is demodulated by a data signal processing algorithm, so that the phase information and amplitude information of the original AC output signal can be extracted, which facilitates the subsequent determination of the pressure sampling value of the pressure sensor based on the phase information and amplitude information, and further improves the accuracy of the acquired pressure sampling value.
[0126] In some embodiments of the present application, the determination module 806 is used to determine the pressure sampling value according to the phase information, the amplitude information and the target mapping relationship.
[0127] In an embodiment of the present application, the target mapping relationship is a mapping relationship between phase information, amplitude information and pressure sampling value. After acquiring 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 the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtualreality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personalcomputer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
[0129] The pressure sampling device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0130] The pressure sampling device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.
[0131] Optionally, an embodiment of the present application further provides an electronic device, which includes a pressure sampling device as 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 herein.
[0132] Optionally, an embodiment of the present application further provides an electronic device, Fig. 9 A structural block diagram of an electronic device according to an embodiment of the present application is shown. Fig. 9 As shown, the electronic device 900 includes a processor 902, a memory 904, and a program or instruction stored in the memory 904 and executable on the processor 902. When the program or instruction is executed by the processor 902, each process of the above-mentioned pressure sampling method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0133] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0134] Fig.10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0135] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009 and a processor 1010 and other components.
[0136] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0137] The processor 1010 is used to control the on / off state of the first switch circuit and the second switch circuit according to a preset frequency to transmit an AC drive signal to the pressure sensing circuit;
[0138] The processor 1010 is used to obtain phase information and amplitude information of an AC output signal output by the pressure sensing circuit;
[0139] The processor 1010 is used to determine the pressure sampling value according to the phase information and the amplitude information.
[0140] In an embodiment of the present application, by connecting the first end and the second end of the pressure sensing circuit to the first switching circuit and the second switching circuit respectively, the first switching circuit can switch and control the on-off state of the first end of the pressure sensing circuit and the power supply and the ground end, and the second switching circuit can also switch and control the on-off state of the second end of the pressure sensing circuit and the power supply and the ground end, so that an AC drive signal can be transmitted to the pressure sensing circuit through the first switching circuit and the second switching circuit, so that the control circuit can collect the AC output signal at the third end and the fourth end of the pressure sensing circuit, demodulate the AC output signal 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 and determining the pressure sampling value based on the phase information and amplitude information. In the process of demodulating the AC output signal, the real signal and the imaginary signal of the AC output signal can be processed separately. Signal and noise can be effectively separated, thereby providing better noise suppression capability.
[0141] Further, the processor 1010 is used to control the first switch circuit and the second switch circuit to switch between the first on-off state and the second on-off state according to a preset frequency;
[0142] The first on-off state includes: the first end of the first switch circuit is connected to the third end, and the second end of the first switch circuit is disconnected from the third end; and the second end of the second switch circuit is connected to the third end, and the first end of the second switch circuit is disconnected from the third end;
[0143] The second on-off state includes: the second end and the third end of the first switch circuit are connected, and the first end and the third end of the first switch circuit are disconnected; and the first end and the third end of the second switch circuit are connected, and the second end and the third end of the second switch circuit are disconnected.
[0144] In an embodiment of the present application, the control circuit can control the on-off state of the first switching circuit and the on-off state of the second switching circuit, and control the conduction state between the first and second ends of the pressure sensing circuit and the power supply and ground ends, thereby transmitting a corresponding AC drive signal to the pressure sensing circuit.
[0145] Further, the processor 1010 is used to determine the first output signal and the second output signal according to the preset frequency and the AC output signal;
[0146] The processor 1010 is used to perform low-pass filtering on the first output signal and the second output signal respectively to obtain a real signal and an imaginary signal;
[0147] The processor 1010 is used to determine phase information and amplitude information according to the real signal and the imaginary signal.
[0148] In an embodiment of the present application, the filtered signal is demodulated by a data signal processing algorithm, so that the phase information and amplitude information of the original AC output signal can be extracted, which facilitates the subsequent determination of the pressure sampling value of the pressure sensor based on the phase information and amplitude information, and further improves the accuracy of the acquired pressure sampling value.
[0149] Furthermore, the processor 1010 is used to determine the pressure sampling value according to the phase information, the amplitude information and the target mapping relationship.
[0150] In an embodiment of the present application, the target mapping relationship is a mapping relationship between phase information, amplitude information and pressure sampling value. After acquiring 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 the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or action file obtained by the image capture device (such as a camera) in the action file capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 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 two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0152] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application 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 processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
[0154] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0155] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0156] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned pressure sampling method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0157] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0158] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned pressure sampling method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0159] It should be noted that, in this article, the term "comprises", "includes" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, device, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or device. In the absence of further restrictions, an element defined by the statement "includes one..." does not exclude the presence of other identical elements in the process, device, article or device including the element. In addition, it should be noted that the scope of the devices and apparatuses in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described device may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment device can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including a number of instructions for a terminal (which can be a mobile phone, computer, server, or network equipment, etc.) to execute the device of each embodiment of the present application.
[0161] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A pressure sampling assembly, characterized in that: The pressure sampling assembly comprises: Pressure sensing circuit; a first switch circuit, wherein a first end of the first switch circuit is connected to a power source, a second end of the first switch circuit is grounded, and a third end of the first switch circuit is connected to a first end of the pressure sensing circuit; a second switch circuit, wherein a first end of the second switch circuit is connected to the power supply, a second end of the second switch circuit is grounded, and a third end of the second switch circuit is connected to the second end of the pressure sensing circuit; A control circuit, wherein the output end of the control circuit is connected to the control end of the first switch circuit and the control end of the second switch circuit, and the control circuit is used to control the on-off state of the first switch circuit and the second switch circuit to transmit an AC drive signal to the pressure sensing circuit, and the input end of the control circuit is connected to the third end and the fourth end of the pressure sensing circuit, and the control circuit is also used to determine the pressure sampling value according to the phase information and amplitude information of the AC output signal of the pressure sensing circuit.
2. The pressure sampling assembly according to claim 1, characterized in that: The control circuit is used to control the first end of the first switch circuit to be connected to the third end, and the second end of the first switch circuit to be disconnected from the third end; and to control the second end of the second switch circuit to be connected to the third end, and the first end of the second switch circuit to be disconnected from the third end; or The control circuit is used to control the second end and the third end of the first switch circuit to be connected, and the first end and the third end of the first switch circuit to be disconnected; and to control the first end and the third end of the second switch circuit to be connected, and the second end and the third end of the second switch circuit to be disconnected.
3. The pressure sampling assembly according to claim 1, characterized in that: The first switch circuit comprises: a first MOS transistor, wherein a source of the first MOS transistor is connected to the power supply, a drain of the first MOS transistor is connected to a first end of the pressure sensing circuit, and a gate of the first MOS transistor is connected to the control circuit; a second MOS transistor, wherein a source of the second MOS transistor is grounded, a drain of the second MOS transistor is connected to the first end of the pressure sensing circuit, and a gate of the second MOS transistor is connected to the control circuit; The second switch circuit comprises: a third MOS tube, wherein a source of the third MOS tube is connected to the power supply, a drain of the third MOS tube is connected to the second end of the pressure sensing circuit, and a gate of the third MOS tube is connected to the control circuit; A fourth MOS tube, wherein the source of the fourth MOS tube is grounded, the drain of the fourth MOS tube is connected to the second end of the pressure sensing circuit, and the gate of the fourth MOS tube is connected to the control circuit.
4. The pressure sampling assembly according to claim 1, characterized in that: The first switch circuit comprises: a first switch element, wherein a first static contact of the first switch element is connected to the power source, a second static contact of the first switch element is grounded, a moving contact of the first switch element is connected to a first end of the pressure sensing circuit, and a control end of the first switch element is connected to the control circuit; The second switch circuit comprises: A second switch element, wherein a first static contact of the second switch element is connected to the power supply, a second static contact of the second switch element is grounded, a moving contact of the second switch element is connected to a second end of the pressure sensing circuit, and a control end of the second switch element is connected to the control circuit.
5. The pressure sampling assembly according to any one of claims 1 to 4, characterized in that: The control circuit comprises: an amplifying sub-circuit, wherein a first input terminal of the amplifying sub-circuit is connected to a third terminal of the pressure sensing circuit, and a second input terminal of the amplifying sub-circuit is connected to a fourth terminal of the pressure sensing circuit; a sampling subcircuit, wherein an input end of the sampling subcircuit is connected to an output end of the amplifying subcircuit; A processor, wherein an input end of the processor is connected to an output end of the sampling subcircuit.
6. The pressure sampling assembly according to any one of claims 1 to 4, characterized in that: The pressure sensing circuit comprises: a first resistor, wherein a first end of the first resistor is connected to a third end of the first switch circuit, and a second end of the first resistor is connected to an input end of the control circuit; a second resistor, wherein a first end of the second resistor is connected to a second end of the first resistor, and a second end of the second resistor is connected to a third end of the second switch circuit; a third resistor, wherein a first end of the third resistor is connected to a second end of the second resistor, and a second end of the third resistor is connected to an input end of the control circuit; a fourth resistor, wherein a first end of the fourth resistor is connected to a second end of the third resistor, and a second end of the fourth resistor is connected to a first end of the first resistor; Wherein, at least one of the first resistor, the second resistor, the third resistor and the fourth resistor is a varistor.
7. An electronic device, characterized in that: include: The pressure sampling assembly according to any one of claims 1 to 6.
8. A pressure sampling method, characterized in that: The pressure sampling assembly applied to any one of claims 1 to 6, wherein the pressure sampling method comprises: Controlling the on / off state of the first switch circuit and the second switch circuit according to a preset frequency to transmit an AC drive signal to the pressure sensing circuit; Acquiring phase information and amplitude information of an AC output signal output by the pressure sensing circuit; A pressure sampling value is determined according to the phase information and the amplitude information.
9. The pressure sampling method according to claim 8, characterized in that: The controlling the on / off state of the first switch circuit and the second switch circuit according to the preset frequency includes: 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 a preset frequency; The first on-off state includes: the first end of the first switch circuit is conductively connected to the third end, and the second end of the first switch circuit is disconnected from the third end; and the second end of the second switch circuit is conductively connected to the third end, and the first end of the second switch circuit is disconnected from the third end; The second on-off state includes: the second end of the first switch circuit is connected to the third end, and the first end of the first switch circuit is disconnected from the third end; and the first end of the second switch circuit is connected to the third end, and the second end of the second switch circuit is disconnected from the third end.
10. The pressure sampling method according to claim 8, characterized in that: The step of obtaining phase information and amplitude information of an AC output signal output by the pressure sensing circuit includes: Determining a first output signal and a second output signal according to the 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 signal and an imaginary signal; The phase information and the amplitude information are determined according to the real signal and the imaginary signal.
11. The pressure sampling method according to any one of claims 8 to 10, characterized in that: The step of determining the pressure sampling value according to the phase information and the amplitude information includes: The pressure sampling value is determined according to the phase information, the amplitude information and the target mapping relationship.
12. A pressure sampling device, characterized in that: The pressure sampling assembly applied to any one of claims 1 to 6, the pressure sampling device comprising: A control module, used 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 AC drive signal to the pressure sensing circuit; An acquisition module, used to acquire phase information and amplitude information of an AC output signal output by the pressure sensing circuit; The determination module is used to determine the pressure sampling value according to the phase information and the amplitude information.
Citation Information
Patent Citations
Power circuit convenient for tests
CN107742973A
Detection circuit and detection method of piezoresistive pressure sensor and electronic device
CN113865757A
Sampling hold circuit and switch thereof
CN118199632A
Circuit for feeding a Wheatstone Bridge with a rectangular waveform voltage
US5804978A