Summary of the invention
Based on this, it is necessary to provide the electricity quantity inquiring of a kind of electronic cigarette battery that can inquire about battery dump energyMethod, device and electronic cigarette.
The method for enquiring electric quantity of a kind of electronic cigarette battery, comprises the following steps: judge whether that receiving inquiry refers toOrder, the most then obtain the voltage data of electronic cigarette battery;According to the predeterminated voltage belonging to described voltage dataScope, controls the number of times that display lamp flicker is corresponding.
Wherein in an embodiment, the instruction of described lock machine is at short notice by the smoking hitting described electronic cigaretteMore than 3 times produced instructions of button;The described short time referred to less than or equal to 3 seconds.
Wherein in an embodiment, described query statement is that the smoking button pinning described electronic cigarette continues 3More than Miao, or at short notice by hitting more than the 2 times produced instructions of described smoking button, described short timeRefer to less than or equal to 3 seconds.
Wherein in an embodiment, the step of the voltage data of described acquisition electronic cigarette battery specifically includes:Gather the output voltage analog quantity of described electronic cigarette battery;Described output voltage analog quantity is carried out analog digital conversion,Obtain described voltage data.
Wherein in an embodiment, described according to the predetermined voltage range belonging to described voltage data, controlThe step of the number of times that display lamp flicker is corresponding specifically includes: if described voltage data belongs to first voltage range,Then control described display lamp first number of flicker;If described voltage data belongs to the second voltage range, then controlDescribed display lamp second number of flicker;If described voltage data belongs to tertiary voltage scope, then control described fingerShow lamp flicker third time number;If described voltage data belongs to the 4th voltage range, then control described display lamp and dodgeBright 4th number;If described voltage data belongs to the 5th voltage range, then control described display lamp flicker the 5thNumber of times;Described first, second, third, fourth and fifth voltage range is different, and described first,Two, the three, the 4th and the 5th numbers are different.
Wherein in an embodiment, described in judge whether to receive query statement step before, including withLower step: receive lock machine instruction, makes electronic cigarette enter lock machine state.
A kind of electricity quantity inquiring system of electronic cigarette battery, including:
Sampling module, is used for judging whether to receive query statement, the most then obtains the electricity of electronic cigarette batteryPressure data;Control module, for according to the predetermined voltage range belonging to described voltage data, controls display lampThe number of times that flicker is corresponding.
Wherein in an embodiment, described sampling module includes: collecting unit, is used for gathering described electronicsThe output voltage analog quantity of cigarette battery;Converting unit, turns for described output voltage analog quantity is carried out modulusChange, obtain described voltage data.
Wherein in an embodiment, described control module includes: the first judging unit, is used for judging describedWhether voltage data belongs to first voltage range, if then controlling described display lamp first number of flicker;SecondJudging unit, is used for judging whether described voltage data belongs to the second voltage range, if then controlling described fingerShow that lamp flashes second number;3rd judging unit, is used for judging whether described voltage data belongs to tertiary voltageScope, if then controlling described display lamp flicker third time number;4th judging unit, is used for judging described electricityWhether pressure data belong to the 4th voltage range, if then controlling described display lamp to flash the 4th number;5th sentencesDisconnected unit, is used for judging whether described voltage data belongs to the 5th voltage range, if then controlling described instructionLamp flashes the 5th number;Described first, second, third, fourth and fifth voltage range is different, instituteState first, second, third, fourth and fifth number of times different.
Wherein in an embodiment, the electricity quantity inquiring system of described electronic cigarette battery includes detection module, instituteState detection module and instruct for receiving lock machine, make electronic cigarette enter lock machine state.
A kind of electronic cigarette, including button, analog-digital converter, control unit and display lamp, described button and mouldNumber converter connects described control unit by system bus, and described control unit is by input/output port evenConnecing described display lamp, described control unit is used for judging whether to receive query statement, the most then pass through mouldNumber converter obtains the voltage data of electronic cigarette battery;And for according to the default electricity belonging to described voltage dataPressure scope, controls the number of times that the flicker of described display lamp is corresponding.
The method for enquiring electric quantity of above-mentioned electronic cigarette battery and system, sampling module determines whether that query statement is defeatedEntering, if then obtaining the voltage data of electronic cigarette battery, control module is according to the default electricity belonging to voltage dataThe number of times that pressure scope control display lamp flicker is corresponding.By the flashing times of display lamp just it is known that battery remainsThe scope of remaining electricity, it is simple to be charged in time when battery dump energy is relatively low, it is to avoid electronic cigarette occursSituation about cannot use because electricity is not enough.Dump energy is indicated by flashing times, can be only by oneDisplay lamp just completes electric quantity indication function, therefore can improve on the electronic cigarette of only one of which display lamp and form.
Detailed description of the invention
Traditional electronic cigarette can not indicate the dump energy of battery, and user cannot know when to need to fill to battery, usually there is the situation that electronic cigarette cannot use because electricity is not enough, makes troubles to user in electricity.
If design with multiple LED(Light Emitting Diode, light emitting diode) battery capacity indication dressPut, by the number instruction battery dump energy that LED is bright, or utilize LCD(Liquid CrystalDisplay, liquid crystal display) device for indicating quantity, display battery has several lattice electricity to indicate remaining batteryElectricity.These devices can clearly indicate battery dump energy, but can increase extra hardware cost, simultaneouslyChange the original structure of electronic cigarette, make electronic cigarette outward appearance become wordy generous.
For overcoming drawbacks described above, the present invention provides the method for enquiring electric quantity of a kind of electronic cigarette battery, such as Fig. 1 instituteShow, comprise the following steps:
Step S130: judge whether to receive query statement.
If being not received by query statement, then repeat step S130, until receiving query statement;?Step S140 is carried out after receiving query statement.Query statement refers to that the smoking button pinning electronic cigarette continues 3 secondsAbove, or at short notice by hitting the produced instruction of smoking button more than 2 times, wherein the short time refers to be less thanOr equal to 3 seconds, in the present embodiment, query statement continued 3 seconds for pinning smoking button, or by hitting in 2 secondsInstruct produced by smoking button 3 times.
Directly send query statement by controlling the smoking button of electronic cigarette, easy to operate simply, and be not required toIncrease extra hardware cost.It is appreciated that the persistent period and at short notice pinning smoking buttonNot unique by the number of times hitting smoking button, can be configured according to practical situation, the concrete duration of short timeCan also be adjusted according to by the number of times hitting smoking button.
Step S140: obtain the voltage data of electronic cigarette battery.
Specifically, it may include following steps:
Gather the output voltage analog quantity of electronic cigarette battery.
Output voltage analog quantity is carried out analog digital conversion, obtains voltage data.
Wherein, available Acquisition Circuit gathers the output voltage analog quantity of electronic cigarette battery, then passes through modulusThe output voltage analog quantity collected is changed by change-over circuit, obtains voltage data.
Step S150: according to the predetermined voltage range belonging to voltage data, control the secondary of display lamp flicker correspondenceNumber.
Display lamp can be LED, it is also possible to be other luminescent devices.Specifically, step S150 can be wrappedInclude:
If described voltage data belongs to first voltage range, then control described display lamp first number of flicker.
If described voltage data belongs to the second voltage range, then control described display lamp second number of flicker.
If described voltage data belongs to tertiary voltage scope, then control described display lamp flicker third time number.
If described voltage data belongs to the 4th voltage range, then control described display lamp and flash the 4th number.
If described voltage data belongs to the 5th voltage range, then control described display lamp and flash the 5th number.
Wherein, first, second, third, fourth and fifth voltage range is different, first, second,Three, the 4th and the 5th times number is different.
In the present embodiment, can arrange first voltage range is more than 4V, and less than or equal to 4.2V, for the first timeNumber is 5 times;Second voltage range is more than 3.8V, and less than or equal to 4V, second time number is 4 times;TheThree voltage ranges are more than 3.6V, and less than or equal to 3.8V, number is 3 times for the third time;4th voltage rangeFor more than 3.4V, and less than or equal to 3.6V, the 4th time number is 2 times;5th voltage range is more than 3.2V,And less than or equal to 3.4V, the 5th time number is 1 time;When voltage data is less than or equal to 3.2V, display lampDo not flash.It is appreciated that each flashing times of each voltage range and correspondence is not unique, can carry outSuitably adjust.
The method for enquiring electric quantity of above-mentioned electronic cigarette battery, it is first determined whether there is query statement to input, if thenObtain the voltage data of electronic cigarette battery, and control display lamp according to the predetermined voltage range belonging to voltage dataThe number of times that flicker is corresponding.By the flashing times of display lamp just it is known that the scope of battery dump energy, justIn being charged in time when battery dump energy is relatively low, simple and practical, it is to avoid electronic cigarette to occur because of electricityNot enough and situation about cannot use.Indicate dump energy by flashing times, can only pass through a display lampJust complete electric quantity indication function, therefore can improve on the electronic cigarette of only one of which display lamp and form.
Wherein in an embodiment, as in figure 2 it is shown, can comprise the following steps that before step S130
Step S110: receive lock machine instruction.
Step S120 is carried out after receiving lock machine instruction.If being not received by lock machine instruction, electronic cigarette is just being carried outNormal smoking processing routine.Equally, it is possible to directly by controlling the smoking button transmission lock machine instruction of electronic cigarette,Lock machine instruction can be to instruct by the smoking button more than 3 times hitting electronic cigarette is produced at short notice, itsThe middle short time refers to less than or equal to 3 seconds, and in the present embodiment, lock machine instruction is by hitting smoking button 5 in 2 secondsSecondary produced instruction.
Step S120: make electronic cigarette enter lock machine state.
Under lock machine state, the smoking processing routine of electronic cigarette is not responding to smoking button operation, such as originally logicalCross and press smoking button and can realize the ON/OFF of electronic cigarette, then be not responding under lock machine state the opening of smoking button/Close operation.By step S110 and step S120, electronic cigarette is made to enter lock machine state, it is to avoid carrying out electricityStart the smoking processing routine of electronic cigarette while inquiry, cause maloperation.After electronic cigarette enters lock machine stateCarry out step S130.
Accordingly, the invention provides the electricity quantity inquiring system of a kind of electronic cigarette battery, including sampling module andControl module.
Sampling module is used for judging whether to receive query statement, if it is not, then repeat to judge until receiving and looking intoAsk instruction;The voltage data of electronic cigarette battery is obtained after receiving query statement.
Control module is for according to the predetermined voltage range belonging to voltage data, controlling display lamp flicker correspondenceNumber of times.
Specifically, display lamp can be LED, it is also possible to be other luminescent devices.Query statement refers to pinThe smoking button of electronic cigarette continues more than 3 seconds, or is produced for more than 2 times by hitting smoking button at short noticeInstruction, the short time refers to less than or equal to 3 seconds.In the present embodiment, query statement continues 3 for pinning smoking buttonSecond, or instructing produced by smoking button 3 times as hitting in 2 seconds.
Directly send query statement by controlling the smoking button of electronic cigarette, easy to operate simply, and be not required toIncrease extra hardware cost.It is appreciated that the persistent period and at short notice pinning smoking buttonNot unique by the number of times hitting smoking button, can be configured according to practical situation, the concrete duration of short timeCan also be adjusted according to by the number of times hitting smoking button.
The electricity quantity inquiring system of above-mentioned electronic cigarette battery, sampling module, after receiving query statement, obtains electricityThe voltage data of sub-cigarette battery, control module controls display lamp according to the predetermined voltage range belonging to voltage dataThe number of times that flicker is corresponding.By the flashing times of display lamp just it is known that the scope of battery dump energy, justIn being charged in time when battery dump energy is relatively low, simple and practical, it is to avoid electronic cigarette to occur because of electricityNot enough and situation about cannot use.Indicate dump energy by flashing times, can only pass through a display lampJust complete electric quantity indication function, therefore can improve on the electronic cigarette of only one of which display lamp and form.
Wherein in an embodiment, the electricity quantity inquiring system of electronic cigarette battery may also include detection module, inspectionSurvey module to be used for receiving lock machine instruction, make electronic cigarette enter lock machine state.Equally, it is possible to directly by controllingThe smoking button of electronic cigarette sends lock machine instruction, and lock machine instruction can be at short notice by the suction hitting electronic cigaretteMore than the 3 times produced instructions of cigarette button, wherein the short time refers to less than or equal to 3 seconds, locks in the present embodimentMachine instruction in 2 seconds as hitting instruction produced by smoking button 5 times.
After entering lock machine state, the smoking processing routine of electronic cigarette is not responding to smoking button operation, such as originallyThe ON/OFF of electronic cigarette can be realized by pressing smoking button, then under lock machine state, be not responding to smoking buttonOn/off operation.Detection module is utilized to make electronic cigarette enter lock machine state, it is to avoid while carrying out electricity quantity inquiringStart the smoking processing routine of electronic cigarette, cause maloperation.
Wherein in an embodiment, sampling module can include collecting unit and converting unit, and collecting unit is usedIn the output voltage analog quantity gathering electronic cigarette battery;Converting unit is for carrying out mould to output voltage analog quantityNumber conversion, obtains voltage data.
Control module can include the first judging unit, the second judging unit, the 3rd judging unit, the 4th judgementUnit and the 5th judging unit.
First judging unit is used for judging whether voltage data belongs to first voltage range, if then controlling instructionLamp first number of flicker.
Second judging unit is used for judging whether voltage data belongs to the second voltage range, if then controlling instructionLamp second number of flicker.
3rd judging unit is used for judging whether voltage data belongs to tertiary voltage scope, if then controlling instructionLamp flicker third time number.
4th judging unit is used for judging whether voltage data belongs to the 4th voltage range, if then controlling instructionLamp flashes the 4th number.
5th judging unit is used for judging whether voltage data belongs to the 5th voltage range, if then controlling instructionLamp flashes the 5th number.
Wherein, first, second, third, fourth and fifth voltage range is different, first, second,Three, the 4th and the 5th times number is different.
In the present embodiment, can arrange first voltage range is more than 4V, and less than or equal to 4.2V, for the first timeNumber is 5 times;Second voltage range is more than 3.8V, and less than or equal to 4V, second time number is 4 times;TheThree voltage ranges are more than 3.6V, and less than or equal to 3.8V, number is 3 times for the third time;4th voltage rangeFor more than 3.4V, and less than or equal to 3.6V, the 4th time number is 2 times;5th voltage range is more than 3.2V,And less than or equal to 3.4V, the 5th time number is 1 time;When voltage data is less than or equal to 3.2V, display lampDo not flash.It is appreciated that each flashing times of each voltage range and correspondence is not unique, can carry outSuitably adjust.
Additionally, present invention also offers a kind of electronic cigarette, as it is shown on figure 3, include button 110, analog digital conversionDevice 120, control unit 130 and display lamp 140.
Button 110 and analog-digital converter 120 connect control unit 130, control unit 130 by system busDisplay lamp 140 is connected by input/output port (I/O).Control unit 130 judges whether to receive and passes throughThe query statement of button 110 input, if it is not, then control unit 130 repeats to judge until receiving inquiry and referring toOrder.Control unit 130 obtains electronic cigarette battery by analog-digital converter 120 after receiving query statementVoltage data, and according to the predetermined voltage range belonging to voltage data, control display lamp 140 and flash correspondenceNumber of times.
Specifically, analog-digital converter 120 gathers the output voltage analog quantity of electronic cigarette battery, and to output electricityPressing mold analog quantity carries out analog digital conversion and obtains voltage data.Control unit 130 is 8bit CPU(CentralProcessing Unit, central processing unit) control unit, display lamp 140 can be LED, it is also possible to beOther luminescent devices.
Query statement may refer to press & hold and 110 continues more than 3 seconds, or at short notice by hitting button 110Instructing produced by more than twice, the short time referred to less than or equal to 3 seconds.In the present embodiment, query statement is for pressingLive button 110 and continue 3 seconds, or instructing produced by button 110 3 times as hitting in 2 seconds.It is appreciated thatPress & hold persistent period of 110 and unique by hitting the number of times of button 110 at short notice, can rootBeing configured according to practical situation, the concrete duration of short time can also be carried out according to by the number of times hitting button 110Adjust.
Above-mentioned electronic cigarette, after control unit 140 receives the query statement inputted by button 110, controlsAnalog-digital converter 120 obtains the voltage data of electronic cigarette battery, and according to the predeterminated voltage belonging to voltage dataScope control display lamp 140 flashes the number of times of correspondence.By the flashing times of display lamp 140 just it is known thatThe scope of electronic cigarette battery dump energy, it is simple to be charged in time when battery dump energy is relatively low, simplyPractical, it is to avoid the situation that electronic cigarette cannot use because electricity is not enough occurs.Surplus by flashing times instructionRemaining electricity, only can just complete electric quantity indication function by a display lamp 140, therefore can be only oneImprove on the electronic cigarette of individual display lamp 140 and form.
Wherein in an embodiment, control unit 130 is inputted by button 110 judging whether to receiveQuery statement before, be additionally operable to receive the lock machine inputted by button 110 and instruct, and control electronic cigarette and enterEnter lock machine state.Lock machine instruction can be at short notice by hitting more than 110 3 times produced instructions of button,Wherein the short time refers to less than or equal to 3 seconds, and in the present embodiment, lock machine instruction is by hitting button 110 in 2 secondsInstruct produced by five times.After entering lock machine state, the smoking processing routine of electronic cigarette is not responding to button 110Smoking button operation, such as originally by 110 ON/OFF that can realize electronic cigarette that push button, then at lockThe on/off operation of button 110 it is not responding under machine state.Electricity quantity inquiring is carried out, it is to avoid entering under lock machine stateStart the smoking processing routine of electronic cigarette while row electricity quantity inquiring, cause maloperation.
Embodiment described above only have expressed the several embodiments of the present invention, and it describes more concrete and detailed,But therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that, for this areaThose of ordinary skill for, without departing from the inventive concept of the premise, it is also possible to make some deformation andImproving, these broadly fall into protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be with appendedClaim is as the criterion.