Summary of the invention
Technical matters to be solved by this invention is: provide one to fall self-protection circuit, control method and POS, solves electronic equipment and cause the damage problem in electric property to internal circuit configuration after falling.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is:
The invention provides one and fall self-protection circuit, comprise total power switch, control module, power unit, storage unit and gravity sensor, described power unit comprises MCU unit; The input termination power input of total power switch, exports termination power unit; Described control module is connected with the Enable Pin of described total power switch and the GPIO mouth of described MCU unit respectively; Described MCU unit is also connected with described storage unit and gravity sensor respectively.Another technical scheme provided by the invention is:
Fall a self-protection circuit's control method, use above-mentioned one to fall self-protection circuit,
Controlling total power switch conducting by control module, is that the power unit comprising MCU unit is powered;
Gravity sensor carries out acceleration of gravity induction, when detect be in free falling body state time, export look-at-me to described MCU unit;
MCU unit stores significant data after receiving described look-at-me, stores and terminates rear output power-off signal to the shutoff of control module control total power switch, cutting system power supply.The present invention also provides technical scheme:
A kind of POS, is characterized in that, comprise above-mentioned fall self-protection circuit, scanner head, magnetic card drive and LCD screen; The road be connected with described MCU unit in described total power switch output terminal drives with described scanner head, magnetic card respectively and LCD screen is connected.
Beneficial effect of the present invention is: the electronic equipment that the present invention is different from prior art generally adopts the method doing Cushioning Design structurally in dropproof protection; still electronic equipment cannot be avoided the circuit of inside to be caused to the damage of electric property in falling process, seriously also may burn the problem of internal circuit.The invention provides one and fall self-protection circuit, control method and POS, by being connected in series total power switch in power supply input with between system power supply, being controlled connection and the shutoff of power supply by the control module between MCU unit and total power switch; When gravity sensor detects that equipment is in free falling body state, send look-at-me immediately to MCU unit, MCU unit carries out the storage of significant data immediately, after storing, control the power supply that total power switch cuts off whole system by control module.Circuit of the present invention, control method and consisting of POS can judge be in and fall state time automatically preserve significant data, and before falling, just cut off the power supply of whole system, effective reduction equipment causes the damage of electric property to internal circuit when colliding, prevent the alive circuit of electronic equipment internal from causing short circuit owing to colliding, and then burn circuit structure.Present invention achieves electronic equipment, the particularly protection fallen of POS, more to improve compared to existing technology and reliable.
Embodiment
By describing technology contents of the present invention in detail, realized object and effect, accompanying drawing is coordinated to be explained below in conjunction with embodiment.
The design of most critical of the present invention is: be in MCU unit when falling state and will receive the shutoff signal of gravity sensor transmission, then MCU unit carries out the storage of significant data immediately, and total power switch cutting system power supply is controlled by control module before falling, prevent circuit structure from after falling, causing electrical damage.
Please refer to Fig. 1 to Fig. 3, the invention provides one and fall self-protection circuit, comprise total power switch, control module, power unit, storage unit and gravity sensor, described power unit comprises MCU unit;
The input termination power input of total power switch, exports termination power unit; Described control module is connected with the Enable Pin of described total power switch and the GPIO mouth of described MCU unit respectively; Described MCU unit is also connected with described storage unit and gravity sensor respectively
It should be noted that, gravity sensor is for carrying out the induction of acceleration of gravity, its principle of work carrys out work according to piezoelectric effect, by measuring inner a slice weight (weight and piezoelectric patches are made of one), determined level direction is come by the component size of the orthogonal both direction of gravity, when falling appears in the equipment being provided with gravity sensor, free falling body state will be in before hitting ground, now, the weight of gravity sensor inside is all 0 at the component of orthogonal both direction, now gravity sensor will detect that equipment is in and fall state, just a look-at-me is exported immediately to MCU unit, subsequent treatment is carried out by MCU.
From foregoing description, beneficial effect of the present invention is: the invention provides one and fall self-protection circuit, by being connected in series total power switch in power supply input with between system power supply, controlled connection and the shutoff of power supply by the control module between MCU unit and total power switch; When gravity sensor detects that equipment is in free falling body state, send look-at-me immediately to MCU unit, MCU unit carries out the storage of significant data immediately, after storing, control the power supply that total power switch cuts off whole system by control module.Circuit of the present invention can preserve significant data automatically when judgement is in and falls state, and before falling, just cut off the power supply of whole system, effective reduction equipment causes the damage of electric property to internal circuit when colliding, prevent the alive circuit of electronic equipment internal from causing short circuit owing to colliding, and then burn circuit structure.Present invention achieves the protection that electronic equipment is fallen, more improve with reliable compared to existing technology.
Further, described control module comprises triode, and the collector of described triode connects the Enable Pin of described total power switch, and the base stage of described triode connects the GPIO mouth of described MCU unit, the grounded emitter of described triode.
Preferably, the equipment that described control module can also can play gauge tap by metal-oxide-semiconductor etc. is formed.
Seen from the above description, in circuit structure, controlled the turn-on and turn-off of total power switch by control module, and then control the electric power thus supplied of whole system.In this circuit, the break-make of total power switch is controlled by enable pin " EN ", the total power switch conducting when " EN " pin is dragged down, and when " EN " pin is driven high, total power switch turns off.After the switch of control module is closed, " EN " pin will be dragged down, total power switch conducting, for system power supply, after MCU cell operation, high level will be exported to control module by GPIO mouth control ON/OFF, control total power switch thus and keep conducting state, POS is in open state.
When MCU unit receives the look-at-me that gravity sensor sends, and determining apparatus is when being in free falling body state, MCU unit will store significant data immediately, then by GPIO mouth, ON/OFF pin to be dragged down rapidly, control module controls total power switch and turns off instantaneously, when electronic equipment hitting ground, just cut off the power supply of all internal circuits, effectively reduce the damage of colliding and electronic equipment internal circuit being caused.
Further, also comprise voltage monitoring module, described voltage monitoring module comprises voltage monitoring chip, the first resistance, the second resistance and the 3rd resistance; One end of described first resistance connects the GPIO mouth of described MCU unit, and the other end is connected with the OUT pin of described voltage monitoring chip and the base stage of triode respectively; The VDD pin of described voltage monitoring chip connects the second resistance and the 3rd resistance respectively, and described second resistance connects the power input of MCU unit, described 3rd resistance eutral grounding.
It should be noted that, the effect of voltage monitoring chip U1 is: guarantee that the power supply of MCU can normally be closed.When fall protection, the ON/OFF pin on GPIO mouth drags down by MCU unit, and the power supply of MCU is closed.But due to MCU power supply having shunt capacitance, the power down of MCU unit has a discharge process from high to low, when voltage is lower than MCU unit normal working voltage time, the level of the uncontrollable ON/OFF pin of MCU unit, now voltage monitoring chip U1 detects the operating voltage of voltage lower than MCU unit, namely when pin PIN2 (VDD) voltage is lower than threshold voltage, pin PIN1 (OUT) output low level, continue to keep transistor base low level state, until the thorough power-off of whole system.
Further, the I2C interface of described MCU unit connects described gravity sensor.
Concrete, MCU unit is by I2C and gravity sensor communication, and the interrupt mode of gravity sensor is set, when acceleration change, gravity sensor interrupts the exportable look-at-me of pin to MCU unit, read the value of gravity sensor after MCU unit receives look-at-me by I2C, if detect that the weight of gravity sensor inside is all 0 at the component of orthogonal both direction, then judge to be in fall state.
Another technical scheme provided by the invention is:
Fall a self-protection circuit's control method, use above-mentioned one to fall self-protection circuit;
Controlling total power switch conducting by control module, is that the power unit comprising MCU unit is powered;
Gravity sensor carries out acceleration of gravity induction, when detect be in free falling body state time, export look-at-me to described MCU unit;
MCU unit stores significant data after receiving described look-at-me, stores and terminates rear output power-off signal to the shutoff of control module control total power switch, cutting system power supply.
From foregoing description, beneficial effect of the present invention is: the invention provides a kind of control method falling self-protection circuit, is controlled connection and the shutoff of power supply by the control module between MCU unit and total power switch; When gravity sensor detects that equipment is in free falling body state, send look-at-me immediately to MCU unit, MCU unit carries out the storage of significant data immediately, after storing, control the power supply that total power switch cuts off whole system by control module.The present invention can preserve significant data automatically when judgement is in and falls state, and before falling, just cut off the power supply of whole system, effective reduction equipment causes the damage of electric property to internal circuit when colliding, prevent the alive circuit of electronic equipment internal from causing short circuit owing to colliding, and then burn circuit structure.Present invention achieves the protection that electronic equipment is fallen, more improve with reliable compared to existing technology.
Further, drag down the Enable Pin of described total power switch after described control module conducting, make total power switch conducting;
Export high level by described GPIO mouth after described MCU cell operation, keep the conducting state of described total power switch;
After described MCU unit receives described look-at-me, by described GPIO mouth output low level to control module, the Enable Pin being controlled total power switch by control module is turned off.
The present invention also provides technical scheme:
A kind of POS, is characterized in that, comprise above-mentioned fall self-protection circuit, scanner head, magnetic card drive and LCD screen; The road be connected with described MCU unit in described total power switch output terminal drives with described scanner head, magnetic card respectively and LCD screen is connected.
From foregoing description, beneficial effect of the present invention is: be all designed to carry hand-held mobile easily for existing a lot of POS, and hand-held mobile POS easily occurs falling portably using in process, POS internal circuit is caused to the problem of damage.The power supply of partial circuit and the existing protected mode for POS is only just broken, the power supply of the circuit of being correlated with for CPU element has no idea to break, some gang sockets such as LCD as POS connects machine, magnetic head connector, scanner head connector etc., because when colliding, these structures are all charged, likely there is the impact that moment repeatedly switches on and off in the PIN contact of connector, or there is the short-circuit conditions that PIN misplaces, damage is caused by the electric property of POS, moreover, screening cover on POS mainboard or other metal devices come off due to drop impact, the alive circuit touched on mainboard causes short circuit, circuit is caused to damage further.
What this programme employing was above-mentioned falls self-protection circuit; automatically significant data can be preserved when judging that POS is in and falls state; and before falling, just cut off the power supply of whole system; comprise the power supply of CPU; effective reduction POS causes the damage of electric property to internal circuit when colliding; prevent the alive circuit of POS inside from causing short circuit owing to colliding, and then burn circuit structure.Present invention achieves the protection that POS equipment is fallen, more improve with reliable compared to existing technology.
Refer to Fig. 1 and Fig. 3, embodiments of the invention one are:
Hand-held mobile POS inside is provided with low self-protection circuit; concrete grammar comprises: for power supply is input to a total power switch of having connected between system power supply; the break-make of power supply is controlled by enable pin " EN ", the total power switch conducting when " EN " pin is dragged down.
Long starting key " K1 " 1 of pressing arrives 2s, K1 for start touch-switch, and Q1 is NPN triode, and U1 is voltage monitoring IC.Total power switch conducting, export high level by GPIO mouth control ON/OFF after MCU work, now total power switch keeps conducting state, and POS is in open state.
MCU on POS, by the plug-in gravity sensor G-sense of I2C interface, can carry out the induction of acceleration of gravity.G-sense carrys out work according to the principle of piezoelectric effect, by measuring inner a slice weight (weight and piezoelectric patches are made of one) in the component size of the orthogonal both direction of gravity, judges horizontal direction.
When there is unexpected falling in POS, before hitting ground, POS is in free falling body state, and the weight of G-sense inside is all 0 at orthogonal both direction component, now G-sense just can detect that POS is in and falls state, and G-sense exports look-at-me at once to MCU.
Before POS hitting ground, significant data is stored in ROM by MCU, is dragged down by ON/OFF pin then rapidly, and total power switch turns off instantaneously, when POS hitting ground, because all devices is stopped power supply all, effectively can reduce the damage of collision to POS.
In sum; one provided by the invention falls self-protection circuit, method and POS; for electronic equipment; particularly hand-held mobile POS equipment, can realize automatically storing significant data in falling process, and all power supplies of closing device after storing; comprise the power supply of MCU unit; and then effectively avoid electronic equipment after falling, cause the electric property of internally charged circuit to damage due to collision, prevent internal circuit from burning, improve the dropproof safeguard measure of electronic equipment.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every equivalents utilizing instructions of the present invention and accompanying drawing content to do, or be directly or indirectly used in relevant technical field, be all in like manner included in scope of patent protection of the present invention.