Summary of the invention
Technical matters to be solved by this invention is to provide a kind of circuit to simplify rational multi-point switch control circuit system more, can carry out multipoint switch control to load circuit, control signal is a low voltage digital signal, and the quantity of multipoint switch is unrestricted, and mode of connection is simple.
Another technical matters to be solved by this invention is the switch controlling device that a kind of electric appliance load loop will be provided, this device can the external connection electrical apparatus load circuit, and only need the some normally closed points of serial connection to touch switch in this load circuit, just can realize simple multiple spot control to load circuit.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is as follows:
A kind of digital multi-point switch control circuit system, comprise some load circuits and power input, each load circuit is connected in parallel between the zero line and live wire of power input, all connect in each load circuit and be provided with some switches, described switch is that normally closed point touches switch, and described each load circuit is all connected and is provided with relay switch, and Circuits System also is provided with a microcontroller, microcontroller is connected with a DIP module is set
Also respectively be provided with the point that a state that the normally closed point in respective load loop is touched switch monitors on the described load circuit and touch the switching signal sampling module, the output port that each point touches the switching signal sampling module is connected with the microcontroller signal input part, the control end of this microcontroller is connected through the control end of current amplification circuit with the relay switch of corresponding each load circuit
The ac-dc conversion power circuit that is connected between zero line, the live wire links to each other with described microcontroller and each relay, for it provides power supply.
Described point touches the switching signal sampling module and comprises sampling diode group, the first isolation sample circuit, second isolation sample circuit and the current-limiting resistance,
Sampling diode group is series in the load circuit, this sampling diode group is formed in parallel by two groups of diodes, every group is composed in series by two equidirectional diodes, these two groups of diode directions compose in parallel sampling diode group on the contrary, the two ends of sampling diode group are connected with first two input ends of isolating sample circuit respectively, and connect on sampling diode group and first connection line of isolating between the sample circuit and be provided with current-limiting resistance, the output terminal of the first isolation sample circuit is connected with the signal input part of microcontroller;
The current-limiting resistance that the two ends of the relay switch of described each load circuit are provided with through series connection respectively is connected to two input ends of the second isolation sample circuit, and second output terminal of isolating sample circuit is connected with the microcontroller signal input part;
The control end of microcontroller is connected through the control end of current amplification circuit with the relay switch of corresponding each load circuit,
Described ac-dc conversion power circuit is isolated sample circuit with first, second and is linked to each other, for it provides power supply.
More optimally, this Circuits System can also be provided with some and the corresponding rocker switch control loop of each load circuit, each rocker switch control loop comprises a rocker switch and rocker switch signal sampling module, rocker switch one end ground connection, other end series connection is provided with fuse resistance and current-limiting resistance, be concatenated into an input end of the 3rd isolation sample circuit then, the 3rd another input end of isolating sample circuit links to each other with the ac-dc conversion power circuit output end, the 3rd signal output part of isolating sample circuit is connected with the microcontroller signal input part, connect ac-dc conversion power circuit one side at rocker switch and also be provided with the electric capacity that filtering rocker switch shake is disturbed, the two ends of this electric capacity are connected respectively to the 3rd and isolate on the circuit of sample circuit two input end both sides.
More directly perceived for the state that makes each load circuit further, preferably also be provided with status indicator LED in each load circuit, the two ends of status indicator LED are connected to respectively on the connecting line of the connecting line of corresponding relay switch and current amplification circuit, corresponding relay switch and ac-dc conversion power circuit.
The present invention simultaneously also provides a kind of digital multi-point switch controller that applies to above-mentioned control circuit system, this controller is a surface-mounted integrated circuit of being made up of electronic component and wiring board, this controller comprises power input, an ac-dc conversion power circuit, a microcontroller, some load circuit terminals and the relay switch that is series at each load circuit, and microcontroller is provided with module with DIP and is connected; Each load circuit hot terminal normally closed point to the respective load loop that is linked in sequence touches the point that on off state monitors and touches switching signal sampling module and relay switch, be connected with the power firestreak input end then, load circuit zero line terminals are connected with the zero-power line input end, this multipoint switch controller also is provided with a microcontroller, the signal output part that each point touches the switching signal sampling module is connected with the input end of microcontroller, and the control end of microcontroller links to each other with the control end of corresponding each relay switch behind current amplification circuit;
The ac-dc conversion power circuit that is connected between zero line, the live wire links to each other with described microcontroller and each relay, for it provides power supply.
Described point touches the switching signal sampling module and comprises sampling diode group, the first isolation sample circuit, second isolation sample circuit and the current-limiting resistance,
Sampling diode group is series between respective load loop hot terminal and the relay switch; This sampling diode group is formed by two groups of diodes in parallels; Every group is composed in series by two equidirectional diodes; Compose in parallel sampling diode group these two groups of diode opposite directions; The two ends of sampling diode group are connected with two inputs of the first isolation sample circuit respectively; And isolating connection line between the sample circuit in sampling diode group and first connects and is provided with current-limiting resistance; The output of the first isolation sample circuit is connected with the microcontroller signal input part
The two ends of the relay switch of described each load circuit are connected to two input ends of the second isolation sample circuit respectively behind the current-limiting resistance that series connection is provided with, second output terminal of isolating sample circuit is connected with the microcontroller signal input part;
The control end of microcontroller is connected with the control end of the relay switch of corresponding each load circuit behind current amplification circuit,
First, second power input of isolating sample circuit is connected with described ac-dc conversion power circuit, provides power supply by it.
More optimally, this multipoint switch controller can also be provided with the rocker switch control circuit, comprise some and the corresponding rocker switch terminals of load circuit output terminal, a public earth terminal and some rocker switch signal sampling modules, each rocker switch terminals is connected with corresponding rocker switch signal sampling module respectively, each rocker switch signal sampling modular power source end is connected with described ac-dc conversion power circuit, and the signal output part of each rocker switch signal sampling module is connected with the microcontroller signal input part.
Each described rocker switch signal sampling module comprises fuse resistance, current-limiting resistance, the 3rd isolates the electric capacity of sample circuit and filtering rocker switch shake interference, each rocker switch terminals is connected in series fuse resistance and current-limiting resistance respectively, be concatenated into an input end of the 3rd isolation sample circuit then, the 3rd another input end of isolating sample circuit links to each other with the ac-dc conversion power circuit output end, the 3rd signal output part of isolating sample circuit is connected with the microcontroller signal input part, and the two ends of described electric capacity are connected respectively to the 3rd and isolate on the circuit of sample circuit two input end both sides.
More directly perceived for the state that makes each external load loop further, this controller preferably also is provided with some and the corresponding status indicator LED of load circuit, and the two ends of status indicator LED are connected to respectively on the connecting line of the connecting line of corresponding relay switch and current amplification circuit, corresponding relay switch and ac-dc conversion power circuit.
Digital multi-point switch control circuit system of the present invention and controller thereof have been finished the goal of the invention of single line load circuit multipoint switch control by circuit design cleverly, by serial connection in each load circuit arbitrarily a plurality of normally closed points touch switch and realize simple multiple spot control load circuit.Simplify load circuit greatly, both saved material, reduced numerous and diverse degree, the labour intensity of cable wiring manufacture also revolutionaryly, also made simultaneously Circuits System more stable work, maintenance also convenient.
The present invention simultaneously also setting by the rocker switch control loop reaches direct switch control to the respective load loop (normally closed point touch switch implements load circuit be the upset control of on off state), makes the more perfect function of Circuits System of the present invention and controller.
Embodiment
Fig. 1 shows digital multi-point switch controller 1000 of the present invention, this controller is a surface-mounted integrated circuit of being made up of electronic component and wiring board, its terminals are by power input L, N, load circuit terminals 101,102,201,202, and rocker switch terminals 301,401 and public earth terminal 501 are formed.Power input inserts the civil power of 220V/50Hz; The load circuit terminals comprise hot terminal 101,201 and zero line terminals 102,202, and the multipoint switch controller of present embodiment is provided with 2 cover load circuit terminals (many cover load circuit terminals also can be set as required).This multipoint switch controller 1000 also is provided with a microcontroller 1001 and ac-dc conversion power circuit 1004, and microcontroller 1001 is provided with module 1002 with a DIP and is connected.
Being connected between every suit load circuit terminals and the power input following (following is example with the first load circuit terminals 101,102):
The normally closed point that is provided with a relay switch 104 and a pair of load circuit between the first load circuit hot terminal 101 and power firestreak input end 102 touches the point that on off state monitors and touches switching signal sampling module 103, point touches switching signal sampling module 103 (as shown in Figure 4) and comprises sampling diode group, first isolates sample circuit 106, second isolates sample circuit 107 and current-limiting resistance R25, sampling diode group is series at an end of the normally opened contact of the first load circuit hot terminal 101 and relay switch 104, the other end of the normally opened contact of relay switch 104 is connected with the power firestreak input end, this sampling diode group is by two groups of diode (D6, D7 and D8, D9) be formed in parallel, every group is composed in series by two equidirectional diodes, these two groups of diode directions compose in parallel sampling diode group on the contrary, the two ends of sampling diode group respectively with first two input ends 7 of isolating sample circuit 106,8 connect, and on the connection line of sampling diode group one end and the input end 7 of the first isolation sample circuit 106, connect and be provided with current-limiting resistance R25, the first output terminals A mpInput1 that isolates sample circuit 106 is connected with microcontroller 1001 signal input parts
The two ends that are serially connected with the relay switch of first load circuit are connected to the second output end vo ltInput1 that isolates two input ends, 5,6, the second isolation sample circuits 107 of sample circuit 107 respectively and are connected with microcontroller 1001 signal input parts behind current-limiting resistance R21, R22 that series connection is provided with;
The control end of microcontroller 1001 is connected with the control end of the relay switch 104 of first load circuit behind current amplification circuit 1003 (can be Darlington circuit),
The controller of each load circuit part respectively is provided with status indicator LED, on the connecting line, relay switch 104 that the two ends of the first load circuit status indicator LED 105 are connected to relay switch 104 and current amplification circuit 1003 respectively and the connecting line of ac-dc conversion power circuit 1004.
First, second power input of isolating sample circuit 106,107 is connected with described ac-dc conversion power circuit 1004, provides power supply by it.
Same, the controller part of second load circuit is identical with first load circuit, comprise terminals 201,202, point touches switching signal sampling module, relay switch and status indicator LED, is connected with the corresponding port of microcontroller 1001, current amplification circuit 1003, ac-dc conversion power circuit 1004 equally.
According to the increase of the demand of load circuit quantity, controller of the present invention also can be provided with more load circuit terminals in addition, and according to the above-mentioned connection line that is provided with in its controller of corresponding increase.
This multipoint switch controller 1000 also is provided with the rocker switch control circuit, comprises two corresponding rocker switch terminals 301,401, one public earth terminals 501 of load circuit output terminal and two rocker switch signal sampling modules 302,402,
Being example with the corresponding first load circuit rocker switch control section of first load circuit: the first rocker switch terminals 301 are connected with rocker switch signal sampling module 302, rocker switch signal sampling module 302 is connected with the ac-dc conversion power circuit, provides power supply by the ac-dc conversion power circuit, and the signal output part of rocker switch signal sampling module 302 is connected with microcontroller 1001 signal input parts.
Described rocker switch signal sampling module 302 comprises fuse resistance R K1, current-limiting resistance RK5, the 3rd isolates the capacitor C K1 of sample circuit 303 and filtering rocker switch shake interference, rocker switch terminals 303 serial connection fuse resistance R K1, current-limiting resistance RK5, be concatenated into an input end 1 of the 3rd isolation sample circuit 303 then, the 3rd another input end 2 of isolating sample circuit 303 is connected with ac-dc conversion power circuit 1004 corresponding ports, the 3rd signal output part of isolating sample circuit 303 is connected with microcontroller 1001 signal input parts, the end of described capacitor C K1 is connected to the 3rd and isolates sample circuit input end 2, and the other end is connected on the connecting line between fuse resistance R K1 and the current-limiting resistance RK5.
Multipoint switch controller 1000 of the present invention in actual use, its power input inserts the civil power of 220V/50Hz, and the live wire and the zero line in load circuit terminals external load loop, form 1 the tunnel, the 2 tunnel or the multichannel loading loop, the normally closed point of any amount of can contacting as required on each road load circuit touches the multipoint control switch of switch as this load circuit; Corresponding rocker switch terminals are then distinguished external rocker switch S1, S2, and the other end of rocker switch S1, S2 connects public earth terminal 501 then.So just formed digital multi-point switch control circuit system of the present invention.
Shown in Fig. 2 a, 3,4, when multipoint switch controller 1000 of the present invention is worked,
At first, microcontroller 1001 energising back programs are provided with the initial setting up state that reads DIP the module 1002 from DIP earlier, according to the DIP state relay switch in respective load loop is controlled, the state of DIP can be set by toggle switch before the controller energising as required, DIP is provided with in the module 1002 corresponding push button and represents the corresponding circuit original state to be set to path in the ON side, otherwise be set to open circuit, the effect that DIP is provided with is the initial break-make attitude in setting controller energising back loading loop.
Microcontroller 1001 reads the state of rocker switch circuit as virgin state then, judge whether the current state of rocker switch circuit changes, if change, new state according to the rocker switch circuit is controlled, and not influenced by the state of load circuit initial setting up and the break-make attitude of the preceding load circuit of change.If the state of rocker switch S1, S2 does not change, judge that then detecting first of each load circuit behind the state of relay switch isolates sample circuit output terminal or second and isolate the sample circuit output terminal;
With first load circuit is example, when if the relay switch of load circuit 104 touches switch and presses for attracting state, variable close point, second isolates sample circuit output end vo ltInput1 is always high level, judge that first isolates whether sample circuit output terminals A mpInput1 is low level, it is the detection of then carrying out other load circuit, otherwise the pilot relay switch disconnects, and carries out the detection of other load circuit then; If the relay switch of load circuit 104 is an off-state, judge that then second isolates whether sample circuit output end vo ltInput1 is low level, be the detection of then carrying out other load circuit, otherwise the detection of other load circuit is carried out in then pilot relay switch adhesive then.After other load circuit detected and finishes, above step was carried out in circulation.
The judgement of load circuit repeat circuit switch 104 states and the control of relay switch state are (control end are defined as the port that microcontroller is connected with current amplification circuit) of realizing in the following manner:
Microcontroller 1001 is at first judged the state of the relay switch 104 in loop by the level state of its control end.Control end is that high level represents that relay switch 104 is current to be off-state, and control end is that represent relay switch 104 current be attracting state to low level.If pilot relay switch 104 disconnects, the control end output high level of microcontroller 1001 gets final product; If 104 adhesives of pilot relay switch, the control end output low level of microcontroller 1001 gets final product.
Fig. 3 is the rocker switch control circuit part-structure synoptic diagram of corresponding first load circuit, and when rocker switch S1 was closed, the 3rd isolates sample circuit 303 input ends 1,2 electric current, and the 3rd isolates sample circuit output terminal KeyInput1 output low level; When rocker switch S1 disconnected, the 3rd isolated sample circuit 303 input ends 1,2 no currents, and output terminal KeyInput1 exports high level.It is that low level is promptly sent 104 adhesives of instruction control relay switch that microcontroller scanning detects the 3rd isolation sample circuit output terminal KeyInput1, if be attracting state before detecting low level, relay switch 104 will still keep attracting state; If detecting the 3rd isolation sample circuit output terminal KeyInput1 is that high level promptly sends 104 disconnections of instruction control relay switch.Same, the structure and the principle of work of the rocker switch control circuit part of corresponding other load circuits are identical therewith.
Fig. 4 be first load circuit multipoint switch control section structural representation,
When relay switch 104 adhesives, variable close point are touched switch and are pressed, the voltage at sampling diode group (D6, D7 and D8, D9) two ends is about 1.4V during the first load circuit path, be added in 7,8 ends (promptly first isolates the sample circuit input end) of optocoupler U3D through current-limiting resistance R25,7,8 ends have electric current, 10,9 end paths, first isolate sample circuit output terminals A mpInput1 be connected to low level; If relay switch 104 adhesives, when having normally closed point to touch switch to press, loop open circuit, sampling diode group (D6, D7 and D8, D9) two ends no-voltage, 7, the 8 end no currents of optocoupler U3D, 10,9 ends open circuit, and output terminals A mpInput1 end is connected to high level through resistance R 34 and ac-dc conversion power circuit 1004.
When relay switch 104 adhesives, variable close point are touched switch and are pressed, current-limiting resistance R21 and current-limiting resistance R22 and relay switch 104 links are by short circuit, 5, the 6 end no currents of optocoupler U3C, 12,11 ends open circuit, and second isolates sample circuit VoltInput1 end is connected to high level through resistance R 33 and ac-dc conversion power circuit 1004; When relay switch 104 disconnects, when variable close point is touched switch and is pressed, electric current touches switch and load through 5,6 ends, the resistance R 22 of current-limiting resistance R21, optocoupler U3C, the some normally closed point of sample diode group, series connection, though formation loop, because resistance R 21 and resistance R 22 resistances in the circuit are bigger, therefore the electric current in the load circuit is very little, and load can't operate as normal.But 5,6 ends of optocoupler U3C have electric current, 12,11 end paths, output end vo ltInput1 be connected to low level.
Microcontroller 1001 is at first judged the state of the relay switch 104 in loop.If the state of relay switch 104 is adhesive, 1001 of microcontrollers detect first level state of isolating sample circuit output terminals A mpInput1: this end is a high level, microcontroller 1001 is that pilot relay switch 104 disconnects, on the contrary pilot relay switch 104 adhesives (promptly keeping relay switch 104 attracting states); If the state of relay switch 104 is for disconnecting, 1001 of microcontrollers detect second and isolate the level state that sample circuit output end vo ltInput1 holds: this end is a high level, microcontroller 1001 is 104 adhesives of pilot relay switch, otherwise pilot relay switch 104 disconnects (promptly keeping relay switch 104 off-states).Microcontroller 1001 continues the state that scanning detects next load circuit after finishing said procedure.
The operational detail of circuit is described with the concrete case of first load circuit control below in conjunction with Fig. 3, Fig. 4.
First load circuit of DIP is preset as channel status before supposing energising, and the first load circuit rocker switch S1 original state is an off-state, the energising back by DIP be set to path then first load circuit be path.
According to program flow diagram 2a, microcontroller 1001 will be sampled and the 3rd be isolated sample circuit output terminal KeyInput1 state, rocker switch S1 state shown in Figure 3 is for disconnecting, the 3rd isolates sample circuit input end no current, output terminal KeyInput1 is a high level, and microcontroller 1001 reads the original state of high level preservation as rocker switch.
Whether the level state of judging output terminal KeyInput1 then changes, if rocker switch S1 closure, the 3rd isolates the sample circuit input end electric current, output terminal KeyInput1 is a low level, be that output terminal KeyInput1 level state changes (previous status of preservation is a high level), it is low level that microcontroller detects its state, promptly controls the first load circuit relay switch adhesive, because relay switch 104 initially is attracting state, so load circuit remains connection.After rocker switch S1 state changed, the output terminal KeyInput1 state of then sampling new (being low level this moment) was as the reference state of judging whether state next time changes.The corresponding respectively output terminal KeyInput1 of the open/close state of rocker switch S1 is low level/high level, after the state of sampling output terminal KeyInput1 changes, as long as find output terminal KeyInput1 is low level, microcontroller 1001 is with regard to 104 adhesives of pilot relay switch, otherwise pilot relay switch 104 disconnects, and the control of rocker switch S1 is not influenced by relay switch 104 original states.Will be successively in the actual execution of program the rocker switch in each loop be carried out above-mentioned detection.
Whether finish to begin to detect after the detection of each road rocker switch has normally closed point to touch switch to press in the load circuit:
For example, in 104 adhesives of Fig. 4 state relay switch, first load circuit is a path.Judge the state of relay switch 104 earlier according to Fig. 2 a program circuit, if relay switch 104 is an attracting state, judge whether the first output terminals A mpInput1 that isolates sample circuit 106 is low level in first load circuit, by Fig. 4 state analysis, if not having normally closed point to touch switch presses, first input end of isolating sample circuit 106 has electric current, and output terminals A mpInput1 is a low level, microcontroller 1001 does not change the state of relay switch 104, proceeds the detection in other loop; If having arbitrary normally closed point to touch switch presses, though relay switch 104 adhesives, but load circuit opens circuit, no current in the loop, first isolates the input end no current of sample circuit 106, output terminals A mpInput1 is a high level, proceeds the state-detection of other load circuit behind the state of microcontroller 1001 change relay switches 104.
If the state of relay switch 104 is for disconnecting, judge that then second isolates whether sample circuit output end vo ltInput1 is low level, press if there is normally closed point to touch switch, the load circuit no current, second isolates the input end no current of sample circuit 107, output end vo ltInput1 is a high level, proceeds the detection of other load circuit behind the state of microcontroller 1001 change relay switches 104; If variable close point is touched switch and is pressed, load circuit has less current, and second input end of isolating sample circuit 107 has electric current, and output end vo ltInput1 is a low level, microcontroller 1001 control ends do not change the state of relay switch, proceed the detection of other load circuit.
After having finished the state-detection of each load circuit, program is returned and is continued to read the 3rd isolation sample circuit output terminal KeyInput1 state, and above step is carried out in circulation.
Microcontroller 1001 also can come the state in loop is sampled and handled (shown in Fig. 2 b) by interrupt mode, when microcontroller 1001 input ends have the level saltus step, carry out the inspection of rocker switch control loop earlier, state changes and then according to new state load circuit is controlled; State does not change checks to load circuit that then the method for inspection is scheme as described above, executes corresponding processing back microcontroller and enters the wait interruption status, has look-at-me to carry out above-mentioned circular test and processing again.
In the circuit operate as normal, the state of relay adhesive or disconnection, control end control by microcontroller 1001, the status indicator LED 105 in respective load loop, also by the same control end control of microcontroller 1001, so status indicator LED 105 can or disconnect the state of indicating load circuit according to the adhesive of relay.