WO2015085469A1 - 供电电压检测系统、方法及供电系统 - Google Patents

供电电压检测系统、方法及供电系统 Download PDF

Info

Publication number
WO2015085469A1
WO2015085469A1 PCT/CN2013/088896 CN2013088896W WO2015085469A1 WO 2015085469 A1 WO2015085469 A1 WO 2015085469A1 CN 2013088896 W CN2013088896 W CN 2013088896W WO 2015085469 A1 WO2015085469 A1 WO 2015085469A1
Authority
WO
WIPO (PCT)
Prior art keywords
power supply
voltage
reference voltage
microprocessor
value
Prior art date
Application number
PCT/CN2013/088896
Other languages
English (en)
French (fr)
Inventor
向智勇
Original Assignee
吉瑞高新科技股份有限公司
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 吉瑞高新科技股份有限公司 filed Critical 吉瑞高新科技股份有限公司
Priority to PCT/CN2013/088896 priority Critical patent/WO2015085469A1/zh
Publication of WO2015085469A1 publication Critical patent/WO2015085469A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/25Arrangements for measuring currents or voltages or for indicating presence or sign thereof using digital measurement techniques
    • G01R19/2503Arrangements for measuring currents or voltages or for indicating presence or sign thereof using digital measurement techniques for measuring voltage only, e.g. digital volt meters (DVM's)

Definitions

  • the present invention relates to the field of electronic cigarettes, and more particularly to a power supply voltage detecting system, method and power supply system for a mobile power charger for an electronic cigarette, an electronic cigarette case or an electronic cigarette.
  • the internal control circuit of the electronic cigarette generally includes a microprocessor, a battery for powering the microprocessor and other components, and the like.
  • the electronic cigarette case or mobile power charger also includes a microprocessor, a battery for powering the microprocessor and other components, and the like.
  • the battery since the battery is used to supply voltage to the microprocessor, as the battery voltage changes (for example, decreases), the power supply voltage of the microprocessor VCC It also changes with it.
  • the AD reference voltage of the microprocessor uses an internal regulated source while AD In the channel, there is a channel that can be programmed to connect VCC or a signal divided by VCC to obtain the voltage value of the supply voltage.
  • the disadvantages of the above method are that it requires a regulated source inside the microprocessor, or that a complicated external circuit needs to be added, so that the range of available microprocessor models is narrow and the cost is increased.
  • the present invention aims to solve at least one of the above technical problems. To this end, the present invention proposes a power supply voltage detecting system, method, and power supply system.
  • a supply voltage detection system comprising:
  • the microprocessor includes a power input pin and an ADC conversion module;
  • reference voltage source and the ADC are respectively The conversion module and the power supply unit are electrically connected; the power input pin of the microprocessor is electrically connected to the power supply unit; and the ADC conversion module is connected to the power input pin;
  • the reference voltage source is used to provide a stable reference voltage
  • the conversion module is configured to sample the reference voltage, and use a power supply voltage of the power supply unit as a reference voltage, and perform analog-to-digital conversion on the reference voltage to obtain a digital quantized value of the reference voltage;
  • the microprocessor is configured to calculate a voltage value of the power supply voltage according to the digital quantized value
  • V cc V ref ⁇ ( 2 n -1 ) /D ad
  • V ref the voltage value of the reference voltage supplied by the reference voltage source
  • n the ADC
  • D ad the digital quantized value of the reference voltage
  • the microprocessor further includes a plurality of ADC channels and an ADC channel selection switch;
  • the ADC channel selection switch is used to conduct a connection path between the corresponding ADC channel and the ADC conversion module;
  • the reference voltage source is coupled to any one of the plurality of ADC channels.
  • the reference voltage source comprises: a three-terminal adjustable shunt reference source, a first resistor and a first capacitor;
  • a cathode of a three-terminal adjustable shunt reference source and any one of a plurality of ADC channels of the microprocessor The channel is connected and electrically connected to the power supply unit through the first resistor; the anode of the three-terminal adjustable shunt reference source is respectively connected to the negative pole of the first capacitor and the ground; the reference end of the three-terminal adjustable shunt reference source is connected to the positive pole of the first capacitor and One end of the first resistor.
  • the ADC The conversion module is further configured to: after sampling the reference voltage and delaying for a predetermined period of time, using a supply voltage of the power supply unit as a reference voltage, performing analog-to-digital conversion on the reference voltage to obtain a digital quantized value of the reference voltage.
  • the microprocessor is further configured to compare the voltage value of the power supply voltage with a preset voltage value, and output prompt information according to the comparison result. Or low voltage protection of the power supply unit.
  • the microprocessor is further configured to preset a digital quantized value, compare the digital quantized value of the reference voltage with a preset digital quantized value, and output prompt information according to the comparison result. Or low voltage protection of the power supply unit.
  • the reference voltage source is used to provide a stable 2.5V reference voltage.
  • a power supply system comprising the above-mentioned power supply voltage detecting system, further comprising a power supply interface;
  • the power supply interface is electrically connected to the power supply unit; the power supply interface is used to supply power to components connected to the interface.
  • the power supply system further includes: a switch circuit
  • the switch circuit is electrically connected to the microprocessor and the power supply unit: the power supply interface is electrically connected to the power supply unit and the switch circuit;
  • the microprocessor is configured to compare a voltage value of a power supply voltage with a preset voltage value, Controlling the switching circuit to be turned on or off, so that the power supply unit supplies power to the power supply interface or stops supplying power to the power supply interface.
  • the power supply system further includes: a prompting unit;
  • the prompting unit is connected to the microprocessor
  • the microprocessor is configured to control the prompting unit to send prompt information according to a comparison result between a voltage value of the power supply voltage and a preset voltage value;
  • the prompting unit is a light emitting diode or a speaker.
  • a method for detecting a supply voltage includes the following steps:
  • the reference voltage provided by the sampling reference voltage source is the reference voltage provided by the sampling reference voltage source
  • V cc V ref ⁇ ( 2 n -1 ) /D ad
  • V ref the voltage value of the reference voltage
  • n the accuracy of the analog-to-digital conversion
  • D ad the digital quantized value of the reference voltage
  • the reference voltage source comprises: a three-terminal adjustable shunt reference source, a first resistor and a first capacitor;
  • a cathode of the three-terminal adjustable shunt reference source and an ADC of the microprocessor The channel is connected and electrically connected to the power supply unit through the first resistor; the anode of the three-terminal adjustable shunt reference source is respectively connected to the negative pole of the first capacitor and the ground; the reference end of the three-terminal adjustable shunt reference source is connected to the positive pole of the first capacitor and One end of the first resistor.
  • said Taking the power supply voltage of the power supply unit as a reference voltage, performing analog-to-digital conversion of the reference voltage to obtain a digital quantized value of the reference voltage further includes:
  • the reference voltage is analog-digital converted to obtain a digital quantized value of the reference voltage by using a power supply voltage of the power supply unit as a reference voltage.
  • the method further includes:
  • the method further includes:
  • Presetting a digital quantized value Presetting a digital quantized value, comparing the digital quantized value of the reference voltage with a preset digital quantized value, and outputting the prompt information according to the comparison result and Or low voltage protection of the power supply unit.
  • the reference voltage source provides a stable reference voltage of 2.5V.
  • the power supply voltage detecting system, method and power supply system embodying the invention have the following beneficial effects:
  • the channel can obtain the voltage of the power supply, reduce the microprocessor's pin occupancy, save system resources, and select a microprocessor with fewer pins to save costs;
  • FIG. 1 is a schematic structural diagram of a power supply voltage detecting system according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a power supply system according to an embodiment of the present invention.
  • FIG. 3 is a circuit diagram of an electronic cigarette according to an embodiment of the present invention.
  • FIG. 4 is a circuit diagram of an electronic cigarette according to another embodiment of the present invention.
  • FIG. 5 is a flowchart of a power supply voltage detecting method according to an embodiment of the present invention.
  • FIG. 6 is a view showing a method of applying the power supply voltage detecting method of the embodiment of the present invention to the electronic cigarette shown in FIG. 3 or FIG. Specific flow chart;
  • FIG. 7 is a flow chart of outputting prompt information according to a voltage value of a power supply voltage according to an embodiment of the present invention.
  • FIG. 8 is another flow chart of outputting prompt information according to a voltage value of a power supply voltage according to an embodiment of the present invention.
  • FIG. 1 is a schematic structural diagram of a power supply voltage detecting system according to an embodiment of the present invention.
  • the system includes: a reference voltage source 200, a microprocessor 100 and power supply unit (not shown).
  • the microprocessor 100 includes a power input pin 103 and an ADC conversion module 101.
  • the reference voltage source 200 is electrically connected to the ADC conversion module 101 and the power supply unit, respectively; the microprocessor 100
  • the power input pin 103 is electrically connected to the power supply unit; the ADC conversion module 101 is connected to the power input pin 103.
  • the reference voltage source 200 is used to provide a stable reference voltage.
  • ADC Conversion Module 101 It is used for sampling the reference voltage and using the power supply voltage of the power supply unit as a reference voltage, and performing analog-to-digital conversion on the reference voltage to obtain a digital quantized value of the reference voltage.
  • the ADC conversion module 101 The analog-to-digital conversion can be performed by the analog-to-digital conversion method of the prior art to obtain a digital quantized value of the reference voltage.
  • the ADC conversion module 101 performs analog-to-digital conversion by an integrating circuit, a comparison circuit, or the like.
  • the microprocessor 100 is operative to calculate a voltage value of the supply voltage based on the digital quantized value. Specifically, the microprocessor 100 Obtain the voltage value of the supply voltage according to the calculation formula shown below:
  • V cc V ref ⁇ ( 2 n -1 ) /D ad ( 1 )
  • V cc is the voltage value of the power supply voltage
  • V ref is the voltage value of the reference voltage supplied from the reference voltage source 200
  • n is the accuracy of the ADC conversion module 101 (for example, 8-bit, 12-bit, etc.)
  • the same factor x may be multiplied on both sides of the formula (1) so that the left side is shifted by a certain number of bytes. In order to achieve the purpose of simplifying the operation.
  • the factor x is a non-negative integer.
  • the microprocessor 100 includes a plurality of ADC channels and an ADC channel select switch 102.
  • the ADC channel select switch 102 is used to conduct the connection path of the corresponding ADC channel to the ADC conversion module 101. Voltage reference 200 with any ADC Channel connection.
  • the reference voltage source 200 includes: a three-terminal adjustable shunt reference source D1, a first resistor R1, and a first capacitor C1. .
  • the cathode of the three-terminal adjustable shunt reference D1 is connected to an ADC channel of the microprocessor 100 and passes through the first resistor R1. Electrically connected to the power supply unit.
  • the anode of the three-terminal adjustable shunt reference source D1 is connected to the cathode of the first capacitor C1 and to the ground.
  • the reference end of the three-terminal adjustable shunt reference D1 is connected to the positive terminal of the first capacitor C1 and the first resistor One end of R1.
  • the power supply unit electrically connected to the three-terminal adjustable shunt reference source D1 may be the microprocessor 100.
  • the power supply unit that supplies power may also be a power supply unit that independently supplies power to the three-terminal adjustable shunt reference source D1.
  • ADC Conversion Module 101 After sampling the reference voltage and delaying for a predetermined period of time, the reference voltage is analog-digital converted to obtain a digital quantized value of the reference voltage by using the power supply voltage of the power supply unit as a reference voltage.
  • ADC conversion module 101 The delay can be 40us to wait for the sample input to stabilize before starting the AD conversion to enhance the accuracy of the AD conversion and filter out the interference signal.
  • microprocessor 100 It is also used to compare the calculated voltage value of the power supply voltage with a preset voltage value, and output prompt information according to the comparison result and/or low voltage protection of the power supply unit.
  • the microprocessor 100 may further preset a digital quantized value, compare the digital quantized value of the reference voltage with a preset digital quantized value, and output prompt information and/or to the power supply unit according to the comparison result (eg, a battery) ) Perform low voltage protection.
  • the preset digital quantized value can be implemented by presetting a voltage value A and substituting A into the formula (1) to obtain a digital quantized value corresponding to A (in this case, A is V cc ), thereby implementing the preset one. Digital quantized value. Therefore, the microprocessor 100 only needs to compare the digital quantized value obtained by the ADC conversion module with the preset digital quantized value, and can output the prompt information according to the comparison result. In this way, the computational process of the microprocessor 100 can be simplified, saving the hardware resources of the microprocessor 100.
  • the power supply system includes a power supply voltage detecting system 1 and a power supply interface 2 .
  • the power supply voltage detecting system 1 includes a reference voltage source 200, a microprocessor 100, and a power supply unit 300.
  • Power supply interface 2 is connected to power supply unit 300; power supply interface 2 Used to power components that access the interface. For example, if the power supply system of the embodiment of the present invention is applied to an electronic cigarette, the component connected to the power supply interface 2 is a heating wire of the atomizer, that is, by connecting the heating wire to the power supply interface 2 The power supply to the electric heating wire can be realized. If the power supply system of the embodiment of the present invention is applied to an electronic cigarette case capable of charging the electronic cigarette, the component connected to the power supply interface 2 is a battery rod of the electronic cigarette.
  • the power supply system of the embodiment of the present invention further includes a switch circuit 600.
  • Switch circuit 600 and microprocessor 100 Connected to the power supply unit 300:
  • the power supply interface 2 is connected to the power supply unit 300 and the switch circuit 600.
  • the microprocessor 100 is configured to compare the voltage value of the power supply voltage with a preset voltage value,
  • the switching circuit 600 is turned on or off to enable the power supply unit 300 to supply power to the power supply interface 2 or to stop supplying power to the power supply interface 2.
  • the power supply system of the embodiment of the present invention further includes a prompting unit 700.
  • Prompt unit 700 and microprocessor 100 Connected.
  • the microprocessor 100 is configured to control the prompting unit 700 to issue a prompt message according to a comparison result between the voltage value of the power supply voltage and the preset voltage value.
  • the prompting unit 700 It is a light emitting diode or a speaker.
  • the power supply system of the embodiments of the present invention can be applied to an electronic cigarette, an electronic cigarette case, or a mobile power charger.
  • the electronic cigarette includes: a power supply system (not labeled in the figure), a trigger module 400 And electric heating wire 500.
  • the power supply system includes a microprocessor 100, a reference voltage source 200, a power supply unit 300, a power supply interface (not shown), a switch circuit 600, and a prompting unit 700. .
  • the heating wire 500 is connected to the power supply interface.
  • the switching circuit 600 includes a MOS transistor Q1.
  • the prompt unit 700 includes a light emitting diode D2.
  • the microprocessor 100 includes a power input pin and an ADC conversion module; the heating wire 500 is connected to the power supply interface;
  • the reference voltage source 200 is electrically connected to the ADC conversion module and the power supply unit 300 respectively;
  • the power input pin of the microprocessor 100 is electrically connected to the power supply unit 300;
  • the conversion module is connected to the power input pin;
  • the trigger module 400 is electrically connected to the microprocessor 100;
  • the switch circuit 600 is electrically connected to the microprocessor 100 and the power supply unit 300, respectively;
  • One end of the 500 is connected to the power supply unit 300, and the other end is connected to the switch circuit 600;
  • the prompt unit 700 is connected to the microprocessor 100.
  • the model of the microprocessor 100 is SN8P2711, which includes an ADC conversion module (Fig. 2 Not shown) and the power input pin (ie VDD pin).
  • This model of microprocessor 100 includes four ADC channels (AIN0-AIN3).
  • the cathode of the three-terminal adjustable shunt reference source D1 of the reference voltage source 200 and the seventh pin of the microprocessor 100 P4.1/AIN1) connection; the first pin (VDD pin) of microprocessor 100 is grounded through filter capacitor C2; microprocessor 100
  • the first pin ie, the power input pin
  • the second pin P0.2/Xout pin
  • the third pin of 100 (P0.4/RST/Vpp pin) is connected to one end of resistor R3 and the drain of MOS transistor Q1; the other end of resistor R3 is connected to power supply unit 300.
  • the positive terminal; the fourth pin of the microprocessor 100 (P5.3/BZ1/PWM1 pin) is connected to the gate of the MOS transistor Q1; the fifth pin of the microprocessor 200 ( P5.4/BZ0/PWM0 pin) is connected to the cathode of LED D1; the anode of LED D2 is connected to one end of resistor R2, and the other end of resistor R2 is connected to power supply unit 300 Positive terminal; the ninth pin of microprocessor 100 (P4.4/AIN4 pin) is connected to the drain of MOS transistor Q1; the tenth pin of microprocessor 100 (VSS pin) is grounded; MOS The source of the tube Q1 is connected to the cathode of the power supply unit 300; the power terminal of the trigger module 400 is connected to the anode of the power supply unit 300, and the ground is grounded; one end of the heating wire 500 and the power supply unit 300 The positive terminal is connected, and the other end is connected to the drain of the MOS transistor Q1.
  • the power supply unit 300 is used to store electrical energy and provide a supply voltage.
  • the heating wire 500 is used for heating to atomize the liquid.
  • MOS tube Q1 It is used to control the power supply unit 300 to turn on or off the power supply circuit of the heating wire 500 according to the control signal of the microprocessor 100.
  • the VCC terminal connected to one end of the first resistor R1 can be connected to the power supply unit 300.
  • the positive terminal is connected to the first pin of the microprocessor 100.
  • the reference voltage provided by the reference 200 is input through the seventh pin of the microprocessor 100.
  • ADC inside microprocessor 100 The channel select switch selects the corresponding ADC channel.
  • the first pin of the microprocessor 100 i.e., the power input pin
  • Power supply unit 300 is a microprocessor 100 provides voltage.
  • the ADC inside the microprocessor 100 uses the power supply unit voltage as a reference voltage (ie, the voltage input by the first pin as a reference voltage), and performs analog-to-digital conversion on the reference voltage input to the seventh pin to obtain a digital quantized value of the reference voltage. Thereafter, the microprocessor 100 According to the above formula (1), the voltage value of the accurate supply voltage can be calculated.
  • the microprocessor 100 After calculating the voltage value of the power supply voltage, the microprocessor 100 The voltage value can be compared with a preset voltage value to output prompt information. For example, if the voltage value is less than the preset voltage value, the microprocessor 100 controls the output voltage of the fifth pin to make the light emitting diode D2 Lights up, thereby prompting the user. In addition, when the voltage value of the power supply voltage is less than the preset voltage value, the microprocessor 100 can also turn off the power supply unit by controlling the output of the fourth pin to turn off the MOS transistor Q1. 300 pairs of heating wire 500 power supply path to achieve low voltage protection of power supply unit 300.
  • the trigger module 400 is an air flow sensor or a push button switch, and therefore, the trigger module 400
  • the generated trigger signal includes an air flow trigger signal or a key trigger signal.
  • the microprocessor 100 needs to control the power supply unit 300 to the heating wire.
  • the power supply path of the 500 is turned on to supply power to the heating wire 500 to atomize the smoke liquid for the smoker to smoke.
  • the microprocessor 100 Short-circuit protection can be achieved by detecting the voltage change at the ninth pin.
  • the specific implementation process is as follows: if a short circuit occurs, the voltage detected by the ninth leg will be abrupt (voltage rise), and the microprocessor 100 Setting the fourth pin low causes the MOS transistor Q1 to turn off, thereby stopping the power supply and achieving short-circuit protection.
  • the microprocessor 100 When the level of the second pin is at a high level (or low voltage) for a certain period of time, it means that there is always a smoking signal during this time, that is, the smoking state is always in this period of time, at this time, the microprocessor 100 Controllable MOS tube
  • the deadline of Q1 is to avoid accidents such as hot mouths during long-term smoking, so as to achieve long-suck protection.
  • the microprocessor 100 The voltage of the power supply process can also be detected by the voltage of the third pin, so that when the voltage is higher than the preset value, the fourth pin is controlled to turn off the MOS transistor Q1 to achieve overvoltage protection.
  • FIG. 4 is a circuit diagram of an electronic cigarette according to another embodiment of the present invention.
  • the electronic cigarette includes a microprocessor 100 and a reference voltage source 200 And power supply unit 300.
  • the trigger module, the heating wire, the power supply interface, and the like included in the electronic cigarette are not shown in the drawings.
  • FIG. 4 In practice, according to the specific model of the microprocessor 100, refer to FIG. The illustrated embodiment performs corresponding connections to achieve the corresponding functions.
  • the microprocessor 100 is model HT46R065B and includes an ADC inside. Conversion module (not shown). This model of microprocessor includes four ADC channels (AN0-AN3).
  • the cathode of the three-terminal adjustable shunt reference source D1 of the reference voltage source 200 and one of the ADCs of the microprocessor 100 The channel (first pin) is connected.
  • the sixteenth pin of the microprocessor 100 (the VDD pin, the power input pin) is connected to the positive terminal of the power supply unit 300.
  • one end of the first resistor R1 is connected to the anode of the power supply unit 300 (also simultaneously with the microprocessor). 100 VDD pin connection).
  • the reference voltage provided by the reference 200 is input through the first pin of the microprocessor 100.
  • ADC inside microprocessor 100 The channel select switch selects the corresponding AD channel.
  • the sixteenth pin of the microprocessor 100 ie, the power input pin
  • the power supply unit 300 is a microprocessor. 100 provides voltage.
  • the ADC inside the microprocessor 100 uses the power supply unit voltage as a reference voltage (ie, the voltage input from the sixteenth pin as a reference voltage), and performs analog-to-digital conversion on the reference voltage input from the first pin to obtain a digital quantized value of the reference voltage. Thereafter, the microprocessor 100 According to the above formula (1), the voltage value of the accurate supply voltage can be calculated.
  • the microprocessor 100 After calculating the voltage value of the power supply voltage, the microprocessor 100 The voltage value can be compared with a preset voltage value to output a prompt message, for example, the preset voltage value is set to 3.8V, and when the calculated voltage value is greater than 3.8V, the microprocessor 100 controls the PB1.
  • the output voltage of the pin is such that LED1 connected to the PB1 pin emits light (this connection is not shown); when the calculated voltage value is less than 3.8V, the microprocessor 100 controls PB2.
  • the output voltage of the pin to make the LED2 connected to PB2 Luminescence (this connection is not shown in the figure). Thereby, it is possible to output corresponding prompt information according to the detected voltage.
  • the microprocessor 100 when the voltage value of the power supply voltage is less than a preset voltage value, the microprocessor 100
  • the power supply path of the power supply unit 300 to the electronic cigarette heating wire can also be controlled to achieve low voltage protection of the power supply unit 300.
  • FIG. 5 is a flowchart of a method for detecting a power supply voltage according to an embodiment of the present invention. The method includes the following steps:
  • the step further includes: sampling to After the reference voltage is delayed by a predetermined period of time, the reference voltage is analog-digital converted to obtain a digital quantized value of the reference voltage by using a power supply voltage of the power supply unit as a reference voltage.
  • V cc V ref ⁇ ( 2 n -1 ) /D ad
  • V cc V ref ⁇ ( 2 n -1 ) /D ad
  • V ref is a voltage value of the reference voltage
  • n is an accuracy of analog-to-digital conversion (for example , 8 bits, 12 bits, etc.)
  • D ad is the digital quantized value of the reference voltage.
  • Power supply voltage detecting method of embodiment of the present invention The method further includes: comparing a voltage value of the power supply voltage with a preset voltage value, and outputting prompt information according to the comparison result and / Or performing low voltage protection on the power supply unit; or preset a digital quantized value, and comparing the digital quantized value of the reference voltage with a preset digital quantized value, and outputting prompt information according to the comparison result and / Or low voltage protection of the power supply unit.
  • the power supply voltage detecting method of the embodiment of the present invention corresponds to the power supply voltage detecting system, and the power supply voltage detecting method of the embodiment of the present invention can be applied to FIG. 3 and FIG. 4 .
  • the supply voltage is detected.
  • the supply voltage detection method begins in step S21, initializes the microprocessor, and connects the ADC channel connected to the reference voltage source to the ADC conversion module.
  • step S22 Medium, delay for a preset duration to wait for the sample input to stabilize.
  • step S23 it is judged whether the delay time has arrived. If it does not arrive, it continues to wait.
  • step S24 the analog-to-digital conversion is started in step S24, so that the ADC is
  • the conversion module uses the power supply voltage of the power supply unit as a reference voltage, and performs analog-to-digital conversion on the reference voltage to obtain a digital quantized value of the reference voltage; and in step S25 It is judged whether or not the analog-to-digital conversion is completed. If it is not completed, the analog-to-digital conversion is continued, and if it is finished, the voltage value of the power supply voltage is obtained in accordance with the formula (1) and the digital quantized value in step S26.
  • step S31 Initialize the microprocessor and connect the AD C channel connected to the reference to the ADC conversion module.
  • step S32 a predetermined duration is delayed to wait for the sampling input to be stable.
  • step S33 In the determination of whether the delay time has arrived, if it does not arrive, it continues to wait.
  • step S34 the analog-to-digital conversion is started in step S34, so that the ADC is
  • the conversion module uses the power supply voltage of the power supply unit as a reference voltage, and performs analog-to-digital conversion on the reference voltage to obtain a digital quantized value of the reference voltage; and in step S35 In the middle, it is judged whether or not the analog-to-digital conversion is completed. If not, the analog-to-digital conversion is continued, and if it is finished, the voltage value of the power supply voltage is obtained in accordance with the formula (1) and the digital quantized value in step S36.
  • step S37 The voltage value of the obtained power supply voltage is compared with a preset voltage value. If the voltage value of the power supply voltage is greater than the preset voltage value, the first prompt information is output, otherwise the output is different from the second prompt information. Prompt message.
  • step S41 Predetermining a voltage value, and calculating and storing the digital quantized value corresponding to the voltage value according to formula (1) to obtain a preset digital quantized value.
  • step S42 the microprocessor is initialized and the AD connected to the reference is connected.
  • the C channel is connected to the ADC conversion module.
  • step S43 a predetermined duration is delayed to wait for the sampling input to be stable.
  • step S44 In the determination of whether the delay time has arrived, if it does not arrive, it continues to wait.
  • step S45 the analog-to-digital conversion is started in step S45, so that the ADC
  • the conversion module uses the power supply voltage of the power supply unit as a reference voltage, and performs analog-to-digital conversion on the reference voltage to obtain a digital quantized value of the reference voltage; and in step S46 If it is judged whether the analog-to-digital conversion is finished, if it is not finished, the analog-to-digital conversion is continued, and if it is finished, then in step S47 Comparing the digital quantized value of the reference voltage with the preset digital quantized value, if the digital quantized value of the reference voltage is greater than the preset digital quantized value, outputting the first prompt information, otherwise outputting the second prompt information different from the first prompt information .
  • the power supply unit can also be low-voltage protected according to the comparison result, or other beneficial operations can be performed.
  • the reference voltage source 200 provides a reference voltage of 2.5V, which may be other values.
  • Microprocessor 100 Can be a microcontroller, CPU, etc.
  • the ADC conversion module 101 is a microprocessor 100.
  • An internal module that is a physical hardware module, such as the A/D converter of microprocessor 100 model number HT46R065B.
  • Figure 3 and Figure 4 The circuit diagram when the power supply voltage detecting system of the embodiment of the present invention is applied to the electronic cigarette is shown. However, when the power supply voltage detecting system of the embodiment of the present invention is applied to the electronic cigarette case and the mobile power charger, the principle is the same, only It is necessary to connect the reference voltage source and the power supply unit according to the model of the corresponding microprocessor.
  • the power supply unit 300 may be a power supply battery (for example, Battery, dry battery or lithium battery) or other electrical devices.
  • a power supply battery for example, Battery, dry battery or lithium battery
  • the power supply voltage detection system, method, and power supply system of the embodiments of the present invention enable AD
  • the range of options for the microprocessor is greatly increased, making the selection easier and the product more substitutable (for example, if a certain type of single-chip microcomputer is in use, it can be quickly replaced with other models), so that it can be used more Cheap and economical microprocessors to achieve the corresponding design, increase product economic efficiency, profit margins and product competitiveness.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measurement Of Current Or Voltage (AREA)

Abstract

一种供电电压检测系统、方法及供电系统。供电电压检测系统包括:基准电压源(200)、微处理器(100)和供电单元;微处理器(100)包括电源输入引脚(103)和ADC转换模块(101);其中,基准电压源(200)用于提供稳定的基准电压;ADC转换模块(101)用于采样基准电压,并以供电单元的供电电压为参考电压,将基准电压进行模数转换以得到基准电压的数字量化值;微处理器(100)用于根据数字量化值获取供电电压的电压值。有益效果是可降低对AD型微处理器的过多苛刻要求,涵盖的类型大为增加,可供选择的型号极大增加,从而可以找到更加便宜的微处理器;节省元器件,节省PCB面积,节省成本;节省微处理器的ROM、RAM空间和CPU执行时间。

Description

供电电压检测系统、方法及供电系统 技术领域
本发明涉及电子烟领域,更具体地说,涉及一种应用于电子烟、电子烟盒或电子烟的移动电源充电器的供电电压检测系统、方法及供电系统。
背景技术
电子烟的内部控制电路一般包括微处理器、用于为微处理器及其它部件进行供电的电池等。
此外,在一些可对电子烟进行充电的电子烟盒或移动电源充电器中,电子烟盒或移动电源充电器同样包括微处理器、用于为微处理器及其它部件进行供电的电池等。
上述情况中,由于采用电池为微处理器提供电压,随着电池电压的变化(例如,减小),微处理器的供电电压 VCC 也随之不断变化。
由于诸如对电池进行低压保护或显示电池的电量信息等功能,必须要精确的获取电池电压的大小,这就需要微处理器对电池的供电电压进行 AD 转换采样,由此间接获取电池电压值。
一般的,微处理器对供电电压进行 AD 检测的方法有两种:
( 1 )使用微处理器内部通路获得,例如,微处理器的 AD 参考电压采用内部的稳压源,同时 AD 通道中,留有一通道,这个通道可以可编程地连通 VCC 或者经 VCC 分压的信号,由此获取供电电压的电压值。
( 2 )若微处理器内部没有稳压源,则只能增加结构复杂的外部电路,以取样 VCC 电压,从而获取供电电压的电压值。
上述方法的缺点为:需要微处理器内部具有稳压源,或需要增加复杂的外部电路,使得可供选择使用的微处理器型号范围窄,且增加了成本。
发明内容
本发明旨在至少解决上述技术问题之一。为此,本发明提出了一种供电电压检测系统、方法及供电系统。
一种供电电压检测系统,包括:
基准电压源、微处理器和供电单元;所述微处理器包括电源输入引脚和 ADC 转换模块;
其中,所述基准电压源分别与所述 ADC 转换模块和供电单元电连接;所述微处理器的电源输入引脚与所述供电单元电连接;所述 ADC 转换模块与所述电源输入引脚连接;
基准电压源用于提供稳定的基准电压;
ADC 转换模块用于采样所述基准电压,并以供电单元的供电电压为参考电压,将所述基准电压进行模数转换以得到所述基准电压的数字量化值;
所述微处理器用于根据所述数字量化值计算供电电压的电压值;
其中, Vcc=Vref× ( 2n-1 ) /Dad , Vcc 为所述供电电压的电压值, Vref 为所述基准电压源提供的基准电压的电压值, n 为所述 ADC 转换模块的精度, Dad 为所述基准电压的数字量化值。
优选的,所述微处理器还包括多个 ADC 通道和 ADC 通道选择开关;
所述 ADC 通道选择开关用于将相应的 ADC 通道与 ADC 转换模块的连接通路导通;
所述基准电压源与多个 ADC 通道中的任一个 ADC 通道连接。
优选的 , 所述基准电压源包括:三端可调分流基准源、第一电阻和第一电容;
三端可调分流基准源的阴极与所述微处理器的多个 ADC 通道中的任一 ADC 通道连接,并通过第一电阻与供电单元电连接;三端可调分流基准源的阳极分别连接第一电容的负极和接地;三端可调分流基准源的参考端连接第一电容的正极和第一电阻的一端。
优选的 , 所述 ADC 转换模块还用于采样到所述基准电压并延迟一预设时长后,以供电单元的供电电压为参考电压,将所述基准 电压进行模数转换以得到所述 基准电压的数字量化值。
优选的 ,所述微处理器还用于将所述供电电压的电压值与预设的电压值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
优选的 ,所述微处理器还用于预设一数字量化值,并将所述基准电压的数字量化值与预设的数字量化值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
优选的 ,所述基准电压源用于提供稳定的 2.5V 基准电压。
一种供电系统,包括上述的供电电压检测系统,还包括供电接口;
所述供电接口与所述供电单元电连接;所述供电接口用于为接入该接口的元件供电。
优选的,所述供电系统还包括:开关电路;
所述开关电路与所述微处理器和供电单元电连接:所述供电接口与所述供电单元和开关电路电连接;
所述微处理器用于根据供电电压的电压值与预设电压值的比较结果, 控制所述开关电路的导通或截止,以使供电单元给所述供电接口供电或停止给所述供电接口供电。
优选的,所述供电系统还包括:提示单元;
所述提示单元与所述微处理器连接;
所述微处理器用于根据供电电压的电压值与预设电压值的比较结果, 控制所述提示单元发出提示信息;
所述提示单元为发光二极管或扬声器。
一种供电电压检测方法,包括以下步骤:
采样基准电压源提供的基准电压;
以供电单元的供电电压为参考电压,将所述基准电压进行模数转换以得到所述基准电压的数字量化值;
根据所述数字量化值获取供电电压的电压值;
其中, Vcc=Vref× ( 2n-1 ) /Dad , Vcc 为所述供电电压的电压值, Vref 为所述基准电压的电压值, n 为所述模数转换的精度, Dad 为基准电压的数字量化值。
优选的 ,所述基准电压源包括:三端可调分流基准源、第一电阻和第一电容;
三端可调分流基准源的阴极与所述微处理器的一 ADC 通道连接,并通过第一电阻与供电单元电连接;三端可调分流基准源的阳极分别连接第一电容的负极和接地;三端可调分流基准源的参考端连接第一电容的正极和第一电阻的一端。
优选的, 所述 以供电单元的供电电压为参考电压,将所述基准电压进行模数转换以得到所述基准电压的数字量化值进一步包括:
采样到 所述基准电压并延迟一预设时长后,以供电单元的供电电压为参考电压,将所述基准电压进行模数转换以得到所述基准电压的数字量化值。
优选的,所述方法还包括:
将所述供电电压的电压值与预设的电压值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
优选的,所述方法还包括:
预设一数字量化值,并将所述基准电压的数字量化值与预设的数字量化值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
优选的,所述基准电压源提供稳定的基准电压为 2.5V 。
实施本发明的供电电压检测系统、方法及供电系统,具有以下有益效果:
( 1 )无需特别要求微处理器有内部稳压模块,可选择使用价格较低的微处理器(如 HT46R065B ),从而降低了产品的成本;
( 2 )扩大了可供选择使用的微处理器型号范围;
( 3 )由于几乎所有的具有 AD 转换功能的微处理器均可适用,在选型时就省去了大量时间,节省了人力,缩短产品开发周期;
( 4 )仅仅使用一路微处理器的 AD 通道就能取得供电电源的电压,减少了微处理器的管脚占用,节省了系统资源,可以选择管脚更少的微处理器,节省了成本;
( 5 )由于没有电源电压取样电路,节省了取样元器件,减少了元器件和 PCB 空间的占用;
( 6 )减少微处理器的计算量,大大节省了微处理器宝贵的 ROM 、 RAM 空间。
附图说明
下面将结合附图及实施例对本发明作进一步说明,附图中:
图 1 是本发明实施例的供电电压检测系统的结构示意图;
图 2 是本发明实施例的供电系统的结构示意图;
图 3 是本发明一实施例的电子烟的电路图;
图 4 是 本发明另一实施例的电子烟的电路图;
图 5 是本发明实施例的供电电压检测方法的流程图 ;
图 6 是 将本发明实施例的供电电压检测方法应用到图 3 或图 4 所示的电子烟中 时的 具体流程图;
图 7 是本发明实施例的根据供电电压的电压值输出提示信息的流程图;
图 8 是本发明实施例的根据供电电压的电压值输出提示信息的另一流程图。
具体实施方式
为了对本发明的技术特征、目的和效果有更加清楚的理解,现对照附图详细说明本发明的具体实施方式。
参见图 1 为本发明实施例的供电电压检测系统的结构示意图。该系统包括: 基准电压源 200 、微处理器 100 和供电单元(图中未示出)。微处理器 100 包括电源输入引脚 103 和 ADC 转换模块 101 。
其中,基准电压源 200 分别与 ADC 转换模块 101 和供电单元电连接;微处理器 100 的电源输入引脚 103 与供电单元电连接; ADC 转换模块 101 与电源输入引脚 103 连接。
基准电压源 200 用于提供稳定的基准电压。 ADC 转换模块 101 用于采样基准电压,并以供电单元的供电电压为参考电压,将基准电压进行模数转换以得到基准电压的数字量化值。其中, ADC 转换模块 101 可采用现有技术的模数转换方式进行模数转换以得到基准电压的数字量化值,例如, ADC 转换模块 101 通过积分电路、比较电路等来实现模数转换。
微处理器 100 用于根据数字量化值计算供电电压的电压值。具体的,微处理器 100 根据如下所示的计算公式获取供电电压的电压值:
Vcc=Vref× ( 2n-1 ) /Dad ( 1 )
式( 1 )中, Vcc 为供电电压的电压值, Vref 为基准电压源 200 提供的基准电压的电压值, n 为 ADC 转换模块 101 的精度(例如, 8 位、 12 位等), Dad 为所述基准电压的数字量化值。例如,若基准电压的电压值为 2.5V , ADC 转换模块 101 的精度为 8 位,则 Vcc=2.5×255/Dad 。在本发明的实施例中,为了避免出现浮点数的运算,可在公式( 1 )的两边同乘相同的因子 x (例如 2 、 4 、 8 等),使得左移一定位数的字节,以达到简化运算的目的。因子 x 为非负整数。
参见图 1 ,优选的,微处理器 100 包括多个 ADC 通道和 ADC 通道选择开关 102 。 ADC 通道选择开关 102 用于将相应的 ADC 通道与 ADC 转换模块 101 的连接通路导通。基准电压源 200 与任意一个 ADC 通道连接。
参见图 1 ,基准电压源 200 包括:三端可调分流基准源 D1 、第一电阻 R1 和第一电容 C1 。
三端可调分流基准源 D1 的阴极与微处理器 100 的一 ADC 通道连接,并通过第一电阻 R1 与供电单元电连接。三端可调分流基准源 D1 的阳极分别连接第一电容 C1 的负极和接地。三端可调分流基准源 D1 的参考端连接第一电容 C1 的正极和第一电阻 R1 的一端。其中,与所述三端可调分流基准源 D1 电连接的所述供电单元可以是为所述微处理器 100 供电的所述供电单元,也可以是独立地为所述三端可调分流基准源 D1 供电的供电单元。
ADC 转换模块 101 还用于采样到基准电压并延迟一预设时长后,以供电单元的供电电压为参考电压,将基准电压进行模数转换以得到基准电压的数字量化值。例如, ADC 转换模块 101 可延迟 40us ,以等待采样输入稳定后,再启动 AD 转换,以增强 AD 转换的准确性,滤除干扰信号。
在本发明的实施例中,微处理器 100 还用于将计算得到的供电电压的电压值与预设的电压值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
此外,微处理器 100 还可预设一数字量化值,并将基准电压的数字量化值与预设的数字量化值进行比较,并根据比较结果输出提示信息和 / 或对供电单元(例如,电池)进行低压保护。具体的,预设数字量化值可通过如下方式实现:预设一电压值 A ,将 A 代入公式( 1 )得到 A 对应的数字量化值(此时, A 即 Vcc ),从而实现预设一数字量化值。由此,微处理器 100 只需将 ADC 转换模块得到的数字量化值与预设的数字量化值进行比较,即可根据比较结果输出提示信息。通过这样的方式,可简化微处理器 100 的计算过程,节省微处理器 100 的硬件资源。
参见图 2 所示为本发明实施例的供电系统的结构示意图。该供电系统包括供电电压检测系统 1 和供电接口 2 。其中供电电压检测系统 1 包括基准电压源 200 、微处理器 100 和供电单元 300 。供电接口 2 与供电单元 300 连接;供电接口 2 用于为接入该接口的元件供电。例如,若将本发明实施例的供电系统运用于电子烟,则接入供电接口 2 的元件为雾化器的电热丝,即通过将电热丝接入供电接口 2 ,可实现对电热丝的供电;若将本发明实施例的供电系统运用于可对电子烟进行充电的电子烟盒,则接入供电接口 2 的元件为电子烟的电池杆。
参见图 2 ,本发明实施例的供电系统还包括 开关电路 600 。 开关电路 600 与微处理器 100 和供电单元 300 连接:供电接口 2 与供电单元 300 和开关电路 600 连接。微处理器 100 用于根据供电电压的电压值与预设电压值的比较结果, 控制开关电路 600 的导通或截止,以使供电单元 300 给供电接口 2 供电或停止给供电接口 2 供电。
参见图 2 ,本发明实施例的供电系统还包括 提示单元 700 。提示单元 700 与微处理器 100 连接。 微处理器 100 用于根据供电电压的电压值与预设电压值的比较结果, 控制提示单元 700 发出提示信息。在本发明的实施例中,提示单元 700 为发光二极管或扬声器。
应理解,可将本发明实施例的供电系统应用于电子烟、电子烟盒或移动电源充电器。
参见图 3 为本发明一实施例的电子烟的电路图。该电子烟包括:供电系统(图中未标号)、触发模块 400 和电热丝 500 。其中供电系统包括微处理器 100 、基准电压源 200 、供电单元 300 、供电接口(图中未示出)、开关电路 600 和提示单元 700 。其中,电热丝 500 接入供电接口。 开关电路 600 包括 MOS 管 Q1 。提示单元 700 包括发光二极管 D2 。
其中,微处理器 100 包括电源输入引脚和 ADC 转换模块; 电热丝 500 接入供电接口; 基准电压源 200 分别与 ADC 转换模块和供电单元 300 电 连接;微处理器 100 的电源输入引脚与供电单元 300 电 连接; ADC 转换模块与电源输入引脚连接;触发模块 400 与微处理器 100 电 连接;开关电路 600 分别与微处理器 100 和供电单元 300 电 连接;电热丝 500 的一端与供电单元 300 连接,另一端与开关电路 600 连接;提示单元 700 与微处理器 100 连接。
具体的,微处理器 100 的型号为 SN8P2711 ,其包括一 ADC 转换模块(图 2 中未示出)和电源输入引脚(即 VDD 引脚)。该型号的微处理器 100 包括 4 个 ADC 通道( AIN0-AIN3 )。
具体的,基准电压源 200 的三端可调分流基准源 D1 的阴极与微处理器 100 的第七引脚( P4.1/AIN1 )连接;微处理器 100 的第一引脚( VDD 引脚)通过滤波电容 C2 接地;微处理器 100 的第一引脚(即电源输入引脚)还连接供电单元 300 的正极;微处理器 100 的第二引脚( P0.2/Xout 引脚)连接触发模块 400 的输出端;微处理器 100 的第三引脚( P0.4/RST/Vpp 引脚)连接电阻 R3 的一端以及 MOS 管 Q1 的漏极;电阻 R3 的另一端连接供电单元 300 的正极;微处理器 100 的第四引脚( P5.3/BZ1/PWM1 引脚)连接 MOS 管 Q1 的栅极;微处理器 200 的第五引脚( P5.4/BZ0/PWM0 引脚)连接发光二极管 D1 的阴极;发光二极管 D2 的阳极连接电阻 R2 的一端,电阻 R2 的另一端连接供电单元 300 的正极;微处理器 100 的第九引脚( P4.4/AIN4 引脚)连接 MOS 管 Q1 的漏极;微处理器 100 的第十引脚( VSS 引脚)接地; MOS 管 Q1 的源极连接供电单元 300 的负极;触发模块 400 的电源端连接供电单元 300 的正极、接地端接地;电热丝 500 的一端与供电单元 300 的正极连接,另一端与 MOS 管 Q1 的漏极连接。
供电单元 300 用于存储电能以及提供供电电压。电热丝 500 用于发热以雾化烟液。 MOS 管 Q1 用于根据微处理器 100 的控制信号,控制供电单元 300 对电热丝 500 的供电电路的导通或截止。
在图 3 所示的本发明的实施例中,与第一电阻 R1 一端连接的 VCC 端可与供电单元 300 的正极或与微处理器 100 的第一引脚连接。基准电压源 200 提供的基准电压通过微处理器 100 的第七引脚输入。微处理器 100 内部的 ADC 通道选择开关选择接通相应的 ADC 通道。此外,微处理器 100 的第一引脚(即电源输入引脚)与供电单元 300 的正极连接。供电单元 300 为微处理器 100 提供电压。根据图 1 所示,可知,微处理器 100 内部的 ADC 转换模块以供电单元电压为参考电压(即以第一引脚输入的电压为参考电压),将第七引脚输入的基准电压进行模数转换以得到基准电压的数字量化值。此后,微处理器 100 根据上述公式( 1 )可计算得到精确的供电电压的电压值。
计算得到供电电压的电压值后,微处理器 100 可将该电压值与预设的电压值进行比较,以输出提示信息,例如,若该电压值小于预设的电压值,则微处理器 100 通过控制第五引脚的输出电压,使得发光二极管 D2 发光,由此提示用户。此外,当供电电压的电压值小于预设的电压值时,微处理器 100 还可通过控制第四引脚的输出,使得 MOS 管 Q1 截止,从而截止供电单元 300 对电热丝 500 的供电通路,以实现对供电单元 300 的低压保护。
此外,在本发明的图 3 所示的实施例中,触发模块 400 为气流传感器或按键开关,因此,触发模块 400 产生的触发信号包括气流触发信号或按键触发信号。当产生这两种触发信号时,均表明使用者的吸烟动作开始,此时,微处理器 100 需控制供电单元 300 对电热丝 500 的供电通路导通以实现给电热丝 500 供电以雾化烟液供吸烟者吸食。且在供电过程中,微处理器 100 可通过检测第九引脚的电压变化实现短路的保护。其具体实现过程为:若发生短路则第九脚检测到的电压会发生突变(电压升高),则微处理器 100 置第四引脚为低电平,使得 MOS 管 Q1 截止,从而使供电停止,实现短路保护。此外,在供电过程中,若微处理器 100 第二引脚的电平某一时间段内均处于高电平(或低电压)时,说明这段时间内一直存在吸烟信号,即这段时间一直处于吸烟状态,此时,微处理器 100 可控制 MOS 管 Q1 的截止,避免长时间处于吸烟状态发生烫嘴等事故,以实现长吸保护功能。在供电过程中,微处理器 100 还可通过第三引脚的电压实现对供电过程的电压的检测,从而可实现到电压高于预设值时,控制第四引脚从而使 MOS 管 Q1 截止,以实现过压保护。
参见图 4 为本发明另一实施例的电子烟的电路图。该电子烟包括 微处理器 100 、基准电压源 200 和供电单元 300 。在该实施例中,电子烟包括的触发模块、电热丝、供电接口等图中未示出,在实际中,可根据微处理器 100 的具体型号,参照图 3 所示的实施例进行相应的连接以实现相应的功能。
图 4 中,微处理器 100 的型号为 HT46R065B ,其内部包括一 ADC 转换模块(图中未示出)。该型号的微处理器包括 4 个 ADC 通道( AN0-AN3 )。
具体的,基准电压源 200 的三端可调分流基准源 D1 的阴极与微处理器 100 的的其中一个 ADC 通道(第一引脚)连接。微处理器 100 的第十六引脚( VDD 引脚,即电源输入引脚)与供电单元 300 的正极连接。
在图 4 所示的本发明实施例中,与第一电阻 R1 一端与供电单元 300 的正极连接(同时也与微处理器 100 的 VDD 引脚连接)。基准电压源 200 提供的基准电压通过微处理器 100 的第一引脚输入。微处理器 100 内部的 ADC 通道选择开关选择接通相应的 AD 通道。此外,微处理器 100 的第十六引脚(即电源输入引脚)与供电单元 300 的正极连接,供电单元 300 为微处理器 100 提供电压。根据图 1 所示,可知,微处理器 100 内部的 ADC 转换模块以供电单元电压为参考电压(即以第十六引脚输入的电压为参考电压),将第一引脚输入的基准电压进行模数转换以得到基准电压的数字量化值。此后,微处理器 100 根据上述公式( 1 )可计算得到精确的供电电压的电压值。
计算得到供电电压的电压值后,微处理器 100 可将该电压值与预设的电压值进行比较,以输出提示信息,例如,预设的电压值设为 3.8V ,当计算得到的电压值大于 3.8V 时,微处理器 100 控制 PB1 引脚的输出电压,以使得与 PB1 引脚连接的 LED1 发光(图中未示出这一连接关系);当计算得到的电压值小于 3.8V 时,微处理器 100 控制 PB2 引脚的输出电压,以使得与 PB2 连接的 LED2 发光(图中未示出这一连接关系)。由此,可实现根据检测到的电压,输出相应的提示信息。此外,当供电电压的电压值小于预设的电压值时,微处理器 100 还可控制供电单元 300 对电子烟电热丝的供电通路,以实现对供电单元 300 的低压保护。
参见图 5 为本发明实施例的供电电压检测方法的流程图。该方法包括 以下步骤:
S11 、采样基准电压源提供的基准电压。
S12 、以供电单元的供电电压为参考电压,将基准电压进行模数转换以得到基准电压的数字量化值。
具体的,该步骤进一步包括:采样到 所述基准电压并延迟一预设时长后,以供电单元的供电电压为参考电压,将所述基准电压进行模数转换以得到所述基准电压的数字量化值。
S13 、根据数字量化值获取供电电压的电压值。具体的, Vcc=Vref× ( 2n-1 ) /Dad , Vcc 为所述供电电压的电压值, Vref 为所述基准电压的电压值, n 为模数转换的精度(例如, 8 位、 12 位等), Dad 为基准电压的数字量化值。
本发明实施例的供电电压检测方法 还包括:将所述供电电压的电压值与预设的电压值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护;或预设一数字量化值,并将所述基准电压的数字量化值与预设的数字量化值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
应理解,本发明实施例的供电电压检测方法与供电电压检测系统是相对应的,且可将本发明实施例的供电电压检测方法运用到图 3 和图 4 所示的电子烟中,以进行供电电压的检测。
具体的, 参见图 6 为 将本发明实施例的供电电压检测方法运用到图 3 或图 4 所示的电子烟中 时的 具体流程图。其供电电压检测方法开始于步骤 S21 、初始化微处理器,并将与基准电压源连接的 ADC 通道接入 ADC 转换模块。在步骤 S22 中,延迟一预设时长,以等待采样输入稳定。在步骤 S23 中,判断延迟时间是否到达,若未到达,则继续等待,若到达,则在步骤 S24 中启动模数转换,使得 ADC 转换模块以供电单元的供电电压为参考电压,将基准电压进行模数转换以得到基准电压的数字量化值;并在步骤 S25 中判断模数转换是否结束,若未结束,则继续进行模数转换,若结束,则在步骤 S26 中根据公式( 1 )和数字量化值获取供电电压的电压值。
参见图 7 为根据供电电压的电压值输出提示信息的流程图。开始于步骤 S31 、初始化微处理器,并将与基准电压源连接的 AD C 通道接入 ADC 转换模块。 在步骤 S32 中,延迟一预设时长,以等待采样输入稳定。在步骤 S33 中,判断延迟时间是否到达,若未到达,则继续等待,若到达,则在步骤 S34 中启动模数转换,使得 ADC 转换模块以供电单元的供电电压为参考电压,将基准电压进行模数转换以得到基准电压的数字量化值;并在步骤 S35 中判断模数转换是否结束,若未结束,则继续进行模数转换,若结束,则在步骤 S36 中根据公式( 1 )和数字量化值获取供电电压的电压值。在步骤 S37 中,将获取的供电电压的电压值与预设的电压值进行比较,若供电电压的电压值大于预设的电压值,则输出第一提示信息,否则输出不同于第一提示信息的第二提示信息。
参见图 8 为根据供电电压的电压值输出提示信息的另一流程图。开始于步骤 S41 、预设一电压值,并根据公式( 1 )计算并存储该电压值对应的数字量化值以得到预设数字量化值。在步骤 S42 中,初始化微处理器,并将与基准电压源连接的 AD C 通道接入 ADC 转换模块。 在步骤 S43 中,延迟一预设时长,以等待采样输入稳定。在步骤 S44 中,判断延迟时间是否到达,若未到达,则继续等待,若到达,则在步骤 S45 中启动模数转换,使得 ADC 转换模块以供电单元的供电电压为参考电压,将基准电压进行模数转换以得到基准电压的数字量化值;并在步骤 S46 中判断模数转换是否结束,若未结束,则继续进行模数转换,若结束,则在步骤 S47 将基准电压的数字量化值与预设数字量化值进行比较,若基准电压的数字量化值大于预设数字量化值,则输出第一提示信息,否则输出不同于第一提示信息的第二提示信息。
此外,在步骤 S37 和 S47 中也可根据比较结果对供电单元进行低压保护,或进行其他有益的操作。
在本发明的实施例中,基准电压源 200 提供的基准电压可为 2.5V ,也可为其他值。微处理器 100 可为单片机、 CPU 等。
应理解,在本发明的实施例中, ADC 转换模块 101 为微处理器 100 内部的模块,其为实体的硬件模块,例如,型号为 HT46R065B 的微处理器 100 的 A/D 转换器。
应理解,图 3 、图 4 所示为将本发明实施例的供电电压检测系统运用到电子烟中时的电路图,但将本发明实施例的供电电压检测系统运用到电子烟盒、移动电源充电器中时,原理相同,只需要将基准电压源和供电单元根据相应的微处理器的型号进行连接即可。
在本发明的实施例中,供电单元 300 可 为供电电池(例如, 蓄电池、干电池或锂电池)或其他电力装置。
在微处理器的供电电源不恒定的系统中(比如供电电池供电)或恒定的系统中,通过本发明实施例的供电电压检测系统、方法及供电系统,使得 AD 型微处理器的可选用范围大为增加,使选型更加容易,产品的可替代性更强(比如正在适用中的某型号单片机断货,即可迅速的更换其他型号),从而能采用更加便宜经济的微处理器来实现相应的设计方案,增加产品的经济效益、利润空间和产品的竞争力。
将本发明实施例的供电电压检测系统、方法及供电系统运用到电子烟、电子烟盒或电子烟的移动电源充电器中,可降低对 AD 型微处理器的过多苛刻要求,涵盖的类型大为增加,可供选型的型号也极大的增加了,从而可找到更加便宜的微处理器;节省元器件,节省 PCB 面积,节省成本;节省微处理器的 ROM 、 RAM 空间和 CPU 执行时间;更加节省软件代码,降低软件的复杂程度,从而可以选择更小存储空间的单片机,降低成本。
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本发明的保护之内。

Claims (16)

  1. 一种供电电压检测系统,其特征在于,包括:
    基准电压源、微处理器和供电单元;所述微处理器包括电源输入引脚和 ADC 转换模块;
    其中,所述基准电压源分别与所述 ADC 转换模块和供电单元电连接;所述微处理器的电源输入引脚与所述供电单元电连接;所述 ADC 转换模块与所述电源输入引脚电连接;
    基准电压源用于提供稳定的基准电压;
    ADC 转换模块用于采样所述基准电压,并以供电单元的供电电压为参考电压,将所述基准电压进行模数转换以得到所述基准电压的数字量化值;
    所述微处理器用于根据所述数字量化值计算供电电压的电压值;
    其中, Vcc=Vref× ( 2n-1 ) /Dad , Vcc 为所述供电电压的电压值, Vref 为所述基准电压源提供的基准电压的电压值, n 为所述 ADC 转换模块的精度, Dad 为所述基准电压的数字量化值。
  2. 根据权利要求 1 所述的供电电压检测系统,其特征在于,所述微处理器还包括多个 ADC 通道和 ADC 通道选择开关;
    所述 ADC 通道选择开关用于将相应的 ADC 通道与 ADC 转换模块的连接通路导通;
    所述基准电压源与多个 ADC 通道中的任一个 ADC 通道连接。
  3. 根据权利要求 2 所述的 供电电压检测系统 ,其特征在于, 所述基准电压源包括:三端可调分流基准源、第一电阻和第一电容;
    三端可调分流基准源的阴极与所述微处理器的多个 ADC 通道中的任一 ADC 通道连接,并通过第一电阻与供电单元电连接;三端可调分流基准源的阳极分别连接第一电容的负极和接地;三端可调分流基准源的参考端连接第一电容的正极和第一电阻的一端。
  4. 根据权利要求 1 所述的 供电电压检测系统 ,其特征在于, 所述 ADC 转换模块还用于采样到所述基准电压并延迟一预设时长后,以供电单元的供电电压为参考电压,将所述基准 电压进行模数转换以得到所述 基准电压的数字量化值。
  5. 根据权利 要求 1 所述的 供电电压检测系统 ,其特征在于,所述微处理器还用于将所述供电电压的电压值与预设的电压值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
  6. 根据权利要求 1 所述的供电电压检测系统,其特征在于,所述微处理器还用于预设一数字量化值,并将所述基准电压的数字量化值与预设的数字量化值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
  7. 根据权利要求 1 所述的供电电压检测系统,其特征在于,所述基准电压源用于提供稳定的 2.5V 基准电压。
  8. 一种供电系统,其特征在于,包括权利要求 1-7 任一项所述的供电电压检测系统,还包括供电接口;
    所述供电接口与所述供电单元电连接;所述供电接口用于为接入该接口的元件供电。
  9. 根据权利要求 8 所述的供电系统,其特征在于,所述供电系统还包括:开关电路;
    所述开关电路与所述微处理器和供电单元电连接:所述供电接口与所述供电单元和开关电路电连接;
    所述微处理器用于根据供电电压的电压值与预设电压值的比较结果, 控制所述开关电路的导通或截止,以使供电单元给所述供电接口供电或停止给所述供电接口供电。
  10. 根据权利要求 8 所述的供电系统,其特征在于,所述供电系统还包括:提示单元;
    所述提示单元与所述微处理器连接;
    所述微处理器用于根据供电电压的电压值与预设电压值的比较结果, 控制所述提示单元发出提示信息;
    所述提示单元为发光二极管或扬声器。
  11. 一种供电电压检测方法,其特征在于,包括以下步骤:
    采样基准电压源提供的基准电压;
    以供电单元的供电电压为参考电压,将所述基准电压进行模数转换以得到所述基准电压的数字量化值;
    根据所述数字量化值获取供电电压的电压值;
    其中, Vcc=Vref× ( 2n-1 ) /Dad , Vcc 为所述供电电压的电压值, Vref 为所述基准电压的电压值, n 为所述模数转换的精度, Dad 为基准电压的数字量化值。
  12. 根据权利要求 11 所述的供电电压检测方法,其特征在于,所述基准电压源包括:三端可调分流基准源、第一电阻和第一电容;
    三端可调分流基准源的阴极与所述微处理器的一 ADC 通道连接,并通过第一电阻与供电单元电连接;三端可调分流基准源的阳极分别连接第一电容的负极和接地;三端可调分流基准源的参考端连接第一电容的正极和第一电阻的一端。
  13. 根据权利要求 11 所述的 供电电压检测方法 ,其特征在于, 所述 以供电单元的供电电压为参考电压,将所述基准电压进行模数转换以得到所述基准电压的数字量化值进一步包括:
    采样到所述基准电压并延迟一预设时长后,以供电单元的供电电压为参考电压,将所述基准电压进行模数转换以得到所述基准电压的数字量化值。
  14. 根据权利 要求 11 所述的 供电电压检测方法 ,其特征在于,所述方法还包括:
    将所述供电电压的电压值与预设的电压值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
  15. 根据权利要求 11 所述的供电电压检测 方法 ,其特征在于,所述方法还包括:
    预设一数字量化值,并将所述基准电压的数字量化值与预设的数字量化值进行比较,并根据比较结果输出提示信息和 / 或对供电单元进行低压保护。
  16. 根据权利要求 11 所述的供电电压检测 方法 ,其特征在于,所述基准电压源提供稳定的基准电压为 2.5V 。
PCT/CN2013/088896 2013-12-09 2013-12-09 供电电压检测系统、方法及供电系统 WO2015085469A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/088896 WO2015085469A1 (zh) 2013-12-09 2013-12-09 供电电压检测系统、方法及供电系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/088896 WO2015085469A1 (zh) 2013-12-09 2013-12-09 供电电压检测系统、方法及供电系统

Publications (1)

Publication Number Publication Date
WO2015085469A1 true WO2015085469A1 (zh) 2015-06-18

Family

ID=53370440

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/088896 WO2015085469A1 (zh) 2013-12-09 2013-12-09 供电电压检测系统、方法及供电系统

Country Status (1)

Country Link
WO (1) WO2015085469A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105137162A (zh) * 2015-07-28 2015-12-09 东华大学 一种皮安级电流检测器
CN109752593A (zh) * 2019-01-18 2019-05-14 钜泉光电科技(上海)股份有限公司 检测系统和电能计量芯片及其设备
CN113364461A (zh) * 2021-06-24 2021-09-07 苏州磐启微电子有限公司 一种待测芯片的模数转换校准方法及系统
CN114077018A (zh) * 2020-08-17 2022-02-22 广东海信宽带科技有限公司 一种光模块
CN114128926A (zh) * 2021-11-04 2022-03-04 绿烟实业(深圳)有限公司 一种电子烟的烟弹和电子烟

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6798188B2 (en) * 2002-08-29 2004-09-28 Advanced Micro Devices, Inc. Voltage peak measurement with digital memory
US20070078616A1 (en) * 2005-10-03 2007-04-05 Yazaki Corporation Method and apparatus of voltage measurement
CN201937299U (zh) * 2010-12-31 2011-08-17 崧顺电子(深圳)有限公司 一种充电装置
CN102175906A (zh) * 2010-12-31 2011-09-07 崧顺电子(深圳)有限公司 一种检测电压的方法及使用该方法的充电装置
CN102707128A (zh) * 2012-01-10 2012-10-03 河南科技大学 一种基于微控制器的交流信号采集电路及方法
CN102879742A (zh) * 2012-09-12 2013-01-16 卢运娇 一种电池电量检测电路
CN102981041A (zh) * 2012-11-10 2013-03-20 中山普润斯电源设备技术有限公司 一种单体电池监控系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6798188B2 (en) * 2002-08-29 2004-09-28 Advanced Micro Devices, Inc. Voltage peak measurement with digital memory
US20070078616A1 (en) * 2005-10-03 2007-04-05 Yazaki Corporation Method and apparatus of voltage measurement
CN201937299U (zh) * 2010-12-31 2011-08-17 崧顺电子(深圳)有限公司 一种充电装置
CN102175906A (zh) * 2010-12-31 2011-09-07 崧顺电子(深圳)有限公司 一种检测电压的方法及使用该方法的充电装置
CN102707128A (zh) * 2012-01-10 2012-10-03 河南科技大学 一种基于微控制器的交流信号采集电路及方法
CN102879742A (zh) * 2012-09-12 2013-01-16 卢运娇 一种电池电量检测电路
CN102981041A (zh) * 2012-11-10 2013-03-20 中山普润斯电源设备技术有限公司 一种单体电池监控系统

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105137162A (zh) * 2015-07-28 2015-12-09 东华大学 一种皮安级电流检测器
CN109752593A (zh) * 2019-01-18 2019-05-14 钜泉光电科技(上海)股份有限公司 检测系统和电能计量芯片及其设备
CN114077018A (zh) * 2020-08-17 2022-02-22 广东海信宽带科技有限公司 一种光模块
CN114077018B (zh) * 2020-08-17 2023-03-28 广东海信宽带科技有限公司 一种光模块
CN113364461A (zh) * 2021-06-24 2021-09-07 苏州磐启微电子有限公司 一种待测芯片的模数转换校准方法及系统
CN113364461B (zh) * 2021-06-24 2024-05-03 苏州磐启微电子有限公司 一种待测芯片的模数转换校准方法及系统
CN114128926A (zh) * 2021-11-04 2022-03-04 绿烟实业(深圳)有限公司 一种电子烟的烟弹和电子烟
CN114128926B (zh) * 2021-11-04 2023-10-27 绿烟实业(深圳)有限公司 一种电子烟的烟弹和电子烟

Similar Documents

Publication Publication Date Title
WO2015085469A1 (zh) 供电电压检测系统、方法及供电系统
WO2011029334A1 (zh) 一种移动终端供电单元及移动终端供电切换方法
WO2015010261A1 (zh) 一种电子烟usb充电器
WO2014205694A1 (zh) 电子烟及电子烟恒定功率输出方法
WO2014134781A1 (zh) 一种用于电子烟的过流或短路保护的控制装置及方法
WO2014134815A1 (zh) 电子烟的可充电电源保护装置及方法
WO2015113341A1 (zh) 电子设备充电装置及其电源适配器
EP2959753A1 (en) Led driving and dimming circuit and configuration method
WO2015003338A1 (zh) 一种用于电子烟盒的控制电路及其控制方法
CN111601422B (zh) 启动电路及电子设备
WO2015085578A1 (zh) 一种电池放电的过流保护电路及方法
WO2016015356A1 (zh) 交流-直流转换电路
WO2016202061A1 (zh) 一种可降低灯芯数量的线性恒流led驱动装置
WO2015032080A1 (zh) 小电池容量电池杆的充电控制方法以及充电器
CN101107773A (zh) 自激式直流/直流转换器的控制电路和使用了它的发光装置及电子设备
TW201448394A (zh) 具有延遲電路的起動機保護器及延遲電路
CN207184438U (zh) 开关控制电路、开关电路及电子设备
DE69602422D1 (de) Stromversorgungsschaltung
CN207118045U (zh) 一种兼顾开关量和电平量的触发电路
CN110635541A (zh) 电池充电装置
WO2015013942A1 (zh) 电量查询装置及方法
WO2020209532A2 (ko) 카메라와 동조되는 엘이디 스트로보 장치
JP3227594U (ja) 充電器の出力保護装置
CN209133048U (zh) 用于实验教学的无线多功能开发板电路
WO2019006991A1 (zh) 供电驱动模块、供电装置及电子烟

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13899243

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13899243

Country of ref document: EP

Kind code of ref document: A1