Method for controlling electronic cigarette, and electronic cigarette
View Patent ↗The present disclosure provides a method for controlling an electronic cigarette and an electronic cigarette. The electronic cigarette comprises an airflow sensor. The control method comprises: measuring whether a duration of a low-level signal sent by the airflow sensor is greater than a preset threshold; if so, when a high-level signal sent by the airflow sensor is received, responding to the high-level signal so as to control the electronic cigarette to operate; and if not, when a high-level signal sent by the airflow sensor is received, not responding to the high-level signal. In the above control method, it is determined, according to the duration of the low-level signal generated by the airflow sensor, whether to respond to triggering of the high-level signal so as to cause the electronic cigarette to operate.
1 . A method for controlling an electronic cigarette, the electronic cigarette comprising an airflow sensor having a capacitance sensing part and a signal sampling output part, wherein the capacitance sensing part is configured to indicate a capacitance change due to a leaking e-liquid or a smoking airflow, and wherein the signal sampling output part is configured to collect the capacitance change, wherein, in response to a detected capacitance change at the capacitance sensing part within a sampling time, the airflow sensor is configured to output a high-level signal, and in response to no capacitance change being detected at the capacitance sensing part within the sampling time, the airflow sensor is configured to output a low-level signal in a time interval between the sampling, wherein the method comprises the following steps:
measuring a duration of a low-level signal output by the airflow sensor;
comparing the duration of the low-level signal to a preset threshold;
in response to the duration of the low-level signal being higher than the preset threshold and the airflow sensor outputting the high-level signal, outputting a control signal to control the electronic cigarette to operate; and
in response to the duration of the low-level signal being lower than the preset threshold, determining that the airflow sensor is falsely triggered by a leaking e-liquid and in response to receiving the high-level signal output by the airflow sensor, not responding to the high-level signal.
2 . The method for controlling the electronic cigarette according to claim 1 , further comprising the following steps:
setting a state flag configured for marking whether the airflow sensor is in a normal state or an abnormal state;
when a high-level signal output by the airflow sensor is received, detecting whether the state flag marks a normal state; if the state flag marks a normal state, responding to the high-level signal so as to control the electronic cigarette to operate; if the state flag does not mark a normal state, not responding to the high-level signal.
3 . The method for controlling the electronic cigarette according to claim 2 , further comprising the following steps:
measuring whether a duration of a low-level signal output by the airflow sensor is greater than a preset threshold; if so, adjusting the state flag to mark a normal state; if not, adjusting the state flag to mark an abnormal state.
4 . The method for controlling the electronic cigarette according to claim 3 , wherein the electronic cigarette further comprises a controller having a flag register, and the state flag is stored in the flag register of the controller.
5 . The method for controlling the electronic cigarette according to claim 3 , wherein the airflow sensor outputs a first high-level signal and a second high-level signal that are adjacent; the duration of the low-level signal is a time interval between the first high-level signal and the second high-level signal.
6 . The method for controlling the electronic cigarette according to claim 2 , wherein the step of setting a state flag configured for marking whether the airflow sensor is in a normal state or an abnormal state comprises:
marking an initial state of the state flag as a normal state.
7 . The method for controlling the electronic cigarette according to claim 6 , wherein the electronic cigarette further comprises a controller having a flag register, and the state flag is stored in the flag register of the controller.
8 . The method for controlling the electronic cigarette according to claim 6 , wherein the airflow sensor outputs a first high-level signal and a second high-level signal that are adjacent; the duration of the low-level signal is a time interval between the first high-level signal and the second high-level signal.
9 . The method for controlling the electronic cigarette according to claim 2 , wherein the electronic cigarette further comprises a controller having a flag register, and the state flag is stored in the flag register of the controller.
10 . The method for controlling the electronic cigarette according to claim 2 , wherein the airflow sensor outputs a first high-level signal and a second high-level signal that are adjacent; the duration of the low-level signal is a time interval between the first high-level signal and the second high-level signal.
11 . The method for controlling the electronic cigarette according to claim 1 , wherein the airflow sensor outputs a first high-level signal and a second high-level signal that are adjacent; the duration of the low-level signal is a time interval between the first high-level signal and the second high-level signal.
12 . The method for controlling the electronic cigarette according to claim 1 , wherein the preset threshold is greater than or equal to 200 ms.
13 . The method for controlling the electronic cigarette according to claim 1 , wherein the preset threshold is less than 1 s.
14 . An electronic cigarette, comprising an airflow sensor and a controller, wherein the airflow sensor has a capacitance sensing part and a signal sampling output part, wherein the capacitance sensing part is configured to indicate a capacitance change due to a leaking e-liquid or a smoking airflow, wherein the signal sampling output part is configured to collect the capacitance change, wherein, in response to a detected capacitance change at the capacitance sensing part within a sampling time, the airflow sensor is configured to output a high-level signal, and in response to no capacitance change being detected at the capacitance sensing part within the sampling time, the airflow sensor is configured to output a low-level signal, and wherein the controller comprises a processing unit, which is configured for executing the method for controlling the electronic cigarette according to claim 1 .