Disclosure of Invention
The invention aims to provide a capacitive microphone capacitance detection method of an electronic cigarette, an analog front end and the electronic cigarette, so as to solve the technical problems. The preferred technical solutions of the technical solutions provided by the present invention can produce a plurality of technical effects described below.
In order to achieve the above purpose, the present invention provides the following technical solutions:
the invention provides a method for detecting capacitance of a capacitive microphone of an electronic cigarette, which comprises the following steps:
Before the capacitive detection period starts, the connection between the negative electrode of the capacitive microphone and the ground end is disconnected, and the same driving signals are input to the positive electrode and the negative electrode of the capacitive microphone;
Collecting capacitance data of the positive electrode of the capacitive microphone in a period of the front section of the capacitance detection period, and amplifying and analog-to-digital converting the collected capacitance data to obtain co-drive capacitance data of the capacitive microphone;
when the front period of the capacitance detection period is finished, the negative electrode and the ground end of the capacitance type microphone are communicated, and different driving signals are respectively input to the positive electrode and the negative electrode of the capacitance type microphone;
collecting capacitance data of the positive electrode of the capacitive microphone in a period of the rear section of the capacitance detection period, and amplifying and analog-to-digital converting the collected capacitance data to obtain capacitance data of the capacitive microphone to ground;
and performing difference operation on the capacitance data to ground of the capacitive microphone and the same-drive capacitance data to obtain capacitance data of the capacitive microphone for eliminating interference.
In some embodiments, the obtained co-drive capacitance data includes the wiring interference capacitance data of the capacitive microphone and the pin interference capacitance data of the capacitive microphone, and the obtained capacitance data to ground includes the capacitance data of the capacitive microphone for eliminating interference, the wiring interference capacitance data of the capacitive microphone and the pin interference capacitance data of the capacitive microphone.
In some embodiments, inputting different driving signals to the positive electrode and the negative electrode of the capacitive microphone respectively includes the following steps:
And when the front period of the capacitance detection period is finished, the negative electrode of the capacitance type microphone inputs a low-level signal, the positive electrode of the capacitance type microphone inputs the same driving signal, and the same driving signal is a voltage square wave signal.
In some embodiments, inputting different driving signals to the positive electrode and the negative electrode of the capacitive microphone respectively includes the following steps:
And when the front period of the capacitance detection period is finished, the positive electrode of the capacitance type microphone inputs the driving signals with the same driving signals and the low level signals alternately in sequence, the negative electrode of the capacitance type microphone inputs the driving signals with the low level signals and the same driving signals alternately in sequence, and the same driving signals are voltage square wave signals.
In some embodiments, the method for detecting the capacitance of the capacitive microphone of the electronic cigarette further comprises the following steps:
and if the capacitance data of the capacitive microphone for eliminating interference exceeds a set threshold, starting heating the electronic cigarette, otherwise, not starting heating the electronic cigarette.
In some embodiments, the method for detecting capacitance of the capacitive microphone of the electronic cigarette further includes collecting co-driving capacitance data and ground capacitance data of two poles of the capacitive microphone, and the steps include:
Collecting capacitance data of two poles of the capacitive microphone in a front period of a next capacitance detection period, and amplifying and analog-to-digital converting the collected capacitance data to obtain positive electrode co-driving capacitance data and negative electrode co-driving capacitance data of the capacitive microphone;
When the front period of the next capacitance detection period is finished, the negative electrode of the capacitance type microphone is communicated with the ground, a corresponding driving signal is input to the positive electrode of the capacitance type microphone, and the driving signal corresponding to the negative electrode is stopped;
After the acquisition of the capacitance data of the positive electrode of the capacitive microphone to the ground is completed, setting the connection between the capacitive microphone and the ground from the negative electrode to be the connection between the positive electrode and the ground, stopping the driving signal corresponding to the positive electrode, inputting the corresponding driving signal to the negative electrode of the capacitive microphone, acquiring the capacitance data of the negative electrode of the capacitive microphone in the period of the later stage of the next capacitance detection period, and amplifying and analog-to-digital converting the acquired capacitance data to obtain the negative electrode capacitance data of the capacitive microphone.
In some embodiments, according to the obtained capacitance data of the negative electrode and the positive electrode of the capacitive microphone, the following judgment is performed on the interference of the capacitive microphone:
when the positive electrode grounding capacitance data and the positive electrode common driving capacitance data both exceed a set threshold value, and the negative electrode grounding capacitance data and the negative electrode common driving capacitance data are smaller than the set threshold value, the positive electrode of the capacitive microphone has wiring interference or pin interference;
When the positive electrode grounding capacitance data and the positive electrode co-driving capacitance data are both smaller than a set threshold value and the negative electrode grounding capacitance data and the negative electrode co-driving capacitance data exceed the set threshold value, wiring interference or pin interference exists at the negative electrode of the capacitive microphone;
When the positive electrode grounding capacitance data and the positive electrode common driving capacitance data both exceed the set threshold value, and the negative electrode grounding capacitance data and the negative electrode common driving capacitance data both exceed the set threshold value, wiring interference or pin interference exists in the positive electrode and the negative electrode of the capacitive microphone.
As a common inventive concept, the present invention further provides an analog front end, configured to implement the above-described electronic cigarette capacitive microphone capacitive detection method, including an analog-to-digital converter ADC, a first operational amplifier CA1, a first switch SW1, a second switch SW2, a third switch SW3, a capacitive detection pin and a mode control pin;
The analog-to-digital converter ADC, the first operational amplifier CA1 and the capacitance detection pin are sequentially connected, one end of the second switch SW2 is connected between the first operational amplifier CA1 and the capacitance detection pin, the other end of the second switch SW2 and one end of the first switch SW1 are both connected with a driving signal source, the other end of the first switch SW1 and one end of the third switch SW3 are both connected with the mode control pin, and the other end of the third switch SW3 is grounded;
The capacitance detection pin and the mode control pin are respectively connected with the anode and the cathode of the capacitance microphone, and the analog-to-digital converter ADC is connected with a main control chip of the electronic cigarette.
In some embodiments, the analog front end further includes a second operational amplifier CA2, a fourth switch SW4, a fifth switch SW5, and a sixth switch SW6, where the analog-to-digital converter ADC, the second operational amplifier CA2, and the mode control pin are sequentially connected, one end of the fourth switch SW4 is connected to one end of the second switch SW2 and the input end of the first operational amplifier CA1, the other end of the fourth switch SW4 is connected to the capacitance detection pin, one end of the fifth switch SW5 is connected between the capacitance detection pin and the fourth switch SW4, the other end of the fifth switch SW4 is grounded, one end of the sixth switch SW6 is connected to one end of the first switch SW1 and the input end of the second operational amplifier CA2, and the other end of the sixth switch SW6 is connected to the mode control pin.
The invention further provides an electronic cigarette which comprises the analog front end, a main control chip and a capacitor type microphone, wherein the analog front end is embedded in the main control chip, a capacitor detection pin of the analog front end is connected with the positive electrode of the capacitor type microphone, a mode control pin of the analog front end is connected with the negative electrode of the capacitor type microphone, the main control chip performs difference operation on the capacitance data to ground and the capacitance data to the same drive of the capacitor type microphone output by an analog-to-digital converter of the analog front end to obtain capacitance data for eliminating interference of the capacitor type microphone, and the capacitance data for eliminating interference exceeding a set threshold value is used as a smoking judgment condition to start heating the electronic cigarette.
By implementing one of the technical schemes, the invention has the following advantages or beneficial effects:
The invention inputs the same driving signals in the front period of the whole capacitance detection period through the positive electrode and the negative electrode of the capacitance type microphone, the negative electrode is not connected with the ground terminal, the different driving signals are input in the rear period of the whole capacitance detection period, the negative electrode is connected with the ground terminal, and then the capacitance change caused by the interference signals of the peripheral environment is eliminated through calculation, so that the actual capacitance change data of the capacitance type microphone caused by smoking is obtained.
On the other hand, the invention can effectively eliminate the external interference of the capacitive microphone, such as the pin capacitance interference caused by oil leakage and water inflow, the capacitance interference caused by the wiring of the related circuit of the touch capacitive microphone, and the like, adopts the capacitive microphone with low cost, and does not have an expensive ASIC chip, thereby effectively reducing the cost. Moreover, the obtained capacitance data for eliminating the interference can accurately correspond to the determined smoking force, so that the consistency of the threshold for starting the negative pressure can be improved.
Therefore, the invention not only can reduce the cost, but also can obviously improve the anti-interference capability of the electronic cigarette, thereby effectively solving the problem of false triggering caused by the external environment change or the pin and wiring of the hand touch microphone during assembly.
Detailed Description
For a better understanding of the objects, technical solutions and advantages of the present invention, reference should be made to the various exemplary embodiments described hereinafter with reference to the accompanying drawings, which form a part hereof, and in which are described various exemplary embodiments which may be employed in practicing the present invention. The same reference numbers in different drawings identify the same or similar elements unless expressly stated otherwise. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. It is to be understood that they are merely examples of processes, methods, apparatuses, etc. that are consistent with certain aspects of the present disclosure as detailed in the appended claims, other embodiments may be utilized, or structural and functional modifications may be made to the embodiments set forth herein without departing from the scope and spirit of the present disclosure.
In the description of the present invention, it should be understood that the terms "center," "longitudinal," "transverse," and the like are used in an orientation or positional relationship based on that shown in the drawings, and are merely for convenience in describing the present invention and to simplify the description, rather than to indicate or imply that the elements referred to must have a particular orientation, be constructed and operate in a particular orientation. The terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. The term "plurality" means two or more. The terms "connected," "coupled" and "connected" are to be construed broadly and may be, for example, fixedly connected, detachably connected, integrally connected, mechanically connected, electrically connected, communicatively connected, directly connected, indirectly connected via intermediaries, or may be in communication with each other between two elements or in an interaction relationship between the two elements. The term "and/or" includes any and all combinations of one or more of the associated listed items. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In order to illustrate the technical solutions of the present invention, the following description is made by specific embodiments, only the portions related to the embodiments of the present invention are shown.
The first embodiment of the invention provides a method for detecting capacitance of a capacitive microphone of an electronic cigarette, as shown in fig. 1, comprising the following steps:
s100, before a capacitance detection period starts, disconnecting the connection between the negative electrode of the capacitance type microphone and the ground end, and inputting the same driving signals to the positive electrode and the negative electrode of the capacitance type microphone;
s200, collecting capacitance data of the positive electrode of the capacitive microphone in a period of the front section of a capacitance detection period, and amplifying and analog-to-digital converting the collected capacitance data to obtain co-drive capacitance data of the capacitive microphone;
s300, when the front period of the capacitance detection period is finished, the negative electrode and the ground end of the capacitance type microphone are communicated, and different driving signals are respectively input to the positive electrode and the negative electrode of the capacitance type microphone;
s400, collecting capacitance data of the positive electrode of the capacitive microphone in a period of the rear section of the capacitance detection period, and amplifying and analog-to-digital converting the collected capacitance data to obtain capacitance data of the capacitive microphone to ground;
S500, performing difference operation on the capacitance data to ground of the capacitive microphone and the same-drive capacitance data to obtain capacitance data of the capacitive microphone for eliminating interference.
The invention inputs the same driving signals in the front period of the whole capacitance detection period through the positive electrode and the negative electrode of the capacitance type microphone, the negative electrode is not connected with the ground terminal, the different driving signals are input in the rear period of the whole capacitance detection period, the negative electrode is connected with the ground terminal, and then the capacitance change caused by the peripheral environment interference signals is eliminated through calculation, so that the real capacitance change data of the capacitance type microphone caused by actual smoking is obtained. On the other hand, the invention can effectively eliminate external interference of the capacitive microphone, such as pin capacitance interference caused by oil leakage and water inflow, capacitance interference caused by wiring of a relevant circuit (such as a detection circuit) of the touch capacitive microphone, and the like. The low-cost capacitor microphone is adopted, and no expensive ASIC chip is arranged, so that the cost can be effectively reduced. Moreover, the obtained capacitance data for eliminating the interference can accurately correspond to the determined smoking force, and the consistency of the threshold for starting the negative pressure can be improved. Therefore, the invention not only can reduce the cost, but also can obviously improve the anti-interference capability of the electronic cigarette, thereby effectively solving the problem of false triggering caused by the external environment change or the pin and wiring of the hand touch microphone during assembly.
It should be noted that the existing self-capacitance detection principle is to convert the capacitance change of the microphone into the change of the frequency signal, and then obtain the magnitude of the capacitance change by measuring the frequency of the signal. The self-capacitance detection principle of the invention is that the capacitance change of the microphone is converted into the voltage change, and the voltage change is amplified by the operational amplifier and converted into a digital signal by the ADC for calculation processing. It can be understood that the driving signal is a charging voltage to the capacitor, and the voltage converted by the capacitor is obtained at the output end of the operational amplifier CA, so as to convert the capacitance change into the voltage change.
Further, the obtained co-driving capacitance data includes the wiring interference capacitance data of the capacitive microphone and the pin interference capacitance data of the capacitive microphone. The obtained capacitance data to ground comprises capacitance data of the capacitive microphone for eliminating interference, wiring interference capacitance data of the capacitive microphone and pin interference capacitance data of the capacitive microphone. Therefore, the ground capacitance data and the same-drive capacitance data are subtracted to obtain the actual capacitance of the capacitive microphone for eliminating the interference, and the interference is effectively eliminated.
As shown in fig. 2, it can be seen from the equivalent capacitance of the capacitive microphone of the electronic cigarette that the capacitance-to-ground data of the capacitance detection pin can be considered to be composed of three parts, namely the real capacitance-to-ground data Cmic of the microphone, the routing capacitance Cr from the positive electrode (v+ end) of the microphone to the capacitance detection pin, and the pin interference capacitance Cg including human hand touching the microphone and the induction of the microphone oil and water intake, and the detection capacitance c=cmic+cg+cr.
In the front period of the capacitance detection period, the same driving signals are input to the positive electrode and the negative electrode (V-end) of the microphone, the signals between the corresponding V+ end and the V-end are identical, no voltage difference exists, no capacitance or very small capacitance exists between the V+ end and the V-end according to a parallel plate capacitance formula Q=U×C, so that capacitance data tested by the capacitance detection pin of the chip in the period is only the trace capacitance Cr, and an interference capacitance Cg possibly introduced from the outside, which is equivalent to the detection capacitance C1=Cr+Cg, and in the rear period of the capacitance detection period, different driving signals (such as positive electrode input voltage square wave signals and negative electrode input low level signals) are respectively input to the positive electrode and the negative electrode of the capacitive microphone, the capacitance tested by the mode control pin comprises the microphone capacitance, namely the detection capacitance C2=cmic+Cr+Cg, and the difference between the two capacitances C1 and C2 detected in the two periods is calculated, so that the real capacitance Cmic of the microphone can be obtained, and meanwhile, the influence of the trace and interference caused by the trace capacitance is eliminated.
In some embodiments, inputting different driving signals to the positive electrode and the negative electrode of the capacitive microphone respectively includes the following steps:
When the front period of the capacitance detection period is finished, a low-level signal is input to the negative electrode of the capacitance type microphone, and the same driving signal is input to the positive electrode of the capacitance type microphone. The same driving signal is a voltage square wave signal.
In some embodiments, inputting different driving signals to the positive electrode and the negative electrode of the capacitive microphone respectively includes the following steps:
when the front period of the capacitance detection period is finished, the positive electrode of the capacitance type microphone inputs the same driving signals and driving signals with low level signals alternating in sequence, the negative electrode of the capacitance type microphone inputs the driving signals with low level signals alternating in sequence and the periods of the low level signals and the same driving signals can be consistent, and the same driving signals are voltage square wave signals.
The electronic cigarette capacitive microphone capacitance detection method of the embodiment further comprises the following steps:
and if the capacitance data of the capacitive microphone for eliminating interference exceeds a set threshold, starting heating the electronic cigarette, otherwise, not starting heating the electronic cigarette.
Particularly, when the electronic cigarette and the capacitive microphone thereof are produced and assembled, a hand can easily touch pins or wires of the microphone on the PCB, the capacitance of the chip capacitance detection pin to the ground is changed, and the electronic cigarette is started by mistake. Therefore, in order to ensure that the electronic cigarette is not started by mistake due to assembly, whether the positive electrode and the negative electrode of the capacitive microphone are interfered needs to be further judged.
As shown in fig. 3, the method for detecting capacitance of a capacitive microphone of an electronic cigarette according to the embodiment further includes collecting co-driving capacitance data and ground capacitance data of two poles of the capacitive microphone, and includes the steps of:
S600, collecting capacitance data of two poles of the capacitive microphone in a period of a front section of a next capacitance detection period, and amplifying and analog-to-digital converting the collected capacitance data to obtain positive electrode co-drive capacitance data and negative electrode co-drive capacitance data of the capacitive microphone;
S700, when the front period of the next capacitance detection period is finished, the negative electrode and the ground end of the capacitance type microphone are communicated, a corresponding driving signal is input to the positive electrode of the capacitance type microphone, and the driving signal corresponding to the negative electrode is stopped;
S800, after collecting capacitance data of the positive electrode of the capacitor type microphone to the ground, setting the connection between the capacitor type microphone and the ground from the negative electrode to be the connection between the positive electrode and the ground, stopping the driving signal corresponding to the positive electrode, inputting the corresponding driving signal to the negative electrode of the capacitor type microphone, collecting the capacitance data of the negative electrode of the capacitor type microphone in the period of the later stage of the next capacitance detection period, and amplifying and analog-to-digital converting the collected capacitance data to obtain the capacitance data of the negative electrode of the capacitor type microphone to the ground.
Further, according to the obtained capacitance data of the negative electrode and the positive electrode of the capacitor microphone, the following judgment is performed on the interference of the capacitor microphone:
When the positive electrode grounding capacitance data and the positive electrode co-driving capacitance data both exceed a set threshold value, and the negative electrode grounding capacitance data and the negative electrode co-driving capacitance data are smaller than the set threshold value, the positive electrode of the capacitive microphone has wiring interference or pin interference;
When the positive electrode grounding capacitance data and the positive electrode co-driving capacitance data are both smaller than a set threshold value and the negative electrode grounding capacitance data and the negative electrode co-driving capacitance data exceed the set threshold value, wiring interference or pin interference exists at the negative electrode of the capacitor type microphone;
When the positive electrode grounding capacitance data and the positive electrode co-driving capacitance data both exceed the set threshold value, and the negative electrode grounding capacitance data and the negative electrode co-driving capacitance data both exceed the set threshold value, wiring interference or pin interference exists in the positive electrode and the negative electrode of the capacitor type microphone.
Therefore, the corresponding interference factors can be detected through the steps S600-S800 before assembly, further measures are taken to effectively avoid interference in the assembly process, eliminate false start of the electronic cigarette and improve user experience of the electronic cigarette.
In a second embodiment, as shown in fig. 4, as the same inventive concept, the present embodiment provides an analog front end for implementing the method for detecting capacitance of an electronic cigarette capacitive microphone described in the first embodiment, which includes an analog-to-digital converter ADC, a first operational amplifier CA1, a first switch SW1, a second switch SW2, a third switch SW3, a capacitance detection pin and a mode control pin. Specific:
The analog-to-digital converter ADC, the first operational amplifier CA1 and the capacitance detection pin are sequentially connected, one end of the second switch SW2 is connected between the first operational amplifier CA1 and the capacitance detection pin, the other end of the second switch SW2 and one end of the first switch SW1 are both connected with a driving signal source, the other end of the first switch SW1 and one end of the third switch SW3 are both connected with a mode control pin, and the other end of the third switch SW3 is grounded. Further, the capacitance detection pin and the mode control pin are respectively connected with the anode and the cathode of the capacitance microphone, and the analog-to-digital converter ADC is connected with the main control chip of the electronic cigarette.
As shown in fig. 5-6, in some embodiments, taking a capacitance detection period of 10ms as an example, 5ms (a period before the capacitance detection period) before the detection period is in the same-drive detection mode, the driving signals of the positive electrode and the negative electrode of the capacitive microphone are both voltage square wave signals. That is, the capacitance detection pin MIC outputs a voltage square wave signal, and the MODE control pin MODE outputs a voltage square wave signal. The synchronous drive detection mode can detect wiring capacitance and interference capacitance, and the rear 5ms (the period of the rear section of the capacitance detection period) is a low-level detection mode, wherein the driving signals of the positive pole and the negative pole of the capacitance type microphone are respectively voltage square wave signals and low-level signals. That is, the capacitance detection pin MIC outputs a voltage square wave signal, and the MODE control pin MODE outputs a low level signal. The low level detection mode can detect the interference-free capacitance, the wiring capacitance and the interference capacitance of the microphone.
It can be understood that the driving signals of the positive pole and the negative pole of the capacitive microphone are not limited to the square-wave voltage signal and the low-level signal, but can be alternating signals of the square-wave voltage signal and the low-level signal. In other words, in the low-level detection MODE of the latter period (the latter 5 ms) of the capacitance detection period, the positive electrode of the capacitance type microphone inputs a driving signal sequentially alternating with the voltage square wave signal through the capacitance detection pin MIC, the negative electrode of the capacitance type microphone inputs a driving signal sequentially alternating with the voltage square wave signal through the MODE control pin MODE, and the periods of the low-level signal and the voltage square wave signal are identical.
Through the setting of the driving signals, after the two pins V+ (positive electrode) and V- (negative electrode) of the capacitive microphone are respectively connected to the capacitance detection pin and the mode control pin of the analog front end, the mode control pin of capacitance detection connected with the V-end of the microphone outputs a common-drive square waveform in the first 5ms and outputs a low-level signal in the last 5ms in one capacitance detection period of 10 ms. The capacitance detection pin connected with the V+ end of the microphone outputs a common-drive square waveform within 10ms, and the self-capacitance to the ground is always detected.
The following 2 steps are completed in one capacitance detection scanning period:
1) The detection time of the same drive is that the first switch SW1 and the second switch SW2 are closed (ON), the third switch SW3 is Opened (OFF), and the detection capacitance C1=Cr+Cg. Cr wiring interference capacitance and Cg microphone pin interference capacitance. The frequency, phase and voltage amplitude of the working waveforms of the capacitance detection pin and the mode control pin are completely consistent. Step S100 and step S200 are completed, and the co-driving capacitance data of the capacitive microphone is obtained through the acquisition channel formed by the capacitance detection pin, the first operational amplifier CA1 and the analog-to-digital converter ADC.
2) The low level detection time is when the second switch SW2 and the third switch SW3 are turned ON, the first switch SW1 is turned OFF, and the detection capacitance c2=cmic+cr+cg. The true capacitance (capacitance without interference) of Cmic microphone. Step S300 and step S400 are completed, and the capacitance-to-ground data of the capacitive microphone is obtained through the acquisition channel formed by the capacitance detection pin, the first op-amp CA1 and the analog-to-digital converter ADC. It should be noted that, the first switch SW1 turns off the negative electrode of the capacitive microphone and has no signal input, i.e. the input is a low level signal.
In the third embodiment, as shown in fig. 7, as the same inventive concept, the embodiment provides an electronic cigarette, which comprises the analog front end described in the second embodiment, and further comprises a main control chip and a capacitive microphone. The analog front end is embedded in the main control chip, a capacitance detection pin of the analog front end is connected with the positive electrode of the capacitance type microphone, and a mode control pin of the analog front end is connected with the negative electrode of the capacitance type microphone. Further, the main control chip performs a difference operation on the capacitance data to ground of the capacitor microphone output by the analog-to-digital converter at the analog front end and the co-drive capacitance data to obtain capacitance data of the capacitor microphone for eliminating interference, and the capacitance data of eliminating interference exceeding a set threshold value is used as a smoking judging condition to start heating the electronic cigarette.
In this embodiment, the positive electrode (v+) of the capacitive microphone is connected to the MIC pin of the main control chip U2, and the negative electrode (V-) thereof is directly connected to the MODE pin of the main control chip U2. The MIC pin of the main control chip U2 corresponds to a capacitance detection pin of the analog front end, and the MODE pin of the main control chip U2 corresponds to a MODE control pin of the analog front end.
It should be noted that, at present, the connection mode of the microphone in actual use is generally that the v+ end is connected with the capacitance detection end of the chip, the V- (connected with the microphone shell) is grounded, and the capacitance detection chip detects the self capacitance to ground of the v+ end of the microphone. The corresponding self-capacitance detection principle is to convert the capacitance change of the microphone into the change of a frequency signal, and then obtain the capacitance change through measuring the frequency of the signal. The connection mode and self-capacitance detection principle of the microphone and the main control chip in the prior art are abandoned in the embodiment. The V-end is connected with the capacitance detection mode control pin of the chip, and outputs different signals in the capacitance detection period of the V-end, so that the V-end detects the capacitance of the ground self-capacitance under different signals, and then the capacitance change caused by interference signals of the peripheral environment is eliminated through calculation, so that the actual capacitance change of the microphone caused by smoking is obtained. The self-capacitance detection principle is adjusted to convert the capacitance change of the microphone into the voltage change, and the voltage change is amplified by the operational amplifier and converted into a digital signal by the ADC for calculation. That is, the driving signal is a charging voltage to the capacitor, and the voltage converted by the capacitor is obtained at the output end of the operational amplifier CA, thereby converting the capacitance change into a voltage change.
As a specific example, the present example adopts a hand touch PCB board channel wiring or microphone pin to simulate an interference signal, negative pressure is generated for the hollow microphone by the air suction device to simulate actual smoking action, when the main control chip is powered on, the capacitance detection channel is calibrated, a reference value is generated after capacitance data calibration, the detected value after capacitance detection is compared with the reference value, the generated difference value is capacitance data C1 and C2 in the following table 1, when no interference and air suction action exist, both capacitance data theoretically jump around 0, the set threshold value of microphone capacitance data change is 500, the data change exceeding 500, and the electronic cigarette starts the work of the heating wire.
According to the design of C2=Cmic+Cr+Cg, C1=Cr+Cg, when a hand touches the wiring of the capacitance detection pin or the V+ end of the empty microphone pin, cg can be increased to different degrees, at the moment, the data of C1 and C2 can be correspondingly increased, the capacitance change data of the microphone obtained after difference processing is smaller, and the preset threshold requirement 500 is not met, so that the heating wire of the electronic cigarette does not work, and interference signals are filtered. When the smoking action is simulated by the air suction device, the capacitance of the microphone is increased, and as can be seen from the following table 1, the C2 is greatly changed, the C1 is hardly changed, and the difference value between the C2 and the C1 exceeds the set threshold 500, so that the electronic cigarette can be started normally. The invention can effectively filter the capacitance change caused by the interference signal and improve the capacity detection anti-interference capacity of the microphone.
TABLE 1 microphone capacitance data for interference cancellation obtained according to the method of example one and the E-cigarette of this example
Note that the data in the table is data obtained by converting the capacitance into a voltage (capacitance detection data) and performing ADC conversion, and the data has no unit and can be understood as the magnitude of the voltage.
As further shown in fig. 8, as the same inventive concept, this embodiment provides an analog front end for implementing the capacitive detection method of electronic cigarette capacitive microphone according to the embodiment, including an analog-to-digital converter ADC, a first operational amplifier CA1, a first switch SW1, a second switch SW2, a third switch SW3, a capacitive detection pin and a mode control pin. Specific:
The analog-to-digital converter ADC, the first operational amplifier CA1 and the capacitance detection pin are sequentially connected, one end of the second switch SW2 is connected between the first operational amplifier CA1 and the capacitance detection pin, the other end of the second switch SW2 and one end of the first switch SW1 are both connected with a driving signal source, the other end of the first switch SW1 and one end of the third switch SW3 are both connected with a mode control pin, and the other end of the third switch SW3 is grounded. Further, the capacitance detection pin and the mode control pin are respectively connected with the anode and the cathode of the capacitance microphone, and the analog-to-digital converter ADC is connected with the main control chip of the electronic cigarette.
In some embodiments, the second operational amplifier CA2, the fourth switch SW4, the fifth switch SW5 and the sixth switch SW6 are further included. Specifically, the analog-to-digital converter ADC, the second op-amp CA2, and the mode control pin are sequentially connected. One end of the fourth switch SW4 is connected to one end of the second switch SW2 and the input end of the first op-amp CA1, and the other end thereof is connected to the capacitance detection pin. One end of the fifth switch SW5 is connected between the capacitance detection pin and the fourth switch SW4, the other end of the fifth switch SW6 is grounded, one end of the sixth switch SW6 is connected with one end of the first switch SW1 and the input end of the second operational amplifier CA2, and the other end of the sixth switch SW6 is connected with the mode control pin.
In this embodiment, the collection channel is divided into two channels, namely, a positive capacitance data collection channel (v+, a capacitance detection pin, a channel formed by the first op-amp CA1 and the analog-to-digital converter ADC) and a negative capacitance data collection channel (V-, a channel formed by the mode control pin, the second op-amp CA2 and the analog-to-digital converter ADC), so as to collect the co-drive capacitance data and the ground capacitance data of two poles of the capacitive microphone in steps S600-S800 in the first embodiment.
Specifically, the following 3 steps are completed in one capacitance detection scanning period:
1) The first switch SW1, the second switch SW2, the fourth switch SW4 and the sixth switch SW6 are closed (ON), the third switch SW3 and the fifth switch SW5 are Opened (OFF), and simultaneously the capacitance data to ground of the two capacitance detection channels are detected, and the scanning waveforms, the frequency, the phase and the voltage amplitude at the two ends are completely consistent. At this time, corresponding to step S600 in the first embodiment, the positive electrode co-driving capacitance data and the negative electrode co-driving capacitance data of the capacitive microphone are obtained.
2) The fourth switch SW4, the third switch SW3 and the second switch SW2 are turned ON, the fifth switch SW5, the sixth switch SW6 and the first switch SW1 are turned OFF, the capacitance data to ground of the positive electrode capacitance data acquisition channel is detected, and the negative electrode capacitance data acquisition channel is grounded. At this time, corresponding to step S700 in the first embodiment, the positive electrode capacitance to ground data of the capacitive microphone is obtained.
3) The fifth switch SW5, the sixth switch SW6 and the first switch SW1 are turned ON, the fourth switch SW4, the third switch SW3 and the second switch SW2 are turned OFF, the capacitance data to ground of the negative electrode capacitance data acquisition channel is detected, and the positive electrode capacitance data acquisition channel is grounded. At this time, corresponding to step S800 in the first embodiment, the negative electrode capacitance to ground data of the capacitive microphone is obtained.
As further shown in fig. 7, as the same inventive concept, the embodiment provides an electronic cigarette, which comprises the analog front end described in the fourth embodiment, and further comprises a main control chip and a capacitive microphone. The analog front end is embedded in the main control chip, a capacitance detection pin of the analog front end is connected with the positive electrode of the capacitance type microphone, and a mode control pin of the analog front end is connected with the negative electrode of the capacitance type microphone. Further, the main control chip performs a difference operation on the capacitance data to ground of the capacitor microphone output by the analog-to-digital converter at the analog front end and the co-drive capacitance data to obtain capacitance data of the capacitor microphone for eliminating interference, and the capacitance data of eliminating interference exceeding a set threshold value is used as a smoking judging condition to start heating the electronic cigarette. Meanwhile, the main control chip can obtain the co-drive capacitance data and the ground capacitance data of two poles of the capacitive microphone through the first embodiment, and specifically analyze interference factors affecting the capacitive microphone.
In this embodiment, the positive electrode (v+) of the capacitive microphone is connected to the MIC pin of the main control chip U2, and the negative electrode (V-) thereof is directly connected to the MODE pin of the main control chip U2. The MIC pin of the main control chip U2 corresponds to a capacitance detection pin of the analog front end, and the MODE pin of the main control chip U2 corresponds to a MODE control pin of the analog front end.
As shown in table 2, for the practical device of this embodiment, the two-channel capacitance detection data is obtained according to the implementation method, the interference signal is simulated by touching the PCB channel trace or the hollow microphone pin, and the suction device generates negative pressure to the hollow microphone to simulate the actual smoking action. When the main control chip is electrified, the two capacitance detection channels are calibrated, a reference value is generated after capacitance data is calibrated, the detection value after capacitance detection is started is compared with the reference value, and the generated difference value is the data value of the following table. When no interference and air suction exist, the 4 capacitance data are all in about 0 jump point in theory, the capacitance data set threshold can be set to be 500, and the light suction microphone can be ensured to be started normally. The data parameters for various interference conditions and normal operation can be clearly determined from the data in table 2 below. In the table, a capacitance detection channel 1 is an anode capacitance data acquisition channel, and a capacitance detection channel 2 is a cathode capacitance data acquisition channel.
From the following table data, it can be derived:
1) When the positive electrode grounding capacitance data and the positive electrode co-driving capacitance data both exceed a set threshold value, and the negative electrode grounding capacitance data and the negative electrode co-driving capacitance data are smaller than the set threshold value, the positive electrode of the capacitive microphone has wiring interference or pin interference;
2) When the positive electrode grounding capacitance data and the positive electrode co-driving capacitance data are both smaller than a set threshold value and the negative electrode grounding capacitance data and the negative electrode co-driving capacitance data exceed the set threshold value, wiring interference or pin interference exists at the negative electrode of the capacitor type microphone;
3) When the positive electrode grounding capacitance data and the positive electrode co-driving capacitance data both exceed the set threshold value, and the negative electrode grounding capacitance data and the negative electrode co-driving capacitance data both exceed the set threshold value, wiring interference or pin interference exists in the positive electrode and the negative electrode of the capacitor type microphone.
Table 2 obtaining a two-channel capacitance detection data and capacitance variation cause comparison table according to the method of the implementation
Note that the data in the table is data obtained by converting the capacitance into a voltage (capacitance detection data) and performing ADC conversion, and the data has no unit and can be understood as the magnitude of the voltage.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flow according to the embodiments above may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
The foregoing is only illustrative of the preferred embodiments of the application, and it will be appreciated by those skilled in the art that various changes in the features and embodiments may be made and equivalents may be substituted without departing from the spirit and scope of the application. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the application without departing from the essential scope thereof. Therefore, it is intended that the application not be limited to the particular embodiment disclosed, but that the application will include all embodiments falling within the scope of the appended claims.