The control method of flashlight light
Technical field:
The present invention relates to lighting field, specifically is a kind of control method of flashlight light.
Background technology:
Flashlight is a kind of common lighting device, generally be used in the place that does not have other lighting apparatus or be inconvenient to use mains lighting supply, be widely used in places such as exploration, tourism, mine and family, at present, the control method of the flashlight of prior art generally can only be controlled a light source, and has only this simple function of Push And Release, the control method of this flashlight light has following shortcoming: the first, and uncontrollable flashlight cuts out automatically, the waste electric weight; The second, can only control a light source, function singleness adopts the flashlight of this control method to use as signal lamp, can not offer the user and effectively help.
Summary of the invention:
The technical problem to be solved in the present invention is, overcomes existing technological deficiency, provides a kind of and can control two light sources, and function is more, and the control method of a kind of flashlight light of power saving again.
The control method of a kind of flashlight light provided by the invention, it has five steps of following order:
(1): the key information that reads flashlight switch, if the action of button is arranged, then flashlight jumps to first gear operation, be that headlight is bright, if receive the information of button within the t once more, then jump to step (2), if within preset time t in preset time, do not have other control informations, then jump to step (5);
(2): flashlight jumps to the operation of second gear, and promptly headlight and back light are bright together, if receive the information of button preset time once more within the t, then jump to step (3), if within preset time t, do not have other control informations, then jumps to step (5);
(3): flashlight jumps to the operation of the 3rd gear, and promptly headlight is closed, back light is bright, if receive the information of button within preset time once more, then jumps to step (4), if within preset time t, do not have other control informations, then jumps to step (5);
(4): flashlight jumps to the operation of the 4th gear, and promptly headlight goes out, back light is glittering, if receive the information of button preset time once more within the t, then jumps to step (5), if within preset time t, do not have other control informations, then jumps to step (5);
(5): flashlight jumps to the 5th gear operation, and headlight and back light are closed together, and whole flashlight cuts out.
Described time t is the time of the time-delay closing of flashlight setting, can set up on their own.
The present invention compared with prior art, have the following advantages: first, the control of flashlight light source all has the setting of time-delay closing, when the user forgets when closing flashlight, after the time t that sets, flashlight can cut out voluntarily, saves energy, second, two light sources of this control method may command, when headlight and back light are simultaneously bright, can throw light on to the place ahead, and provide signal for the people at rear simultaneously, when when the user meets with danger, may command flashlight back light is glittering, sends an SOS, and makes things convenient for the user.
Description of drawings:
Fig. 1 is the system flow chart of the control method of flashlight light of the present invention;
Fig. 2 is the circuit theory diagrams of control board in the control method instantiation of flashlight light of the present invention.
Embodiment:
The present invention is further detailed explanation below in conjunction with Fig. 1, Fig. 2:
As shown in the figure, Fig. 1 is the system flow chart of the control method of flashlight light of the present invention, this control method can be used in single-chip microcomputer, when system begins, whether the single-chip microcomputer in the flashlight control board reads the flashlight key switch and moves, if have, then flashlight jumps to first gear operation, and promptly headlight is opened, if not action, then jump to previous step, flashlight is not done any action, from flashlight when the operation of first gear, t within the time single-chip microcomputer continue the monitoring key switch and whether move, if have, then flashlight jumps to second gear operation, and promptly headlight and back light are opened together, if do not have, then flashlight jumps to the 5th gear automatically at t after the time, and promptly headlight and back light are closed together, and flashlight cuts out; From flashlight when the operation of second gear, t within the time single-chip microcomputer continue the monitoring key switch and whether move, if having, then flashlight jumps to the 3rd gear operation, be that headlight is closed, back light is opened, if do not have, then flashlight jumps to the 5th gear automatically at t after the time; From flashlight when the operation of the 3rd gear, t within the time single-chip microcomputer continue the monitoring key switch and whether move, if having, then flashlight jumps to the 4th gear operation, be that headlight is closed, back light is glittering, if do not have, then flashlight jumps to the 5th gear automatically at t after the time; From flashlight when the operation of the 4th gear, t within the time single-chip microcomputer continue the monitoring key switch and whether move, if having, then flashlight jumps to the 5th gear operation, if do not have, then flashlight jumps to the 5th gear automatically at t after the time.Described time t is the time of a given time-delay closing, can set up on their own.
Fig. 2 is the circuit theory diagrams of an instantiation control board of the control method of flashlight light of the present invention, as shown in the figure, this control board comprises two LED lamp sources, headlight LED1 and back light LED2, a single-chip microcomputer, its model is TB630A, a diode D1, two capacitor C 1, C2, key switch S1 of two switches, a taps S2, three triode T1, T2, T3, four resistance R 1, R2, R3, R4, used power supply is a DC power supply in this control circuit, the negative pole of diode D1 connects the negative pole of power supply, positive pole connects 8 ports of single-chip microcomputer TB630A, the positive pole of one termination power of capacitor C 1, the negative pole of another termination power, 1 of single-chip microcomputer TB630A, 4 ports connect the positive pole of power supply, one section 5 port that meet single-chip microcomputer TB630A of key switch S1, the emitter of another termination triode T1, the collector electrode of triode T1 connects 3 ports of single-chip microcomputer TB630A, the common port of base stage connecting resistance R1 and R2, resistance R 1 one termination key switch S1 one terminating resistor R2, the other end water receiving switch S 2 of resistance R 2, the positive pole of another termination power of taps S2,6 ports of resistance R 3 one termination single-chip microcomputer TB630A, the base stage of another termination triode T2, the collector electrode of triode T2 connects the positive pole of back light LED2, emitter connects the positive pole of power supply, and a termination of resistance R 4 connects 7 ports of single-chip microcomputer TB630A, and another termination other end connects the base stage of triode T3, the collector electrode of triode T3 connects the positive pole of headlight LED1, and emitter connects the positive pole of power supply.In this control circuit, single-chip microcomputer TB630A can receive the switching signal of key switch S1, S2, then the opening and closing of headlight LED1 in the control circuit and back light LED2.