Summary of the invention
The invention provides a kind of key control circuit, start, shutdown and reset function can be realized by a button,
Reduce cost.
For solving above-mentioned technical problem, the present invention is achieved by the following technical solutions:
A kind of key control circuit, including DC source, button, power management chip, main control chip, reset circuit;Described press
One end of key is connected with DC source, and the other end is connected with the Enable Pin of power management chip;Described power management chip is main
Control chip power supply;Described main control chip is connected with the Enable Pin of power management chip, and the other end of described button connects master control core
Sheet;Described reset circuit includes charging resistor, charging capacitor, switching tube;Described DC source is by by bonded charging resistor
One end, the other end of described charging resistor pass through charging capacitor ground connection;Described charging capacitor and the connection node of charging resistor
It is connected with the control end of switching tube, switch ways one end ground connection of described switching tube, another of the switch ways of described switching tube
End connects described DC source by current-limiting resistance, and the other end of the switch ways of described switching tube connects the reset of main control chip
Pin.
Further, described key control circuit also includes Bluetooth chip, and described main control chip controls the fortune of Bluetooth chip
OK.
Further, described power management chip is LDO chip.
Further, described button is connected with the Enable Pin of power management chip by the first diode, described master control
Chip is connected with the Enable Pin of power management chip by the second diode, and the negative electrode of two diodes connects.
Further, the Enable Pin of described power management chip passes through pull down resistor ground connection, described power management chip
Enable Pin pass through capacity earth.
Preferably, described switching tube is NMOS tube, and the grid of described NMOS tube connects described charging capacitor and charging resistor
Connection node, the source ground of described NMOS tube, the drain electrode of described NMOS tube by described current-limiting resistance connect described direct current
Power supply, the drain electrode of described NMOS tube connects the reset pin of described main control chip.
Preferably, described switching tube is NPN audion, and the base stage of described NPN audion connects described charging capacitor and fills
The connection node of electricity resistance, the grounded emitter of described NPN audion, the colelctor electrode of described NPN audion is by described current limliting
Resistance connects described DC source, and the colelctor electrode of described NPN audion connects the reset pin of described main control chip.
Further, described key control circuit also includes the connection of electrostatic discharge protection circuit, described button and charging resistor
Node passes through described electrostatic discharge protection circuit ground connection.
Further, described reset circuit also includes that discharge circuit, described discharge circuit include discharge diode and put
Electricity resistance, the anode of described discharge diode connects the connection node of described charging capacitor and charging resistor, described diode
Negative electrode passes through described discharge resistance ground connection.
Structure based on above-mentioned key control circuit designs, and the invention allows for the described key control circuit of a kind of employing
The electronic product of design, including described key control circuit, described key control circuit includes DC source, button, power supply
Managing chip, main control chip, reset circuit;One end of described button is connected with DC source, the other end and power management chip
Enable Pin connect;Described power management chip is that main control chip is powered;Described main control chip and the enable of power management chip
End connects, and the other end of described button connects main control chip;Described reset circuit includes charging resistor, charging capacitor, switching tube;
Described DC source passes through charging capacitor ground connection by the one end by bonded charging resistor, the other end of described charging resistor;
Described charging capacitor is connected with the control end of switching tube with the node that connects of charging resistor, switch ways one end of described switching tube
Ground connection, the other end of the switch ways of described switching tube connects described DC source, opening of described switching tube by current-limiting resistance
The other end closing path connects the reset pin of main control chip.
Compared with prior art, advantages of the present invention and good effect are: the key control circuit of the present invention and electronics produce
Product, achieve the start of main control chip, shutdown and reset function by a button, and control mode is fairly simple, it is simple to use
Family operates, easy to use, improves the experience of user;Owing to number of keys is few, the components and parts that whole circuit uses are less,
Circuit structure is fairly simple, it is easy to accomplish, cost is relatively low, has stronger competitiveness, it is simple to popularization and application.
After reading in conjunction with the accompanying the detailed description of embodiment of the present invention, the other features and advantages of the invention will become more
Add clear.
Detailed description of the invention
Below in conjunction with the accompanying drawings the detailed description of the invention of the present invention is described in more detail.
The key control circuit of the present embodiment mainly includes DC source PWR, button U1, power management chip U7, master control
Chip MCU, reset circuit etc., see shown in Fig. 1, Fig. 2;One end of button U1 connects DC source PWR, and the other end connects power supply
Enable Pin EN of managing chip U7;The power output end VOUT of power management chip U7 is connected with main control chip, out-put supply VCC
Powering for main control chip MCU, main control chip MCU is connected with Enable Pin EN of power management chip U7;The other end of button U1 with
The detection pin of main control chip MCU connects, the folding condition of main control chip MCU detection button U1;Reset circuit mainly includes filling
Electricity resistance R3, charging capacitor C2, switching tube Q5 etc., DC source PWR connects one end of charging resistor R3 by button U1, charging
The other end of resistance R3 connects one end of charging capacitor C2, the other end ground connection of charging capacitor C2, charging capacitor C2 and charged electrical
The node that connects of resistance R3 is connected with the control end of switching tube Q5, one end ground connection of the switch ways of switching tube Q5, switching tube Q5's
The other end of switch ways connects DC source PWR by current-limiting resistance R4, and the other end of the switch ways of switching tube Q5 connects
The reset pin of main control chip, sends reset signal to the reset pin of main control chip.
Under main control chip off-mode, if needing start, then push button U1, and the high level that DC source PWR provides leads to
Cross button U1 and transmit Enable Pin EN to power management chip U7, enable power management chip U7, power management chip U7 and run,
Power output end VOUT out-put supply VCC powers to main control chip MCU, and main control chip MCU powers on operation;On main control chip MCU
After electricity, Enable Pin EN of output high level to power management chip U7;Now, even if release button U1, also can guarantee that power supply pipe
Enable Pin EN of reason chip U7 is high level, it is ensured that power management chip U7 can normally work, and persistently supplies for main control chip MCU
Electricity, it is achieved main control chip MCU power up function.
After main control chip start, detect the folding condition of button U1 in real time by detecting the level of its detection pin.
After main control chip is started shooting, if button U1 is off, the control end of switching tube Q5 is low level, due to
Switching tube Q5 is high level conducting, and therefore switching tube Q5 turns off, and the other end of the switch ways of switching tube Q5 is high level, now
The reset pin of main control chip is high level, and main control chip normally works (not resetting).
After main control chip is started shooting, if needing shutdown, then can grow by button U1.When button U1 presses again and presses the time
When reaching to set unused time (such as 5 seconds), i.e. the detection pin current potential of main control chip is jumped to high level, and high level by low level
Signal continues for some time (reaching to set the unused time), then main control chip is after button U1 discharges, the shutdown of output low level
Signal is closed to Enable Pin EN of power management chip U7, power management chip U7, stops out-put supply VCC, and main control chip falls
Electricity shutdown, it is achieved shut-off function.
After main control chip is started shooting, if needing to reset, then push button U1, and DC source PWR is filled by charging resistor R3
Electricity electric capacity C2 charging, the voltage at charging capacitor C2 two ends gradually rises, when meeting the turn-on condition of switching tube Q5, switching tube Q5
Conducting, the electric current that DC source PWR provides flows into ground by the switch ways of current-limiting resistance R4, switching tube Q5, switching tube Q5's
The other end of switch ways is pulled to low level, sends low level reset signal, master control core to the reset pin of main control chip
The reset pin of sheet is pulled to low level, and main control chip resets, it is achieved the reset function of main control chip, prevents main control chip software
Race flies.
The ON time of switching tube Q5 can be adjusted neatly by the value adjusting charging resistor R3 and charging capacitor C2, from
And adjust the hardware reset time, i.e. the compressing time of button U1.As button U1 presses Guan Bi 10 seconds, switching tube Q5 turns on, master control
Chip reset.
Certainly, the value by adjusting charging resistor R3 and charging capacitor C2 adjusts resetting time so that resetting time, ratio set
Determine the unused time to grow, it is to avoid maloperation.
The key control circuit of the present embodiment, is achieved the start of main control chip by a button U1, is shut down and multiple
Bit function, control mode is fairly simple, it is simple to user operation, easy to use, improves the experience of user;Due to by bond number
Amount is few, and the components and parts that whole circuit uses are less, and circuit structure is fairly simple, it is easy to accomplish, cost is relatively low, has stronger competing
Strive power, it is simple to popularization and application.
Being additionally provided with Bluetooth chip BT in key control circuit, main control unit is connected with Bluetooth chip BT, controls bluetooth
The operation of chip.
After main control chip is started shooting, click the detection pin current potential of (or short press) button U1, i.e. main control chip by low level
Jump to high level, then main control chip sends pairing enabling signal by serial ports UART to Bluetooth chip, and Bluetooth chip receives this
After signal, start matching function, it is achieved Bluetooth chip and the pairing of external device, such as mobile phone, PAD etc..
Such as, after main control chip powers on, after Bluetooth chip and mobile phone match, if now cell phone incoming call words, Ke Yidan
Hitting button U1, main control chip is after the change of this level being detected, and transmitting control commands, to Bluetooth chip, is connected by Bluetooth chip
Phone, it is achieved connect the function of phone.
By arranging Bluetooth chip in key control circuit, enrich the function of this circuit, expand the application of circuit
Scope, improves the market competitiveness.
In the present embodiment, power management chip U7 is preferably LDO chip, and LDO chip power-consumption is low, stable performance, it is possible to
Power supply needed for providing for main control chip.
In order to ensure the correct flow direction of electric current, preventing from pouring in down a chimney, improve stability and the safety of circuit, button U1 is by the
Enable Pin EN of one diode D2 and power management chip U7 is connected, and main control chip is by the second diode D3 and power management core
Enable Pin EN of sheet U7 connects.That is, the negative electrode of the first diode D2 and the second diode D3 connects, and junction point and power management
Enable Pin EN of chip U7 connects, and the anode of the first diode D2 connects the anode of button U1, the second diode D3 and connects master control
Unit;Thus the electric energy avoiding DC source PWR to export pour in down a chimney to main control chip and main control chip the electric energy exported pour in down a chimney to
DC source PWR.
Enable Pin EN of power management chip U7 passes through pull down resistor R5 ground connection, keeps when Enable Pin EN is not driven high
Low level, it is ensured that Enable Pin EN current potential is stable, it is to avoid power-on managing chip U7 repeatedly, it is ensured that the shape of power management chip U7
State is stable.
Enable Pin EN of power management chip U7 passes through electric capacity C79 ground connection, and electric capacity C79 has time-lag action.Press by
When key U1 starts main control chip, the electric energy that DC source PWR provides is transmitted to power management by button U1, the first diode D2
The Enable Pin of chip U7, charges to electric capacity C79, and the voltage at electric capacity C79 two ends gradually rises, and enables power management chip U7.
When causing main control chip to carry low level to Enable Pin EN of power management chip U7 due to unexpected factor, electric capacity
C79 is discharged by pull down resistor R5, and the voltage at electric capacity C79 two ends is gradually lowered, and the voltage of Enable Pin EN is gradually lowered, power supply pipe
Reason chip U7 can also keep normally working a period of time, and during this period of time main control chip may recover to power management chip
The Enable Pin EN conveying high level of U7, such that it is able to avoid fluctuating the power supply caused due to the of short duration low-voltage output of main control chip
Managing chip U7 shuts down, and improves the stability of power management chip U7, it is ensured that the confession electrical stability of main control chip.
Switching tube Q5 is high level conducting, and in the present embodiment, switching tube Q5 is preferably NMOS tube, and the grid of NMOS tube is even
Connecing the connection node of charging capacitor C2 and charging resistor R3, the source ground of NMOS tube, current-limiting resistance is passed through in the drain electrode of NMOS tube
R4 connects DC source PWR, and the drain electrode of NMOS tube connects the reset pin of main control chip, shown in Figure 3.
As the another kind of preferred design of the present embodiment, switching tube Q5 elects NPN audion, the base of NPN audion as
Pole connects the connection node of charging capacitor C2 and charging resistor R3, the grounded emitter of NPN audion, the current collection of NPN audion
Pole connects DC source PWR by current-limiting resistance R4, and the colelctor electrode of NPN audion connects the reset pin of main control chip.
The reset circuit of the present embodiment is that charging capacitor C2 charges, by charging capacitor C2 two ends by charging resistor R3
The break-make of voltage cut-out pipe Q5, thus control the level height of reset signal, and then whether control the reset of main control chip,
Control mode is fairly simple, it is simple to use;And use a switching tube (NMOS tube or NPN audion), circuit structure is simple,
It is easily achieved, low cost, reduces the cost of reset circuit.
In order to bleed off the electric charge on charging capacitor C2, key control circuit is additionally provided with discharge circuit, charging capacitor
Electric charge on C2 is bled off by discharge circuit.Discharge circuit mainly includes diode D1 and discharge resistance R1, the sun of diode D1
Pole connects the connection node of charging capacitor C2 and charging resistor R3, and the negative electrode of diode D1 passes through discharge resistance R1 ground connection.
After reset, discharge button U1, by diode D1, discharge resistance R1, the electric charge in charging capacitor C2 is bled off;Fill
The voltage at electricity electric capacity C2 two ends is gradually lowered, and switching tube Q5 controls the voltage of end and is gradually lowered, when being unsatisfactory for leading of switching tube Q5
During gating condition, switching tube Q5 turns off.
Being additionally provided with electrostatic discharge protection circuit in key control circuit, button U1 passes through with the connection node of charging resistor R3
Electrostatic discharge protection circuit ground connection.
Electrostatic discharge protection circuit is used for carrying out electrostatic defending, it is to avoid the electronic device in circuit is impaired because of electrostatic, improves whole
The stability of individual circuit, extends the service life of electronic device, reduces maintenance cost.
In the present embodiment, electrostatic discharge protection circuit is preferably ESD pipe, i.e. one anode docking, double two poles of differential concatenation
Tube device, simple in construction, facilitate implementation, cost relatively low.Certainly, electrostatic discharge protection circuit can also select other components and parts to build,
It is not limited to the example above.
In order to filter high frequency spurs, key control circuit is additionally provided with filter capacitor C1, DC source PWR by filter
Ripple electric capacity C1 ground connection, thus filter the high frequency spurs of DC source output, it is to avoid damage other components and parts in reset circuit.
Design based on above-mentioned key control circuit, the present embodiment also proposed a kind of electronic product, including described by
Key control circuit.
Electronic product is to need the wearing electron-like being realized the functions such as start, shutdown, hardware reset by a button to set
Standby, such as virtual implementing helmet etc..
By designing described key control circuit in electronic product, main control chip can be realized by a button
Start, shutdown, reset function, it is simple to user operation, improve the experience of user;Owing to the number of keys of design is few, no
Only make electronic product have preferable outward appearance, and make circuit structure simpler, it is easy to accomplish, reduce cost, carry
The high competitiveness of electronic product.
Certainly, described above is not limitation of the present invention, and the present invention is also not limited to the example above, and this technology is led
Change that the those of ordinary skill in territory is made in the essential scope of the present invention, retrofit, add or replace, also should belong to this
Bright protection domain.