Specific embodiments
This routine drive motors is in transmission connection by the spool of speed changing transmission gear group and driving belt and shutter, and drive motors is controlled the opening and closing of opening, reverse of its positive turn-off by ON-OFF control circuit.
Controller and memory, comparator with data processing function adopt the single-chip microcomputer that becomes one, and described ON-OFF control circuit is connected with the single-chip microcomputer output.
The shutter position sensor that Fig. 3 adopts for this example: be provided with and be the runner 1 that linear speeds ratio rotates with tested mobile shutter, overlapping the belt 4 that is in transmission connection with the shutter rotating shaft on this routine runner 1, runner wheel disc one side is equipped with light-emitting component 5, opposite side is equipped with photo electric sensitive element 3, runner 1 wheel disc is provided with circumferential two through hole 2a that draw back 30 degree angles, 2b, one of them through hole 2a along the circumferential length of runner wheel disc greater than the circumferential length of another through hole 2b, it is pulse-scaling circuit that described location data signal forms circuit, photoelectric sensing parts 3 are connected with the single-chip microcomputer input by pulse-scaling circuit, runner 1 whenever turns around, promptly can produce one wide one narrow two pulse signals in pulse-scaling circuit, single-chip microcomputer can be judged the rotating of motor by the sequencing of width pulse, terminal location with roller shutter is a reference point, by rotating the number of turns displacement of shutter roller shutter is counted, thus the real time position data U in the acquisition shutter lifting process.
As long as the distance that circumferential large through-hole 2a that spaces out that is provided with on the above-mentioned runner wheel disc and small through hole 2b are drawn back is not equal to 180 degree, promptly can be used for judging rotating.
Final position data U1, following final position data U2 in the shutter lifting are existed in the single-chip microcomputer memory, simultaneously vent position data U3, shading intermediate positional data U4 in the middle of the shutter that is provided with are existed in the single-chip microcomputer memory.
Fig. 6 is the schematic diagram of this example final position U1, following final position U2, shading position U3, vent position U4 on setting respectively on the shutter.
The single-chip microcomputer input is provided with four function keys: lifting key D1, decline key D2, stop key D3, storage key D4, by the data comparison other in the operation word-select memory of function key, compare with the shutter real time position data U that obtains, when shutter real time position data U and selected data (U1 or U2 or U3 or U4) when equating, controller promptly sends control signal, close drive motors by ON-OFF control circuit, shutter is parked on the selected position.
The physical circuit figure of single-chip microcomputer and ON-OFF control circuit sees Fig. 5, controller and memory with data processing function, comparator adopts the single-chip microcomputer HMC87C1304 that becomes one, the pulse counting signal that the U4 photo electric sensitive element is formed by switching tube Q7 forms circuit and is connected with single-chip microcomputer input 12 pin, single-chip microcomputer is calculated the actual location data U of shutter according to the counting pulse signal of input, during each motor stall, present position data with shutter are kept in the memory simultaneously, when starting once more, can on the basis of this data memory, proceed counting, and according to instruction with the time real data U and memory in selected data compare.
ON-OFF control circuit is: be provided with the thyristor Q10 that the control utmost point is connected with single-chip microcomputer HMC87C1304 switch controlling signal output 3 pin, thyristor Q10 is serially connected in ground connection one lateral circuit of drive motors M current supply circuit, when single-chip microcomputer will be imported shutter real time position data U when identical with selected storage data comparative result, its 3 pin is the signal of exportable shutoff thyristor, cut off the power supply circuits of motor M, drive motors stops operating, and shutter is parked on the position of setting.ON-OFF control circuit also is provided with the control circuit of drive motors rotating, this circuit is by the two-way double-throw relay J 1 that is connected with the forward and reverse control signal output of single-chip microcomputer respectively, J2 forms, the two ends of drive motors M respectively with two relay J 1, the cutter end of J2 connects, what two cutter ends were corresponding respectively two throws 230 volts of terminal contacts one termination drive motors power supplies, other end contact B is by reverse-blocking tetrode thyristor control circuit ground connection, two relay J 1, the J2 coil is connected on switch triode Q8 respectively, in the collector loop of Q9, the switch triode base stage is just meeting single-chip microcomputer HMC87C1304 respectively, reverse control signal output 6 pin and 5 pin; Generally, the cutter end of two relays all is connected to constant close contact with ground connection throwing point B, drive motors two ends no-voltage is not worked, when single-chip microcomputer is just changeing control signal output 6 human hair combing wastes and is going out switch controlling signal, switching tube Q8 conducting, relay J 1 conducting, its double-throw cutter end K1 and 230 volts throw the end adhesive, the drive motors forward rotation, otherwise, when single-chip microcomputer reverse control signal output 5 human hair combing wastes go out switch controlling signal, switching tube Q9 conducting, relay J 2 conductings, its double-throw cutter end K2 and 230 volts throw end adhesive, drive motors backward rotation.
The single-chip microcomputer input is connected to function key: lifting key D1, decline switch D2, shutdown switch D3, storage switch D4, be used to produce required control command or operational order, the moving and stop position of the program selecting shutter that operation by these several function keys and single-chip microcomputer are provided with.
This example has been stored data U1, U2, U3, the U4 in upper terminal position, lower terminal position, shading centre position and ventilation centre position in the single-chip microcomputer memory, on two selection function key D1, D2 being connected with the single-chip microcomputer input, send the order of selecting to go up terminal, following terminal, shading, vent position data respectively by the length of button duration, the control shutter is parked on the position corresponding with selected data automatically.
Method of operating and the function of two selection function key D1, D2 are:
Press rising function key D1, the shutter roller shutter rises, and stops during to upper terminal position U1;
Press decline function key D2, the shutter roller shutter descends, and stops during to lower terminal position U2;
Long by rising function key D1, the shutter roller shutter stops when moving to shading centre position U3;
Long by decline function key D2, the shutter roller shutter stops when moving to ventilation centre position U4;
In the roller shutter lifting process, whenever press the stop key D3 that is connected with the single-chip microcomputer input, motor all can stall.
Fig. 7 is the computer program control flow chart of above-mentioned selection function key D1, D2, D3.
Control method to lifting key D1 is successively:
Step 101, press rising function key D1;
Step 102, delay are sent inquiry after 2 seconds: whether also according to rising function key D1, change the 103rd step if not, if change the 107th step;
Whether the current location U of step 103, shutter equals final position data U1, changes the 104th step if not; If do not say the word;
Step 104, control motor are just changeing rises curtain;
Whether step 105, inquiry press stops strong D3, if change the 114th step, or does not change the 106th step;
Whether the current location of step 106, shutter equals final position data U1, changes the 104th step if not; If change 114 steps;
Whether the current location U of step 107, shutter if not changes 108th step greater than shading intermediate positional data U3; If change 111 steps;
Step 108, control motor are just changeing rises curtain;
Whether step 109, inquiry press stops strong D3, if change the 114th step, changes the 110th step if not;
Whether the current location of step 110, shutter equals shading intermediate positional data U3, changes the 108th step if not; If change 114 steps;
Step 111, the counter-rotating of control motor descend curtain;
Whether step 112, inquiry press stops strong D3, if change the 114th step, or does not change the 113rd step;
Whether the current location of step 113, shutter equals shading intermediate positional data U3, changes the 111st step if not; If change 114 steps;
Step 114, the stall of control motor.
Control method to decline key D2 is successively:
Step 201, press decline function key D2;
Step 202, delay are sent inquiry after 2 seconds: whether also according to decline function key D2, change the 203rd step if not, if change the 207th step;
Whether the current location U of step 203, shutter equals final position data U2 down, changes the 204th step if not; If do not say the word;
Step 204, the counter-rotating of control motor descend curtain;
Whether step 205, inquiry press stops strong D3, if change the 214th step, or does not change the 206th step;
Whether the current location U of step 206, shutter equals final position data U2 down, changes the 204th step if not; If change 214 steps;
Whether the current location of step 207, shutter if not changes 208th step greater than ventilation intermediate positional data U4; If change 211 steps;
Step 208, control motor are just changeing rises curtain;
Whether step 209, inquiry press stops strong D3, if change the 214th step, changes the 210th step if not;
Whether the current location U of step 210, shutter equals the intermediate positional data U4 that ventilates, and changes the 208th step if not; If change 214 steps;
Step 211, the counter-rotating of control motor descend curtain;
Whether step 212, inquiry press stops strong D3, if change the 214th step, or does not change the 213rd step;
Whether the current location of step 213, shutter equals the intermediate positional data U4 that ventilates, and changes the 211st step if not; If change 214 steps.
Step 214, the stall of control motor.
The said method that this example adopts only need be operated two buttons easily, can control the shutter roller shutter and stop automatically and accurately to selected in four a desired locations position.Use easily.
The function that is provided with the memory function key D4 that is connected with the single-chip microcomputer input is: the data in the memory can be provided with by the manufacturer in advance, for example, manufacturer 80% position of closing as the shading position, 95% position of closing as vent position, and terminal open position about having imported, also can utilize this memory function key D4 that storage is set voluntarily as required by the user, its using method is: when the shutter roller shutter moves to a certain position, press memory function key D4, promptly this position data can be deposited in the memory.
This routine single-chip microcomputer input is provided with the photosensitive sensing circuit of being made up of light resistor R47 that is used to detect sunlight strength, this photosensitive sensing circuit output connects single-chip microcomputer input 2 pin, when sunlight strength G greater than the setting value Gm, be that input signal is during greater than the setting value in the single-chip microcomputer, the position U that the while single-chip microcomputer detects shutter this moment is higher than shading position U3, promptly can send dropping signal to drive motors, when the shutter down position arrives shading position U3, single-chip microcomputer sends stop signal, makes shutter be parked in shading position U3 automatically.Certainly by aforesaid manual control shutter is stopped to the shading position.
Fig. 8 is the computer program control flow chart of sunlight strength control.