CN114567308A - Switch circuit, control method thereof and electronic equipment - Google Patents

Switch circuit, control method thereof and electronic equipment Download PDF

Info

Publication number
CN114567308A
CN114567308A CN202210410049.9A CN202210410049A CN114567308A CN 114567308 A CN114567308 A CN 114567308A CN 202210410049 A CN202210410049 A CN 202210410049A CN 114567308 A CN114567308 A CN 114567308A
Authority
CN
China
Prior art keywords
switch
pin
circuit
switch unit
control
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
CN202210410049.9A
Other languages
Chinese (zh)
Other versions
CN114567308B (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.)
Shenzhen Oula Zhizao Technology Co ltd
Original Assignee
Shenzhen Oula Zhizao 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 Shenzhen Oula Zhizao Technology Co ltd filed Critical Shenzhen Oula Zhizao Technology Co ltd
Priority to CN202210410049.9A priority Critical patent/CN114567308B/en
Publication of CN114567308A publication Critical patent/CN114567308A/en
Application granted granted Critical
Publication of CN114567308B publication Critical patent/CN114567308B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/30Modifications for providing a predetermined threshold before switching
    • H03K17/302Modifications for providing a predetermined threshold before switching in field-effect transistor switches
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02MAPPARATUS FOR CONVERSION BETWEEN AC AND AC, BETWEEN AC AND DC, OR BETWEEN DC AND DC, AND FOR USE WITH MAINS OR SIMILAR POWER SUPPLY SYSTEMS; CONVERSION OF DC OR AC INPUT POWER INTO SURGE OUTPUT POWER; CONTROL OR REGULATION THEREOF
    • H02M1/00Details of apparatus for conversion
    • H02M1/36Means for starting or stopping converters
    • 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
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Abstract

The invention discloses a switching circuit, a control method thereof and electronic equipment, wherein the switching circuit comprises: the interface unit, key switch, a control chip, first switch element and second switch element, the interface unit who inserts analog signal or PWM signal has been add on the basis that adopts key switch to open the circuit, utilize analog signal and PWM signal to switch on first switch element, and then control second switch element and switch on and awaken up the control chip, the control chip is electrified and is detected the analog signal or the PWM signal of input, output level signal according to the result of detection controls first switch element and switches on, and then control second switch element and maintain to switch on in order to start whole circuit. From this, realized the start-up of button, analog signal, three kinds of modes of PWM signal, increased the mode of more switches for the mode of switch is more diversified, and the reliability is higher, and stability is stronger, improves user and uses experience.

Description

Switch circuit, control method thereof and electronic equipment
Technical Field
The invention relates to the technical field of electronic circuits, in particular to a switching circuit, a control method thereof and electronic equipment.
Background
The current electronic products usually have batteries inside, so the power consumption problem needs to be considered. If the power consumption is too large, the power supply product can cause great electric energy loss when being idle for a long time, and meanwhile, the battery easily causes the damage of the internal structure of the battery in the long-term low-current discharging process, thereby damaging the battery. Therefore, the current electronic product is usually in a standby state when not in use, has low standby power consumption, and can save the damage of electric energy.
When an electronic product is to be used, the electronic product needs to be switched from a standby state to a power-on state, and the existing electronic product is usually started by a key. However, the single-key opening only has the problems of singleness and reliability, and the key cannot be started when being damaged.
Disclosure of Invention
The invention provides a switch circuit, a control method thereof and electronic equipment, and aims to solve the problem that the electronic equipment can be started through keys, digital signals (PWM) and analog signals (high and low levels) in a state scene that a PCB (printed circuit board) is not powered, a battery is connected with an input end, and standby low power consumption is needed.
In a first aspect, the present invention provides a switching circuit comprising: the interface unit is used for accessing an external signal; the key switch comprises a first end and a second end, wherein the first end is connected with a power supply, and the second end is grounded; the control chip is provided with a first pin and a second pin, the first pin is connected with the interface unit and the first end, the first pin is used for detecting an external signal and the key switch, and the second pin is used for outputting a level signal; the first switch unit is connected with the second pin and the interface unit, and the first switch unit is used for being switched on or off according to a level signal and an external signal; the second switch unit is connected with the first switch unit and the first end, and the second switch unit is controlled by the key switch and the first switch to be switched on or off; the control chip and the circuit to be started are connected with a power supply through the second switch unit, and when the key switch is pressed down and/or the external signal conducts the first switch unit, the second switch unit conducts to start the control chip; the control chip is further configured to output a level signal through the second pin according to the external signal detected by the first pin and a control action of the key switch to control the first switch unit to be turned on or off, so as to maintain the second switch unit to be turned on to start the circuit to be started or turn off the second switch unit.
Further, the first switch unit includes an NPN triode, a base of the NPN triode is connected to the second pin and the interface unit, a collector of the NPN triode is connected to the second switch unit, and an emitter of the NPN triode is grounded.
Further, the second switch unit includes a PMOS transistor, a gate of the PMOS transistor is connected to a collector of the NPN triode and the first end, a source of the PMOS transistor is used for connecting a power supply, and a drain of the PMOS transistor is used for connecting the control chip.
Furthermore, the switch circuit further comprises a pull-down resistor, wherein one end of the pull-down resistor is connected with a power supply and a source electrode of the PMOS tube, and the other end of the pull-down resistor is connected with a grid electrode of the PMOS tube and the first end.
Furthermore, the switch circuit further comprises a first sampling resistor, and two ends of the first sampling resistor are respectively connected with the first end and the first pin.
Furthermore, the switch circuit further comprises a second sampling resistor, one end of the second sampling resistor is connected with the first switch unit, and the other end of the second sampling resistor is connected with the first pin and the interface unit.
In a second aspect, the present invention further provides a control method for a switch circuit, where the switch circuit is the switch circuit of the first aspect, and the control chip in the switch circuit is configured to execute the control method, and the control method includes: detecting that the control action of the key switch is a first operation or a second operation through the first pin; if the control action of the key switch is a first operation, outputting a high level through a second pin to control the conduction of the first switch unit so as to maintain the conduction of the second switch unit; if the switching action of the key switch is used as a second operation, the first switch unit is controlled to be switched off by outputting a low level through the second pin so as to switch off the second switch unit.
Further, the external signal is an analog signal, and the control method further includes: detecting whether the analog signal is at a high level or a low level through a first pin; if the analog signal is at a high level, outputting the high level through a second pin to control the first switch unit to be conducted so as to maintain the second switch unit to be conducted; if the analog signal is at a low level, the low level is output through the second pin to control the first switch unit to be switched off so as to switch off the second switch unit.
Further, the external signal is a PWM signal, and the control method further includes: detecting whether the duty ratio of the PWM signal is larger than a preset threshold value or not through a first pin; if the duty ratio of the PWM signal is larger than a preset threshold value, outputting a high level through a second pin to control the first switch unit to be conducted so as to maintain the conduction of the second switch unit; and if the duty ratio of the PWM signal is smaller than a preset threshold value or the PWM signal is not detected, outputting a low level through a second pin to control the first switching unit to be switched off so as to switch off the second switching unit.
In a third aspect, the present invention further provides an electronic device, including a first circuit board and a second circuit board, where the first circuit board has a switch circuit, the switch circuit is the switch circuit in the first aspect, the first circuit board is connected to the second circuit board through an interface unit, the second circuit is used to input an external signal through the interface unit, and a control chip of the switch circuit is used to execute the control method in the second aspect.
Compared with the prior art, the invention has the beneficial effects that: the second switch unit is arranged between the control chip and the power supply, and the first switch unit is arranged to control the second switch unit; one switching mode is that an interface unit is used for accessing an external signal, when the external signal reaches the starting voltage of a first switching unit, the first switching unit is conducted, and then a second switching unit is controlled to be conducted, so that a control chip is powered on; the other switching mode is that a key switch is arranged to control the second switching unit, and the second switching unit is controlled to be conducted when a key is pressed down, so that the control chip is electrified; after the control chip is powered on, the control chip detects an external signal and/or a control action of the key switch through the first pin, outputs a level signal through the second pin according to a detected result to control the first switch unit to be switched on, and then maintains the second switch unit to be switched on, so that a circuit to be started, which is connected to the second switch unit, is started, or outputs the level signal through the second pin according to the detected result to control the first switch unit to be switched off, and then controls the second switch unit to be switched off, and the whole circuit is closed. Therefore, the PCB is unpowered, the input end is connected with the battery, the standby low-power-consumption state scene is needed, the starting of various modes is achieved, more switching modes are added, the switching modes are diversified, the reliability is higher, the stability is stronger, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 shows a schematic diagram of a switching circuit according to an embodiment of the present invention;
FIG. 2 shows a circuit diagram of a switching circuit according to an embodiment of the invention;
FIG. 3 is a flow chart illustrating a method of controlling a switching circuit according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating a method for controlling a switching circuit according to another embodiment of the present invention;
FIG. 5 is a flow chart showing a control method of a switching circuit according to still another embodiment of the present invention;
FIG. 6 shows a schematic view of an electronic device according to an embodiment of the invention;
100. a first circuit board; 10. a first switch unit; 20. a second switching unit; 30. a control chip; 40. an interface unit; 50. a key switch; 60. a power source; 200. a second circuit board.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present 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.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items and includes such combinations.
The embodiment of the application provides a switch circuit, and the problem that the switch circuit switching mode is single and the reliability is low is solved only to adopt key switch 50 for the switch circuit of current low-power consumption, thereby introduces external signal through the increase and realizes opening and closing of circuit from multiple mode to the starting circuit, has guaranteed switch circuit's reliability and stability.
In order to solve the problem of low reliability, the technical scheme in the embodiment of the application has the following general idea:
because the current electronic devices (e.g., fascia guns, vacuum cleaners, sweeping robots, balance cars, etc.) usually include two circuit boards, one circuit board is a circuit board for displaying and touch control (hereinafter referred to as a display circuit board), and the other circuit board is a circuit board for controlling a motor to work (hereinafter referred to as a control circuit board), when the electronic devices are not used, the control circuit board is usually in a low power consumption state to save energy consumption, while the display circuit board is still in a working state, and the control circuit board usually adopts a key to start the electronic devices under low power consumption. However, in this case, as described in the present application, the switch is controlled in a single manner, which results in a problem of low reliability of the key. In order to solve the problem, the display circuit board in the working state is ingeniously utilized to realize the opening and closing of the control circuit board in the low power consumption state.
Specifically, an external signal input by the display circuit board is introduced through the addition of the interface unit 40, and the first switch unit 10 and the second switch unit 20 are turned on by the external signal to power on the control chip 30. After the control chip 30 is powered on, an external signal is detected, the first switch unit 10 is controlled to be turned on or off according to the external signal, and then the second switch unit 20 is controlled to be turned on or off, so that the whole circuit to be started is selectively started or the circuit to be started is selectively closed. From this, except that the circuit under the low-power consumption state is switched on or off through key switch 50's mode, can also be through utilizing the circuit under the display circuit board input external signal to switch on or off the low-power consumption state, increased the mode of more switches for the mode of switch is more diversified, and the reliability is higher, and stability is stronger, improves the user and uses experience.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Referring to fig. 1, the present embodiment provides a switching circuit including: the interface unit 40, the key switch 50, the control chip 30, the first switch unit 10 and the second switch unit 20, the interface unit 40 for accessing external signals; the key switch 50 comprises a first end and a second end, wherein the first end is connected with the power supply 60, and the second end is grounded; a control chip 30 having a first pin and a second pin, wherein the first pin is connected to the interface unit 40 and the first end, the first pin is used for detecting an external signal and the key switch 50, and the second pin is used for outputting a level signal; the first switch unit 10 is connected with the second pin and the interface unit 40, and the first switch unit 10 is used for being switched on or off according to a level signal and an external signal; a second switch unit 20 connected to the first switch unit 10 and the first terminal, the second switch unit 20 being controlled by the key switch 50 and the first switch to be turned on or off; the control chip 30 and the circuit to be started are connected to the power supply 60 through the second switch unit 20, and when the key switch 50 is pressed and/or the external signal turns on the first switch unit 10, the second switch unit 20 is turned on to start the control chip 30; the control chip 30 is further configured to output a level signal through the second pin according to the external signal detected by the first pin and the control action of the key switch 50 to control the first switch unit 10 to be turned on or off, so as to maintain the second switch unit 20 to be turned on to start the circuit to be started or turn off the second switch unit 20.
By implementing the embodiment, in a low power consumption state, the interface unit 40 is used to introduce an external signal to turn on the first switch unit 10 and the second switch unit 20, so that the control chip 30 is powered on, the control chip 30 detects the external signal after being powered on, and controls the first switch unit 10 to be turned on or off according to the external signal, so as to maintain the second switch unit 20 to be turned on, thereby starting the whole circuit to be started, or turn off the second switch unit 20, thereby closing the circuit. Besides switching the circuit through the key switch 50, the circuit can be switched on and off through an external signal, more switching modes are added, the reliability is higher, and the stability is stronger.
Referring to fig. 2, in an embodiment, the first switching unit 10 includes an NPN transistor Q12, and the second switching unit 20 includes a PMOS transistor Q7. The base of the NPN transistor Q12 is connected to the second pin and the interface unit 40, the collector of the NPN transistor Q12 is connected to the second switching unit 20, and the emitter of the NPN transistor Q12 is grounded. In an embodiment, the gate of the PMOS transistor Q7 is connected to the collector of the NPN transistor Q12 and the first terminal, the source of the PMOS transistor Q7 is connected to the power supply 60, and the drain of the PMOS transistor Q7 is connected to the control chip 30. The switch circuit further comprises a pull-down resistor R87, wherein one end of the pull-down resistor R87 is connected with a power supply 60 and the source electrode of the PMOS transistor Q7, and the other end of the pull-down resistor R87 is connected with the gate electrode of the PMOS transistor Q7 and the first end.
Specifically, when the key switch 50 is pressed, the power supply 60 is turned on, the pull-down resistor R87 has a voltage thereon, and the pull-down resistor R87 is connected between the source and the gate of the PMOS transistor Q7, so that the pull-down resistor R87 pulls the voltage on the gate low, thereby turning on the PMOS transistor Q7. The PMOS tube Q7 is powered on after being conducted, the control chip 30 detects the control action of the key switch 50 through the first pin, if the key switch 50 is detected to be pressed down, a high level is output to the base electrode of the NPN triode Q12 through the second pin, the NPN triode Q12 is conducted, the NPN triode Q12 is conducted, the grid electrode of the PMOS tube Q7 can be kept at a low level, the conduction of the PMOS tube Q7 is maintained, the conduction of the PMOS tube Q7 can be maintained after the key switch 50 is loosened, and the whole circuit to be started is started.
An external signal is input to the base of the NPN transistor Q12 through the interface unit 40, and when the voltage of the external signal reaches the turn-on voltage (0.7V) of the NPN transistor Q12, the NPN transistor is turned on. After the NPN transistor Q12 is turned on, the power supply 60 is turned on, and the gate of the PMOS transistor Q7 is pulled down through the pull-down resistor R87, so that the PMOS transistor Q7 is turned on. After the PMOS tube Q7 is conducted, the control chip 30 is powered on, the control chip 30 detects an external signal through the first pin, if the detected external signal is a signal for starting the circuit, a high level is output to the base electrode of the NPN triode Q12 through the second pin, the NPN triode Q12 is conducted, the NPN triode Q12 is conducted, the grid electrode of the PMOS tube Q7 can maintain a low level, the conduction of the PMOS tube Q7 is maintained, and the whole circuit to be started is started.
It should be noted that, the first switch unit 10 and the second switch unit 20 in this embodiment may also adopt other types of switch components, for example, PNP triode, NMOS transistor, diode, etc., as long as it is possible to implement that the first switch unit 10 controls the second switch unit 20 to be turned on or off, and the first switch unit 10 can be turned on or off according to the level signal, and simple form changes and equivalent substitutions fall within the protection scope of the present invention.
It should be further noted that the first pin of this embodiment is an IO port of the chip having functions of KEY detection, ADC detection, and PWM capture. The second pin is a normal IO port of the chip.
Referring to fig. 2, in an embodiment, the switching circuit further includes a first sampling resistor R94 and a second sampling resistor R88. Two ends of the first sampling resistor R94 are respectively connected with the first end and the first pin. One end of the second sampling resistor R88 is connected to the first switch unit 10, and the other end is connected to the first pin and the interface unit 40.
Specifically, the first pin of the control chip 30 is used for detecting through a sampling resistor. The first sampling resistor R94 is connected between the key switch 50 and the first pin, and the control chip 30 detects the control action of the key switch 50 by detecting the voltage on the first sampling resistor R94. For example, the detection of a voltage across the first sampling resistor R94 indicates that the key switch 50 is pressed, whereas the key switch 50 is released. The second sampling resistor R88 is connected to the interface unit 40 and the second pin, and the control chip 30 detects the external signal by detecting the voltage across the second sampling resistor R88. Specifically, when the external signal is an analog signal, a high level or a low level can be detected; when the external signal is a PWM signal, its duty ratio can be detected.
In this embodiment, the control chip 30 is further configured to output a level signal through the second pin to control the first switch unit 10 to be turned on or off according to the external signal detected by the first pin and the control action of the key switch 50, so as to maintain the second switch unit 20 to be turned on to start the circuit to be started or turn off the second switch unit 20.
Specifically, after the control chip 30 is powered on, the control chip 30 can realize the on and off of the circuit according to the control signal triggered by the user.
For the switching mode of the key switch 50, if the user wants to turn on the computer, the user may trigger a control action of the key switch 50, where the control action is used to indicate that the user wants to turn on the computer, for example, pressing for a short time and pressing for two times continuously, the control chip 30 knows that the user wants to turn on the computer after detecting the control action through the first pin, and at this time, outputs a high level to the base of the NPN transistor Q12 through the second pin, so that the NPN transistor Q12 is turned on, and the PMOS transistor Q7 is maintained to be turned on, thereby starting the circuit to be started. If the user wants to turn off the electronic device, the user may trigger a control action of the key switch 50, where the control action is used to indicate that the user wants to turn off the electronic device, for example, pressing a long button for three times continuously, the control chip 30 knows that the user wants to turn off the electronic device after detecting the control action through the first pin, and outputs a low level to the base of the NPN transistor Q12 through the second pin, so that the NPN transistor Q12 is turned off, and the PMOS transistor Q7 is controlled to turn off, thereby turning off the electronic device.
For the switching mode of the external signal, if the user wants to turn on the device, an external signal may be input, where the external signal is used to indicate that the user wants to turn on the device, for example, a high level signal and a PWM signal with a duty ratio greater than 20%, the control chip 30 knows that the user wants to turn on the device after detecting the external signal through the first pin, and at this time, outputs a high level to the base of the NPN transistor Q12 through the second pin, so that the NPN transistor Q12 is turned on, and the PMOS transistor Q7 is maintained to be turned on, thereby starting the circuit to be started. If the user wants to shut down, an external signal may be triggered, where the external signal is used to indicate that the user wants to shut down, for example, a low level PWM signal with a duty ratio less than 20%, the control chip 30 knows that the user wants to shut down after detecting the external signal through the first pin, and outputs a low level to the base of the NPN transistor Q12 through the second pin, so that the NPN transistor Q12 is turned off, and the PMOS transistor Q7 is further controlled to be turned off, thereby closing the circuit.
Therefore, there are various control manners for turning on and off the circuit to be started after the control chip 30 is powered on in this embodiment, and this embodiment is not limited herein, but the hardware circuit of this embodiment needs to be sampled to implement the control manner regardless of the type of control manner, that is, the hardware circuit of this embodiment falls within the protection scope of the present invention as long as the hardware circuit of this embodiment is adopted regardless of the type of control manner.
A specific control manner is proposed below to realize specific control of the switching circuit.
Referring to fig. 3 to fig. 5, an embodiment of the present invention further provides a control method for a switch circuit, where the switch circuit is the switch circuit described in the foregoing embodiment, and the control chip 30 in the switch circuit is configured to execute the control method, where the control method includes:
s1, detecting whether the control action of the key switch 50 is the first operation or the second operation through the first pin.
S21, if the control action of the key switch 50 is the first operation, the high level is outputted through the second pin to control the first switch unit 10 to be turned on, so as to maintain the second switch unit 20 to be turned on.
S22, if the key switch 50 is operated as the second operation, outputting a low level through the second pin to control the first switch unit to be turned off, so as to turn off the second switch unit 20.
Specifically, the first operation is a control action indicating that the user wants to turn on, such as a short press. The second operation is a control action indicating that the user wants to shut down, such as a long press. It is understood that the first operation and the second operation may be other control actions, and are not limited herein.
Firstly, explaining each connecting port of a power-on and power-off circuit, wherein VCC is a battery positive terminal; VCC _ IN is the positive voltage end of the whole circuit (connected with the circuit to be started); MCU _ IO is a second pin; MCU _ IO1 is a first pin; j1 is the interface unit 40.
Starting up by pressing a key: when the power-on is needed, after the key SW1 is pressed, the PMOS tube Q7 is conducted, the MCU (control chip 30) starts working after being electrified, after the MCU works and is initialized, whether the key is pressed down or not is detected at the first time, if the key is detected to be pressed down, the pin MCU _ IO is immediately output with high level to maintain the conduction of the PMOS, so that the power supply 60 at the VCC _ IN end is conducted with the battery end, and the whole system starts working; (manually pressing the button, the time is short, so MUC _ IO is needed to turn on the PMOS). The low power consumption of the battery is realized, and the main chip is started under the condition of no power supply. When the power-off is needed, the key SW1 is pressed for a long time, the MCU detects that the key is pressed for a long time, the MCU _ IO pin is output to be low level, and after the key is released, the PMOS tube Q7 is not conducted, so that the whole system is powered off, namely the power-off is carried out.
And S3, detecting whether the analog signal is at a high level or a low level through the first pin.
S41, if the analog signal is at a high level, outputting the high level through the second pin to control the first switch unit 10 to be turned on, so as to maintain the second switch unit 20 to be turned on.
And S42, if the analog signal is at a low level, outputting a low level through the second pin to control the first switch unit to be switched off, so as to switch off the second switch unit 20.
Specifically, when the external signal is an analog signal, and when the power-on is required, a high level is provided from the J1 terminal (the interface unit 40), the PMOS transistor Q7 is turned on, the MCU starts to operate after being powered on, after the MCU operates and initializes, the signal condition input from the J1 terminal is detected at the first time, if the high level is provided, the pin MCU _ IO is immediately turned on to output a high level to maintain the conduction of the PMOS, so that the power supply 60 at the VCC _ IN terminal is turned on with the battery terminal, and the whole system starts to operate. And the MCU is started under the condition of no power supply. When the power-off is needed, a low level is provided from the J1 terminal, the MCU detects a low level signal, the MCU _ IO pin is output to be a low level, and the PMOS tube Q7 is not conducted, so that the whole system has no power, and the power-off is performed.
And S5, detecting whether the duty ratio of the PWM signal is larger than a preset threshold value through the first pin.
S61, if the duty ratio of the PWM signal is greater than the preset threshold, outputting a high level through the second pin to control the first switch unit 10 to be turned on, so as to maintain the second switch unit 20 to be turned on.
And S62, if the duty ratio of the PWM signal is smaller than a preset threshold value or the PWM signal is not detected, outputting a low level through the second pin to control the first switch unit to be switched off so as to switch off the second switch unit 20.
Specifically, when the external signal is a PWM signal, when the power-on is required, a PWM signal is applied from the J1 terminal, when the PWM signal is greater than the duty ratio of 20% or more, the PMOS transistor Q7 is turned on, the MCU starts to operate after being turned on, after the MCU has initialized its operation, the signal condition input from the J1 terminal is detected at the first time, and the MCU _ IO pin is immediately output a high level to maintain the conduction of the PMOS, so that the power supply 60 at the VCC _ IN terminal is turned on with the battery terminal, and the entire system starts to operate. And the MCU is started under the condition of no power supply. When the power-off is needed, when no PWM signal is sent from the external J1 terminal, the MCU detects that no signal exists, the MCU _ IO pin is output to be low level, the PMOS tube Q7 is not conducted, and the whole system is powered off. The preset threshold of this embodiment is 20% of the duty cycle, and may be other thresholds, which are determined according to an actual circuit, and are not limited herein.
Through this embodiment, under the MCU does not have the circumstances of power supply, realized the switch on and off under key switch 50, analog signal and the three kinds of modes of PWM signal, for only adopting this kind of single switching mode of key switch 50, this embodiment has increased the mode of more switches for the mode of switch is more diversified, and the reliability is higher, and stability is stronger, improves user and uses experience.
Referring to fig. 6, an embodiment of the present invention further provides an electronic device, including a first circuit board 100 and a second circuit board 200, where the first circuit board 100 has a switch circuit, the switch circuit is the switch circuit described in the above embodiment, the first circuit board 100 is connected to the second circuit board 200 through an interface unit 40, the second circuit is used to input an external signal through the interface unit 40, and a control chip 30 of the switch circuit is used to execute the control method described in the above embodiment. The switch circuit and the control method have been described in detail in the above embodiments, and are not repeated herein for brevity.
The electronic device of the present embodiment may be, for example, a fascia gun, a vacuum cleaner, a sweeping robot, a balance car, or the like. The first circuit board 100 is generally a circuit board for controlling the operation of the motor, and the second circuit board 200 is generally a circuit board for displaying touch. The first circuit board 100 is provided with the above switching circuit, and is connected to the second circuit board 200 through the interface unit 40, and the second circuit board 200 inputs an external signal through the interface unit 40 to control the switching of the first circuit board 100.
From this, through this embodiment, realized adopting second circuit board 200 to input external signal to first circuit board 100 and carry out on-off control to first circuit board 100 under the low-power consumption state, under the condition that standby state MCU does not have the power supply, key switch 50 has been realized, the switching on and shutting down under analog signal and the three kinds of modes of PWM signal, for only adopting this kind of single switching mode of key switch 50, this embodiment has increased the mode of more switches, make the mode of switch more diversified, the reliability is higher, stability is stronger, improve user's use experience.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A switching circuit, comprising:
the interface unit is used for accessing an external signal;
the key switch comprises a first end and a second end, wherein the first end is connected with a power supply, and the second end is grounded;
the control chip is provided with a first pin and a second pin, the first pin is connected with the interface unit and the first end, the first pin is used for detecting an external signal and the key switch, and the second pin is used for outputting a level signal;
the first switch unit is connected with the second pin and the interface unit, and the first switch unit is used for being switched on or off according to a level signal and an external signal;
the second switch unit is connected with the first switch unit and the first end, and the second switch unit is controlled by the key switch and the first switch to be switched on or off;
the control chip and the circuit to be started are connected with a power supply through the second switch unit, and when the key switch is pressed down and/or the external signal conducts the first switch unit, the second switch unit conducts to start the control chip;
the control chip is further configured to output a level signal through the second pin according to the external signal detected by the first pin and a control action of the key switch to control the first switch unit to be turned on or off, so as to maintain the second switch unit to be turned on to start the circuit to be started or turn off the second switch unit.
2. The switch circuit of claim 1, wherein the first switch unit comprises an NPN transistor, a base of the NPN transistor is connected to the second pin and the interface unit, a collector of the NPN transistor is connected to the second switch unit, and an emitter of the NPN transistor is grounded.
3. The switch circuit according to claim 2, wherein the second switch unit comprises a PMOS transistor, a gate of the PMOS transistor is connected to a collector of the NPN transistor and the first terminal, a source of the PMOS transistor is connected to a power supply, and a drain of the PMOS transistor is connected to the control chip.
4. The switch circuit of claim 3, further comprising a pull-down resistor, wherein one end of the pull-down resistor is connected to a power supply and the source of the PMOS transistor, and the other end of the pull-down resistor is connected to the gate of the PMOS transistor and the first end.
5. The switch circuit according to any one of claims 1 to 3, further comprising a first sampling resistor, wherein two ends of the first sampling resistor are respectively connected to the first end and the first pin.
6. The switch circuit according to claim 5, further comprising a second sampling resistor, wherein one end of the second sampling resistor is connected to the first switch unit, and the other end of the second sampling resistor is connected to the first pin and the interface unit.
7. A control method of a switch circuit, wherein the switch circuit is the switch circuit of any one of claims 1 to 6, the control chip in the switch circuit is used for executing the control method, and the control method comprises:
detecting whether the control action of the key switch is a first operation or a second operation through the first pin;
if the control action of the key switch is a first operation, outputting a high level through a second pin to control the conduction of the first switch unit so as to maintain the conduction of the second switch unit;
if the switching action of the key switch is used as a second operation, the first switching unit is controlled to be switched off by outputting a low level through the second pin, so that the second switching unit is switched off.
8. The control method according to claim 7, wherein the external signal is an analog signal, the control method further comprising:
detecting whether the analog signal is at a high level or a low level through a first pin;
if the analog signal is in a high level, outputting the high level through a second pin to control the first switch unit to be conducted so as to maintain the second switch unit to be conducted;
and if the analog signal is at a low level, outputting the low level through the second pin to control the first switch unit to be switched off so as to switch off the second switch unit.
9. The control method according to claim 7, wherein the external signal is a PWM signal, the control method further comprising:
detecting whether the duty ratio of the PWM signal is larger than a preset threshold value or not through a first pin;
if the duty ratio of the PWM signal is larger than a preset threshold value, outputting a high level through a second pin to control the first switch unit to be conducted so as to maintain the conduction of the second switch unit;
and if the duty ratio of the PWM signal is smaller than a preset threshold value or the PWM signal is not detected, outputting a low level through a second pin to control the first switching unit to be switched off so as to switch off the second switching unit.
10. An electronic device, comprising a first circuit board and a second circuit board, wherein the first circuit board has a switch circuit thereon, the switch circuit is the switch circuit of any one of claims 1-6, the first circuit board is connected to the second circuit board through an interface unit, the second circuit is used for inputting an external signal through the interface unit, and a control chip of the switch circuit is used for executing the control method of any one of claims 7-9.
CN202210410049.9A 2022-04-19 2022-04-19 Switch circuit, control method thereof and electronic equipment Active CN114567308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210410049.9A CN114567308B (en) 2022-04-19 2022-04-19 Switch circuit, control method thereof and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210410049.9A CN114567308B (en) 2022-04-19 2022-04-19 Switch circuit, control method thereof and electronic equipment

Publications (2)

Publication Number Publication Date
CN114567308A true CN114567308A (en) 2022-05-31
CN114567308B CN114567308B (en) 2022-08-23

Family

ID=81721229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210410049.9A Active CN114567308B (en) 2022-04-19 2022-04-19 Switch circuit, control method thereof and electronic equipment

Country Status (1)

Country Link
CN (1) CN114567308B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106374897A (en) * 2016-11-22 2017-02-01 亿嘉和科技股份有限公司 Delayed startup/shutdown circuit and delayed startup/shutdown control method
CN107425835A (en) * 2016-05-23 2017-12-01 中兴通讯股份有限公司 A kind of on/off circuit
CN108712159A (en) * 2018-05-03 2018-10-26 福建科立讯通信有限公司 A kind of the igniting start-up circuit and method of Vehicle mounted station
CN109884935A (en) * 2018-11-30 2019-06-14 珠海趣印科技有限公司 A kind of multivoltage multifunctional multiplexing reset switch latching circuit
CN209103135U (en) * 2018-12-20 2019-07-12 王小兵 Boot-strap circuit based on single chip application
CN112737558A (en) * 2020-12-14 2021-04-30 复旦大学 Multifunctional key switch circuit for electronic product
CN113641233A (en) * 2021-07-14 2021-11-12 深圳市柔宇科技股份有限公司 Power supply circuit for preventing power failure in reset state and flexible keyboard

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107425835A (en) * 2016-05-23 2017-12-01 中兴通讯股份有限公司 A kind of on/off circuit
CN106374897A (en) * 2016-11-22 2017-02-01 亿嘉和科技股份有限公司 Delayed startup/shutdown circuit and delayed startup/shutdown control method
CN108712159A (en) * 2018-05-03 2018-10-26 福建科立讯通信有限公司 A kind of the igniting start-up circuit and method of Vehicle mounted station
CN109884935A (en) * 2018-11-30 2019-06-14 珠海趣印科技有限公司 A kind of multivoltage multifunctional multiplexing reset switch latching circuit
CN209103135U (en) * 2018-12-20 2019-07-12 王小兵 Boot-strap circuit based on single chip application
CN112737558A (en) * 2020-12-14 2021-04-30 复旦大学 Multifunctional key switch circuit for electronic product
CN113641233A (en) * 2021-07-14 2021-11-12 深圳市柔宇科技股份有限公司 Power supply circuit for preventing power failure in reset state and flexible keyboard

Also Published As

Publication number Publication date
CN114567308B (en) 2022-08-23

Similar Documents

Publication Publication Date Title
CN105223858B (en) The switching on and shutting down control circuit of a kind of electronic equipment
CN203522501U (en) Dc power on-off control circuit and DC power device
CN114567308B (en) Switch circuit, control method thereof and electronic equipment
CN102736524B (en) Power switch
CN213879789U (en) Switch holding circuit with high integration level
CN204539107U (en) A kind of automatic holding device of switch control rule
CN210157162U (en) Key combined circuit for realizing hardware reset
CN210518245U (en) Startup and shutdown circuit and startup and shutdown system
CN218974798U (en) Startup and shutdown circuit and electronic equipment
CN216672981U (en) Key circuit, power control system and vehicle
CN214956519U (en) Low-power-consumption dial switch circuit and electronic equipment
CN219627690U (en) Switch device and single-button switch circuit
CN219181399U (en) Working mode control circuit and power supply
CN211151936U (en) Power switch circuit
EP2308148B1 (en) Standby circuit and electric appliance comprising such a circuit
CN113467292B (en) Universal instrument control circuit, control method and control circuit driving device
CN216252683U (en) Electronic switch
CN105492995A (en) Battery-driven electronic device
CN217443761U (en) Protection circuit of voice control equipment and voice control equipment
CN214590675U (en) Power supply control circuit and electronic equipment
CN219936309U (en) One-key multifunctional control circuit
CN217443770U (en) Switch control circuit and electronic equipment
CN212874301U (en) Hybrid switch and accessory module
CN112439581B (en) Gondola water faucet controlling means and gondola water faucet
CN220208212U (en) Uninterruptible power mode switching circuit based on single key

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
CB03 Change of inventor or designer information

Inventor after: Zhou Dengjin

Inventor after: Wang Long

Inventor after: Wu Qingbo

Inventor before: Zhou Dengjin

Inventor before: Jiang Long

Inventor before: Wu Qingbo

CB03 Change of inventor or designer information