CN111972726A - Dynamic switching method of electronic cigarette system - Google Patents

Dynamic switching method of electronic cigarette system Download PDF

Info

Publication number
CN111972726A
CN111972726A CN201911224429.8A CN201911224429A CN111972726A CN 111972726 A CN111972726 A CN 111972726A CN 201911224429 A CN201911224429 A CN 201911224429A CN 111972726 A CN111972726 A CN 111972726A
Authority
CN
China
Prior art keywords
electronic cigarette
uart
software program
computer
judging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911224429.8A
Other languages
Chinese (zh)
Other versions
CN111972726B (en
Inventor
曾钦煌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongguan Fuqiang Electronic Co ltd
Cheng Uei Precision Industry Co Ltd
Original Assignee
Dongguan Fuqiang Electronic Co ltd
Cheng Uei Precision Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongguan Fuqiang Electronic Co ltd, Cheng Uei Precision Industry Co Ltd filed Critical Dongguan Fuqiang Electronic Co ltd
Publication of CN111972726A publication Critical patent/CN111972726A/en
Application granted granted Critical
Publication of CN111972726B publication Critical patent/CN111972726B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A24TOBACCO; CIGARS; CIGARETTES; SIMULATED SMOKING DEVICES; SMOKERS' REQUISITES
    • A24FSMOKERS' REQUISITES; MATCH BOXES; SIMULATED SMOKING DEVICES
    • A24F47/00Smokers' requisites not otherwise provided for

Abstract

The invention discloses a dynamic switching method of an electronic cigarette system, which comprises the steps of switching the UART function of an electronic cigarette through a discrimination software program in a Microcontroller (MCU) stored in the electronic cigarette after a USB interface of the electronic cigarette is connected with a computer through a USB wire, wherein the technical advantages of the step of executing the discrimination software program are that (1) a UART circuit is connected to the USB interface of the electronic cigarette from the inside of the electronic cigarette to supply power to the electronic cigarette through the USB wire for charging, (2) the UART of the electronic cigarette is communicated with the computer to meet the application of factory production test, health management and the like, and (3) when the USB interface of the electronic cigarette is connected with the computer through the USB wire for charging, the screen of the computer does not generate information which cannot be identified by a device.

Description

Dynamic switching method of electronic cigarette system
Technical Field
The invention relates to a dynamic switching method of an electronic cigarette system, in particular to a method for switching a UART function of an electronic cigarette by a discrimination software program stored in a Microcontroller (MCU) in the electronic cigarette after a USB interface of the electronic cigarette is connected with a computer through a USB wire.
Background
An Electronic atomizer (VAPE or Electronic cigarette) is a device that uses rechargeable lithium polymer battery to supply power to drive the atomizer and heats Electronic liquid (E-liquid or E-juice) in an oil tank, wherein the Electronic liquid contains propylene glycol, vegetable glycerin, edible essence or nicotine. The electronic cigarette does not need to be burnt, only generates steam and does not have tar and carbon monoxide, and the influence of part of the traditional cigarette on the body can be reduced, so that the smoker using the electronic cigarette to replace the cigarette is far away from carcinogens in the cigarette.
As known, electronic cigarettes are similar to mobile phones and other electronic devices, and after being used, lithium batteries or IMR batteries, also called lithium manganate (LI MN) batteries, need to be charged.
Fig. 1 is a block diagram illustrating charging of an e-cigarette via a usb (universal Serial bus) interface of a computer. The USB interface from the inside of the electronic cigarette to the electronic cigarette can connect parts of the power supply, and the design can enable the computer to supply power to the electronic cigarette through the USB and charge the electronic cigarette.
As shown in fig. 2, the figure is a block diagram of the electronic cigarette for charging by connecting the UART line to the USB interface of the electronic cigarette from inside the electronic cigarette and for communicating with the computer. In order to enable the electronic cigarette to be powered and charged by using a USB and simultaneously enable the electronic cigarette to be communicated with a computer, a part of a power supply is connected from the inside of the electronic cigarette to a USB interface of the electronic cigarette; on the other hand, a UART (Universal Asynchronous Receiver/Transmitter, which is an Asynchronous transceiver Transmitter and is a part of computer hardware, and transmits and converts data between serial communication and parallel communication) line is connected to the USB interface of the electronic cigarette from the inside of the electronic cigarette, so that the electronic cigarette is charged by the computer through USB power supply, and the electronic cigarette can communicate with the computer, thereby meeting the application requirements of factory production test, health management, and the like. However, when the USB interface of the electronic cigarette is connected to the computer for charging, the operating system is Windows, and the computer screen may have a message that cannot be identified by the device.
If the USB interface of the electronic cigarette has the UART function and the UART function is already turned on, a message that the device cannot recognize appears on the screen of the computer when the electronic cigarette is connected to the Windows computer. The reason for this is that the USB interface of the Windows computer is USB signal, and if the USB interface of the electronic cigarette receives the UART signal, the Windows computer cannot recognize the signal and jump out the unrecognizable information.
Therefore, after the USB interface of the electronic cigarette is connected to the Windows computer through the USB cable, if a software determination flow mechanism can be provided, a flow for switching the UART function of the electronic cigarette is urgently needed.
Disclosure of Invention
The purpose of the invention is as follows: when the USB interface of the electronic cigarette is connected with the Windows computer through a USB line, the UART function of the electronic cigarette is not started, and no unrecognizable information can be generated in the charging process.
In order to achieve the above object, the present invention provides a dynamic switching method for an electronic cigarette system, wherein a USB interface of the electronic cigarette is connected to a computer through a USB cable, and then a UART function in the electronic cigarette is dynamically switched through a determination software program stored in a Microcontroller (MCU) in the electronic cigarette, comprising the following steps: step (a): judging whether the number of times of inserting and pulling the USB line by the electronic cigarette reaches a preset threshold value by the judging software program in a first preset time, if so, executing the step (b); step (b): changing the value of a register of the UART of the MCU of the electronic cigarette by the judging software program to temporarily start the UART function of the electronic cigarette, and executing the step (c): judging whether a UART starting command is received by the computer through the USB cable within a second preset time by the judging software program, if so, executing the step (d): if the judging software program receives the UART starting command in the second preset time, the judging software program formally starts the UART function of the electronic cigarette and executes the step (e): after receiving the UART command by the judging software program, the judging software program will execute the function of the electronic cigarette corresponding to the UART command, and the step (f): after judging whether receiving a UART finishing command sent from the computer by the judging software program, if so, executing the step (i) that the judging software program closes the UART function of the MCU of the electronic cigarette and switches back to a common state, otherwise, executing the step (e).
Preferably, when the predetermined threshold is not reached in step (a), the computer performs step (g) to charge the electronic cigarette through the USB cable.
Preferably, when the determining software program in the step (c) does not receive the UART starting command, the determining software program in the step (h) changes the register of the MCU of the electronic cigarette back to the original value.
Preferably, the number of plugging/unplugging operations of the predetermined threshold is 3, the first predetermined time is 6 seconds, and the second predetermined time is 5 seconds.
Preferably, the UART command function is related to factory production testing, health management applications.
Preferably, the computer is a Windows computer.
Drawings
The various aspects of the present invention and the particular features and advantages thereof will become more readily apparent to those having ordinary skill in the art upon reading the following detailed description and upon viewing the accompanying drawings in which:
fig. 1 is a block diagram illustrating charging of an electronic cigarette according to a USB interface of a computer.
Figure 2 is a block diagram illustrating charging based on a USB interface connecting a UART line from inside the e-cigarette to the e-cigarette, and the e-cigarette communicating with a computer.
Fig. 3 is a schematic diagram of a connection circuit between the USB interface of the electronic cigarette and the computer through a USB cable according to the present invention.
Fig. 4 is a flowchart of a dynamic switching method of the electronic cigarette system according to the present invention.
The reference numerals in the drawings are explained below.
USB interface of electronic cigarette 1
UART12 Microcontroller (MCU) 13
Discriminating software program 14 register 15
USB line 2 Windows computer 3
Step (a) to step (i).
Detailed Description
The embodiments of the present invention will be described in more detail with reference to the drawings and the reference numerals, so that those skilled in the art can read the description to implement the embodiments.
Fig. 3 is a schematic diagram of a connection circuit between the USB interface of the electronic cigarette and the computer through a USB cable according to the present invention. Fig. 4 is a flowchart of a dynamic switching method of the electronic cigarette system according to the present invention. The above two figures illustrate the flow of the method for dynamically switching a UART12 function in an electronic cigarette 1 via a discrimination software program 14 stored in a microcontroller 13(MCU) in the electronic cigarette 1 after the USB interface 11 of the electronic cigarette 1 is connected to a computer 3 (for example, a Windows computer, hereinafter abbreviated as computer 3) via a USB cable 2.
The discrimination software program 14 is a system program of the electronic cigarette 1, the hardware structure of the electronic cigarette 1 is the MCU 13 plus peripheral circuit systems, the MCU 13 is a microcontroller, and the microcomputer integrates a central processing unit, a memory, a timer/counter, various input/output interfaces, and the like on an integrated circuit chip. Therefore, the discrimination software program 14 is stored in the MCU 13 of the electronic cigarette 1.
Referring to fig. 3 and 4, after the USB interface 11 of the electronic cigarette 1 is connected to the computer 3 through the USB cable 2, the method for dynamically switching the UART12 function in the electronic cigarette 1 through the determination software program 14 stored in the microcontroller 13(MCU) in the electronic cigarette 1 includes the following steps:
step (a): judging whether the number of times of inserting and pulling the USB cable 2 by the electronic cigarette 1 reaches a predetermined threshold (the number of times of inserting and pulling is 3) by the judging software program 14 within a first predetermined time (taking 6 seconds as an example), if so, executing the step (b).
That is, step (a) aims to: the determination software program 14 determines whether there is a request to temporarily turn on the UART function of the electronic cigarette 1. This shows whether the USB interface 11 of the electronic cigarette 1 is pulled out and reinserted again within 6 seconds and pulled out and reinserted again, and is pulled out twice a total of three times after the USB cable 2 is first inserted, and if the determination software program 14 determines that it is true, step (b) is executed, and if it is not true, step (g) is executed: the computer 3 charges the electronic cigarette 1 through the USB cable 2.
Step (b): the determination software program 14 changes the value of a register 15 of the UART of the MCU 13 of the electronic cigarette 1 to temporarily turn on the UART function of the electronic cigarette 1, and then performs step (c). For example, the value of the register 15 of the original UART is 0x00, and the value of the register 15 of the UART is changed to 0xFF, so that the UART function is turned on.
Step (c): the determination software program 14 determines whether to receive a UART start command sent from the computer 3 through the USB cable 2 within a second predetermined time (5 seconds for example). If yes, executing the step (d), and if not, executing the step (h): the determination software program 14 changes the register 15 of the UART of the MCU 13 of the electronic cigarette 1 back to the original value. For example, the value of the register 15 of the original UART is 0xFF, and the value of the register 15 of the UART is changed to 0x00, so that the UART function is turned off.
Step (d): if the determining software program 14 receives the UART starting command within the second predetermined time, the determining software program 14 formally starts the UART function of the electronic cigarette 1.
A step (e): after the UART command is received by the determination software program 14, the determination software program 14 will execute the function of the electronic cigarette 1 corresponding to the UART command. Wherein, the UART command function relates to the application of factory production test and health management.
Step (f): after the determination software program 14 determines whether to receive a command for ending the UART from the computer 3, if yes, the determination software program 14 executes step (i) to turn off the UART function of the MCU 13 of the electronic cigarette 1 and switch back to a normal state, otherwise, execute step (e).
After step (f) is completed, initializing the program variables until step (i) is completed, which is a preparation for changing the register 15 of the UART, and automatically performing step (h) after the preparation is completed, and automatically performing step (g) after step (h) is completed.
The invention provides a dynamic switching method of an electronic cigarette system, which comprises the step of switching the UART function of the electronic cigarette through a discrimination software program stored in a Microcontroller (MCU) in the electronic cigarette after the USB interface of the electronic cigarette is connected with a computer through a USB line. The technical advantages of the steps executed by the software program are as follows: (1) the UART circuit is connected to the USB interface of the electronic cigarette from the inside of the electronic cigarette, so that the computer supplies power to the electronic cigarette through the USB line to charge the electronic cigarette; (2) the UART circuit of the electronic cigarette is communicated with a computer, so that the production test, health management and other applications of a factory are met; and (3) when the USB interface of the electronic cigarette is connected with the computer through the USB line for charging, the computer screen does not generate information which cannot be identified by the device.
The dynamic switching method of the electronic cigarette system provided by the present invention has industrial application value, but the above description is only a preferred embodiment of the present invention, and those skilled in the art can easily make other improvements based on the above description, but still fall within the spirit of the present invention and the scope of the patent defined below.

Claims (6)

1. A dynamic switching method of an electronic cigarette system is characterized in that: after a USB (Universal Serial Bus) interface of the electronic cigarette is connected to a computer through a USB cable, a method for dynamically switching a UART (Universal Asynchronous Receiver/Transmitter) function in the electronic cigarette is performed through a discrimination software program stored in a Microcontroller (MCU) in the electronic cigarette, wherein the method for dynamically switching comprises the following steps:
step (a): judging whether the number of times of inserting and pulling the USB line by the electronic cigarette reaches a preset threshold value by the judging software program in a first preset time, if so, executing the step (b);
step (b): changing the value of a register of the UART of the MCU of the electronic cigarette by the judging software program to temporarily start the UART function of the electronic cigarette, and executing the step (c);
step (c): judging whether receiving a UART starting command sent by the computer through the USB cable within a second preset time by the judging software program, if so, executing the step (d);
Step (d): if the judgment software program receives the UART starting command within the second preset time, the judgment software program formally starts the UART function of the electronic cigarette and executes the step (e);
a step (e): after receiving the UART command by the determination software program, the determination software program will execute the function of the electronic cigarette corresponding to the UART command and execute step (f)
Step (f): after judging whether receiving a UART finishing command sent from the computer by the judging software program, if so, executing the step (i) that the judging software program closes the UART function of the MCU of the electronic cigarette and switches back to a common state, otherwise, executing the step (e).
2. The electronic cigarette system dynamic switching method of claim 1, characterized in that: and (c) when the step (a) does not reach the preset threshold value, executing the step (g), and charging the electronic cigarette through the USB line by the computer.
3. The electronic cigarette system dynamic switching method of claim 1, characterized in that: when the judging software program in the step (c) does not receive the UART starting command, the judging software program executes the step (h) to change the register of the UART of the MCU of the electronic cigarette to the original value.
4. The electronic cigarette system dynamic switching method of claim 1, characterized in that: the number of plugging/unplugging times of the predetermined threshold is 3 times, the first predetermined time is 6 seconds, and the second predetermined time is 5 seconds.
5. The electronic cigarette system dynamic switching method of claim 1, characterized in that: the UART command function is related to the application of factory production test and health management.
6. The electronic cigarette system dynamic switching method of claim 1, characterized in that: the computer is a Windows computer with an operating system.
CN201911224429.8A 2019-05-24 2019-12-04 Dynamic switching method of electronic cigarette system Active CN111972726B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201962852323P 2019-05-24 2019-05-24
US62/852,323 2019-05-24

Publications (2)

Publication Number Publication Date
CN111972726A true CN111972726A (en) 2020-11-24
CN111972726B CN111972726B (en) 2023-09-08

Family

ID=73441558

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201911041599.2A Withdrawn CN111972717A (en) 2019-05-24 2019-10-30 Short circuit detection circuit and method for electronic cigarette
CN201911224429.8A Active CN111972726B (en) 2019-05-24 2019-12-04 Dynamic switching method of electronic cigarette system

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201911041599.2A Withdrawn CN111972717A (en) 2019-05-24 2019-10-30 Short circuit detection circuit and method for electronic cigarette

Country Status (2)

Country Link
CN (2) CN111972717A (en)
TW (2) TWM601481U (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114094540B (en) * 2022-01-20 2022-04-12 深圳市益中源科技有限公司 Atomization system short-circuit protection method and atomization system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080162980A1 (en) * 2006-12-31 2008-07-03 Franck Dahan Memory Controller Idle Mode
CN101931674A (en) * 2010-09-01 2010-12-29 惠州Tcl移动通信有限公司 Method and device for sharing Micro-USB interface
CN101937414A (en) * 2010-08-26 2011-01-05 惠州Tcl移动通信有限公司 Method and device of sharing minitype USB interface for UART (Universal Asynchronous Receive/Transmitter) and USB (Universal Serial Bus)
CN106126266A (en) * 2016-07-08 2016-11-16 卓尔悦欧洲控股有限公司 Application interface replacing options, device and the electronic cigarette of electronic cigarette
CN106471789A (en) * 2015-09-24 2017-03-01 广东欧珀移动通信有限公司 The methods, devices and systems of adapter upgrade
US20180048094A1 (en) * 2014-05-08 2018-02-15 Apple Inc. Connector system impedance matching
US20190082968A1 (en) * 2017-09-15 2019-03-21 Prasad Karnik System and method of continuous health monitoring

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201984475U (en) * 2011-02-11 2011-09-21 南京工业职业技术学院 USB automatic identification multifunction converter
CN104037719B (en) * 2013-03-05 2018-12-18 惠州市吉瑞科技有限公司 It is a kind of for the overcurrent of electronic cigarette or the control device and method of short-circuit protection
EP2856893B2 (en) * 2013-10-02 2023-10-04 Fontem Holdings 1 B.V. Electronic smoking device
CN103853689A (en) * 2014-02-17 2014-06-11 上海大学 Device and method of automatic switchover of USB (Universal Serial Bus) and four-line serial port UART (Universal Asynchronous Receiver Transmitter)
TW201627862A (en) * 2015-01-26 2016-08-01 鴻海精密工業股份有限公司 Debug circuit, debug request circuit and debug system
EP3403183B1 (en) * 2016-03-17 2019-04-24 Qualcomm Incorporated Type-c factory and special operating mode support
CN108763131A (en) * 2018-05-18 2018-11-06 郑州云海信息技术有限公司 A kind of single UART port connector easy to plug

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080162980A1 (en) * 2006-12-31 2008-07-03 Franck Dahan Memory Controller Idle Mode
CN101937414A (en) * 2010-08-26 2011-01-05 惠州Tcl移动通信有限公司 Method and device of sharing minitype USB interface for UART (Universal Asynchronous Receive/Transmitter) and USB (Universal Serial Bus)
CN101931674A (en) * 2010-09-01 2010-12-29 惠州Tcl移动通信有限公司 Method and device for sharing Micro-USB interface
US20180048094A1 (en) * 2014-05-08 2018-02-15 Apple Inc. Connector system impedance matching
CN106471789A (en) * 2015-09-24 2017-03-01 广东欧珀移动通信有限公司 The methods, devices and systems of adapter upgrade
CN106126266A (en) * 2016-07-08 2016-11-16 卓尔悦欧洲控股有限公司 Application interface replacing options, device and the electronic cigarette of electronic cigarette
US20190082968A1 (en) * 2017-09-15 2019-03-21 Prasad Karnik System and method of continuous health monitoring

Also Published As

Publication number Publication date
TW202044091A (en) 2020-12-01
CN111972726B (en) 2023-09-08
TWI717108B (en) 2021-01-21
TWM601481U (en) 2020-09-11
CN111972717A (en) 2020-11-24

Similar Documents

Publication Publication Date Title
WO2013168289A1 (en) Electronic device and control method therefor
WO2011088672A1 (en) Intelligent charging method and device for terminal
CN108132401A (en) Charge abnormal detection method, device, storage medium and mobile terminal
KR20210127748A (en) Glasses having a wireless charging receiver circuit, eyeglass cases for eyeglasses, and systems
CN101102119A (en) A charging detection circuit of appliance device and charging detection method
CN102981916A (en) Mobile terminal and control method of mobile terminal and device of mobile terminal
CN210574270U (en) Heating table intelligence remote control circuit, remote controller and heating table
WO2016065822A1 (en) Multifunctional data mobile power supply and charging method
KR20130063131A (en) Method and apparatus for configuring touch sensing parameter
CN111972726B (en) Dynamic switching method of electronic cigarette system
EP4027160B1 (en) Universal plug status detection circuit
CN106131722A (en) A kind of bluetooth earphone control method
CN101854427A (en) Method for reminding operation start and mobile terminal
CN110970954B (en) Charging control method and device, storage medium and split type electronic equipment
CN100358211C (en) Charging set for handset
CN107484055B (en) TWS earphone with charging reset function
CN216530587U (en) Power supply connector for supplying power to master equipment and slave equipment
KR20200042480A (en) Charging method, terminal and computer storage medium
CN113300423A (en) Connector and power supply control method applied to connector
CN205901363U (en) Apparatus for controlling charge
CN110768315B (en) Protection method and system for charging interface and storage medium
CN107204645B (en) Portable charging device
CN207612080U (en) Charging circuit and intelligent terminal
CN111711235B (en) Charging method and device, terminal and storage medium
CN104330984A (en) Portable terminal capable of preventing automatic startup and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant