[go: up one dir, main page]

CN109901689B - Hardware switch circuit - Google Patents

Hardware switch circuit Download PDF

Info

Publication number
CN109901689B
CN109901689B CN201910088624.6A CN201910088624A CN109901689B CN 109901689 B CN109901689 B CN 109901689B CN 201910088624 A CN201910088624 A CN 201910088624A CN 109901689 B CN109901689 B CN 109901689B
Authority
CN
China
Prior art keywords
switch
resistor
voltage
circuit
tube
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
CN201910088624.6A
Other languages
Chinese (zh)
Other versions
CN109901689A (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.)
Zhuhai Jieli Technology Co Ltd
Original Assignee
Zhuhai Jieli 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 Zhuhai Jieli Technology Co Ltd filed Critical Zhuhai Jieli Technology Co Ltd
Priority to CN201910088624.6A priority Critical patent/CN109901689B/en
Publication of CN109901689A publication Critical patent/CN109901689A/en
Application granted granted Critical
Publication of CN109901689B publication Critical patent/CN109901689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electronic Switches (AREA)

Abstract

A hardware switch circuit comprises a switch tube, a voltage division circuit, a key switch and a charging and discharging unit; the first end of the switch tube is used for being connected with a power supply, the second end of the switch tube is used for being connected with an electric appliance working circuit, and the third end of the switch tube is connected with the output end of the voltage division circuit; the input end of the voltage division circuit is used for being connected with a power supply, and the control end of the voltage division circuit is connected with the second end of the switching tube; the first end of the key switch is connected with the third end of the switch tube, and the second end of the key switch is connected with the charge and discharge end of the charge and discharge unit; the grounding end of the charge and discharge unit is grounded. The hardware switch circuit provided by the embodiment of the invention is different from the traditional software switch circuit, does not need to be connected with an electric appliance MCU, does not need to be controlled by an additional MCU, does not occupy the IO interface resource of the MCU, and has simple circuit structure and low cost.

Description

Hardware switch circuit
Technical Field
The invention relates to the field of electronic circuits, in particular to a hardware switching circuit.
Background
In daily life, electronic products need to be turned on and off by adopting a switch to control the electronic products. Most of the existing switches are controlled by software, and the power-on and power-off processes of the existing switches need to be controlled by an MCU (micro controller Unit) to run a power-on and power-off program to control power supply so as to complete the power-on or power-off actions. The switching mode needs to occupy the IO port resource of the MCU, resulting in complex circuit structure and high hardware cost.
Disclosure of Invention
Therefore, it is necessary to provide a hardware switch circuit for solving the technical problem that the software control switch needs to occupy the IO interface resource of the MCU.
The embodiment of the invention provides a hardware switch circuit, which comprises a switch tube, a voltage division circuit, a key switch and a charging and discharging unit, wherein the switch tube is connected with the voltage division circuit;
the first end of the switch tube is used for being connected with a power supply, the second end of the switch tube is used for being connected with an electric appliance working circuit, and the third end of the switch tube is connected with the output end of the voltage division circuit;
the input end of the voltage division circuit is used for being connected with a power supply, and the control end of the voltage division circuit is connected with the second end of the switching tube;
the first end of the key switch is connected with the third end of the switch tube, and the second end of the key switch is connected with the charge and discharge end of the charge and discharge unit;
the grounding end of the charge and discharge unit is grounded.
In one embodiment, the voltage dividing circuit comprises a switch unit, a first resistor and a second resistor;
the first end of the first resistor is used for connecting a power supply, and the second end of the first resistor is respectively connected with the first end of the second resistor, the third end of the switch tube and the first end of the key switch;
the first end of the switch unit is connected with the second end of the second resistor, the second end of the switch unit is grounded, and the third end of the switch unit is connected with the second end of the switch tube; the switch unit is used for conducting under the output control of the switch tube.
In one embodiment, the switch tube is a P-channel enhancement type field effect transistor, a source electrode of the P-channel enhancement type field effect transistor is used for connecting a power supply, a drain electrode of the P-channel enhancement type field effect transistor is used for connecting an electric appliance working circuit, and a grid electrode of the P-channel enhancement type field effect transistor is respectively connected with the second end of the first resistor and the first end of the switch.
In one embodiment, the switching unit includes an NPN transistor, a collector of the NPN transistor is connected to the second terminal of the second resistor, a base of the NPN transistor is connected to the drain of the P-channel enhancement type fet, and an emitter of the NPN transistor is grounded.
In one embodiment, the charging and discharging unit includes a capacitor, a first end of the capacitor is connected to the second end of the key switch and the output end of the fet, and a second end of the capacitor is grounded.
In one embodiment, the hardware switching circuit further comprises a third resistor and a fourth resistor; and the base electrode of the NPN triode is connected with the drain electrode of the P-channel enhanced field effect transistor through a third resistor and is grounded through a fourth resistor.
In one embodiment, the hardware switching circuit further includes a fifth resistor, and the first terminal of the capacitor is connected to the output terminal of the fet through the fifth resistor.
In one embodiment, the voltage division circuit comprises an adjustable potentiometer and a switch unit;
the first fixed end of the adjustable potentiometer is used for being connected with a power supply, the second fixed end of the adjustable potentiometer is connected with the input end of the switch unit, and the adjusting output end of the adjustable potentiometer is connected with the third end of the switch tube and the first end of the key switch respectively.
In one embodiment, the switch unit comprises a relay, a first contact of the relay is connected with the second end of the second resistor, a second contact of the relay is grounded, a first end of a relay coil is connected with the output end of the switch tube, and a second end of the relay coil is grounded.
The embodiment of the invention also provides an electrical appliance which comprises the hardware switching circuit provided by any one of the embodiments.
When the hardware switching circuit is started, the charging and discharging unit is charged by triggering the key switch, so that the voltage of the third end of the switching tube is instantly reduced in a short time, the switching tube is triggered to be conducted, and the power is supplied to the working circuit of the electric appliance. When the circuit works, the second end of the switch tube is used as an output end to completely charge the charge and discharge unit, and the voltage division circuit divides the voltage of the power supply and outputs the voltage to the third end of the switch tube, so that the conduction state of the switch tube is maintained, and the startup is realized. When the switch is turned off, the key switch triggers the charge and discharge unit to discharge to the third end of the switch tube, so that the voltage of the third end of the switch tube is increased in a short time, and the switch tube is turned off. The second end of the switch tube stops outputting after being turned off, so that the voltage dividing circuit stops dividing the voltage of the power supply and outputs the voltage of the power supply to the control end of the switch tube, the turn-off state of the switch tube is maintained, and the shutdown is realized. The hardware switching circuit provided by the embodiment of the invention can be turned on and off without being connected with the MCU of the electric appliance, is different from the traditional software switching circuit, can save the IO interface resource of the MCU, has a simple circuit structure, is low in cost and strong in universality, can adapt to different electric appliance switches, and does not need to re-evaluate and design a replacement scheme because of occupying the IO interface resource of the MCU.
Drawings
FIG. 1 is a functional block diagram of a hardware switching circuit according to one embodiment of the present invention;
fig. 2 is a circuit diagram of a hardware switching circuit according to an embodiment of the present invention.
Detailed Description
For better understanding of the objects, technical solutions and effects of the present invention, the present invention will be further explained with reference to the accompanying drawings and examples. Meanwhile, the following described examples are only for explaining the present invention, and are not intended to limit the present invention.
As shown in fig. 1, an embodiment of the invention provides a hardware switch circuit, which includes a switch tube 1, a voltage divider circuit 2, a key switch 3, and a charging/discharging unit 4.
The first end of switch tube 1 is used for being connected with power 5, and the second end of switch tube 1 is used for being connected with electrical apparatus working circuit 6, and the third end of switch tube 1 is connected with bleeder circuit 2's output and key switch 3's first end respectively. Generally, the first terminal of the switch tube 1 is used as an input terminal, the second terminal of the switch tube 1 is used as an output terminal, and the third terminal of the switch tube 1 is used as a control terminal.
The input end of the voltage division circuit 2 is used for being connected with the power supply 5, and the control end of the voltage division circuit 2 is connected with the second end of the switch tube 1. The voltage dividing circuit 2 is used for dividing the voltage of the power supply 5 and outputting different divided voltages to the switching tube 1.
The first end of the key switch 3 is respectively connected with the output end of the voltage division circuit 2 and the third end of the switch tube 1, and the second end of the key switch 3 is connected with the charge and discharge unit 4. The ground terminal of the charge and discharge unit 4 is grounded.
The switch tube 1 may be a field effect transistor or a triode, and the switch tube is turned on when the voltage of the third terminal is less than the voltage of the first terminal and turned off when the voltage of the third terminal is equal to or greater than the voltage of the first terminal, that is, the turn-on threshold voltage of the first switch tube 1 is less than zero. Such as a P-channel enhancement mode mosfet, such as a PNP transistor or the like. The voltage dividing circuit 2 may be a circuit including a variable potentiometer; or a series resistance voltage-dividing circuit 2; in alternating current, the circuit can also be a circuit with series capacitors; other integrated modules with voltage dividing function are also possible. The voltage dividing circuit 2 only needs to be capable of dividing the voltage of the power supply 5 differently when the switch tube 1 is switched on, and the divided voltage is output to the third end of the switch tube 1. The charge/discharge unit 4 may be any circuit capable of charging and discharging, for example, the charge/discharge unit 4 may be a capacitor, a charge/discharge circuit in which a capacitor is combined with other devices, a charge/discharge integrated module, or a rechargeable battery, as long as charging and discharging can be achieved. The key switch 3 is used for connecting a circuit, is a resettable key switch 3 and conducts a circuit branch in which the key switch is located when being pressed down.
When the power-on device is started, the key switch 3 is pressed, the charge and discharge unit 4 pulls down the voltage of the third end of the switch tube 1, the switch tube 1 is conducted, the voltage division circuit 2 receives the output of the switch tube 1, and the voltage division circuit 2 controls the switch tube 1 to be conducted. When the device is turned off, the key switch 3 is pressed, the charge and discharge unit 4 pulls up the voltage at the third end of the switch tube 1, the switch tube 1 is turned off, the voltage division circuit 2 monitors that the switch tube 1 has no output, and the voltage division circuit 2 controls the switch tube 1 to be kept turned off.
Now, the states of the hardware switch circuit will be described in detail: in the initial state, the hardware switching circuit does not work, the voltage division circuit 2 is connected with the power supply 5, and the first voltage is continuously output to the third end of the switching tube 1, so that the switching tube 1 is in the off state.
At the moment, the key switch 3 is pressed down to start the electric appliance, the key switch 3 conducts a charging loop of the charging and discharging unit 4, the voltage dividing circuit 2 charges the charging and discharging unit 4, in the charging and discharging unit 4 charging process, the voltage of the third end of the switch tube 1 is pulled down by the charging and discharging unit 4 to reach the conduction threshold voltage of the switch tube 1, namely the voltage of the third end of the switch tube 1 is smaller than the voltage of the first end, and the switch tube 1 is conducted to supply power to the electric appliance working circuit 6. Because bleeder circuit 2's control end is connected with the second end of switch tube 1, the control end of bleeder circuit 2 received switch tube 1's output this moment, then divided voltage to power 5 to export the partial voltage to the third end of switch tube 1, make the voltage of the third end of switch tube 1 be less than the voltage of first end, keep switch tube 1 to switch on, last to the power supply of electrical apparatus work circuit 6, accomplish the start.
When the hardware switch works, the switch tube 1 is continuously conducted, and the charging and discharging unit 4 is charged by the second end of the switch tube 1, and the conducting voltage drop of the switch tube 1 is generally smaller no matter a field effect tube or a triode is selected, so that the voltage at the two ends of the charging and discharging unit 4 is approximately equal to the voltage of the power supply 5.
At this moment, the key switch 3 is pressed down to shut down, the key switch 3 conducts the connection between the charge and discharge unit 4 and the voltage dividing circuit 2, the charge and discharge unit 4 discharges outwards in a short time, so that the voltage of the third end of the switch tube 1 is pulled up to be close to the voltage of the power supply 5, the voltage difference between the voltage of the third end and the voltage of the first end of the switch tube 1 cannot reach the conduction threshold voltage, and the switch tube 1 is turned off. Because the control end of the voltage division circuit 2 is connected with the second end of the switch tube 1, the switch tube 1 stops outputting, and the voltage division circuit 2 outputs a second voltage to the third end of the switch tube 1, so that the switch tube 1 is kept turned off, and the shutdown is completed.
The hardware switch circuit provided by the embodiment of the invention is different from the traditional software switch circuit, does not need to be connected with an electric appliance MCU, does not need to be controlled by an additional MCU, does not occupy the IO interface resource of the MCU, and has simple circuit structure and low cost.
As shown in fig. 2, in one embodiment, the voltage divider circuit 2 includes a switch unit, a first resistor R1, and a second resistor R2;
the first resistor R1 and the second resistor R2 are used for dividing the voltage of the power source 5 and outputting the divided voltage to the control end of the first switch tube 1, so that the switch tube 1 is turned on under the control of the divided voltage. The first end of the first resistor R1 is used for connecting a power supply, the second end of the first resistor R1 is connected with the first end of the second resistor R2, and the second end of the second resistor R2 is connected with the first end of the switch unit. The third terminal of the switch tube 1 is also connected to the second terminal of the first resistor R1. Because the switch tube 1 is turned on when the voltage at the third end is less than the voltage at the first end and the turn-on threshold voltage is satisfied, it is only necessary that the resistance of the first resistor R1 is greater than the resistance of the second resistor R2 so that the turn-on threshold voltage of the switch tube is satisfied during voltage division.
The switch unit can be a field effect transistor or a triode, and the switch unit can be conducted as long as the voltage meeting the preset value is input to the third end of the switch unit. The first end of the switch unit is connected with the first end of the second resistor R2, the second end of the switch unit is grounded, and the third end of the switch unit is connected with the second end of the switch tube 1. Generally, the first terminal of the switch unit is used as an input terminal, the second terminal of the switch unit is used as an output terminal, and the third terminal of the switch unit is used as a control terminal.
Since the first end of the first resistor R1 is connected to the power supply 5, the second end is connected to the third end of the switching tube 1, and in the initial state, the hardware switching circuit does not work, and the switching tube 1 is in the off state, the second end of the first resistor R1 outputs the voltage of the power supply 5 to the third end of the switching tube 1, so that the voltage of the third end of the switching tube 1 is equal to the voltage of the first end of the switching tube 1, and the switching tube 1 is in the off state. At this time, the key switch 3 is pressed to conduct a loop of the first resistor R1 and the charging and discharging unit 4, the power supply 5 charges the charging and discharging unit 4 through the first resistor R1, the voltage at the third end of the switch tube 1 is pulled low in a short time when the charging and discharging unit 4 is charged, the switch tube 1 is conducted, and power is supplied to the electric appliance working circuit 6. Because the second end of the switch tube 1 is connected with the third end of the switch unit to output voltage to the switch unit, the switch unit is conducted at the moment, current flows from the first resistor R1 to the second resistor R2, because the resistance of the first resistor R1 is greater than that of the second resistor R2, in a branch where the first resistor R1 and the second resistor R2 are located together, the divided voltage of the first resistor R1 and the second resistor R2 is output to the third end of the switch tube 1, and the conduction condition that the voltage of the third end of the switch tube 1 is less than that of the first end is met, so that the conduction state of the switch tube 1 is maintained, power is continuously supplied to the electric appliance working circuit 6, and the startup is completed. When the hardware switching circuit works, the charging and discharging unit 4 is charged by the second end of the switching tube 1, the key switch 3 is pressed at the moment, the charging and discharging unit 4 discharges through the second resistor R2, in a short time, the voltage of the third end of the switching tube 1 is pulled to be close to the voltage of the first end of the switching tube 1, the switching tube 1 is turned off, and the power supply to the electric appliance working circuit 6 is stopped. Because the third end of the switch unit is connected with the second end of the switch tube 1, after the switch tube 1 stops outputting, the switch unit is also turned off, so that the voltage of the third end of the switch tube 1 is equal to the voltage of the power supply 5, the switch tube 1 keeps a turn-off state, and the shutdown is completed.
In the hardware switch circuit provided by this embodiment, the key switch 3 triggers the charging and discharging control switch tube 1 of the charging and discharging unit 4 to be turned on and off through voltage division of the power supply 5 by the first resistor R1 and the second resistor R2, and the switch unit maintains the on state and the off state of the switch tube 1 according to the on state of the switch tube 1, thereby implementing power on and power off. The starting and shutdown processes are not controlled by control chips such as an MCU (microprogrammed control unit), the structure is simple, MCU interface resources are not occupied, code compiling is not needed in circuit development, and hardware cost and labor cost are saved.
In one embodiment, the switch 1 comprises a P-channel Metal-Oxide-Semiconductor Field-Effect Transistor (P-MOSFET), and is an enhancement type. The source electrode of the P-MOSFET is used for being connected with a power supply 5, the drain electrode of the P-MOSFET is used for being connected with an electric appliance working circuit 6, and the grid electrode of the P-MOSFET is respectively connected with the second end of the first resistor R1 and the first end of the key switch 3. The conduction condition of the P-MOSFET is that the gate voltage is less than the source voltage.
When the key switch 3 is pressed in an initial state, the charge and discharge unit 4 pulls down the grid voltage of the P-MOSFET, the grid voltage is smaller than the source voltage and reaches the conduction threshold, the P-MOSFET is conducted, and the drain supplies power to the electric appliance working circuit 6. The third terminal of the voltage division circuit 2 is connected with the drain of the P-MOSFET, and provides a conducting maintaining voltage to the grid of the P-MOSFET according to the output of the P-MOSFET, so as to maintain the conducting state of the P-MOSFET. And the key switch 3 is pressed again, because the charge and discharge unit 4 is charged by the drain electrode of the P-MOSFET, the charge and discharge unit 4 discharges and pulls up the grid voltage of the P-MOSFET, so that the P-MOSFET is turned off, and the drain electrode of the P-MOSFET has no output, at the moment, the voltage division circuit 2 outputs a turn-off maintaining voltage to the grid electrode of the P-MOSFET according to the output of the drain electrode of the P-MOSFET, keeps the turn-off state of the P-MOSFET and finishes the shutdown. Optionally, the P-MOSFET may be a fast P-MOSFET with an on-time and an off-time both less than the charging and discharging time of the charging and discharging unit 4, so as to ensure the efficiency and accuracy of the circuit switching.
In one embodiment, the switching unit includes an NPN transistor. The collector of the NPN type triode is connected to the second end of the second resistor R2, the base is connected to the second end of the switching tube 1, and the emitter is grounded. Optionally, the base of the NPN transistor is connected to the drain of the P-MOSFET through a third resistor R3 and to ground through a fourth resistor R4, and the emitter is grounded.
The key switch 3 is pressed in an initial state, the switch tube 1 is conducted, the second end of the switch tube 1 inputs voltage to the base electrode of the NPN triode, so that the NPN triode reaches conduction threshold voltage, the NPN triode conducts a branch where the first resistor R1 and the second resistor R2 are located, voltage of the power supply 5 is divided by the first resistor R1 and the second resistor R2 and then provides divided voltage to the third end of the switch tube 1, the voltage of the third end of the switch tube 1 is smaller than the voltage of the first end, and therefore the conduction of the switch tube 1 is kept, namely the startup state of the circuit is kept to achieve startup. At this time, the key switch 3 is quickly pressed, the key switch 3 triggers the switch tube 1 to be turned off, the switch tube 1 stops outputting voltage to the NPN triode, the NPN triode is turned off, at this time, the branch where the first resistor R1 and the second resistor R2 are located is broken, and the power supply 5 provides voltage to the first end of the switch tube 1 through the first resistor, so that the switch tube 1 is kept turned off to realize shutdown.
In one embodiment, the charging and discharging unit 4 includes a capacitor, one end of the capacitor is connected to the second end of the key switch 3 and the second end of the switch tube 1, and the other end of the capacitor is grounded. The capacitor with longer charging time can be selected as the capacitor, so that the charging and discharging time is longer than the turn-on time and the turn-off time of the switch tube 1, and the switching efficiency and the accuracy are ensured.
In one embodiment, the base of the NPN transistor is connected to the drain of the P-MOSFET through a third resistor R3 and to ground through a fourth resistor R4. The NPN transistor is a voltage-driven switching transistor, and is usually rarely directly connected to the power supply 5, but rather provides a conduction control voltage to the base of the NPN transistor through two resistors connected in series and grounded. In this embodiment, the third resistor R3 and the fourth resistor R4 have appropriate values, so that the NPN transistor can be controlled to be turned on and off by voltage division.
In one embodiment, one end of the capacitor is connected to the drain of the P-MOSFET through a fifth resistor R5. In the present embodiment, the capacitor is charged and discharged as the charging and discharging unit 4, and generally, the capacitor needs to be charged and discharged through a resistor, and a large current at the moment of charging and discharging is reduced to protect the circuit. One end of the capacitor is connected with the drain electrode of the P-MOSFET and is used for being charged when the P-MOSFET is conducted, so that the grid voltage of the P-MOSFET can be pulled up to turn off the P-MOSFET when the key switch 3 is pressed to turn off the power supply.
As shown in fig. 2, in one embodiment, the voltage divider circuit 2 includes a first resistor R1 and a second resistor R2, and an NPN transistor, the first switch 1 is an enhancement P-MOSFET, and the charging and discharging unit 4 is a capacitor. The first end of the first resistor R1 is used for connecting the power supply 5, and the second end of the first resistor R1 is connected with the first end of the second resistor R2. The collector of the NPN triode is connected with the second end of the second resistor R2, the base of the NPN triode is connected with the drain of the P-MOSFET through the third resistor R3 and is grounded through the fourth resistor R4, and the emitter of the NPN triode is grounded. The source electrode of the P-MOSFET is used for connecting a power supply 5, the drain electrode of the P-MOSFET is used for connecting an electric appliance working circuit 6, and the grid electrode of the P-MOSFET is respectively connected with the first end of the key switch 3 and the second end of the first resistor R1. One end of the capacitor is connected to the second end of the push switch 3 and to the drain of the P-MOSFET via a fifth resistor R5. Alternatively, the P-MOSFET may select the gate-source threshold voltage Vth1And the high-speed switching tube is less than or equal to-2.5V, and the capacitance is 1 muF so as to ensure that the charging and discharging time of the capacitor is longer than the turning-on and turning-off time of the P-MOSFET. The NPN triode can select the conduction threshold voltage Vth2And a triode with the voltage of more than or equal to 0.7V. Alternatively, the voltage of the power supply 5 may be selected from the voltage VBATA 5V dc power supply 5. In an initial state, the key switch 3 is not pressed, the whole hardware switch circuit has no current loop, the P-MOFET and the NPN triode are in a turn-off state, and the hardware switch circuit has no output. When the key switch 3 is pressed to start the device, the power supply 5 charges the capacitor through the first resistor R1 and the key switch 3, the voltage of the capacitor slowly rises from zero, obviously, the grid source voltage V of the P-MOSFET is in the process of charging the capacitorgsHas a short period of time less than the gate-source threshold voltage Vth1Therefore, the P-MOSFET is conducted, and the drain electrode of the P-MOSFET supplies power to the electric appliance working circuit 6 and also supplies voltage to the base electrode of the NPN triode. At this time, the NPN triodeThe base voltage of (a) is:
Figure GDA0002756843990000101
wherein VbIs the base voltage, V, of an NPN triodedIs the drain output voltage of the P-MOSFET, R3Is the resistance value of the third resistor R34Is the resistance value of the fourth resistor R4. The emitter of the NPN triode is grounded, so the base voltage of the NPN triode is the emitter junction voltage V of the NPN triodebe. At this time, if the NPN triode is required to be conducted, the emitting junction voltage V needs to be satisfiedbeGreater than its turn-on threshold voltage Vth2. If the NPN is turned on, the first resistor R1 and the second resistor R2 divide the voltage of the power supply 5, and the gate voltage of the P-MOSFET is obtained as:
Figure GDA0002756843990000102
wherein VgIs the gate voltage of the P-MOSFET, R1Is the resistance value of the first resistor R1, R2Is the resistance value of the second resistor R2. If the P-MOSFET is kept on to continuously output to the outside to complete the start-up, the gate-source voltage V needs to be satisfiedgsLess than the gate-source threshold voltage Vth1. Namely, it is
Vgs=Vg- Vs<Vth1 (3)
According to the expression (1) and the expression (2), there are various combinations of values of the first resistor R1, the second resistor R2, the third resistor R3, and the fourth resistor R4, and this embodiment provides one of the combinations, and does not represent a limitation to the present invention. Optionally, the resistance of the first resistor R1 may be 100K Ω, the resistance of the second resistor R2 may be 10K Ω, the resistance of the third resistor R3 may be 10K Ω, the resistance of the fourth resistor R4 may be 10K Ω, and the resistance of the fifth resistor R5 may be 100K Ω. The base voltage V of the NPN triode obtained by the expression (1) in the above state can be obtainedbGreater than a turn-on threshold voltage Vth2Is composed of expression (2) and expression(3) Resulting gate-source voltage V of P-MOSFETgs-5V, less than the gate-source threshold voltage Vth1. For the fifth resistor R5, the resistance of the fifth resistor R5 can be set to 100K Ω, and the capacitor is charged by the fifth resistor R5.
When the power-off is performed, the key switch 3 is pressed again, because the capacitor is charged by the drain of the P-MOSFET through the fifth resistor R5 before the key switch 3 is pressed, the voltage V across the capacitorCApproximately equal to the input voltage VBATTherefore, after the key switch 3 is pressed down, the capacitor discharges to the ground through the key switch 3, the second resistor R2 and the NPN triode, and the grid voltage of the P-MOSFET obtains about 5V voltage due to the discharge of the capacitor in a short time in the discharging process, so that the grid-source voltage V of the P-MOSFET is enabled to be VgsGreater than gate-source threshold voltage Vth1Thus the P-MOSFET is off and no voltage is output at the drain. Correspondingly, the base electrode of the NPN triode has no voltage input, and the NPN triode is turned off. At this time, the gate voltage of the P-MOSFET is pulled up to the voltage V of the power supply 5 through the first resistor R1BATAt this time, the gate-source voltage VgsAnd (5) keeping the P-MOSFET to be turned off, and finishing the shutdown when no voltage is output from the drain electrode.
In one embodiment, the voltage divider circuit 2 includes an adjustable potentiometer and a switching unit. The voltage division circuit 2 is used for dividing the voltage of the power supply 5 so as to provide a holding voltage for the control end of the field effect transistor and keep the on state and the off state of the field effect transistor.
In one embodiment, the switching unit includes a relay, a first contact of the relay is connected to the second end of the second resistor R2, a second contact of the relay is grounded, a first end of a relay coil is connected to the second end of the first switching tube 1, and a second end of the relay coil is grounded.
A relay is an electric appliance that generates a predetermined step change in a controlled amount in an electric output circuit when a change in an input amount meets a predetermined requirement. It has the interactive relation between the input loop and the output loop, and is a switch which uses small current to control the operation of large current. In the present embodiment, the switching unit may employ a relay. Of course, this embodiment only provides one connection method of the relay, and the second end of the relay coil may be directly grounded, may be grounded through a sixth resistor, may be grounded through a transistor, and so on.
The embodiment of the invention also provides electric equipment which comprises the hardware switching circuit provided by any one of the embodiments. The electric equipment can be any electric equipment such as a computer and a television. In one embodiment, the electric equipment can be an LED lamp, and the LED lamp is controlled to be turned on or turned off by using a hardware switching circuit. Therefore, compared with the traditional software switching circuit, the LED lamp adopting the hardware switching circuit provided by the embodiment of the invention can save MCU interface resources, has a simple switching circuit structure, and does not need to reevaluate and design a replacement scheme for the switching circuit.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (7)

1. A hardware switch circuit is characterized by comprising a switch tube, a voltage division circuit, a key switch and a charging and discharging unit;
the first end of the switch tube is used for being connected with a power supply, the second end of the switch tube is used for being connected with an electric appliance working circuit, and the third end of the switch tube is connected with the output end of the voltage division circuit; when the voltage of the third end of the switching tube is less than the voltage of the first end of the switching tube, the switching tube is switched on, and when the voltage of the third end of the switching tube is equal to or greater than the voltage of the first end of the switching tube, the switching tube is switched off;
the input end of the voltage division circuit is connected with the power supply, and the control end of the voltage division circuit is connected with the second end of the switch tube; the voltage division circuit is used for dividing the voltage of the power supply and outputting different divided voltages to the switch tube; the voltage division circuit comprises a switch unit, a first resistor and a second resistor; the first end of the first resistor is used for being connected with the power supply, and the second end of the first resistor is respectively connected with the first end of the second resistor and the third end of the switching tube; the first end of the switch unit is connected with the second end of the second resistor, the second end of the switch unit is grounded, and the third end of the switch unit is connected with the second end of the switch tube; the switch unit is used for conducting under the output control of the switch tube;
the charging and discharging unit comprises a capacitor and a fifth resistor, the first end of the capacitor is connected with the second end of the switching tube through the fifth resistor, and the second end of the capacitor is grounded;
the first end of the key switch is connected with the third end of the switch tube, and the second end of the key switch is connected with the first end of the capacitor.
2. The hardware switch circuit of claim 1, wherein the switch transistor is a P-channel enhancement mode fet, a source of the P-channel enhancement mode fet is configured to be connected to the power supply, a drain of the P-channel enhancement mode fet is configured to be connected to an electrical operating circuit, and a gate of the P-channel enhancement mode fet is respectively connected to the second terminal of the first resistor and the first terminal of the switch.
3. The hardware switching circuit according to claim 2, wherein the switching unit comprises an NPN transistor, a collector of the NPN transistor is connected to the second end of the second resistor, a base of the NPN transistor is connected to the drain of the P-channel enhancement mode fet, and an emitter of the NPN transistor is grounded.
4. The hardware switching circuit of claim 3, further comprising a third resistor and a fourth resistor; and the base electrode of the NPN triode is connected with the drain electrode of the P-channel enhanced field effect transistor through a third resistor and is grounded through a fourth resistor.
5. The hardware switching circuit of claim 1 wherein the voltage divider circuit comprises an adjustable potentiometer and a switching unit;
the first fixed end of the adjustable potentiometer is used for being connected with the power supply, the second fixed end of the adjustable potentiometer is connected with the input end of the switch unit, and the adjusting output end of the adjustable potentiometer is respectively connected with the third end of the switch tube and the first end of the key switch.
6. The hardware switching circuit of claim 1 wherein the switching unit comprises a relay, a first contact of the relay is connected to the second terminal of the second resistor, a second contact of the relay is connected to ground, a first terminal of the relay coil is connected to the output terminal of the switching tube, and a second terminal of the relay coil is connected to ground.
7. An electrical device comprising the hardware switching circuit of any of claims 1-6.
CN201910088624.6A 2019-01-29 2019-01-29 Hardware switch circuit Active CN109901689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910088624.6A CN109901689B (en) 2019-01-29 2019-01-29 Hardware switch circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910088624.6A CN109901689B (en) 2019-01-29 2019-01-29 Hardware switch circuit

Publications (2)

Publication Number Publication Date
CN109901689A CN109901689A (en) 2019-06-18
CN109901689B true CN109901689B (en) 2021-10-12

Family

ID=66944439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910088624.6A Active CN109901689B (en) 2019-01-29 2019-01-29 Hardware switch circuit

Country Status (1)

Country Link
CN (1) CN109901689B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654277A (en) * 2020-06-16 2020-09-11 宁波得力科贝技术有限公司 A switch circuit and a printer using method using the switch circuit
CN111654276B (en) * 2020-06-18 2024-05-14 湖南中科电气股份有限公司 Switching value signal control circuit and control method
CN114142848A (en) * 2021-11-16 2022-03-04 上海格易电子有限公司 Chip interface circuit and chip
CN114614806B (en) * 2022-02-23 2024-07-02 宁波伊士通医疗器械有限公司 Pure hardware general double-key switch circuit
CN119496497A (en) * 2025-01-17 2025-02-21 中科南京信息高铁研究院 A hardware switch circuit

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425797A (en) * 2007-11-01 2009-05-06 深圳迈瑞生物医疗电子股份有限公司 Slow opening fast shutting electronic switch circuit and control method thereof
CN201867606U (en) * 2010-11-04 2011-06-15 北京握奇数据系统有限公司 Switch circuit
CN204031110U (en) * 2014-07-11 2014-12-17 深圳市航嘉驰源电气股份有限公司 Electronic DC switch and electronic equipment
CN204836123U (en) * 2015-06-29 2015-12-02 惠州市凯越电子有限公司 Key switch detection circuitry
RU168275U1 (en) * 2016-04-04 2017-01-25 Общество с ограниченной ответственностью "Завод технологических источников" POWER KEY SHUTTER DRIVER
CN107612534A (en) * 2017-09-18 2018-01-19 深圳市沃特沃德股份有限公司 On-off circuit and terminal device
CN206922726U (en) * 2017-05-11 2018-01-23 广州视琨电子科技有限公司 A kind of self-locking electronic switching circuit
CN207010642U (en) * 2017-06-14 2018-02-13 无锡市中健科仪有限公司 Key switch circuit

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101326717A (en) * 2005-12-13 2008-12-17 意法半导体股份有限公司 Drive circuit for switch structure of emitter electrode
US9768160B2 (en) * 2013-08-09 2017-09-19 Infineon Technologies Austria Ag Semiconductor device, electronic circuit and method for switching high voltages
CN204810251U (en) * 2015-05-28 2015-11-25 比亚迪股份有限公司 Switching on and shutting down circuit of consumer and consumer
CN205750715U (en) * 2016-05-11 2016-11-30 重庆工业职业技术学院 A kind of computer power supply controller

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425797A (en) * 2007-11-01 2009-05-06 深圳迈瑞生物医疗电子股份有限公司 Slow opening fast shutting electronic switch circuit and control method thereof
CN201867606U (en) * 2010-11-04 2011-06-15 北京握奇数据系统有限公司 Switch circuit
CN204031110U (en) * 2014-07-11 2014-12-17 深圳市航嘉驰源电气股份有限公司 Electronic DC switch and electronic equipment
CN204836123U (en) * 2015-06-29 2015-12-02 惠州市凯越电子有限公司 Key switch detection circuitry
RU168275U1 (en) * 2016-04-04 2017-01-25 Общество с ограниченной ответственностью "Завод технологических источников" POWER KEY SHUTTER DRIVER
CN206922726U (en) * 2017-05-11 2018-01-23 广州视琨电子科技有限公司 A kind of self-locking electronic switching circuit
CN207010642U (en) * 2017-06-14 2018-02-13 无锡市中健科仪有限公司 Key switch circuit
CN107612534A (en) * 2017-09-18 2018-01-19 深圳市沃特沃德股份有限公司 On-off circuit and terminal device

Also Published As

Publication number Publication date
CN109901689A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
CN109901689B (en) Hardware switch circuit
CN108123596B (en) NMOS switching tube driving circuit
CN109905619B (en) Display device
US7741884B2 (en) Load drive circuit
CN110994774B (en) Power supply switching circuit
CN113169663A (en) Drive circuit of channel switch, charging control method and charger
CN103748752A (en) Start-up circuit
CN107294386A (en) DC power control circuit
CN110932531A (en) Drive circuit and power supply control circuit
US20240310100A1 (en) Control Circuit Including a Controller and an Enable Module, Signal Conversion Circuit Coupled to the Controller, and Control Method
KR20110033485A (en) Inrush Current Limiting Circuit
US10396660B2 (en) Switching regulator, semiconductor integrated circuit, and electronic appliance
US11411397B2 (en) Polarity reversal protection circuit
CN112133238B (en) Drive circuit and electronic device
US10411461B2 (en) Protection circuit for brushless DC motor, and control device
JP2016072676A (en) Semiconductor relay
CN108370216B (en) Switching power converter with zero current at startup
CN109327215B (en) Startup and shutdown control circuit
CN114784927B (en) Power supply circuit for saving chip layout area
CN110138206A (en) Power driving circuit and display device
KR200469552Y1 (en) Apparatus for preventing in-rush current
CN108512191B (en) Surge protection circuit, electronic equipment and surge protection method of circuit
CN212137630U (en) Slow start control circuit
CN115603298A (en) Power-on overshoot prevention circuit, chip and electronic equipment
CN210927592U (en) Startup and shutdown circuit

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519000 No. 333, Kexing Road, Xiangzhou District, Zhuhai City, Guangdong Province

Applicant after: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

Address before: Floor 1-107, building 904, ShiJiHua Road, Zhuhai City, Guangdong Province

Applicant before: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant