CN112327696B - Key control circuit - Google Patents

Key control circuit Download PDF

Info

Publication number
CN112327696B
CN112327696B CN202011223154.9A CN202011223154A CN112327696B CN 112327696 B CN112327696 B CN 112327696B CN 202011223154 A CN202011223154 A CN 202011223154A CN 112327696 B CN112327696 B CN 112327696B
Authority
CN
China
Prior art keywords
control unit
power supply
key
switch
pin
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.)
Active
Application number
CN202011223154.9A
Other languages
Chinese (zh)
Other versions
CN112327696A (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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202011223154.9A priority Critical patent/CN112327696B/en
Publication of CN112327696A publication Critical patent/CN112327696A/en
Application granted granted Critical
Publication of CN112327696B publication Critical patent/CN112327696B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention discloses a key control circuit, comprising: the system comprises a micro control unit, a battery power supply, a switch unit and a switch control unit; the micro control unit is respectively connected with the switch unit and the switch control unit, and the switch unit is also respectively connected with the battery power supply and the switch control unit; the battery power supply supplies power to the micro control unit through the switch control unit; the switch unit outputs a high-level key signal to the switch control unit when a key is pressed down, and outputs a low-level state signal with different time lengths to the micro control unit according to the duration time of the key pressing; the micro control unit outputs corresponding high-level or low-level control signals to the switch control unit according to the low-level state signals with different time lengths output by the switch unit so as to control the switch control unit to be switched on or switched off. The key control circuit can realize multiple function control through the design of one key, occupies less I/O port resources, and has the characteristics of small volume, low power consumption, simplicity, convenience and easiness in operation.

Description

Key control circuit
Technical Field
The invention belongs to the field of circuit control, and particularly relates to a key control circuit.
Background
In current consumer electronics, the key mainly functions on/off and bluetooth pairing, and these functions are implemented by controlling through different I/O ports (I/O is an abbreviation of Input/Output, i.e., Input/Output ports), and different functions correspond to different I/O ports, which requires occupation of many I/O port resources, however, the I/O port resources are limited.
Disclosure of Invention
In view of the above, the present invention discloses a key control circuit to overcome the above problems or at least partially solve the above problems.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention discloses a key control circuit, which comprises: the system comprises a micro control unit, a battery power supply, a switch unit and a switch control unit;
the micro control unit is respectively connected with the switch unit and the switch control unit, and the switch unit is also respectively connected with the battery power supply and the switch control unit; the battery power supply supplies power to the micro control unit through the switch control unit;
the switch unit outputs a high-level key signal to the switch control unit when a key is pressed down, and outputs a low-level state signal with different time lengths to the micro control unit according to the duration time of the key pressing;
and the micro control unit outputs corresponding high-level or low-level control signals to the switch control unit according to the low-level state signals with different time lengths output by the switch unit so as to control the switch control unit to be switched on or switched off.
Furthermore, when the switch unit is pressed for a first preset time after the key is pressed down continuously, the micro control unit outputs a high-level control signal to the switch control unit, the switch control unit is conducted, and the battery power supply supplies power to the micro control unit to realize the starting of the system;
when the key is continuously pressed for a second preset time, the micro control unit outputs a low level control signal to the switch control unit, the switch control unit is disconnected, and the battery power supply stops supplying power to the micro control unit to realize the closing of the system;
when the key is continuously pressed for a third preset time, the micro control unit outputs a low-level control signal to the switch control unit firstly and then outputs a high-level control signal, and the switch control unit is disconnected firstly and then is connected to realize the restart of the system;
the second preset time is longer than the first preset time and shorter than the third preset time.
Furthermore, the key control circuit also comprises a charging control unit, wherein the charging control unit is connected with the micro control unit and is connected with the battery power supply through the switch control unit;
when the charging control unit is not connected with an external power supply, the charging control unit controls the battery power supply to supply power to the micro control unit; when the charging control unit is connected with an external power supply, the charging control unit controls the external power supply to supply power to the micro control unit and controls the external power supply to charge the battery power supply.
Further, in the process of pressing the key in the switch unit, the charging control unit and the switch control unit are synchronously turned off or turned on.
Further, the charge control unit includes: the charging chip is provided with an external power supply input pin, a system power supply output pin, a battery charging pin (BAT _ Chg), an I2C bus pin and an interrupt pin (INT);
the charging chip is connected with the switch control unit through the battery charging pin (BAT _ Chg), and is connected with the micro control unit through the I2C bus pin and the interrupt pin (INT);
when the external power supply input pin of the charging chip is connected with an external power supply (VIN), the system power supply output pin outputs a system power supply (VSYS) to the outside, and meanwhile, the battery charging pin (BAT _ Chg) charges the battery power supply.
Further, the micro control unit includes: the micro-control chip is provided with a State signal input pin (State), a control signal output pin (Hold), a working power supply input pin, an I2C bus pin and an interrupt pin (INT);
the State signal input pin (State) is used for being connected with a State signal output end of the switch unit, the control signal output pin (Hold) is used for being connected with a control signal input end of the switch control unit, the micro control chip obtains a working power supply (VCC) through the working power supply input pin, and is connected with the charging control unit through the I2C bus pin and the interrupt pin (INT);
and when the key in the switch unit is continuously pressed for the third preset time, the micro control unit outputs an interrupt signal to the charging chip through the interrupt pin (INT) to close the work of the charging chip.
Further, the switching unit includes: the key comprises a first resistor (R1), a key (SW1), a second resistor (R2), a fourth resistor (R4), a first N-MOS (Q1), a first diode (D1), a second diode (D2), a first capacitor (C1), a third resistor (R3), a key signal output end and a state signal output end;
one end of the key (SW1) is respectively connected with one end of the first resistor (R1) and one end of the first diode (D1), the other end of the first resistor (R1) is connected with the battery power supply, the other end of the first diode (D1) is grounded, the other end of the key (SW1) is respectively connected with one end of the second resistor (R2) and the key signal output end, the other end of the second resistor (R2) is connected with the grid of the first N-MOS tube (Q1), the other end of the key (SW1) is also respectively connected with one end of the second diode (D2) and one end of the first capacitor (C1), the other ends of the second diode (D2) and the first capacitor (C1) are respectively grounded, the drain of the first N-MOS tube (Q1) is respectively connected with one end of the fourth resistor (R4) and the state signal output end, the source electrode of the first N-MOS transistor (Q1) is grounded, and the third resistor (R3) is connected between the grid electrode and the source electrode of the first N-MOS transistor (Q1);
wherein, the other end of fourth resistance (R4) is used for to little the control unit output working power supply (VCC), button signal output part is used for connecting the button signal input part of on-off control unit, State signal output part is used for connecting little the control unit's State signal input pin (State).
Further, the switch control unit includes: a fourth diode (D4), a fifth diode (D5), a third N-MOS transistor (Q3), a second P-MOS transistor (Q2), a fifth resistor (R5), a sixth resistor (R6), a second capacitor (C2), a third capacitor (C3), a key signal input end and a control signal input end;
the gates of the third N-MOS transistor (Q3) are respectively connected to the cathodes of the fourth diode (D4) and the fifth diode (D5), the anode of the fourth diode (D4) is connected to the key signal input terminal, the cathode of the fourth diode (D4) is further connected to one end of the third capacitor (C3), the other end of the third capacitor (C3) is grounded, the anode of the fifth diode (D5) is connected to the control signal input terminal, the source of the third N-MOS transistor (Q3) is grounded, the drain of the third N-MOS transistor (Q3) is connected to the gate of the second P-MOS transistor (Q2), the source of the second P-MOS transistor (Q2) is respectively connected to the battery power supply and one end of the second capacitor (C2), the other end of the second capacitor (C2) is grounded, and the fifth resistor (R5) is connected between the sources of the second P-MOS transistor (Q2) and the source of the second capacitor (C2), the sixth resistor (R6) is connected between the gate and the source of the third N-MOS transistor (Q3);
the drain electrode of the second P-MOS tube (Q2) is used for being connected with a battery charging pin (BAT _ Chg) of the charging control unit, the key signal input end is used for being connected with the key signal output end of the switch unit, and the control signal input end is used for being connected with a state signal output pin (Hold) of the micro control unit.
Further, the switch control unit further includes: a third diode (D3); the cathode of the third diode (D3) is connected with the grid electrode of the third N-MOS tube (Q3), and the anode of the third diode (D3) is connected with an external power supply detection terminal (VCHG);
when the external power supply input pin of the charging chip is connected with an external power supply (VIN), the external power supply detection end (VCHG) outputs a high level, the third N-MOS transistor (Q3) and the second P-MOS transistor (Q2) are simultaneously conducted, and the external power supply (VIN) charges the battery power supply.
Furthermore, the key control circuit also comprises a voltage conversion unit;
the voltage conversion unit is connected between the micro control unit and the charging control unit and used for performing voltage conversion on a system power supply (VSYS) output by the charging control unit and converting the voltage conversion into a working power supply (VCC) required by the work of the micro control unit.
The invention has the advantages and beneficial effects that:
in the key control circuit, the control of multiple functions can be realized through the design of one key, the occupied I/O port resource is less, and the key control circuit has the characteristics of small volume, simple circuit structure, low power consumption, simplicity, convenience and easiness in operation.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic diagram illustrating a connection relationship of a key control circuit according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a connection relationship of a key control circuit according to an embodiment of the present invention;
FIG. 3 is a schematic circuit diagram of a key control circuit according to an embodiment of the present invention;
FIG. 4 is a circuit diagram of a key control circuit according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail and fully with reference to the accompanying drawings. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
In an embodiment of the present invention, a key control circuit is disclosed, as shown in fig. 1, the key control circuit includes: a switch unit 01, a micro control unit 02, a switch control unit 03 and a battery power source 04.
The micro control unit 02 is respectively connected with the switch unit 01 and the switch control unit 03, and the switch unit 01 is also respectively connected with the battery power supply 04 and the switch control unit 03; the battery power supply 04 supplies power to the micro control unit 02 via the switch control unit 03; the battery power source 04 provides a pull-up voltage to the switching unit 01.
When the switch unit 01 presses a key, the switch unit 01 outputs a high-level key signal to the switch control unit 03, and the switch unit 01 outputs a low-level state signal having a different time length to the micro control unit 02 according to the duration of the key press.
The micro control unit 02 outputs a corresponding high-level or low-level control signal to the switch control unit 03 according to the low-level state signal with different time lengths output by the switch unit 01, so as to control the switch-on or switch-off of the switch control unit 03, and further realize the power supply or power failure of the micro control unit 02 by the battery power supply 04.
In the key control circuit of the embodiment, the control of multiple functions can be realized through the design of one key, the occupied I/O port resources are less, and the key control circuit has the characteristics of small volume, simple circuit structure, low power consumption, simplicity, convenience and easiness in operation.
Specifically, when the switch unit 01 is pressed down for a first preset time, the micro control unit 02 outputs a high level control signal to the switch control unit 03, the switch control unit 03 is turned on, and the battery power supply 04 supplies power to the micro control unit 02 to start the system.
When the key is continuously pressed for the second preset time, the micro control unit 02 outputs a low level control signal to the switch control unit 03, the switch control unit 03 is disconnected, and the battery power supply 04 stops supplying power to the micro control unit 02, so that the system is turned off.
When the key is continuously pressed for the third preset time, the micro control unit 02 outputs a low level control signal to the switch control unit 03 first and then outputs a high level control signal, and the switch control unit 03 is turned off first and then turned on, so that the system is restarted.
The second preset time is longer than the first preset time and shorter than the third preset time.
Of course, the keys of the key control circuit in this embodiment are not limited to implementing the control of the three different functions, and the control of more functions can be implemented by setting other preset time. For example, a fourth preset time is set, the fourth preset time is longer than the third preset time, and when the key is continuously pressed for the fourth preset time, the system enters the sleep mode.
Preferably, as shown in fig. 2, the key control circuit further includes a charging control unit 05, and the charging control unit 05 is connected to the micro control unit 02 and connected to the battery power source 04 via the switch control unit 03.
When the charging control unit 05 is not connected with an external power supply, the charging control unit 05 controls the battery power supply 04 to supply power to the micro control unit 02; when the charging control unit 05 is connected to the external power supply, the charging control unit 05 controls the external power supply to supply power to the micro control unit 02, and controls the external power supply to charge the battery power supply 04.
Preferably, the charging control unit 05 is turned off or on in synchronization with the switching control unit 03 during a key depression in the switching unit 01. Because the charging control unit 05 and the switch control unit 03 control the battery power supply 04 to supply power to the micro control unit 02 together, when the micro control unit 02 is powered off, as long as one of the charging control unit 05 and the switch control unit 03 is turned off, the micro control unit 02 is powered off, and the turn-off speeds of the charging control unit 05 and the switch control unit 03 may be different, so that the synchronous turn-off of the charging control unit 05 and the switch control unit 03 can effectively save the power consumption of the system.
In one embodiment, as shown in fig. 3 and 4, the charging control unit 05 includes: the charging chip (Charger) is provided with an external power supply input pin, a system power supply output pin, a battery charging pin (BAT _ Chg), an I2C bus pin and an interrupt pin (INT).
The charging chip (Charger) is connected with the switch control unit 03 through a battery charging pin (BAT _ Chg), the micro control unit 02 is connected with the interrupt pin (INT) through an I2C bus pin, and the micro control unit 02 controls the charging chip (Charger) to be turned off or turned on through the interrupt pin (INT).
When the external power input pin of the charging chip (Charger) is connected with an external power supply (VIN), the system power output pin outputs the system power (VSYS) to the outside, and the battery charging pin (BAT _ Chg) charges the battery power 04 through the switch control unit 03. When the charging chip (Charger) is not connected with the external power supply (VIN), the battery power supply 04 supplies power to the charging chip (Charger) through the battery charging pin (BAT _ Chg).
In one embodiment, as shown in fig. 3 and 4, the micro control unit 02 includes: the micro control chip (MCU) is provided with a State signal input pin (State), a control signal output pin (Hold), a working power supply input pin, an I2C bus pin and an interrupt pin (INT).
The State signal input pin (State) is used for being connected with a State signal output end of the switch unit 01, the control signal output pin (Hold) is used for being connected with a control signal input end of the switch control unit 03, the micro control chip (MCU) obtains a working power supply (VCC) through the working power supply input pin, and the micro control chip (MCU) is connected with the charging control unit 05 through an I2C bus pin and an interrupt pin (INT).
When the key in the switch unit 01 is continuously pressed for a third preset time, the micro control unit 02 outputs an interrupt signal to the charging chip (Charger) through the interrupt pin (INT), and the charging chip (Charger) is turned off.
In one embodiment, as shown in fig. 3 and 4, the switching unit 01 includes: the circuit comprises a first resistor (R1), a key (SW1), a second resistor (R2), a fourth resistor (R4), a first N-MOS transistor (Q1), a key signal output end and a state signal output end; the switching unit 01 further includes: the circuit comprises a first diode (D1), a second diode (D2), a first capacitor (C1) and a third resistor (R3). The first diode (D1) and the second diode (D2) are two voltage stabilizing diodes which are connected in series in an opposite direction, and the overvoltage protection effect is achieved; the first resistor (R1), the second resistor (R2) and the fourth resistor (R4) play a role in limiting current.
One end of a key (SW1) is respectively connected with one end of a first resistor (R1) and one end of a first diode (D1), the other end of the first resistor (R1) is connected with a battery power supply 04, the other end of the first diode (D1) is grounded, the other end of the key (SW1) is respectively connected with one end of a second resistor (R2) and a key signal output end, the other end of the second resistor (R2) is connected with a grid electrode of a first N-MOS tube (Q1), the other end of the key (SW1) is also respectively connected with one end of a second diode (D2) and one end of a first capacitor (C1), the other ends of the second diode (D2) and the first capacitor (C1) are respectively grounded, the first capacitor (C1) plays a role in filtering, the drain electrode of the first N-MOS tube (Q1) is respectively connected with one end of a fourth resistor (R4) and a state signal output end, and the source electrode of the first N-MOS tube (Q1) is grounded; the third resistor (R3) is connected between the grid electrode and the source electrode of the first N-MOS transistor (Q1) and plays a role in discharging charges.
The other end of the fourth resistor (R4) is used to output a working power supply (VCC) to the micro control unit 02, the key signal output end is used to connect the key signal input end of the switch control unit 03, and the status signal output end is used to connect the status signal input pin (State) of the micro control unit 02.
In one embodiment, as shown in fig. 3 and 4, the switch control unit 03 includes: a fourth diode (D4), a fifth diode (D5), a third N-MOS transistor (Q3), a second P-MOS transistor (Q2) and a key signal input end and a control signal input end; the switch control unit 03 further includes: a fifth resistor (R5), a sixth resistor (R6), a second capacitor (C2) and a third capacitor (C3); the second capacitor (C2) and the third capacitor (C3) function as filtering in this embodiment.
The grid electrode of the third N-MOS tube (Q3) is respectively connected with the cathode electrodes of the fourth diode (D4) and the fifth diode (D5), the anode electrode of the fourth diode (D4) is connected with the key signal input end, the cathode electrode of the fourth diode (D4) is also connected with one end of a third capacitor (C3), the other end of the third capacitor (C3) is grounded, the anode electrode of the fifth diode (D5) is connected with the control signal input end, the source electrode of the third N-MOS tube (Q3) is grounded, the drain electrode of the third N-MOS tube (Q3) is connected with the grid electrode of the second P-MOS tube (Q2), the source electrode of the second P-MOS tube (Q2) is respectively connected with one end of the battery power supply 04 and one end of the second capacitor (C2), and the other end of the second capacitor (C2) is grounded. The fifth resistor (R5) is connected between the grid electrode and the source electrode of the second P-MOS transistor (Q2), the sixth resistor (R6) is connected between the grid electrode and the source electrode of the third N-MOS transistor (Q3), and the fifth resistor (R5) and the sixth resistor (R6) are used for discharging charges.
The drain of the second P-MOS transistor (Q2) is used for connecting a battery charging pin (BAT _ Chg) of the charging control unit 05, the key signal input end is used for connecting the key signal output end of the switch unit 01, and the control signal input end is used for connecting a status signal output pin (Hold) of the micro control unit 02.
In one embodiment, as shown in fig. 3, the switch control unit 03 further includes: a third diode (D3); the negative electrode of the third diode (D3) is connected with the grid electrode of the third N-MOS tube (Q3), and the positive electrode of the third diode (D3) is connected with an external power supply detection end (VCHG).
When an external power input pin of the charging chip (Charger) is connected with an external power supply (VIN), the external power supply detection end (VCHG) outputs high level, the third N-MOS (Q3) and the second P-MOS (Q2) are simultaneously conducted, and the external power supply (VIN) is used for charging the battery power supply 04.
In one embodiment, as shown in FIG. 4, the key control circuit further includes a voltage conversion unit (DCDC).
The voltage conversion unit (DCDC) is connected between the micro control unit 02 and the charging control unit 05, and is used for performing voltage conversion on the system power supply (VSYS) output by the charging control unit 05 to convert the system power supply (VSYS) into a working power supply (VCC) required by the micro control unit 02 to work.
The above description is only an embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, extension, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (7)

1. A key control circuit, the key control circuit comprising: the system comprises a micro control unit, a battery power supply, a switch unit and a switch control unit;
the micro control unit is respectively connected with the switch unit and the switch control unit, and the switch unit is also respectively connected with the battery power supply and the switch control unit; the battery power supply supplies power to the micro control unit through the switch control unit;
the switch unit outputs a high-level key signal to the switch control unit when a key is pressed down, and outputs a low-level state signal with different time lengths to the micro control unit according to the duration time of the key pressing;
the micro control unit outputs corresponding high-level or low-level control signals to the switch control unit according to the low-level state signals with different time lengths output by the switch unit so as to control the switch control unit to be switched on or switched off;
the key control circuit also comprises a charging control unit, and the charging control unit is connected with the micro control unit and is connected with the battery power supply through the switch control unit;
when the charging control unit is not connected with an external power supply, the charging control unit controls the battery power supply to supply power to the micro control unit; when the charging control unit is connected with an external power supply, the charging control unit controls the external power supply to supply power to the micro control unit and controls the external power supply to charge the battery power supply;
in the process of pressing the key in the switch unit, the charging control unit and the switch control unit are synchronously switched off or switched on;
the switching unit includes: the key comprises a first resistor (R1), a key (SW1), a second resistor (R2), a fourth resistor (R4), a first N-MOS (Q1), a first diode (D1), a second diode (D2), a first capacitor (C1), a third resistor (R3), a key signal output end and a state signal output end;
one end of the key (SW1) is respectively connected with one end of the first resistor (R1) and one end of the first diode (D1), the other end of the first resistor (R1) is connected with the battery power supply, the other end of the first diode (D1) is grounded, the other end of the key (SW1) is respectively connected with one end of the second resistor (R2) and the key signal output end, the other end of the second resistor (R2) is connected with the grid of the first N-MOS tube (Q1), the other end of the key (SW1) is also respectively connected with one end of the second diode (D2) and one end of the first capacitor (C1), the other ends of the second diode (D2) and the first capacitor (C1) are respectively grounded, the drain of the first N-MOS tube (Q1) is respectively connected with one end of the fourth resistor (R4) and the state signal output end, the source electrode of the first N-MOS transistor (Q1) is grounded, and the third resistor (R3) is connected between the grid electrode and the source electrode of the first N-MOS transistor (Q1);
wherein, the other end of fourth resistance (R4) is used for to little the control unit output working power supply (VCC), button signal output part is used for connecting the button signal input part of on-off control unit, State signal output part is used for connecting little the control unit's State signal input pin (State).
2. The key control circuit of claim 1,
when the switch unit is pressed for a first preset time after a key is pressed down continuously, the micro control unit outputs a high-level control signal to the switch control unit, the switch control unit is conducted, and the battery power supply supplies power to the micro control unit to realize the starting of the system;
when the key is continuously pressed for a second preset time, the micro control unit outputs a low level control signal to the switch control unit, the switch control unit is disconnected, and the battery power supply stops supplying power to the micro control unit to realize the closing of the system;
when the key is continuously pressed for a third preset time, the micro control unit outputs a low-level control signal to the switch control unit firstly and then outputs a high-level control signal, and the switch control unit is disconnected firstly and then is connected to realize the restart of the system;
the second preset time is longer than the first preset time and shorter than the third preset time.
3. The key control circuit of claim 2, wherein the charge control unit comprises: the charging chip is provided with an external power supply input pin, a system power supply output pin, a battery charging pin (BAT _ Chg), an I2C bus pin and an interrupt pin (INT);
the charging chip is connected with the switch control unit through the battery charging pin (BAT _ Chg), and is connected with the micro control unit through the I2C bus pin and the interrupt pin (INT);
when the external power supply input pin of the charging chip is connected with an external power supply (VIN), the system power supply output pin outputs a system power supply (VSYS) to the outside, and meanwhile, the battery charging pin (BAT _ Chg) charges the battery power supply.
4. The key control circuit of claim 3, wherein the micro-control unit comprises: the micro-control chip is provided with a State signal input pin (State), a control signal output pin (Hold), a working power supply input pin, an I2C bus pin and an interrupt pin (INT);
the State signal input pin (State) is used for being connected with a State signal output end of the switch unit, the control signal output pin (Hold) is used for being connected with a control signal input end of the switch control unit, the micro control chip obtains a working power supply (VCC) through the working power supply input pin, and is connected with the charging control unit through the I2C bus pin and the interrupt pin (INT);
and when the key in the switch unit is continuously pressed for the third preset time, the micro control unit outputs an interrupt signal to the charging chip through the interrupt pin (INT) to close the work of the charging chip.
5. The key control circuit according to claim 4, wherein the switch control unit comprises: a fourth diode (D4), a fifth diode (D5), a third N-MOS transistor (Q3), a second P-MOS transistor (Q2), a fifth resistor (R5), a sixth resistor (R6), a second capacitor (C2), a third capacitor (C3), a key signal input end and a control signal input end;
the gates of the third N-MOS transistor (Q3) are respectively connected to the cathodes of the fourth diode (D4) and the fifth diode (D5), the anode of the fourth diode (D4) is connected to the key signal input terminal, the cathode of the fourth diode (D4) is further connected to one end of the third capacitor (C3), the other end of the third capacitor (C3) is grounded, the anode of the fifth diode (D5) is connected to the control signal input terminal, the source of the third N-MOS transistor (Q3) is grounded, the drain of the third N-MOS transistor (Q3) is connected to the gate of the second P-MOS transistor (Q2), the source of the second P-MOS transistor (Q2) is respectively connected to the battery power supply and one end of the second capacitor (C2), the other end of the second capacitor (C2) is grounded, and the fifth resistor (R5) is connected between the sources of the second P-MOS transistor (Q2) and the source of the second capacitor (C2), the sixth resistor (R6) is connected between the gate and the source of the third N-MOS transistor (Q3);
the drain electrode of the second P-MOS tube (Q2) is used for being connected with a battery charging pin (BAT _ Chg) of the charging control unit, the key signal input end is used for being connected with the key signal output end of the switch unit, and the control signal input end is used for being connected with a state signal output pin (Hold) of the micro control unit.
6. The key control circuit of claim 5, wherein the switch control unit further comprises: a third diode (D3); the cathode of the third diode (D3) is connected with the grid electrode of the third N-MOS tube (Q3), and the anode of the third diode (D3) is connected with an external power supply detection terminal (VCHG);
when the external power supply input pin of the charging chip is connected with an external power supply (VIN), the external power supply detection end (VCHG) outputs a high level, the third N-MOS transistor (Q3) and the second P-MOS transistor (Q2) are simultaneously conducted, and the external power supply (VIN) charges the battery power supply.
7. The key control circuit of claim 3, wherein the key control circuit further comprises a voltage conversion unit;
the voltage conversion unit is connected between the micro control unit and the charging control unit and used for performing voltage conversion on a system power supply (VSYS) output by the charging control unit and converting the voltage conversion into a working power supply (VCC) required by the work of the micro control unit.
CN202011223154.9A 2020-11-05 2020-11-05 Key control circuit Active CN112327696B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011223154.9A CN112327696B (en) 2020-11-05 2020-11-05 Key control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011223154.9A CN112327696B (en) 2020-11-05 2020-11-05 Key control circuit

Publications (2)

Publication Number Publication Date
CN112327696A CN112327696A (en) 2021-02-05
CN112327696B true CN112327696B (en) 2022-04-12

Family

ID=74317142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011223154.9A Active CN112327696B (en) 2020-11-05 2020-11-05 Key control circuit

Country Status (1)

Country Link
CN (1) CN112327696B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112968497A (en) * 2021-03-10 2021-06-15 深圳宝新创科技股份有限公司 Battery power supply control circuit and electronic equipment
CN113274216B (en) * 2021-04-29 2022-03-25 上海惠上电子技术有限公司 Multifunctional bed control device and circuit
CN114400734B (en) * 2021-12-21 2024-07-05 北京航天晨信科技有限责任公司 Dual-circuit power supply circuit for activating battery power by instantaneous switch

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5355737B2 (en) * 2012-03-27 2013-11-27 三菱電機株式会社 Programmable controller
CN103631176B (en) * 2013-08-30 2017-01-25 天津大学 FPGA-based ultrahigh-speed industrial controller
CN103809492B (en) * 2014-02-25 2016-03-16 青岛歌尔声学科技有限公司 One-touch multifunctional control circuit and wearing electronic product
CN108685223A (en) * 2018-06-19 2018-10-23 满德生 A kind of graphene Caloritic clothing
CN211655762U (en) * 2019-12-10 2020-10-09 深圳数马电子技术有限公司 Charging and discharging circuit and key processing machine

Also Published As

Publication number Publication date
CN112327696A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
CN112327696B (en) Key control circuit
CN210912030U (en) Wake-up circuit and rechargeable device
CN110588542B (en) Control circuit and control method for low-power-consumption self-awakening of vehicle-mounted power supply
CN105071469A (en) Solar charging circuit
CN114336857B (en) Conversion circuit for series charging and parallel power supply
CN110693401A (en) Cleaning robot
WO2021143448A1 (en) Key wake-up circuit and electronic device
WO2021258366A1 (en) Control circuit, battery management system and electrochemical device
CN107733413B (en) Intelligent switch circuit and intelligent terminal of pre-installation battery system
WO2021258367A1 (en) Control circuit, battery management system, and electrochemical device
CN210780130U (en) Power-off control circuit
CN215185914U (en) Standby zero-power-consumption circuit applied to battery power supply equipment
CN214590727U (en) Charging device
WO2021200443A1 (en) Electronic circuit unit and battery pack
CN213027985U (en) One-key switching circuit
CN212061818U (en) Display device
CN217486227U (en) Lithium battery and external power supply switching circuit
CN104283245A (en) High-conversion-efficiency mobile power source circuit
CN213780904U (en) Power supply switching system
CN216872904U (en) Charging wake-up circuit and charging system
CN212992000U (en) Battery power supply control circuit
CN214228226U (en) Self-locking control circuit without standby power consumption
CN217135191U (en) Power supply circuit of electronic equipment, lamp and lamp system
CN217849006U (en) Intelligent charger protection circuit based on N-channel MOS (Metal oxide semiconductor) tube
CN219458699U (en) Low power consumption circuit of battery powered device

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