CN113193631A - Power supply control device, power supply control method, storage medium, and electronic device - Google Patents

Power supply control device, power supply control method, storage medium, and electronic device Download PDF

Info

Publication number
CN113193631A
CN113193631A CN202110611128.1A CN202110611128A CN113193631A CN 113193631 A CN113193631 A CN 113193631A CN 202110611128 A CN202110611128 A CN 202110611128A CN 113193631 A CN113193631 A CN 113193631A
Authority
CN
China
Prior art keywords
power supply
module
target
control module
state
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
CN202110611128.1A
Other languages
Chinese (zh)
Other versions
CN113193631B (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110611128.1A priority Critical patent/CN113193631B/en
Publication of CN113193631A publication Critical patent/CN113193631A/en
Application granted granted Critical
Publication of CN113193631B publication Critical patent/CN113193631B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/00711Regulation of charging or discharging current or voltage with introduction of pulses during the charging process
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/70Energy storage systems for electromobility, e.g. batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The embodiment of the invention provides a power supply control device, a power supply control method, a storage medium and an electronic device, wherein the device comprises: the control module is used for switching the state of the control module into a working state when the first detection end of the control module detects that the external power supply is switched on, and controlling the switch control module to switch the on-off state when the first detection end of the control module detects that the target button is triggered for more than preset time; and the switch control module is used for controlling the target equipment to switch the charging state. By the method and the device, the system stability of the target device during charging is improved.

Description

Power supply control device, power supply control method, storage medium, and electronic device
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a power supply control device, a power supply control method, a storage medium and an electronic device.
Background
In the related art, when a charging plug is inserted into a charging interface of a target device (e.g., an automobile), a battery management system is actively awakened, whether the currently inserted plug conforms to a charging protocol and whether a voltage range is within an allowable range is determined, and then the charging system is awakened to charge the battery of the target device. The charging device generally comprises a power module, a voltage awakening module and a data processing module, wherein the power module is connected with the voltage awakening module, and the power module is also connected with an external power supply module and the data processing module. The specific working process is that the external charging equipment is inserted to enable the power module to work, so that the data processing module is enabled, and the data processing module can monitor external power supply at the moment to determine whether to awaken the controller to enable charging. The invention patent with application publication number CN107306043A discloses a charging device, the schematic diagram of which can be seen in fig. 1, and as shown in fig. 1, the charging device completes the functions of starting and waking up by controlling whether the power module works or not. And the power module can cause the system to be repeatedly powered up and down due to the shaking when the button is pressed, so that the stability and the reliability of the system are influenced.
Therefore, the related art has the problem that the system stability is poor due to repeated power supply for the control module of the target device when the target device is charged and turned on and off.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
Embodiments of the present invention provide a power supply control apparatus and method, a storage medium, and an electronic apparatus, so as to at least solve a problem in the related art that a system stability is poor due to repeated power supply to a control module of a target device when the target device is charged and turned on and off.
According to an embodiment of the present invention, there is provided a power supply control apparatus including: the control module is used for switching the state of the control module to a working state when the first detection end of the control module detects that the external power supply is connected or the target button is triggered, and controlling the switch control module to switch the on-off state when the control module is in the working state and the first detection end of the control module detects that the target button is triggered for more than a preset time; and the switch control module is used for controlling the target equipment to switch the charging state.
According to another embodiment of the present invention, there is provided a power supply control method, which is applied to the above apparatus embodiment, and includes: judging whether the external power supply is connected to the target equipment or not or whether the target button is triggered or not based on a first detection end of the control module; under the condition that the external power supply is connected or the target button is triggered, switching the state of the control module to a working state; judging whether the target button is triggered for more than preset time or not based on a first detection end of the control module; controlling the switch control module to switch an on-off state under the condition that the target button is determined to be triggered for more than preset time; and under the condition that the switch control module is in an on state, supplying power to the target equipment.
According to yet another embodiment of the invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the first detection end of the control module included in the power supply control device is configured to be connected with an external power supply, the external power supply is used for charging a battery module of a target device, the first detection end of the control module is also configured to be connected with a target button, the control end of the control module is connected with the switch control module, the state of the control module is switched to be in a working state under the condition that the first detection end detects that the external power supply is connected or the target button is triggered, the switch control module is controlled to be in an opening and closing state under the condition that the first detection end detects that the target button is triggered for more than a preset time, and the switch control module is used for controlling the target device to be in a power supply state. When the external power supply is detected to be connected, namely the target equipment is charged, the switch control module is controlled to be switched on and off only under the condition that the target button is triggered for more than the preset time, so that the power supply state of the target equipment is switched. And after the target button is detected to be triggered, the control module is switched to a working state, and the switch control module is controlled to be switched on and off to switch the power supply state of the target equipment only under the condition that the target button is triggered for more than preset time. Therefore, the problem of poor system stability caused by repeated power supply for the control module of the target device during charging and starting of the target device in the related art can be solved, and the system stability of the target device during charging is improved.
Drawings
Fig. 1 is a schematic view of a charging device in the related art;
fig. 2 is a block diagram of the configuration of a power supply control apparatus according to an embodiment of the present invention;
fig. 3 is a circuit diagram of a power supply control apparatus according to an exemplary embodiment of the present invention;
fig. 4 is a block diagram of a power supply control apparatus according to an exemplary embodiment of the present invention;
fig. 5 is a block diagram of a hardware structure of a mobile terminal of a charging control method according to an embodiment of the present invention;
fig. 6 is a flowchart of a charge control method according to an embodiment of the present invention;
fig. 7 is a flowchart of a power supply control method according to an embodiment of the invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In the present embodiment, a power supply control device is provided, and fig. 2 is a block diagram of a power supply control device according to an embodiment of the present invention, and as shown in fig. 2, the device includes:
the control module 22, wherein a first detection end of the control module is configured to be connected to an external power supply, the external power supply is used for charging a battery module of a target device, the first detection end of the control module is further configured to be connected to a target button, a control end of the control module is connected to a switch control module, the control module is configured to switch a state of the control module to an operating state when the first detection end of the control module detects that the external power supply is connected or the target button is triggered, and control the switch control module to switch an open-close state when the control module is in the operating state and the first detection end of the control module detects that the target button is triggered for more than a predetermined time;
the switch control module 24 is configured to control a power supply state of the target device.
In the above embodiment, the target device may be a camera, the power supply control device may be a device for charging a battery of the camera, and the target button may be a power-on button. The control module can be a single chip microcomputer or other processors and the like. The first detection terminal of the control module may be a wake-up port, i.e., a wake-up pin. When the external power supply is connected, the first detection end can detect a high level, and the control module can be awakened, namely, the control module is switched to a working state. After the control module is awakened, when the first detection end of the control module can detect the high level lasting for N seconds, and the target button is determined to be triggered for more than the preset time, the control module can control the switch control module to be switched on to supply power to the target device, namely, the target device is controlled to be switched from the non-power-supply state to the power-supply state. And when the target button is not triggered for more than the preset time, the power is not supplied to the target equipment, and the target equipment is in a power-off charging state.
In the above embodiment, the control module may also be awakened by the target button, that is, when the target button is pressed, a triggering edge is generated, and the control module is changed from the dormant state to the active state. After the control module is awakened, the control module starts to continuously monitor the state of the target button, and if the target button is pressed for a long time (for example, for more than 3 seconds), the control module is started to supply power to the target device. That is, the predetermined time may be 3 seconds (this value is merely an exemplary illustration, and the present invention does not limit the time for which the target button is triggered, and may be, for example, 2 seconds, 4 seconds, and the like).
According to the invention, the first detection end of the control module included in the power supply control device is configured to be connected with an external power supply, the external power supply is used for charging a battery module of a target device, the first detection end of the control module is also configured to be connected with a target button, the control end of the control module is connected with the switch control module, the state of the control module is switched to be in a working state under the condition that the first detection end detects that the external power supply is connected or the target button is triggered, the switch control module is controlled to be in an opening and closing state under the condition that the first detection end detects that the target button is triggered for more than a preset time, and the switch control module is used for controlling the target device to be in a power supply state. When the external power supply is connected or the target button is triggered, namely the target device is charged, the switch control module is controlled to be switched on and switched off only under the condition that the target button is triggered for more than preset time, so that the power supply state of the target device is switched. And after the target button is detected to be triggered, the control module is switched to a working state, and the switch control module is controlled to be switched on and off to switch the power supply state of the target equipment only under the condition that the target button is triggered for more than preset time. Therefore, the problem of poor system stability caused by repeated power supply for the control module of the target device during charging and starting of the target device in the related art can be solved, and the system stability of the target device during charging is improved.
In an exemplary embodiment, the power supply control device further includes a logic module, wherein a first input terminal of the logic module is configured to be connected to the external power supply, a second input terminal of the logic module is configured to be connected to the target button, an output terminal of the logic module is connected to the first detection terminal of the control module, and the logic module is configured to output a second pulse signal when the first pulse signal is collected, so that the second pulse signal is detected by the first detection terminal of the control module. In this embodiment, both the first pulse signal and the second pulse signal may be at a high level. The logic module may be an or gate. The power supply control device can further comprise a logic module, a first input end of the logic module can be connected with an external power supply, a second input end of the logic module can be connected with the target button, and an output end of the logic module can be connected with the first detection end of the control module. When the external power supply is switched on, the first input end of the logic module can detect a high level and output the high level. And when the control module detects a high level, the state of the control module is switched to a working state. The high level detected by the first input terminal may be a high level generated when the external power is switched on, or a high level generated when the target button is triggered. Both ways can wake up the control module. That is, when the target device is in the shutdown state, the single chip microcomputer is in the sleep state, the shutdown current is very small (only uA level), at this time, if the target button is pressed, the target button circuit jumps from the low level to the high level, and the jump edge is sent to the first detection end of the control module via the logic module, and the single chip microcomputer can be awakened as well. The target button can be a self-resetting button, and can automatically bounce when being released after being pressed. When the button is pressed down, the signal output of the target button is high level, and when the button is released, the button is self-reset and output to low level.
In the above embodiment, when the target button is triggered for more than the predetermined time, the second input terminal of the logic module may detect a high level lasting N seconds and output the high level lasting N seconds, and the control module may detect the high level lasting N seconds and determine that the target button is triggered for more than the predetermined time. After determining that the target button is triggered for more than the predetermined time, the control module may control the switch control module to turn on to power on the target device.
In an exemplary embodiment, the power supply control device further includes a pulse generation module, wherein an output terminal of the pulse generation module is connected to the first input terminal of the logic module, an input terminal of the pulse generation module is configured to be connected to the external power supply, and the pulse generation module generates the first pulse signal when the external power supply is connected. In the present embodiment, when an external power source is plugged in, since the external power source voltage is higher than the battery module voltage of the target device, power is supplied from the external power source to the power module and the switch control module. At the moment of external power insertion, the external power output voltage jumps from 0V to the power supply voltage, and the voltage jump is captured by the pulse generation module and generates a high level pulse (corresponding to the first pulse signal). The high level pulse is sent to a wake-up pin (corresponding to the first detection terminal) of a single chip microcomputer (a single chip microcomputer is a control module, hereinafter referred to as a single chip microcomputer) via a logic module, and the single chip microcomputer is woken up from a sleep state to a working state.
In an exemplary embodiment, the pulse generating module includes a target capacitor, a first resistor, and a first diode, wherein a first end of the target capacitor is configured to be connected to the external power source, a second end of the target capacitor is connected to the first end of the first resistor, a second end of the first resistor is connected to ground, a second end of the first resistor is further connected to an input end of the first diode, an output end of the first diode is connected to a first input end of the logic module, and a first input end of the logic module is further connected to a second end of the target capacitor. In this embodiment, referring to fig. 3, the circuit diagram of the power supply control device is shown in fig. 3, and the circuit includes a detection module, a pulse generation module, a logic module, and an MCU (microprocessor, corresponding to the above control module), wherein the pulse generation module may include a target capacitor C1, a first resistor R4, and a first diode D2, when an external power is switched on, the output of the circuit changes from low level to high level through the detection module, and the rising edge level jumps through a differential limiter circuit (i.e., the pulse generation module) of C1, R4, and D2 to generate a pulse signal with a high level lasting for about 1 ms.
In an exemplary embodiment, the power supply control device further includes a detection module, wherein a first end of the detection module is configured to be connected to the external power supply, a second end of the detection module is connected to the input end of the pulse generation module, and a second end of the detection module is further connected to a second detection end of the control module, and the detection module is configured to output a target voltage when the external power supply is detected to be connected. In this embodiment, the first end of the detection module may be connected to an external power source, and the second end of the detection module is connected to the second detection end of the control module. When the single chip microcomputer is recovered to a working state from an awakening state, a signal output by the voltage detection module is detected so as to judge whether external power supply is currently performed. And when the external power supply is determined to be accessed, the switch control module is controlled to be started to power on the target equipment. After the target device is powered on, whether the target button is triggered for more than 3 seconds (the time is only an exemplary illustration, the triggering time is not limited in the present invention, the same is applied below) can be detected through the logic module, and if the target button is triggered for more than 3 seconds, the switch control module is controlled to be turned off, and the target device is powered off. If the external power supply is still in the access state detected by the detection module, the target device is in a shutdown charging state. And if the external power supply is detected to be in the off state, the singlechip enters the dormant state. Referring to fig. 4, as shown in fig. 4, the power supply control apparatus includes: the device comprises a power module, a detection module, a pulse generation module, a logic module, a control module and a switch control module. When the external power source is plugged in, since the external power source voltage is higher than the battery module voltage, power is supplied from the external power source to the power module and the switch control module. At the moment of external power supply insertion, the external power supply output voltage jumps from 0V to the power supply voltage, and the power supply jump is captured by the pulse generation module and generates a high-level pulse. The high-level pulse gives the awakening pin of the single chip microcomputer through the logic module, the single chip microcomputer is awakened to a working state from a dormant state, and the single chip microcomputer can detect a signal output by the voltage detection module when being recovered to the working state from the awakening state so as to judge whether the current power supply is external power supply. In addition, when the equipment is in a shutdown state, the single chip microcomputer is in a dormant state, the shutdown current is very small (only uA level), at the moment, if the button switch is pressed, the button switch circuit jumps from low level to high level, the jumping edge is sent to a wakeup pin of the single chip microcomputer through the logic module, and the single chip microcomputer can be woken up as well.
In an exemplary embodiment, the detection module includes a second diode, a second resistor, a third resistor, a target transistor, and a not gate, wherein a first terminal of the second diode is configured to be connected to the external power source, a second terminal of the second diode is connected to the first terminal of the second resistor, a second terminal of the second resistor is connected to a base of the target transistor, an emitter of the target transistor is grounded, a collector of the target transistor is connected to the first terminal of the third resistor and the first terminal of the not gate, a second terminal of the third resistor is connected to a power supply, and a second terminal of the not gate is connected to the input terminal of the pulse generation module. In the present embodiment, referring to fig. 3, a circuit diagram of the detection module is shown, and as shown in fig. 3, the detection module includes a second diode D1, a second resistor R1, a third resistor R3, and a not gate U1A. The second diode D1 may be a zener diode, and the not gate may be a schmitt trigger. As shown in fig. 3, the logic module may be an or gate, and performs logical or between the signal generated when the target button is triggered and the pulse signal generated when the external power is switched on. When the button is not pressed and the external power is switched on, the logic module outputs a pulse signal with a high level lasting about 1ms to the MCU to wake up the MCU (corresponding to the control module). When the button is pressed, the logic module will output a high level, also waking up the MCU. When the target button is not triggered and no power-on pulse is generated, the logic module outputs a low level consistent with the power-on button signal.
It should be noted that the resistance values of the resistors in fig. 3 are only an exemplary illustration, and the invention does not limit the resistance values of the resistors.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the operation on the mobile terminal as an example, fig. 5 is a hardware structure block diagram of the mobile terminal of a charging control method according to an embodiment of the present invention. As shown in fig. 5, the mobile terminal may comprise one or more processors 502 (only one is shown in fig. 5) (the processor 502 may comprise, but is not limited to, a processing means such as a microprocessor MCU or a programmable logic device FPGA) and a memory 504 for storing data, wherein the mobile terminal may further comprise a transmission device 506 for communication functions and an input-output device 508. It will be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration and is not intended to limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
The memory 504 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the charging control method in the embodiment of the present invention, and the processor 502 executes various functional applications and data processing by running the computer programs stored in the memory 504, that is, implementing the method described above. The memory 504 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 504 may further include memory located remotely from the processor 502, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 506 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 506 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 506 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In the present embodiment, a charging control method is provided, and fig. 6 is a flowchart of the charging control method according to the embodiment of the present invention, as shown in fig. 6, the flowchart includes the following steps:
step S602, judging whether the external power supply is connected to the target device or not or whether the target button is triggered or not based on the first detection end of the control module;
step S604, under the condition that the external power supply is connected or the target button is triggered, switching the state of the control module to a working state;
step S606, judging whether the target button is triggered for more than preset time based on the first detection end of the control module;
step S608, controlling the switch control module to switch the on-off state when it is determined that the target button is triggered for more than the predetermined time;
step S610, switching a power supply state of the target device based on the open/close state.
In the above embodiment, the target device may be a camera, the power supply control device may be a device for charging a battery of the camera, and the target button may be a power-on button. The control module can be a single chip microcomputer or other processors and the like. The first detection terminal of the control module may be a wake-up port, i.e., a wake-up pin. And under the condition that the external power supply is determined to be accessed into the target equipment according to the first detection end of the control module, switching the state of the control module into a working state. And whether the target button is triggered for more than preset time can be determined according to the first detection end of the control module, and the control switch control module is controlled to switch the on-off state under the condition that the target button is triggered for more than preset time, and the power supply state of the target equipment is switched according to the on-off state. And when the target button is not triggered for more than the preset time, the power is not supplied to the target equipment, and the target equipment is in a power-off charging state.
In the above embodiment, the control module may also be awakened by the target button, that is, when the target button is pressed, a triggering edge is generated, and the control module is changed from the dormant state to the active state. After the control module is awakened, the control module starts to continuously monitor the state of the target button, and if the target button is pressed for a long time (for example, for more than 3 seconds), the control module is started to supply power to the target device. That is, the predetermined time may be 3 seconds (this value is merely an exemplary illustration, and the present invention does not limit the time for which the target button is triggered, and may be, for example, 2 seconds, 4 seconds, and the like).
Optionally, the main body of the above steps may be a control module or a background processor, or other devices with similar processing capabilities, and may also be a machine integrated with at least a data processing device, where the data processing device may include a terminal such as a computer, a mobile phone, and the like, but is not limited thereto.
Through the steps, whether an external power supply is connected to the target device or not is judged according to the first detection end of the control module, and the state of the control module is switched to be in a working state under the condition that the external power supply is connected or the target button is triggered. The method comprises the steps that whether a target button is triggered for more than preset time or not is judged according to a first detection end of a control module, the control switch control module is controlled to switch an opening and closing state under the condition that the target button is triggered for more than preset time, and then the power supply state of target equipment is switched according to the opening and closing state. Under the condition that the control module is awakened, the power supply state of the target device is switched only when the target button is triggered for more than the preset time, so that the problem that the system stability is poor due to repeated power supply for the control module of the target device during charging and power on and power off of the target device in the related art can be solved, and the system stability of the target device during charging is improved.
In an exemplary embodiment, after determining whether the target button is triggered based on the first detection end of the control module, the method further includes: determining an output voltage of the detection module if it is determined that the target button is not triggered; under the condition that the output voltage of the detection module is a first voltage, determining that the target equipment is in a shutdown charging state; and controlling the target state of the control module to be a dormant state under the condition that the output voltage of the detection module is a second voltage. In this embodiment, in the case where the target button is not triggered, it may be determined that the target device is in the power-off state. And then determining the output voltage of the detection module, and when the output voltage of the detection module is the first voltage, determining that the target device is connected to an external power supply, namely the target device is in a shutdown charging state. When the output voltage of the detection module is the second voltage, it may be determined that the target device does not access the external power source, and the control module is caused to enter a sleep state. The first voltage may be a high voltage, and the second voltage may be a low voltage.
In one exemplary embodiment, switching the power supply state of the target device based on the open/close state includes: under the condition that the on-off state indicates that the switch control module is started, switching the power supply state of the target equipment from non-power supply to power supply; and under the condition that the opening and closing state indicates that the switch control module is closed, switching the power supply state of the target equipment from power supply to non-power supply. In this embodiment, when the switch control module is turned on, the power supply state of the target device is switched from non-power supply to power supply. When the target button is triggered again, the switch control module is in an on state, and the power supply state of the target equipment is switched from non-power supply to power supply. When the power supply state of the target equipment is power supply, whether the switch button is triggered or not can be continuously detected, and when the switch button is triggered, the switch control module is closed, and the power supply state of the target equipment is switched from power supply to non-power supply.
The following describes a power supply control method with reference to a specific embodiment:
fig. 7 is a flowchart of a power supply control method according to an embodiment of the present invention, and as shown in fig. 7, the flowchart includes:
and step S702, starting to enable the single chip microcomputer to be in a dormant state.
In step S704, the external power source trigger or the button trigger outputs a trigger signal via the logic module.
Step S706, the single chip microcomputer is triggered to be in a working state from a dormant state.
In step S708, it is detected whether the power-on button (i.e., the logic module output) is kept pressed for more than 3 seconds. If so, go to step S710. If not, go to step S712.
Step S710, the equipment is started, the switch control module is turned on, and the rear-stage system is electrified.
In step S712, the output of the detection module is determined to determine whether the external power source is powered. If yes, step S714 is performed, and if no, step S716 is performed.
In step S714, the shutdown charging state is displayed.
In step S716, the single chip enters a sleep state.
Step S718 ends.
In step S720, it is cyclically detected whether the power-on button (corresponding to the target button, i.e. the logic module output) is kept pressed for more than 3 seconds. If yes, go to step S722, if no, go to step S720.
And step S722, the equipment is shut down, the switch control module is closed, and the rear-stage system is powered off.
In the embodiment, the starting and waking functions are completed by controlling the waking module of the single chip microcomputer, and the waking pin of the single chip microcomputer is used as starting trigger, so that compared with a pure switch bootstrap circuit, the power supply is prevented from being repeatedly turned on and off, and the stability is higher. The low-power-consumption shutdown and charging wake-up functions can be realized by a simple circuit, the circuit is simpler to realize, and the system stability is higher.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A power supply control device characterized by comprising:
the control module is used for switching the state of the control module to a working state when the first detection end of the control module detects that the external power supply is connected or the target button is triggered, and controlling the switch control module to switch the on-off state when the control module is in the working state and the first detection end of the control module detects that the target button is triggered for more than a preset time;
and the switch control module is used for controlling the target equipment to switch the power supply state.
2. The power supply control device according to claim 1, further comprising a logic module, wherein a first input terminal of the logic module is configured to be connected to the external power source, a second input terminal of the logic module is configured to be connected to the target button, an output terminal of the logic module is connected to the first detection terminal of the control module, and the logic module is configured to output a second pulse signal when the first pulse signal is collected, so that the second pulse signal is detected by the first detection terminal of the control module.
3. The power supply control device according to claim 2, further comprising a pulse generation module, wherein an output of the pulse generation module is connected to the first input of the logic module, an input of the pulse generation module is configured to be connected to the external power supply, and the pulse generation module generates the first pulse signal when the external power supply is connected.
4. The power supply control device according to claim 3, wherein the pulse generation module comprises a target capacitor, a first resistor, and a first diode, wherein a first end of the target capacitor is configured to be connected to the external power source, a second end of the target capacitor is connected to a first end of the first resistor, a second end of the first resistor is connected to ground, a second end of the first resistor is further connected to an input end of the first diode, an output end of the first diode is connected to a first input end of the logic module, and a first input end of the logic module is further connected to a second end of the target capacitor.
5. The power supply control device according to claim 3, further comprising a detection module, wherein a first end of the detection module is configured to be connected to the external power supply, a second end of the detection module is connected to the input end of the pulse generation module, and a second end of the detection module is further connected to a second detection end of the control module, and the detection module is configured to output a target voltage when the external power supply is detected to be connected.
6. The power supply control device according to claim 5, wherein the detection module comprises a second diode, a second resistor, a third resistor, a target transistor and a not gate, wherein a first end of the second diode is configured to be connected to the external power supply, a second end of the second diode is connected to a first end of the second resistor, a second end of the second resistor is connected to a base of the target transistor, an emitter of the target transistor is grounded, a collector of the target transistor is connected to a first end of the third resistor and a first end of the not gate, a second end of the third resistor is connected to a power supply, and a second end of the not gate is connected to the input end of the pulse generation module.
7. A power supply control method applied to the apparatus according to any one of claims 1 to 6, comprising:
judging whether the external power supply is connected to the target equipment or not or whether the target button is triggered or not based on a first detection end of the control module;
under the condition that the external power supply is connected or the target button is triggered, switching the state of the control module to be a working state;
judging whether the target button is triggered for more than the preset time or not based on a first detection end of the control module;
controlling the switch control module to switch an on-off state under the condition that the target button is determined to be triggered for more than the preset time;
and switching the power supply state of the target equipment based on the opening and closing state.
8. The method of claim 7, wherein after determining whether the target button is actuated for more than the predetermined time based on the first detection end of the control module, the method further comprises:
determining an output voltage of the detection module in a case where it is determined that the target button is not triggered for more than the predetermined time;
under the condition that the output voltage of the detection module is a first voltage, determining that the target equipment is in a shutdown charging state;
and controlling the target state of the control module to be a dormant state under the condition that the output voltage of the detection module is a second voltage.
9. The method of claim 7, wherein switching the power state of the target device based on the on-off state comprises:
under the condition that the on-off state indicates that the switch control module is started, switching the power supply state of the target equipment from non-power supply to power supply;
and under the condition that the opening and closing state indicates that the switch control module is closed, switching the power supply state of the target equipment from power supply to non-power supply.
10. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method of one of claims 7 to 9.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 7 to 9.
CN202110611128.1A 2021-06-01 2021-06-01 Power supply control device, power supply control method, storage medium, and electronic device Active CN113193631B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110611128.1A CN113193631B (en) 2021-06-01 2021-06-01 Power supply control device, power supply control method, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110611128.1A CN113193631B (en) 2021-06-01 2021-06-01 Power supply control device, power supply control method, storage medium, and electronic device

Publications (2)

Publication Number Publication Date
CN113193631A true CN113193631A (en) 2021-07-30
CN113193631B CN113193631B (en) 2022-08-16

Family

ID=76986305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110611128.1A Active CN113193631B (en) 2021-06-01 2021-06-01 Power supply control device, power supply control method, storage medium, and electronic device

Country Status (1)

Country Link
CN (1) CN113193631B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114698074A (en) * 2022-04-07 2022-07-01 广州航天海特系统工程有限公司 Energy-saving method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015089206A (en) * 2013-10-30 2015-05-07 株式会社デンソー On-vehicle charging system
CN105223858A (en) * 2014-06-13 2016-01-06 深圳市双赢伟业科技股份有限公司 A kind of switching on and shutting down control circuit of electronic equipment
CN107306043A (en) * 2016-04-25 2017-10-31 华为技术有限公司 The control method of charging Rouser and the Rouser that charges
CN111049233A (en) * 2020-01-06 2020-04-21 广州市申迪计算机系统有限公司 Power supply control method, device and system of inspection equipment
CN111327094A (en) * 2020-02-25 2020-06-23 东莞市峰谷科技有限公司 Low pressure BMS dormancy and awaken power supply control device up
CN212484119U (en) * 2020-07-09 2021-02-05 Tcl通力电子(惠州)有限公司 Power switch control circuit and device
CN112639634A (en) * 2020-05-07 2021-04-09 深圳市大疆创新科技有限公司 On-off control device and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015089206A (en) * 2013-10-30 2015-05-07 株式会社デンソー On-vehicle charging system
CN105223858A (en) * 2014-06-13 2016-01-06 深圳市双赢伟业科技股份有限公司 A kind of switching on and shutting down control circuit of electronic equipment
CN107306043A (en) * 2016-04-25 2017-10-31 华为技术有限公司 The control method of charging Rouser and the Rouser that charges
CN111049233A (en) * 2020-01-06 2020-04-21 广州市申迪计算机系统有限公司 Power supply control method, device and system of inspection equipment
CN111327094A (en) * 2020-02-25 2020-06-23 东莞市峰谷科技有限公司 Low pressure BMS dormancy and awaken power supply control device up
CN112639634A (en) * 2020-05-07 2021-04-09 深圳市大疆创新科技有限公司 On-off control device and electronic equipment
CN212484119U (en) * 2020-07-09 2021-02-05 Tcl通力电子(惠州)有限公司 Power switch control circuit and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CSERNÁTH GÉZA: "Embeddable, smart, DC operated UPS for small and mid sized battery backup applications", 《2012 13TH INTERNATIONAL CONFERENCE ON OPTIMIZATION OF ELECTRICAL AND ELECTRONIC EQUIPMENT (OPTIM)》 *
付贝贝等: "极低功耗待机电路的研制", 《微型机与应用》 *
邹传彬等: "一种没有待机电流的开关机电路的设计", 《电子世界》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114698074A (en) * 2022-04-07 2022-07-01 广州航天海特系统工程有限公司 Energy-saving method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113193631B (en) 2022-08-16

Similar Documents

Publication Publication Date Title
KR102015009B1 (en) Method, battery management system and vehicle for charging awakening
CN112039153B (en) On-chip system, battery pack and electronic device
CN111987772B (en) On-chip system, battery pack and electronic device
CN109904886B (en) Control circuit module and control method thereof
CN111987771B (en) On-chip system, battery pack and electronic device
CN112639634A (en) On-off control device and electronic equipment
US20180123183A1 (en) Control circuit, battery having the control circuit and battery control method
CN113193631B (en) Power supply control device, power supply control method, storage medium, and electronic device
CN112616178A (en) Energy consumption management method and device, electronic equipment and storage medium
CN219436644U (en) Battery protection circuit, battery pack and electronic device
CN105204601A (en) System automatic power-on circuit and method
CN213601084U (en) Switch control circuit and endoscope system
CN112865248B (en) Method and device for detecting box entering of wireless earphone, charging box and readable storage medium
CN112866857B (en) Automatic Bluetooth headset reconnection method, Bluetooth headset charging box and readable storage medium
CN107561991B (en) Startup and shutdown management circuit and terminal
WO2021078261A1 (en) Power supply control method, system and device
CN112838645A (en) Charging control method and device for charging box, charging box and readable storage medium
WO2018219175A1 (en) Battery circuit, battery device, electronic cigarette and power supply control method
CN115882555A (en) Electronic device and power supply method thereof
CN111669158B (en) Portable multifunctional switch circuit
CN212289727U (en) Vehicle power-on and power-off control circuit
CN112865224A (en) Bluetooth headset low-power-consumption standby method, electronic equipment, medium and charging system
CN110967999A (en) Power consumption control device and communication system
CN218549913U (en) Positioning module and self-moving equipment
CN219435243U (en) Dormancy wake-up circuit, motor controller and vehicle

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