A kind of three lamp embedded electronic timers
Technical field
The utility model relates to a kind of timing device, specifically a kind of three lamp embedded electronic timers.
Background technology
Present timer divides two kinds of electronic type and mechanical types, and mechanical timer has instability, and is inaccurate, and noise is arranged, the characteristics of restricted timing, and common electronic timer, general strong and weak circuit be regardless of from, can not set multistage timing.
Summary of the invention
The purpose of this utility model is the deficiency that overcomes above-mentioned technology, and a kind of three lamp embedded electronic timers are provided.
The utility model solves the technical scheme that its technical problem adopts: this three lamp embedded electronic timers, and this timer mainly comprises power supply processing section, single-chip microcomputer processing unit, output, definition status indicator light and key input part; Power supply processing section wherein is used to output to provide+direct current of 24V, for other modules provide+direct current of 5V; The single-chip microcomputer processing unit, be used for being responsible for the operation blas, I/O is controlled, state according to the button input, output is done different control, and require to calculate timing according to predetermined timing, realize timing function, and go to indicate current definition status by control definition status indicator light; Output according to two relays of control signal control of single-chip microcomputer processing unit, is controlled the output of No. 2 alternating currents respectively, realizes the output control to alternating current; The definition status indicator light is used for controlling three LED light respectively according to the control signal of single-chip microcomputer processing unit, to be used to refer to current definition status and "on" position; Key input part is used for pressing the back at button and produces input signal to offer the single-chip microcomputer processing unit processes, goes to realize different functions by the single-chip microcomputer processing unit according to different button inputs.
Described power supply processing section: by C1, rectification is converted to the DC-voltage supply road and uses through DB1 again after the R1 coupling, wherein does the impulse-current-proof protection through R2 with the voltage of the alternating current of input; pass through R3 again; C2, the ZD1 voltage stabilizing is passed through C3 again to driving voltage and electric current that 24VDC provides relay; R4; R6, D1, C7; C4, D2 further are depressured to the needed voltage of single-chip microcomputer and other circuit required voltages.
Described output adopts RL1, the RL2 relay provides the output current of two-way 15A respectively, R10, Q1 and R11, the output that Q2 is used for controlling two relays respectively opens or closes, and single-chip microcomputer is by control Q1, the base voltage control triode Q1 of Q2, the opening and closing of Q2, thereby the opening and closing of control relay drive end and control output.
LED1 is used to refer to the current "on" position that is in the described definition status indicator light, LED2, LED3 is used to refer to the time gear of current timing, LED1, LED2, the negative electrode of LED3 is received the PB0 of single-chip microcomputer respectively by a resistance, PB1, the PB2 pin, single-chip microcomputer is by control PB0, PB1, the opening and closing of the State Control LED of PB2 pin.
C8 in the described single-chip microcomputer processing unit, C9, X1 are oscillating circuit, be connected on the 15th, 16 pin and single-chip microcomputer internal oscillator circuit respectively in conjunction with offering the single-chip microcomputer clock reference, D3, R5, C10 are reset circuit of SCM, be connected on the 4th pin, after energising, be used for starting the operation of single-chip microcomputer; R15, R16 provide and draw level to realize stable button detecting as the pull-up resistor of button input; The 12nd, 13 pin is the output control pin, and the break-make of receiving the control end control triode of output respectively reaches control output.
The effect that the utility model is useful is: this product is a embedded electronic timer that is applicable to household, in the small and exquisite body of wall of can directly packing into of volume, controls regularly by the different choice of timing period.This kind of timer is compared with mechanical timer, have stable, accurately, noiselessness, unrestricted characteristics regularly; Strong and weak circuit separates, passes through logical operation circuit, sets the multistage regularly; Touch starting switch.
Description of drawings
Fig. 1 is a systematic square frame principle schematic of the present utility model;
Fig. 2 is a circuit theory schematic diagram of the present utility model;
Description of reference numerals: power supply processing section 1, single-chip microcomputer processing unit 2, output 3, definition status indicator light 4, key input part 5.
Embodiment
Below in conjunction with drawings and Examples the utility model is described in further detail.
This three lamp embedded electronic timers mainly comprise power supply processing section 1, single-chip microcomputer processing unit 2, output 3, definition status indicator light 4 and key input part 5; The power supply processing section is as the power supply supply of entire circuit, this module realizes that alternating current with civil power is through over commutation, step-down, be transformed to the circuits needed power supply after the processing such as filtering, for output provides+direct current of 24V, for other modules provide+direct current of 5V, guarantee the stable supply of power supply of integrated circuit.The single-chip microcomputer processing unit is the core of entire circuit, is responsible for the operation blas, and to input, output is controlled, and realizes the functional requirement of TMZ005.According to the state of button input, output is done different control, and require to calculate timing according to predetermined timing, realize timing function, and go to indicate current definition status by control definition status indicator light.Output is controlled two relays according to the control signal of single-chip microcomputer processing unit, thereby controls the output of No. 2 alternating currents respectively, realizes the output control to alternating current.The button input provides the path of man-machine exchange, and button is pressed the back and produced input signal to offer the single-chip microcomputer processing unit processes, goes to realize different functions by the single-chip microcomputer processing unit according to different button inputs.The definition status indicator light is used for controlling three LED light respectively according to the control signal of single-chip microcomputer processing unit, to be used to refer to current definition status and "on" position.
Circuit theory illustrates as shown in Figure 2:
One: 1 part is the power supply processing section in the circuit block diagram; by C1, rectification is converted to the DC-voltage supply road and uses through DB1 again after the R1 coupling, wherein does the impulse-current-proof protection through R2 with the voltage of the alternating current of input; pass through R3 again; C2, the ZD1 voltage stabilizing is passed through C3 again to driving voltage and electric current that 24VDC provides relay; R4; R6, D1, C7; C4; D2 further is depressured to the needed voltage of single-chip microcomputer and other circuit required voltages, and wherein C3 does Filtering Processing, R4; R6 does voltage division processing; D1 does voltage stabilizing and handles, C7, and C4 does Filtering Processing.Step-down is the needed voltage of single-chip microcomputer through D2 at last.
Two: 3 parts are big electric current output in the circuit block diagram, adopt RL1, the RL2 relay can provide the output current of two-way 15A for use respectively, the output that R10, Q1 and R11, Q2 are used for controlling two relays respectively opens or closes, single-chip microcomputer is by control Q1, the base voltage of Q2 control triode Q1, the opening and closing of Q2, thereby the opening and closing of control relay drive end and control output.D4, D5 are used for respectively eliminating the back electromotive force that produces when relay switch switches, thereby protect other circuit interference-free.
Three: 4 parts are used for showing current definition status in the circuit block diagram, and LED1 is used to refer to the current "on" position that is, LED2, LED3 are used to refer to the time gear of current timing.R12, R13, R14 are used for the electric current of restricted passage LED respectively.LED1, LED2, the negative electrode of LED3 receive the PB0 of single-chip microcomputer respectively by a resistance, PB1, the PB2 pin, single-chip microcomputer is by control PB0, PB1, the opening and closing of the State Control LED of PB2 pin.
Four: 5 parts are key input part in the circuit block diagram, offer user function and manipulate, and when pushing button, are detected by single-chip microcomputer and to judge that button presses behind this low level signal, again according to the feature operation control related circuit work of respective keys.One of them pin of each button is received the 17th, 18 pin of single-chip microcomputer respectively, and single-chip microcomputer is judged the input of button by the state of these two pins of detecting.
Five: 2 parts are the single-chip microcomputer processing unit in the circuit block diagram, core as circuit, the realization of entire circuit function is provided, realize the input detecting of button by the software of single-chip microcomputer inside, the demonstration indication of LED, needed timing, C8 are controlled and realized to the switch of two-way output, C9, X1 is an oscillating circuit, is connected on the 15th, 16 pin and single-chip microcomputer internal oscillator circuit respectively in conjunction with offering the single-chip microcomputer clock reference, single-chip microcomputer goes to calculate timing and needed time of running software according to this time reference, D3, R5, C10 are reset circuit of SCM, be connected on the 4th pin, after the product energising, be used for starting the operation of single-chip microcomputer.R15, R16 provide and draw level to realize stable button detecting as the pull-up resistor of button input.R8, R9 be not for the protection single-chip microcomputer have the port that uses, makes the port stable high level of maintenance and not by suspension joint.The 12nd, 13 pin is the output control pin, and the break-make of receiving the control end control triode of output respectively reaches control output.
Operation principle: by IC18 pin SW1 break-make, internal timer is controlled lamp and fan output.After timer was started working, 12 pin fans kept output constant, and SW1 only changes the output state of 13 footlights.The timing output of 12 pin fans can only be after the internal timer work of 18 pin, maintenance work under the 13 footlights no-output states, and by the break-make of 17 pin SW2, internal timer is controlled the timer of 12 pin.