The content of the invention
In order to solve the above-mentioned technical problem, the present invention proposes a kind of Multifunction open shutdown circuit and method for start-up and shutdown, should
Circuit is simple, cost is low and safe and reliable, functional, and power consumption is few, and the method for start-up and shutdown is simple to operate, and switching on and shutting down are convenient,
It is effectively increased the experience comfort level of user.
In order to achieve the above object, technical scheme is as follows:
A kind of Multifunction open shutdown circuit, including:Button, button is connected with outside power supply;Bleeder circuit, bleeder circuit
Input be connected with button, for outside supply voltage to be carried out into partial pressure transmission;Software controlled circuitry, including:Processor
Detect circuit and processor control circuit;Processor detection circuit is used to detect whether button closes, and processor control circuit is used
The opening and closing of back-end system power supply is controlled in software;Hardware control circuit, the closing for hardware controls back-end system power supply.
A kind of Multifunction open shutdown circuit of the present invention, its is simple in construction, and each several part division of labor is clear and definite, utilizes software controlled circuitry
To control the opening and closing of back-end system power supply, and hardware control circuit can effectively realize the closing of back-end system power supply, in software
When control circuit can not realize the closing of back-end system power supply, hardware control circuit still can rapidly realize end system thereafter
The closing of power supply, realizes shutdown.
On the basis of above-mentioned technical proposal, following improvement can be also done:
As preferred scheme, hardware control circuit includes:Hardware shutdown circuit and discharge circuit.
Using above-mentioned preferred scheme, hardware shutdown circuit is used for realizing that hardware shuts down, and discharge circuit causes hardware to shut down
Circuit stability will not effectively, after shutdown be produced with the start of next time to conflict.
As preferred scheme, bleeder circuit includes multiple divider resistances;Processor detection circuit includes:Reverse buffer
(U1), and the input pin of reverse buffer (U1) is connected with divider resistance, the output pin of reverse buffer (U1) and processor
Detect pin connection;Processor control circuit includes:Resistance (R8), resistance (R8) one end is connected with the positive pole of diode (D2), electricity
The control pin of the other end and processor that hinder (R8) is connected, and the negative pole and the power control pin of back-end system of diode (D2)
Connection;Hardware shutdown circuit includes:Electric capacity (C3) and metal-oxide-semiconductor (Q1), electric capacity (C3) one end, the grid and button of metal-oxide-semiconductor (Q1)
(S1) connect, the other end ground connection of electric capacity (C3), the drain electrode of metal-oxide-semiconductor (Q1) and the power control pin of back-end system are connected, MOS
Manage the source ground of (Q1);Discharge circuit includes:Diode (D3) and discharge resistance, positive pole and the electric capacity (C3) of diode (D3)
One end connection, one end that the negative pole of diode (D3) is connected with discharge resistance, the other end of discharge resistance is grounded.
Using above-mentioned preferred scheme, the circuit is simple, cost is low and safe and reliable, functional, and power consumption is few.
As preferred scheme, hardware shutdown circuit also includes resistance (R9), and one end and the button (S1) of resistance (R9) connect
Connect, the other end of resistance (R9) is connected with electric capacity (C3).
Using above-mentioned preferred scheme, it is ensured that the validity of hardware shutdown circuit, there are certain time-delay and partial pressure effect, prevent
Electric capacity (C3) charging interval is too fast, causes the hard unused time too short.
As preferred scheme, divider resistance includes:Resistance (R1), resistance (R3), resistance (R5), resistance (R7), resistance
(R1) one end, one end of resistance (R5) is connected with button (S1), and the other end of resistance (R1) is with resistance (R3), with reversely buffering
The input connection of device (U1);The other end of resistance (R5) is connected with resistance (R7), with the positive pole of diode (D1), diode
(D1) negative pole and the power control pin of back-end system is connected, the other end ground connection of resistance (R7).
Using above-mentioned preferred scheme, utilize divider resistance so that the circuit can compatible any voltage dc source
Input, compatible performance is more preferable.
As preferred scheme, discharge resistance includes:Resistance (R5) and resistance (R7), one end of resistance (R5) and diode
(D3) negative pole, button (S1) connection, the other end of resistance (R5) are connected with resistance (R7).
Using above-mentioned preferred scheme, more optimized structure, resistance (R5) and resistance (R7) while realizing partial pressure and electric discharge
Effect, saves cost, and energy consumption is small.
As preferred scheme, electric capacity (C1) has been arranged in parallel at resistance (R7) two ends.
Using above-mentioned preferred scheme, it can effectively keep the level of the power control pin of back-end system steady.By
During key (S1) is pinned, finger may cause button (S1) to be disconnected in a flash at certain because of shake, cause rear end
The level of the power control pin of system is dragged down by moment, causes boot failure.And in the two ends shunt capacitance of resistance (R7)
(C1) after, disconnect in a flash, within the time, electric capacity (C1) can be discharged, tie up even in certain that button (S1) is pinned
The power control pin for holding back-end system is high level, keeps the level of back-end system power control pin steady, improves user
Experience Degree.
As preferred scheme, the one end of the power control pin of back-end system also with resistance (R8) is connected, resistance (R8)
Other end ground connection, and be also arranged in parallel electric capacity (C2) at resistance (R8) two ends.
Using above-mentioned preferred scheme, it is ensured that the security of the power control pin of back-end system, and the electric capacity set
(C2) it can effectively keep the level of the power control pin of back-end system steady.The control of processor in processor control circuit
Pin processed may drag down the level of the power control pin of back-end system after certain is interfered in a flash, cause start to lose
Lose.And after the two ends shunt capacitance (C2) of resistance (R8), even if the control pin of processor is interfered in a flash at certain, at this
In time, electric capacity (C2) can be discharged, and the power control pin for maintaining back-end system is high level, keeps back-end system power supply
The level of controlling switch is steady, improves the Experience Degree of user.
The method for start-up and shutdown of switching on and shutting down is carried out using Multifunction open shutdown circuit, starting-up method is:Button (S1) is pressed
Under;If the time of button is less than the hard unused time, start shooting successfully;If the time of button is more than or equal to the hard unused time,
Boot failure;Software closedown method is:It is controlled using processor, realizes shutdown;Hardware closedown method is, by button (S1)
Press;If the time of button is more than or equal to the hard unused time, shut down successfully;If the time of button is less than the hard unused time,
Then shutdown failure.
Using above-mentioned preferred scheme, method for start-up and shutdown is easy and effective.
Embodiment
The preferred embodiment that the invention will now be described in detail with reference to the accompanying drawings.
In order to reach the purpose of the present invention, implement in a kind of Multifunction open shutdown circuit and some of of method for start-up and shutdown
In example,
As shown in figure 1, a kind of Multifunction open shutdown circuit, including:Button 1, bleeder circuit 2, hardware control circuit 3 and soft
Part controls circuit 4.Hardware control circuit 3 and software controlled circuitry 4 are all connected with the power control pin of back-end system, if rear end
The power control pin level of system is height, and back-end system is just started shooting work, is just shut down to be low.
Button 1 is connected with outside power supply;The input of bleeder circuit 2 is connected with button 1, for outside power supply is electric
Pressure carries out partial pressure transmission;Hardware control circuit includes:Hardware shutdown circuit 31 and discharge circuit 32, hardware shutdown circuit 31 are used for
Realize that hardware shuts down, discharge circuit 32 causes hardware shutdown circuit 31 stable effective, will not be produced after shutdown with the start of next time
Conflict;Software controlled circuitry 4 includes:Processor detects circuit 41 and processor control circuit 42;Processor detection circuit 41 is used
Whether closed in detection button, processor control circuit 42 is used for the opening and closing that software controls back-end system power supply.
As shown in Fig. 2 bleeder circuit 2 includes multiple divider resistances, it is respectively:Resistance (R1), resistance (R3), resistance
(R5), resistance (R7), one end, one end of resistance (R5) of resistance (R1) are connected with button (S1), the other end of resistance (R1) with
Resistance (R3), it is connected with the input pin of reverse buffer (U1);The other end of resistance (R5) and resistance (R7) and diode (D1)
Positive pole connection, the power control pin (PWR_CON) of the negative pole of diode (D1) and back-end system connects, resistance (R7) it is another
One end is grounded.
Processor detection circuit 41 includes:Reverse buffer (U1), and the input pin and resistance of reverse buffer (U1)
(R1) connect, the output pin of reverse buffer (U1) and the detection pin (CPU_DET) of processor, be connected with resistance (R2), reversely
The grounding leg ground connection of buffer (U1), supply pin and resistance (R2), the one of electricity of back-end system of reverse buffer (U1)
Press the power pins connection for 3.3V.
Processor control circuit 42 includes:Resistance (R8), resistance (R8) one end is connected with the positive pole of diode (D2), resistance
(R8) the other end and the control pin (CPU_CON) of processor is connected, and the negative pole and the power supply of back-end system of diode (D2)
Controlling switch (PWR_CON) is connected, and the positive pole of diode (D2) is also connected with resistance (R4), the other end of resistance (R4) and rear end
One of voltage of system connects for 3.3V power pins.
Hardware shutdown circuit 31 includes:Resistance (R9), electric capacity (C3) and metal-oxide-semiconductor (Q1), one end of resistance (R9) and button
(S1) connect, the other end of resistance (R9) is connected with the grid of electric capacity (C3), metal-oxide-semiconductor (Q1), the other end ground connection of electric capacity (C3),
The drain electrode of metal-oxide-semiconductor (Q1) and the power control pin (PWR_CON) of back-end system are connected, the source ground of metal-oxide-semiconductor (Q1).
Discharge circuit 32 includes:Diode (D3), resistance (R5) and resistance (R7), the positive pole and electric capacity of diode (D3)
(C3) one end connection, the negative pole of diode (D3) is connected with resistance (R5), and the other end of resistance (R5) is connected with resistance (R7),
Electric capacity (C1) has been arranged in parallel at resistance (R7) two ends.
The one end of the power control pin (PWR_CON) of back-end system also with resistance (R8) is connected, resistance (R8) it is another
End ground connection, and also it has been arranged in parallel electric capacity (C2) at the two ends of resistance (R8).
A kind of switching on and shutting down principle of Multifunction open shutdown circuit of the present invention is as follows:
1) under off-mode when button (S1) is pressed, outside power supply (DC_IN) will to whole on/off circuit and
Back-end system is powered, and processor can work together at once.
2) the processor detection electric circuit inspection in software controlled circuitry is pressed to button (S1), then processor is controlled
Circuit will draw high power control pin (PWR_CON) level of back-end system.Even if now trip switch, back-end system
Power supply will not also disconnect.It is of course also possible to after directly the power supply that the one of voltage of back-end system is 3.3V or so is connected to
The power control pin (PWR_CON) of end system, the action that alternate process device is drawn high.
Wherein, how long button (S1) is by starting shooting, and the time is exactly processor detection circuit inspection in software control module
Measure button (S1) and press this period that processor control circuit draws high the power control pin level of back-end system, can
It is configured with software within a processor, the personal settings for making it more meet people make people obtain more preferable use feeling
By.
3) after system boot, the power supply level of back-end system directly can be dragged down realization shutdown by processor.
If 4) processor crashes, when software can not realize shutdown, long-press button (S1), the hard shutdown in hardware control module
Circuit is started working, and the electric capacity (C3) in hard shutdown circuit is started to charge up, and when being charged to certain voltage, is connected with electric capacity (C3)
Metal-oxide-semiconductor (Q1) is turned on, and the power control pin level of back-end system is directly dragged down into realization shutdown.Wherein, in hard shutdown circuit
Resistance (R9) can effectively extend electric capacity (C3) charging interval, prevent that the hard unused time is too short.
5) after shutting down, the electric capacity (C3) in hard shutdown circuit is quick by electricity by the discharge circuit in hardware control module
Bleed off, it is to avoid when and then start, just the charged power control pin by back-end system is electric in electric capacity (C3) short time
It is flat to drag down all the time, lead to not start.
The time of long-press button (S1) shutdown is exactly the time that electric capacity (C3) charging reaches metal-oxide-semiconductor (Q1) conducting, with electric capacity
(C3) capacity is relevant, can adjust the time shut down firmly by changing the electric capacity of different capabilities.Because button (S1) is pressed
Hardware control circuit and software controlled circuitry are to work simultaneously, so the time of (S1) is pushed button when start to be surpassed
The time of shutdown really up to the mark, inside processor the time of long-press button (S1) start of software design patterns can not exceed shut down firmly when
Between.
During button (S1) is pinned, finger may cause button (S1) occurs in some moment disconnected because of shake
Open, cause the level of the power control pin (PWR_CON) of back-end system to be dragged down by moment, cause boot failure.And in resistance
(R7) after two ends shunt capacitance (C1), disconnected in a flash even in certain that button (S1) is pinned, within the time, electric capacity
(C1) it can be discharged, the power control pin (PWR_CON) for maintaining back-end system is high level, keeps back-end system power supply control
The level of pin (PWR_CON) processed is steady, improves the Experience Degree of user.
The control pin (CPU_CON) of processor in processor control circuit 42, may after certain is interfered in a flash
The level of the power control pin (PWR_CON) of back-end system can be dragged down, cause boot failure.And at resistance (R8) two ends
After shunt capacitance (C2), even if the control pin (CPU_CON) of processor is interfered in a flash at certain, within the time, electric capacity
(C2) it can be discharged, the power control pin (PWR_CON) for maintaining back-end system is high level, keeps back-end system power supply control
The level of pin (PWR_CON) processed is steady, improves the Experience Degree of user.
As shown in figure 3, carrying out the method for start-up and shutdown of switching on and shutting down using Multifunction open shutdown circuit, starting-up method is:
Button (S1) is pressed;
If the time of button is less than the hard unused time, start shooting successfully;
If the time of button is more than or equal to hard unused time, boot failure;
Software closedown method is:It is controlled using processor, realizes shutdown;
Hardware closedown method is to press button (S1);
If the time of button is more than or equal to the hard unused time, shut down successfully;
If the time of button is less than hard unused time, shutdown failure.
Using above-mentioned preferred scheme, method for start-up and shutdown is easy and effective.
It is assumed that in hardware shutdown circuit, the grid voltage of metal-oxide-semiconductor (Q1) is V, external input power (DC_
IN voltage) is Vi, the resistance of resistance (R9) is R, and the capacitance of electric capacity (C3) is C, and the time of hardware shutdown, (i.e. button (S1) was pressed
Time firmly) be t, then the functional relation between individual parameter is as follows:
V=Vi×(1-e-t/RC)
Wherein:E is natural constant, when V value reaches metal-oxide-semiconductor Q1 conducting voltage, is achieved that hard shutdown.It is determined that
The conducting voltage of metal-oxide-semiconductor (Q1) by above-mentioned formula with that after the accurate hard unused time, can obtain RC value.So as to choose
The capacitance electric capacity (C3) of the resistance (R9) of suitable resistance.
A kind of Multifunction open shutdown circuit of the present invention, its is simple in construction, and each several part division of labor is clear and definite, by chip piece and multiple
Discrete component is constituted, and cost is low, realizes basic on/off circuit function, realizes software start and hardware shutdown, and software
Start and hardware unused time are adjustable, and the setting of software available machine time can effectively prevent button imprudence error from pressing, and make
Into machine is opened by mistake, it is more than the available machine time less than the hard unused time when the time that button is pressed down, successfully starts shooting;And when processor crashes
When, software shutdown can not be realized, by the way of hardware shuts down so that operation is simpler.
Because a kind of electromechanical road of multifunction switch of the invention substantially uses discrete component, component utilization rate is high,
And when the voltage of external input power is changed, some divider resistances can be adjusted to be adapted to, it is not using routine
Single-chip microcomputer so that overall circuit structure is more simple and clear, and functional.
A kind of Multifunction open shutdown circuit controls the opening and closing of back-end system power supply using software controlled circuitry 4 come software, and
Hardware control circuit 3 can effectively realize the closing of back-end system power supply, and back-end system electricity can not be realized in software controlled circuitry
During the closing in source, hardware control circuit still can rapidly realize the closing of its rear end system power supply, realize shutdown.Partial pressure electricity
Road the high voltage of external input power is got into the power supply control that a suitable voltage detects circuit and back-end system to processor
Pin processed, when the voltage of external input power changes, can adjust the resistance of divider resistance to adapt to processor detection
The power control pin of circuit and back-end system so that the circuit can compatible any voltage dc source input, it is compatible
Performance is more preferable.
The circuit is simple, cost is low and safe and reliable, functional, and power consumption is few.
New preferred embodiment, it is noted that for the person of ordinary skill of the art, is not departing from this hair
On the premise of bright creation design, various modifications and improvements can be made, these belong to protection scope of the present invention.