Interface circuit of MEMS gas sensor and control method thereof
By designing a MEMS gas sensor interface circuit containing multiple modules, the problem of limited measurement range and poor accuracy of the MEMS gas sensor interface circuit is solved, and a wider resistance detection range and higher detection accuracy are achieved.
Patent Information
- Application Number
- CN202411458466.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-10-18
AI Technical Summary
The interface circuit of MEMS gas sensor is limited in measurement range and poor in measurement accuracy, and the existing detection circuit cannot meet the requirements of improving the performance of MEMS gas sensor.
An interface circuit including a reference voltage and current generation module, a gear switching module, a resistance conversion voltage module, a bias current generation module and a post-processing module are designed. The voltage amplification coefficient and current mirror ratio are changed through fixed charging current and state switching. Realize gear position detection and improve detection accuracy through the hardware delay elimination module.
A wider resistance detection range is achieved under the same power consumption, and the detection accuracy of equivalent resistance of MEMS gas sensor is improved by eliminating delay error and common mode error.
Smart Images

Figure CN119492787A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of sensor circuit design, and more specifically, relates to an interface circuit of a MEMS gas sensor and a control method thereof. Background Art
[0002] As MEMS gas sensor technology continues to mature, the research on gas identification technology has become a trend in the field of artificial intelligence. In the gas identification system, in order to accurately identify the gas, the system not only needs a gas sensor, but also needs support from the detection circuit. As the performance of MEMS gas sensors continues to improve, their sensitivity continues to increase, and the range of resistance changes is becoming wider and wider. Correspondingly, the detection circuit also needs to have a wide range, higher resolution and linearity. In addition, portable and low-cost gas identification systems are becoming the main focus nowadays, so the common resistance voltage divider method and Wheatstone bridge method detection circuits can no longer meet the requirements of existing MEMS gas sensors.
[0003] The RTF structure converts the equivalent resistance value corresponding to the MEMS gas sensor into the frequency of an oscillating square wave. Compared with traditional detection methods, it does not require ADC, has fewer components, and is low in cost. The output is directly a digital signal, which is convenient for direct measurement. The common RTF structure fixes the voltage across the equivalent resistance corresponding to the MEMS gas sensor as the reference voltage. According to Ohm's law, the charging current changes with the equivalent resistance value corresponding to the MEMS gas sensor. When the sensor resistance is large, the charging current is small and the delay of the comparator in the circuit is large; when the sensor resistance is small, the charging current is large and the power consumption is also large; ultimately resulting in a limited measurement range and poor measurement accuracy. Summary of the invention
[0004] In view of the above defects or improvement needs of the prior art, the present invention provides an interface circuit of a MEMS gas sensor and a control method thereof, which aims to solve the technical problems of limited measurement range and poor measurement accuracy of the interface circuit of the MEMS gas sensor.
[0005] To achieve the above object, according to one aspect of the present invention, an interface circuit of a MEMS gas sensor is provided, comprising: a reference voltage and current generating module, a gear switching module, a resistance conversion voltage module, a bias current generating module and a post-processing module;
[0006] The reference voltage and current generating module is used to convert the input voltage into a first reference voltage, a second reference voltage, a reference current, a common mode reference voltage, a charging current and a third reference voltage;
[0007] The gear switching module includes: a first comparator, a second comparator, a state machine and a lookup table; the high level input end of the first comparator is connected to the first reference voltage, the low level input end of the second comparator is connected to the second reference voltage, and the low level input end of the first comparator and the high level input end of the second comparator are connected to the output end of the voltage conversion frequency module; the first comparator and the second comparator are used to output 1 when the voltage of the high level input end is greater than the input end of the low level input end, and vice versa to output 0; the state machine is connected to the output end of the first comparator and the output end of the second comparator, and is used to output a jump to the next state when the input end signal is 00; when the input end signal is 01 or 11, the output state remains unchanged; the input end of the lookup table is connected to the output end of the state machine, and is used to generate a current mirror enable signal, a capacitor switching array enable signal and an enable signal Buffer-EN under different gears according to the output state of the state machine;
[0008] The bias current generating module is used to generate a reference current I according to the output of the reference voltage current generating module. REF The current mirror enable signal generates the bias current I in different gears bais ;
[0009] The resistance-to-voltage conversion module is used to generate a voltage amplification ratio β at different gears using the capacitor switching array enable signal and the enable signal Buffer-EN, and to convert the equivalent resistance R of the MEMS gas sensor to S Converted into a stable level signal V H ;
[0010] The post-processing module is connected to the reference voltage current generating module and the resistance conversion voltage module, and is used to convert the stable level signal V H and the common mode reference voltage into oscillation waveforms Q1 and Q2; and the two sets of oscillation waveforms Q1 and Q2 are periodically subtracted to obtain the equivalent resistance R of the MEMS gas sensor S The corresponding period T.
[0011] Furthermore, the resistance-to-voltage conversion module comprises:
[0012] A mirror current source, a first transmission gate, a voltage buffer, a switched capacitor amplifier C1, C2, C3, a switched capacitor unit gain buffer, a second transmission gate, a third transmission gate, a capacitor switching array, and switches Sw1, Sw2, Sw3, Sw4, Sw5, Sw6;
[0013] The output end of the mirror current source is connected to one end of the equivalent resistor, and the other end of the equivalent resistor is grounded, so that the resistance value of the equivalent resistor is converted into a voltage value; the output end of the equivalent resistor is connected to the input end of the first transmission gate and the voltage buffer; under the small resistance gear, the first transmission gate enable end is effective, and the output end of the first transmission gate is connected to the input end of the switch capacitor amplifier C1, and under the large resistance gear, the voltage buffer enable end is effective to achieve voltage buffering; the output end of the voltage buffer is connected to the input end of the switch capacitor amplifier C1; the output end of the switch capacitor amplifier C1 is connected to the input end of the second transmission gate, and the output end of the switch capacitor unit gain buffer is connected to the input end of the third transmission gate; the two ends of the capacitor switching array are connected in parallel to the two ends of the switch capacitor amplifier C1; the switch capacitor amplifier capacitor C 2 has one end connected to capacitor C1, and the other end connected to the output end of switched capacitor amplifier A1; one end of capacitor C3 is connected to the negative input end of the switched capacitor unit gain buffer, and the other end is connected to switch Sw4; one end of switch Sw1 is connected to the output end of the voltage buffer, and the other end is connected to switch Sw3; one end of switch Sw3 is connected to switch Sw1, and one end is grounded; switch Sw2 is connected in parallel to capacitor C2; one end of switch Sw4 is connected to the output end of switched capacitor amplifier A1, and the other end is connected to capacitor C3; one end of switch Sw5 is connected to capacitor C3, and the other end is connected to the output end of switched capacitor unit gain buffer A2; one end of switch Sw6 is connected to capacitor C3, and the other end is connected to the output end of switched capacitor unit gain buffer A2;
[0014] The enable end of the capacitor switching array inputs the capacitor switching array enable signal α1…αj. At any time, only one enable end is valid to select a group of capacitor arrays, determine the capacitor C1 under the current gear, and thus determine that the output end of the voltage amplification mirror current source under the current gear is connected to the output end of the equivalent resistor, and convert the resistance value of the equivalent resistor into a voltage value coefficient C1 / C2.
[0015] Furthermore, when the clock clk+ is at a high level, the switches Sw1 and Sw2 are closed, Sw3 is disconnected, and C1 is precharged to Vout1-Vcm. When the open-loop gain of A1 reaches the first threshold, due to the virtual short, the output of the switched capacitor amplifier C1 is Vcm. When the clock clk+ is at a low level, the switch Sw3 is closed, the switches Sw1 and Sw2 are disconnected, and the charge is redistributed between C1 and C2. The output of the switched capacitor amplifier C1 is Vout2=(C1 / C2)*Vout1. When the clock clk- is at a high level, the switches Sw4 and Sw6 are closed, and the switches Sw7 and Sw8 are disconnected. 5 is disconnected, C3 is precharged to Vout2-Vcm, when the open-loop gain of A2 reaches the second threshold, due to the virtual short, the output of the switch capacitor unit gain buffer is Vcm; when clk- is low, the switch Sw5 is closed, Sw4, Sw6 are disconnected, and since the total amount of charge on the capacitor C3 is conserved, the output of the switch capacitor unit gain buffer is Vout2; the second transmission gate transmits Vout2 during the period when clk+ is low, and similarly, the third transmission gate transmits Vout2 during the period when clk- is low; the second and third transmission gates are superimposed to generate a stable level V H , V H =V CM +βI REF ·R S , where R S is the equivalent resistance of the sensor, β=k*C1 / C2, is the product of the current amplification factor k and the voltage amplification factor C1 / C2, k is the width-to-length ratio of the current mirror tube of the resistance conversion voltage module and the current source tube of the bias current module, V CM is the third reference voltage.
[0016] Further, the post-processing module includes: a voltage conversion frequency module, a counter module, and a hardware delay elimination module connected in sequence;
[0017] The voltage conversion frequency module is used to convert the stable level signal V H Converting the oscillation waveform Q1 to convert the third reference voltage into an oscillation waveform Q2;
[0018] The counter module is used to record the period T1 of the oscillation waveform Q1 and the period T2 of the oscillation waveform Q2 respectively;
[0019] The hardware delay elimination module is used to subtract the period T1 of the two sets of oscillation waveforms Q1 and the period T2 of Q2 to obtain the equivalent resistance R of the MEMS gas sensor. S The corresponding period T.
[0020] Furthermore, the voltage conversion frequency module includes: a first oscillation waveform generation group and a second oscillation waveform generation group with the same structure, both including: a PMOS current mirror, an NMOS current mirror, a first switch tube, a second switch tube, an integral capacitor, a high level comparator, a low level comparator, and an RS trigger; the charging current output by the current mirror reference current voltage module charges and discharges the integral capacitor, and the output end of the integral capacitor is connected to the negative input end V1- and the positive input end V2+ of the high level comparator and the low level comparator, and the output voltage V1+ of the resistor conversion voltage module is connected to the negative input end V1- and the positive input end V2+ of the high level comparator and the low level comparator, respectively. H , the output voltage VL of the reference voltage current generating module at the V2- end is compared to perform level flipping; the output ends of the high level comparator and the low level comparator are respectively connected to the reset end R and the set end S of the RS trigger, and two non-overlapping oscillation waveforms Q and QN are output. The Q end is connected to the gate of the first switch tube to control the charging of the integral capacitor, and the QN end is connected to the gate of the second switch tube to control the discharging of the integral capacitor to generate a final stable oscillation square wave.
[0021] Furthermore, the counter module is provided with three input terminals, wherein the first input terminal is connected to the output terminal of the first waveform generating group to record the period T1 of the oscillation waveform Q1; the second input terminal is connected to the output terminal of the second waveform generating group to record the period T2 of the oscillation waveform Q2, where T2 is V CM The error term oscillation period generated is T2 = tcm + td; its third input terminal is connected to the reference clock; tcm is the common mode level V CM The common-mode delay error term generated, td is the delay error term generated by the comparator.
[0022] Furthermore, the period T1 of the oscillation waveform Q1 is expressed as: T1=2C L βαR S +t cm +t d , β=k*C1 / C2, is the product of the current amplification factor k and the voltage amplification factor C1 / C2, k is the width-to-length ratio of the current mirror tube of the resistance conversion voltage module and the current source tube of the bias current module, V CM is the third reference voltage, and α is the voltage amplification factor.
[0023] According to another aspect of the present invention, a method for controlling an interface circuit of a MEMS gas sensor is provided, comprising:
[0024] S1: The state machine output of the gear switching module has an initial value of S0=0000 and enters S2;
[0025] S2: The lookup table determines the corresponding current mirror enable signal β1…βi, the capacitor switching array enable signal α1…αj and the voltage follower enable signal Buffer-EN according to the current output of the state machine;
[0026] S4: the bias current voltage module provides a corresponding bias current to the resistance conversion voltage module according to the current mirror enable signal; the capacitor switching array of the resistance conversion voltage module selects a corresponding capacitor array to obtain a voltage amplification factor according to the corresponding enable signal;
[0027] S5: Resistor-to-voltage module through current source I bias The equivalent resistance of the MEMS gas sensor is charged. Since the voltage follower enable signal is zero, the output end generates V under the action of the voltage amplification factor. H ;
[0028] S6: V H Greater than 1.6V and 1.3V, Shift1Shift0=00, the state machine of the gear shift module switches to the next state;
[0029] S7: If the state machine of the gear switching module outputs 1011, the resistance conversion voltage module outputs a voltage V under the action of the voltage amplification factor. H ; Otherwise repeat S2 to S6;
[0030] S8: Convert S7 to V H The input is sent to the post-processing module to generate stable oscillation waveforms Q1 and Q2. Under the control of the reference clock, the cycles of Q1 and Q2 are counted respectively, and the cycles are subtracted to eliminate the delay error term, thereby generating the cycle T corresponding to the equivalent resistance of the MEMS gas sensor.
[0031] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0032] (1) The present invention provides an interface circuit for a MEMS gas sensor, which uses a resistance-to-voltage module to convert the equivalent resistance corresponding to the MEMS gas sensor into a voltage V, and fixes the charging current to enable the gear switching module to switch the state to change the voltage amplification factor and the current mirror ratio to achieve gear detection, thereby achieving a wider resistance detection range at the same power consumption. At the same time, the voltage is converted into a period to achieve delay elimination. Under the same PVT, the error term can be eliminated by subtracting the T1 and T2 periods, and finally the period T corresponding to the equivalent resistance of the MEMS gas sensor is obtained, thereby improving the detection accuracy of the equivalent resistance corresponding to the MEMS gas sensor.
[0033] (2) This scheme takes into account that in the large resistance gear, even if the current has a slight fluctuation, the voltage will have a large deviation, so a voltage buffer is needed. The advantage is that the voltage sampling accuracy in the large resistance gear can be guaranteed. In addition, considering that the traditional sampling circuit has errors caused by charge leakage and charge injection, a switched capacitor amplifier is used. The advantage is that by controlling the timing of the switch, the charge injection effect can be avoided and the sampling accuracy can be improved. Furthermore, considering that the simple sampling circuit introduces a large charge error and has no load capacity SC unit gain buffer, a switched capacitor unit buffer is used. The advantage is that by controlling the timing of the switch, the charge injection effect can be avoided, the sampling accuracy can be improved, and it has a certain load capacity.
[0034] (3) This solution takes into account that the traditional RTF is a fixed voltage and changes the charging current. When the sensor resistance is large, the charging current is small and the delay of the comparator in the circuit is large. When the sensor resistance is small, the charging current is large and the power consumption is also large. The measurement range and measurement accuracy are limited. Therefore, the charging current is fixed to achieve the detection of the divided positions. The advantage is that a wider resistance detection range can be achieved at the same power consumption.
[0035] (4) This solution uses a hardware module to subtract the periods of Q1 and Q2, which can eliminate comparator delay error and common-mode error and improve resistance detection accuracy.
[0036] (5) The voltage-to-frequency conversion module provided by this solution has a simple structure, a simple principle and is easy to control, which can reduce the design complexity of the entire interface circuit.
[0037] (6) This scheme takes into account the common-mode voltage V corresponding to the switched capacitor amplifier C1 CM The common-mode error tcm generated is therefore counted using a counter module to count the cycles of Q1 and Q2. The advantage is that the hardware module can be used to perform cycle subtraction to eliminate the comparator delay error and common-mode error, thereby improving the resistance detection accuracy.
[0038] (7) This scheme takes into account that the detection accuracy of traditional RTF is limited by the comparator delay error t d , and the switched capacitor amplifier C1 causes the common mode voltage V CM The common mode error tcm generated is eliminated by using a hardware delay elimination module, thereby improving the resistance detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a circuit diagram of an interface circuit of a MEMS gas sensor provided in Example 1 of the present invention;
[0040] Figure 2 is a circuit diagram of a gear switching module in the interface circuit of a MEMS gas sensor provided in Example 1 of the present invention;
[0041] Figure 3 It is a circuit diagram of a resistance-to-voltage conversion module in the interface circuit of a MEMS gas sensor provided in Example 1 of the present invention;
[0042] Figure 4 is a circuit diagram of a voltage-to-frequency conversion module in an interface circuit of a MEMS gas sensor provided in Example 1 of the present invention;
[0043] Figure 5 This is a schematic diagram of the gear switching of the state machine in the interface circuit of the MEMS gas sensor provided in Example 1 of the present invention;
[0044] Figure 6 This is a timing diagram of the output voltage of the voltage-to-frequency module in the interface circuit of the MEMS gas sensor provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0046] Example 1
[0047] like Figure 1 As shown, this embodiment provides an interface circuit of a MEMS gas sensor, including: a reference voltage and current generating module, a gear switching module, a resistance conversion voltage module, a bias current generating module and a post-processing module. The following is an example of a MEMS gas sensor interface circuit based on RTF with a resistance detection range of 100Ω-150MΩ and twelve gears.
[0048] The reference voltage and current generating module is used to convert the input voltage into a first reference voltage, a second reference voltage, a reference current, a common mode reference voltage, a charging current and a third reference voltage. For example, the reference voltage and current generating module has an input terminal connected to a power supply voltage and has six output terminals, which respectively output a 1.6V comparator reference voltage, a 1.2V comparator reference voltage, a 1uA reference current IREF, a 1.2V common mode reference voltage, a 10uA charging current, and a 1.0V low level reference voltage VL.
[0049] The gear switching module includes: a first comparator, a second comparator, a state machine and a lookup table. The high level input end of the first comparator is connected to the first reference voltage, the low level input end of the second comparator is connected to the second reference voltage, and the low level input end of the first comparator and the high level input end of the second comparator are connected to the output end of the voltage conversion frequency module. The first comparator and the second comparator are used to output 1 when the voltage of the high level input end is greater than the input end of the low level input end, and vice versa. The state machine is connected to the output end of the first comparator and the output end of the second comparator, and is used to output a jump to the next state when the input end signal is 00. When the input end signal is 01 or 11, the output state remains unchanged. The input end of the lookup table is connected to the output end of the state machine, and is used to generate a current mirror enable signal, a capacitor switching array enable signal and an enable signal Buffer-EN under different gears according to the output state of the state machine.
[0050] Among them, the gear switching module, such as Figure 2 As shown, it includes a first comparator, a second comparator, a state machine and a lookup table. The high level input end of the first comparator is connected to the 1.6V reference voltage output by the reference voltage current generating module, and the low level input end is connected to the output voltage V of the voltage conversion frequency module. H The high level input terminal of the second comparator is connected to the output voltage V of the voltage conversion frequency module. H The low level input terminal is connected to the 1.2V reference voltage output by the reference voltage current generating module. The two input terminals of the state machine are connected to the output terminals Shift0 and Shift1 of the first comparator and the second comparator respectively. Figure 5 As shown, when the power is initially turned on, V H =0, the initial output of the state machine is S0=0000, Shift1Shift0=11, and the state machine output remains unchanged. During the charging process, the voltage V H Rising, when 1.2V <V H <1.6V, it means that the equivalent resistance value corresponding to the MEMS gas sensor is still within the current gear, Shift1Shift0=01, and the state machine output remains unchanged. <V H , it indicates that the equivalent resistance corresponding to the MEMS gas sensor switches to a larger gear, Shift1Shift0=00, and the state machine output jumps to the next state S1=0001. H If it is still greater than 1.6V, the gear shifting continues until the state machine output is stable. The output of the state machine is connected to the input of the lookup table, and the output of the lookup table generates current mirror enable signals β1…β7, capacitor switching array enable signals α1…α4, and voltage buffer enable signals Buffer-EN under different gears, which are connected to the bias current generation module and the resistance conversion voltage module.
[0051] The bias current generating module is used to generate the reference current I output by the reference voltage current generating module. REF The current mirror enable signal generates the bias current I in different gears bais Specifically, the bias current generating module has its input end connected to the 1uA reference current IREF output by the reference voltage current generating module. Its enable end is connected to the current mirror enable signal β1…β7 output by the gear switching module, and its output end is connected to the gate of the current mirror tube of the resistance conversion voltage module to provide charging current under different gears.
[0052] The resistance-to-voltage conversion module is used to generate a voltage amplification ratio β at different gears using a capacitor switching array enable signal and an enable signal Buffer-EN, and convert the equivalent resistance R of the MEMS gas sensor to S Converted into a stable level signal V H .
[0053] Specifically, the resistance-to-voltage module includes a mirror current source, a first transmission gate, a voltage buffer, a switched capacitor amplifier, a switched capacitor unit gain buffer, a second transmission gate, a third transmission gate, and a capacitor switching array. Figure 3 As shown, the four enable terminals of the capacitor switching array are connected to the output terminals α1…α4 of the lookup table. Only one enable terminal is valid at any time. A group of capacitor arrays is selected to determine the capacitance C1 at the current gear, thereby determining the voltage amplification factor C1 / C2 at the current gear. The output terminal of the mirror current source is connected to the output terminal of the equivalent resistor corresponding to the MEMS gas sensor, and the equivalent resistance value corresponding to the MEMS gas sensor is converted into a voltage value.
[0054] The equivalent resistance output end corresponding to the MEMS gas sensor is connected to the input end of the first transmission gate and the voltage buffer. The PMOS gate of the first transmission gate and the enable signal of the voltage buffer are both connected to the enable signal Buffer-EN. Therefore, in the large resistance gear, the first transmission gate works to transmit the input voltage (VS). In the small resistance gear, the voltage buffer works to achieve voltage buffering and transmit the input voltage (VS). The output ends of the first transmission gate and the voltage buffer are both connected to the switch Sw1. When the clock clk+ is high, the switches Sw1 and Sw2 are closed, and Sw3 is disconnected. C1 is pre-charged to Vout1-Vcm. When the open-loop gain of A1 is very large, due to the virtual short, the output of the switched capacitor amplifier is Vcm. When the clock clk+ is low, the switch Sw3 is closed, the switches Sw1 and Sw2 are disconnected, and the charge is redistributed between C1 and C2. The output of the switched capacitor amplifier is Vout2 = (C1 / C2)*Vout1. When the clock clk- is high, switches Sw4 and Sw6 are closed, Sw5 is open, and C3 is precharged to Vout2-Vcm. When the open-loop gain of A2 is large, the output of the switched capacitor unit gain buffer is Vcm due to the virtual short. When clk- is low, switch Sw5 is closed, Sw4 and Sw6 are open, and the total charge on capacitor C3 is conserved, so the output of the switched capacitor unit gain buffer is Vout2. Since the clock clk+ and the clock clk- are inverted, the output waveforms of the switched capacitor amplifier and the switched capacitor unit gain buffer are as follows: Figure 6 As shown, the second transmission gate transmits in the lower half cycle under the control of clock clk+, that is, Vout2 is transmitted only during the period when clk+ is low level. Similarly, the third transmission gate transmits in the lower half cycle under the control of clock clk-, that is, Vout2 is transmitted only during the period when clk- is low level. Therefore, the output of the second and third transmission gates is superimposed to generate a stable level V H .
[0055] The post-processing module is connected to the reference voltage current generating module and the resistance conversion voltage module to convert the stable level signal V H The common mode reference voltage is converted into oscillation waveforms Q1 and Q2. The equivalent resistance R of the MEMS gas sensor is obtained by periodically subtracting the two sets of oscillation waveforms Q1 and Q2. S The corresponding period is T. The post-processing module includes: a voltage conversion frequency module, a counter module, and a hardware delay elimination module connected in sequence.
[0056] As an optional implementation, the resistance-to-voltage module includes: a mirror current source, a first transmission gate, a voltage buffer, a switch capacitor amplifier C1, C2, C3, a switch capacitor unit gain buffer, a second transmission gate, a third transmission gate, a capacitor switching array, and switches Sw1, Sw2, Sw3, Sw4, Sw5, and Sw6. The output end of the mirror current source is connected to one end of the equivalent resistor, and the other end of the equivalent resistor is grounded to convert the resistance value of the equivalent resistor into a voltage value. The output end of the equivalent resistor is connected to the input end of the first transmission gate and the voltage buffer. Under the small resistance gear, the first transmission gate enable end is effective, and the output end of the first transmission gate is connected to the input end of the switch capacitor amplifier C1. Under the large resistance gear, the voltage buffer enable end is effective to achieve voltage buffering. The output end of the voltage buffer is connected to the input end of the switch capacitor amplifier C1. The output end of the switch capacitor amplifier C1 is connected to the input end of the second transmission gate, and the output end of the switch capacitor unit gain buffer is connected to the input end of the third transmission gate. The two ends of the capacitor switching array are connected in parallel to the two ends of the switch capacitor amplifier C1. One end of the switched capacitor amplifier capacitor C2 is connected to the capacitor C1, and the other end is connected to the output end of the switched capacitor amplifier A1. One end of the capacitor C3 is connected to the negative input end of the switched capacitor unit gain buffer, and the other end is connected to the switch Sw4. One end of the switch Sw1 is connected to the output end of the voltage buffer, and the other end is connected to the switch Sw3. One end of the switch Sw3 is connected to the switch Sw1, and one end is grounded. Switch Sw2 is connected in parallel to the capacitor C2. One end of the switch Sw4 is connected to the output end of the switched capacitor amplifier A1, and the other end is connected to the capacitor C3. One end of the switch Sw5 is connected to the capacitor C3, and the other end is connected to the output end of the switched capacitor unit gain buffer A2. One end of the switch Sw6 is connected to the capacitor C3, and the other end is connected to the output end of the switched capacitor unit gain buffer A2. The enable end of the capacitor switching array inputs the capacitor switching array enable signal α1…αj. At any time, only one enable end is valid to select a group of capacitor arrays, determine the capacitor C1 under the current gear, and thus determine that the output end of the voltage amplifier mirror current source under the current gear is connected to the output end of the equivalent resistor, and the resistance value of the equivalent resistor is converted into a voltage value coefficient C1 / C2.
[0057] As an optional implementation, when the clock clk+ is high, the switches Sw1 and Sw2 are closed, Sw3 is disconnected, and C1 is precharged to Vout1-Vcm. When the open-loop gain of A1 reaches the first threshold, due to the virtual short, the output of the switched capacitor amplifier C1 is Vcm. When the clock clk+ is low, the switch Sw3 is closed, the switches Sw1 and Sw2 are disconnected, and the charge is redistributed between C1 and C2. The output of the switched capacitor amplifier C1 is Vout2 = (C1 / C2) * Vout1. When the clock clk- is high, the switches Sw4 and Sw6 are closed, Sw5 is disconnected, and C3 is precharged to Vout2-Vcm. When the open-loop gain of A2 reaches the second threshold, due to the virtual short, the output of the switched capacitor unit gain buffer is Vcm. When clk- is low, the switch Sw5 is closed, Sw4 and Sw6 are disconnected, and due to the conservation of the total amount of charge on the capacitor C3, the output of the switched capacitor unit gain buffer is Vout2. The second transmission gate transmits Vout2 during the period when clk+ is low level. Similarly, the third transmission gate transmits Vout2 during the period when clk- is low level. The output ends of the second and third transmission gates are superimposed to generate a stable level V H , V H =V CM +βI REF ·R S , where R S is the equivalent resistance of the sensor, β=k*C1 / C2, is the product of the current amplification factor k and the voltage amplification factor C1 / C2, k is the width-to-length ratio of the current mirror tube of the resistance conversion voltage module and the current source tube of the bias current module, V CM is the third reference voltage.
[0058] As an optional implementation, the post-processing module includes: a voltage conversion frequency module, a counter module, and a hardware delay elimination module connected in sequence. The voltage conversion frequency module is used to convert the stable level signal V H The oscillation waveform Q1 is converted and the third reference voltage is converted into the oscillation waveform Q2. The counter module is used to record the period T1 of the oscillation waveform Q1 and the period T2 of the oscillation waveform Q2 respectively. The hardware delay elimination module is used to subtract the period T1 of the two sets of oscillation waveforms Q1 and the period T2 of Q2 to obtain the equivalent resistance R of the MEMS gas sensor. S The corresponding period T; the hardware delay elimination module, whose input end is connected to the SPI bus, uses the MCU unit to perform an arithmetic operation of subtracting two oscillation waveform periods to achieve delay elimination.
[0059] As an optional implementation, Figure 4As shown, the voltage conversion frequency module includes: a first oscillation waveform generation group and a second oscillation waveform generation group with the same structure, both including: a PMOS current mirror, an NMOS current mirror, a first switch tube, a second switch tube, an integral capacitor, a high level comparator, a low level comparator, and an RS trigger. The charging current output by the current mirror reference current voltage module charges and discharges the integral capacitor, and the output end of the integral capacitor is connected to the negative input end V1- and the positive input end V2+ of the high level comparator and the low level comparator, and the output voltage V1+ of the resistor conversion voltage module is connected to the negative input end V1- and the positive input end V2+ of the high level comparator and the low level comparator, respectively. H , V2-terminal reference voltage current generating module output voltage VL, and level flip. The output ends of the high level comparator and the low level comparator are respectively connected to the reset end R and the set end S of the RS trigger, and two non-overlapping oscillation waveforms Q and QN are output. The Q end is connected to the gate of the first switch tube to control the charging of the integral capacitor, and the QN end is connected to the gate of the second switch tube to control the discharge of the integral capacitor to generate a final stable oscillation square wave.
[0060] As an optional implementation, the counter module is provided with three input terminals, wherein the first input terminal is connected to the output terminal of the first waveform generating group to record the period T1 of the oscillation waveform Q1. The second input terminal is connected to the output terminal of the second waveform generating group to record the period T2 of the oscillation waveform Q2, where T2 is V CM The error term oscillation period generated is T2 = tcm + td. Its third input terminal is connected to the reference clock. tcm is the common mode level V CM The common-mode delay error term generated, td is the delay error term generated by the comparator.
[0061] As an optional implementation, the period T1 of the oscillation waveform Q1 is expressed as: T1 = 2C L βαR S +t cm +t d , β=k*C1 / C2, is the product of the current amplification factor k and the voltage amplification factor C1 / C2, k is the width-to-length ratio of the current mirror tube of the resistance conversion voltage module and the current source tube of the bias current module, V CM is the third reference voltage, and α is the voltage amplification factor.
[0062] The interface circuit of the MEMS gas sensor provided in the embodiment of the present invention adopts an RV conversion structure, a fixed charging current, and realizes the detection of the sub-level position by changing the voltage amplification factor and the current mirror ratio through state switching, thereby realizing a wider resistance detection range under the same power consumption. At the same time, a hardware delay elimination module is used to realize delay elimination, thereby improving the resistance detection accuracy. The problem of limited resistance measurement range and measurement accuracy of the traditional RTF detection method is improved.
[0063] Example 2
[0064] This embodiment provides a control method for an interface circuit of a MEMS gas sensor, including:
[0065] S1: The state machine output of the gear switching module has an initial value of S0=0000 and enters S2.
[0066] S2: The lookup table determines the corresponding current mirror enable signal β1 ... βi, the capacitor switching array enable signal α1 ... αj and the voltage follower enable signal Buffer-EN according to the current output of the state machine.
[0067] S4: The bias current voltage module provides a corresponding bias current to the resistance conversion voltage module according to the current mirror enable signal. The capacitor switching array of the resistance conversion voltage module selects a corresponding capacitor array to obtain a voltage amplification factor according to the corresponding enable signal.
[0068] S5: Resistor-to-voltage module through current source I bias The equivalent resistance of the MEMS gas sensor is charged. Since the voltage follower enable signal is zero, the output end generates V under the action of the voltage amplification factor. H .
[0069] S6: V H If the voltage is greater than 1.6V and 1.3V, Shift1Shift0=00, and the state machine of the gear shift module switches to the next state.
[0070] S7: If the state machine of the gear switching module outputs 1011, the resistance conversion voltage module outputs a voltage V under the action of the voltage amplification factor. H , and repeat S2 to S6 otherwise.
[0071] S8: Convert S7 to V H The input is sent to the post-processing module to generate stable oscillation waveforms Q1 and Q2. Under the control of the reference clock, the cycles of Q1 and Q2 are counted respectively, and the cycle subtraction is performed to eliminate the delay error term, and the cycle T corresponding to the equivalent resistance of the MEMS gas sensor is generated.
[0072] In an example, taking a MEMS gas sensor detection interface circuit in which the initial equivalent resistance of the MEMS gas sensor is 100MΩ and jumps to 1kΩ in 30ms as an example, the specific implementation steps are as follows:
[0073] Step 1: The state machine output initial value of the gear switching module is S0=0000, and the lookup table outputs the corresponding current mirror enable signal (β1…β7=1000000), the enable signal of the capacitor switching array (α1…α4=1000) and the voltage follower enable signal Buffer-EN=0.
[0074] Step 2: The bias current voltage module provides a corresponding 100uA bias current to the resistance conversion voltage module according to the current mirror enable signal. At the same time, the capacitor switching array of the resistance conversion voltage module selects the corresponding capacitor C1 array according to the corresponding enable signal, so that the voltage amplification factor C1 / C2=20.
[0075] Step 3: The resistor-to-voltage module passes through a 100uA current source I bias The equivalent resistance Rsens corresponding to the MEMS gas sensor is charged. Since the voltage follower enable signal is zero, the first transmission gate enable buffer-nen is valid at this time, and the transmission voltage Vout1 is approximately equal to the power supply voltage 3.3V. Under the control of clock clk+, the switched capacitor amplifier amplifies Vout1 to Vout2 = (C1 / C2) * Vout1 and transmits Vout2 through the second transmission gate half cycle. The switched capacitor unit gain buffer samples Vout2 under the control of clock clk- and transmits Vout2 through the third transmission gate half cycle, superimposing Vout2 at the output end. H ≈3.3V.
[0076] Step 4: Since V H If the voltage is greater than 1.6V and 1.3V, Shift1Shift0=00, and the gear is switched to S1=0001. Repeat the above steps 1 to 4 until the gear is stabilized to S11=1011. According to Table 1, the bias current is 10nA, the voltage amplification factor is 5 / 16, and V H It stabilizes to about 1.4V.
[0077] Table 1
[0078]
[0079] Step 5: V H The first oscillation waveform generation group input to the voltage conversion frequency module generates a stable oscillation waveform Q1, and the second oscillation waveform generation group generates an oscillation waveform Q2.
[0080] Step 6: The oscillation waveforms Q1 and Q2 are input into the counter module. Under the control of the reference clock clkref, the cycles of Q1 and Q2 are counted respectively. The cycles are transmitted to the hardware delay elimination module through SPI. The MCU arithmetic unit is used to perform cycle subtraction to eliminate the delay error term, and the equivalent resistance value of the MEMS gas sensor corresponding to 100MΩ is generated. The corresponding period T
[0081] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An interface circuit for a MEMS gas sensor, characterized in that: include: Reference voltage and current generating module, gear switching module, resistance conversion voltage module, bias current generating module and post-processing module; The reference voltage and current generating module is used to convert the input voltage into a first reference voltage, a second reference voltage, a reference current, a common mode reference voltage, a charging current and a third reference voltage; The gear switching module includes: a first comparator, a second comparator, a state machine and a lookup table; the high level input end of the first comparator is connected to the first reference voltage, the low level input end of the second comparator is connected to the second reference voltage, and the low level input end of the first comparator and the high level input end of the second comparator are connected to the output end of the voltage conversion frequency module; the first comparator and the second comparator are used to output 1 when the voltage of the high level input end is greater than the input end of the low level input end, and vice versa to output 0; the state machine is connected to the output end of the first comparator and the output end of the second comparator, and is used to output a jump to the next state when the input end signal is 00; when the input end signal is 01 or 11, the output state remains unchanged; the input end of the lookup table is connected to the output end of the state machine, and is used to generate a current mirror enable signal, a capacitor switching array enable signal and an enable signal Buffer-EN under different gears according to the output state of the state machine; The bias current generating module is used to generate a reference current I according to the output of the reference voltage current generating module. REF The current mirror enable signal generates the bias current I in different gears bais ; The resistance-to-voltage conversion module is used to generate a voltage amplification ratio β at different gears using the capacitor switching array enable signal and the enable signal Buffer-EN, and to convert the equivalent resistance R of the MEMS gas sensor to S Converted into a stable level signal V H ; The post-processing module is connected to the reference voltage current generating module and the resistance conversion voltage module, and is used to convert the stable level signal V H and the common mode reference voltage into oscillation waveforms Q1 and Q2; and the two sets of oscillation waveforms Q1 and Q2 are periodically subtracted to obtain the equivalent resistance R of the MEMS gas sensor S The corresponding period T.
2. The interface circuit of the MEMS gas sensor according to claim 1, characterized in that: The resistance-to-voltage conversion module comprises: A mirror current source, a first transmission gate, a voltage buffer, a switched capacitor amplifier C1, C2, C3, a switched capacitor unit gain buffer, a second transmission gate, a third transmission gate, a capacitor switching array, and switches Sw1, Sw2, Sw3, Sw4, Sw5, Sw6; The output end of the mirror current source is connected to one end of the equivalent resistor, and the other end of the equivalent resistor is grounded, so that the resistance value of the equivalent resistor is converted into a voltage value; the output end of the equivalent resistor is connected to the input end of the first transmission gate and the voltage buffer; under the small resistance gear, the first transmission gate enable end is effective, and the output end of the first transmission gate is connected to the input end of the switch capacitor amplifier C1, and under the large resistance gear, the voltage buffer enable end is effective to achieve voltage buffering; the output end of the voltage buffer is connected to the input end of the switch capacitor amplifier C1; the output end of the switch capacitor amplifier C1 is connected to the input end of the second transmission gate, and the output end of the switch capacitor unit gain buffer is connected to the input end of the third transmission gate; the two ends of the capacitor switching array are connected in parallel to the two ends of the switch capacitor amplifier C1; the switch capacitor amplifier capacitor C 2 has one end connected to capacitor C1, and the other end connected to the output end of switched capacitor amplifier A1; one end of capacitor C3 is connected to the negative input end of the switched capacitor unit gain buffer, and the other end is connected to switch Sw4; one end of switch Sw1 is connected to the output end of the voltage buffer, and the other end is connected to switch Sw3; one end of switch Sw3 is connected to switch Sw1, and one end is grounded; switch Sw2 is connected in parallel to capacitor C2; one end of switch Sw4 is connected to the output end of switched capacitor amplifier A1, and the other end is connected to capacitor C3; one end of switch Sw5 is connected to capacitor C3, and the other end is connected to the output end of switched capacitor unit gain buffer A2; one end of switch Sw6 is connected to capacitor C3, and the other end is connected to the output end of switched capacitor unit gain buffer A2; The enable end of the capacitor switching array inputs the capacitor switching array enable signal α1…αj. At any time, only one enable end is valid to select a group of capacitor arrays, determine the capacitor C1 under the current gear, and thus determine that the output end of the voltage amplification mirror current source under the current gear is connected to the output end of the equivalent resistor, and convert the resistance value of the equivalent resistor into a voltage value coefficient C1 / C2.
3. The interface circuit of the MEMS gas sensor according to claim 2, characterized in that: When the clock clk+ is at a high level, the switches Sw1 and Sw2 are closed, Sw3 is opened, and C1 is precharged to Vout1-Vcm. When the open-loop gain of A1 reaches the first threshold, the output of the switched capacitor amplifier C1 is Vcm. When the clock clk+ is at a low level, the switch Sw3 is closed, the switches Sw1 and Sw2 are opened, and the charge is redistributed between C1 and C2. The output of the switched capacitor amplifier C1 is Vout2=(C1 / C2)*Vout1. When the clock clk- is at a high level, the switches Sw4 and Sw5 are closed, and the charge is redistributed between C1 and C2. w6 is closed, Sw5 is disconnected, C3 is precharged to Vout2-Vcm, and when the open-loop gain of A2 reaches the second threshold, the output of the switch capacitor unit gain buffer is Vcm; when clk- is low, the switch Sw5 is closed, Sw4 and Sw6 are disconnected, and the output of the switch capacitor unit gain buffer is Vout2; the second transmission gate transmits Vout2 during the period when clk+ is low, and the third transmission gate transmits Vout2 during the period when clk- is low; the second and third transmission gate output ends are superimposed to generate a stable level V H , V H =V CM +βI REF R S , where R S is the equivalent resistance of the sensor, β=k*C1 / C2, is the product of the current amplification factor k and the voltage amplification factor C1 / C2, k is the width-to-length ratio of the current mirror tube of the resistance conversion voltage module and the current source tube of the bias current module, V CM is the third reference voltage.
4. The interface circuit of the MEMS gas sensor according to claim 1, characterized in that: The post-processing module includes: a voltage conversion frequency module, a counter module, and a hardware delay elimination module connected in sequence; The voltage conversion frequency module is used to convert the stable level signal V H Converting the oscillation waveform Q1 to convert the third reference voltage into an oscillation waveform Q2; The counter module is used to record the period T1 of the oscillation waveform Q1 and the period T2 of the oscillation waveform Q2 respectively; The hardware delay elimination module is used to subtract the period T1 of the two sets of oscillation waveforms Q1 and the period T2 of Q2 to obtain the equivalent resistance R of the MEMS gas sensor. S The corresponding period T.
5. The interface circuit of the MEMS gas sensor according to claim 4, characterized in that: The voltage conversion frequency module includes: a first oscillation waveform generation group and a second oscillation waveform generation group with the same structure, both including: a PMOS current mirror, an NMOS current mirror, a first switch tube, a second switch tube, an integral capacitor, a high level comparator, a low level comparator, and an RS trigger; the charging current output by the current mirror reference current voltage module charges and discharges the integral capacitor, and the output end of the integral capacitor is connected to the negative input end V1- and the positive input end V2+ of the high level comparator and the low level comparator, and is respectively connected to the output voltage V1+ of the resistor conversion voltage module. H , the output voltage VL of the reference voltage current generating module at the V2- end is compared to perform level flipping; the output ends of the high level comparator and the low level comparator are respectively connected to the reset end R and the set end S of the RS trigger, and two non-overlapping oscillation waveforms Q and QN are output. The Q end is connected to the gate of the first switch tube to control the charging of the integral capacitor, and the QN end is connected to the gate of the second switch tube to control the discharging of the integral capacitor to generate a final stable oscillation square wave.
6. The interface circuit of the MEMS gas sensor according to claim 5, characterized in that: The counter module has three input terminals, wherein the first input terminal is connected to the output terminal of the first waveform generating group to record the period T1 of the oscillation waveform Q1; the second input terminal is connected to the output terminal of the second waveform generating group to record the period T2 of the oscillation waveform Q2, where T2 is V CM The error term oscillation period generated is T2 = tcm + td; its third input terminal is connected to the reference clock; tcm is the common mode level V CM The common-mode delay error term generated, td is the delay error term generated by the comparator.
7. The interface circuit of the MEMS gas sensor according to claim 6, characterized in that: The period T1 of the oscillation waveform Q1 is expressed as: T1 = 2C L βαR S +t cm +t d , β=k*C1 / C2, is the product of the current amplification factor k and the voltage amplification factor C1 / C2, k is the width-to-length ratio of the current mirror tube of the resistance conversion voltage module and the current source tube of the bias current module, V CM is the third reference voltage, and α is the voltage amplification factor.
8. A method for controlling an interface circuit of a MEMS gas sensor, characterized in that: include: S1: The state machine output of the gear switching module has an initial value of S0=0000 and enters S2; S2: The lookup table determines the corresponding current mirror enable signal β1…βi, the capacitor switching array enable signal α1…αj and the voltage follower enable signal Buffer-EN according to the current output of the state machine; S4: the bias current voltage module provides a corresponding bias current to the resistance conversion voltage module according to the current mirror enable signal; the capacitor switching array of the resistance conversion voltage module selects a corresponding capacitor array to obtain a voltage amplification factor according to the corresponding enable signal; S5: Resistor-to-voltage module through current source I bias The equivalent resistance of the MEMS gas sensor is charged, and the output end is superimposed to generate V under the action of the voltage amplification factor. H ; S6: V H greater than 1.6V and 1.3V, the output Shift0 of the first comparator and the output Shift1 of the second comparator of the gear switching module are represented as Shift1Shift0=00, and the state machine of the gear switching module switches to the next state; S7: If the state machine of the gear switching module outputs 1011, the resistance conversion voltage module outputs a voltage V under the action of the voltage amplification factor. H ; Otherwise repeat S2 to S6; S8: Convert S7 to V H The input is sent to the post-processing module to generate stable oscillation waveforms Q1 and Q2. Under the control of the reference clock, the cycles of Q1 and Q2 are counted respectively, and the cycles are subtracted to eliminate the delay error term, thereby generating the cycle T corresponding to the equivalent resistance of the MEMS gas sensor.
Citation Information
Patent Citations
High-precision integrated three-dimensional measurement system based on MEMS
CN110726383A
Gas detection system based on MEMS gas sensor array
CN112730527A
Resistive gas sensor flexible circuit and gas concentration calculation method
CN113252734A
Temperature / Power controller for mems sensor
EP2995939A1
Environmental Sensor Signal Detection Circuit, Bio Sensor Signal Detection Circuit And Heterogeneous Sensor Interface
KR101760511B1