WikiPatents - Community Patent Review
Create Free Account  |  License or Sell Your Patent  |  WikiPatents Marketplace  |  WikiPatents Blog
Username:  Password:  
    
Advanced Search
Remote window operating system    
United States Patent4544865   
Link to this pagehttp://www.wikipatents.com/4544865.html
Inventor(s)Sharp; William G. (Rockford, IL)
AbstractA window operating system includes a motor control circuit for controlling the operation of direct current permanent magnet motors mounted on window operators associated with each window. Each of the motors on each of the windows is connected to the control circuit only by a pair of wires which both power the motor and provide information to the control circuit as to the status of motor operation. The status of motor operation is determined by monitoring the back electromagnetic force expressed by the motors. To help differentiate back electromagnetic force from supply voltage supplied to the motors, the motors are supplied with full rectified alternating current power, rather than simple direct current, so that the presence or absence of zero voltage between half waves of the voltage expressed across the motors can be monitored to determine the absence or presence of back electromotive force during those time periods.
   














 Title Information Submit all comments and votes
 
Patent Text Patent PDF Print Page Summary File History
Plain text PDF images Print Summary File History
Drawing from US Patent 4544865
Remote window operating system - US Patent 4544865 Drawing
Remote window operating system
Inventor     Sharp; William G. (Rockford, IL)
Owner/Assignee     Amerock Corporation (Rockford, IL)
Patent assignment
All assignments
Publication Date     October 1, 1985
Application Number     06/618,533
PAIR File History     Application Data   Transaction History
Image File Wrapper   Patent Term   Fees
Litigation
Filing Date     June 8, 1984
US Classification     318/53 318/266 318/430 318/469
Int'l Classification     H02P 003/08 254 A 331
Examiner     Shoop Jr.; William M.
Assistant Examiner     Ro; Bentsu
Attorney/Law Firm     Isaksen, Lathrop, Esch, Hart & Clark
Address
Parent Case    
Priority Data    
USPTO Field of Search     318/53 318/54 318/65 318/71 318/107 318/108 318/124 318/264 318/266 318/282 318/286 318/355 318/377 318/430 318/441 318/468 318/469 318/635 318/254
Patent Tags     remote window operating
   
Enter a comma (,) or semicolon (;) between multiple tag words/phrases.
Describe this patent:
 Amusing   
 Clever   
 Complex   
 Efficient   
 Historic   
 Important   
 Innovative   
 Interesting   
 Practical   
 Simple   
[no votes]
Patent WIKI

Share information and news about this patent, including information and news about the technology, inventors, company, ligation and licensing.

 References Submit all comments and votes
 
*references marked with an asterisk below are user-added references
 U.S. References
 
Add a new US reference:  
ReferenceRelevancyCommentsReferenceRelevancyComments
2994525



[0 after 0 votes]
3431475



[0 after 0 votes]
3781622



[0 after 0 votes]
4471275
Comeau
318/286
Sep,1984

[0 after 0 votes]
4468596
Kinzl
318/287
Aug,1984

[0 after 0 votes]
4467250
Thomasson
318/436
Aug,1984

[0 after 0 votes]
4443745
Seino
318/461
Apr,1984

[0 after 0 votes]
4431954
Carpenter
318/443
Feb,1984

[0 after 0 votes]
4368411
Kidd
318/254
Jan,1983

[0 after 0 votes]
4358718
Delomez
318/54
Nov,1982

[0 after 0 votes]
4341982
Lahti
318/51
Jul,1982

[0 after 0 votes]
4262237
Gelenius
318/254
Apr,1981

[0 after 0 votes]
4119899
Sumida
318/459
Oct,1978

[0 after 0 votes]
4001661
Terabayashi
318/264
Jan,1977

[0 after 0 votes]
3792332
Fuller
318/562
Feb,1974

[0 after 0 votes]
 Foreign References
 Other References
 Market Review Submit all comments and votes
   
Market Size
Estimate the gross annual revenues of the relevant market sector:
> $10B
$5B - $10B
$2B - $5B
$500M - $2B
$100M - $500M
$10M - $100M
$1M - $10M
$500K - $1M
$100K - $500K
< $100K
[No votes]
$0
 
$0   $2.5B   $5B   $7.5B   $10B
Market Share
Estimate the percentage of the relevant market sector this invention will capture:
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Reasonable Royalty
What percentage of gross sales should the inventor or assignee be paid?
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Public's "Guesstimation" of Royalty Value
Market SizeN/A[No votes]
xMarket ShareN/A[No votes]
xReasonable RoyaltyN/A[No votes]

N/A

License Availablity
If you are NOT the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
License Availablity
If you ARE the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
Competitive Advantage
Does this invention have a significant competitive advantage over similar technologies?
Yes

No



[No votes]
Most helpful competitive advantage comment
[No comments]

Commercial Alternatives
Are there viable commercial alternatives for this invention?
Yes

No



[No votes]
Most helpful commercial alternative comment
[No comments]

 Technical Review Submit all comments and votes
 Claims Submit all comments and votes
 


I claim:

1. A motor control circuit for a direct current permanent magnet motor comprising

wave shaping means to supply a periodic power waveform to the motor which regularly reaches zero voltage;

switching means for selectively energizing the motor with the output of the wave shaping means;

a voltage comparator also connected to the output of the wave shaping means for comparing the voltage at that output with a ground voltage;

programmable processing means for scanning the output of the comparator and for controlling the switching means to operate the switching means to disconnected the motor from the wave shaping means when a motor stall condition is detected by a lack of back electromagnetic force induced voltage at the output of the wave shaping means.

2. A motor control circuit as claimed in claim 1 wherein the wave shaping means is a full wave rectifier generating a full wave rectified power waveform from AC power.

3. A motor control circuit as claimed in claim 1 wherein the switching means includes a single throw switching device for each of the motors to be controlled and a double throw switching device common to all of the motors to be controlled which determines the polarity of the power waveform signal provided to the motors.

4. A motor control circuit as claimed in claim 3 wherein each of the switching devices is a relay.

5. A motor control circuit as claimed in claim 4 wherein the processing means operates the switching means by having a respective bit data line of an output data bus connected to operate each of the relays.

6. A motor control circuit for a direct current permanent magnet motor comprising

wave shaping means to supply a periodic power waveform to the motor which regularly reaches zero voltage;

switching means for selectively energizing the motor with the output of the wave shaping means;

a voltage comparator also connected to the output of the wave shaping means for comparing the voltage at that output with a fixed voltage level;

programmable processing means for scanning the output of the comparator and for controlling the switching means to operate the switching means to disconnect the motor from the wave shaping means when a motor stall condition is detected by a lack of back electromagnetic force induced voltage at the output of the wave shaping means; and

a second gating comparator connected between the voltage comparator and the programmable processing means one of the inputs to the gating comparator being an output data bit from the processing means which can be enabled periodically so that the processing means can scan its output to determine the output of the voltage comparator.

7. A motor control circuit for a direct current permanent magnet motor comprising

wave shaping means to supply a periodic power waveform to the motor which regularly reaches zero voltage;

switching means for selectively energizing the motor with the output of the wave shaping means;

a voltage comparator also connected to the output of the wave shaping means for comparing the voltage at that output with a fixed voltage level;

programmable processing means for scanning the output of the comparator and for controlling the switching means to operate the switching means to disconnect the motor from the wave shaping means when a motor stall condition is detected by a lack of back electromagnetic force induced voltage at the output of the wave shaping means, the programmable processing means further programmed to detect motor stall by detection of a lack of back electromagnetic force induced voltage for a predetermined number of times before the condition of motor stall is assumed by the system.

8. A control circuit for operating a closure with a direct current permanent magnet motor comprising

a full wave rectifier to convert alternating current power to a rectified power signal;

switching means for selectively connecting the output of the rectifier to the closure operating motor;

a voltage comparator also connected to the output of the rectifier capable of detecting voltage created by back electromagnetic force from the closure motor and comparing that output with a ground voltage;

programmable processing means for scanning the output of the comparator and for operating the switching means when the limit of the closure operation is detected by the cessation of back electromagnetic force from the motor as sensed by the voltage comparator.

9. A motor control circuit as claimed in claim 8 wherein the switching means includes a single throw switching device for each of the motors to be controlled and a double throw switching device common to all of the motors to be controlled which determines the polarity of the rectified signal provided to the motors.

10. A motor control circuit as claimed in claim 9 where each of the switching devices is a relay.

11. A motor control circuit as claimed in claim 10 wherein the processing means operates the switching means by having a respective bit data line of an output data bus connected to operate each of the relays.

12. A motor control circuit as claimed in claim 8 wherein a second gating comparator is connected between the voltage comparator and the programmable processing means and wherein one of the inputs to the gating comparator is an output data bit from the processing means which can be enabled periodically so that the processing means can scan its output to determine the output of the voltage comparator.

13. A control circuit as claimed in claim 8 for operating a plurality of closures wherein the closures are windows and wherein the control circuit is connected to the motors operating each closure only by a pair of wires.

14. A control circuit as claimed in claim 8 wherein there is a command module which can be scanned by the programmable processing means and wherein the command module includes a plurality of user depressible buttons so that selection of window closing can be made by a user.

15. A control circuit for operating a closure with a direct current permanent magnet motor comprising

a full wave rectifier to convert alternating current power to a rectified power signal;

switching means for selectively connecting the output of the rectifier to the closure operating motor;

a voltage comparator also connected to the output of the rectifier capable of detecting voltage created by back electromagnetic force from the closure motor;

programmable processing means for scanning the output of the comparator and for operating the switching means when the limit of the closure operation is detected by the cessation of back electromagnetic force from the motor as sensed by the voltage comparator, the programmable processing means further programmed to detect motor stall by detection of a lack of back electromagnetic force for a predetermined number of times before the condition of motor stall is assumed by the system.
 Description Submit all comments and votes
 


TECHNICAL FIELD

The present invention relates to motor control circuits in general and relates, in particular, to an electronic circuit for control of a motor operating a device with a fixed limit of motion, such as a window closing against a fixed jamb.

BACKGROUND OF THE INVENTION

In many environments where electric motors are used to do useful work, an object is moved by the motor a predetermined distance. In such an event, often the motor is moved against a fixed limit of motion and the detection of the reaching of such limit needs to be sensed so that the operation of the motor can be ceased. In many prior art systems using direct current motors, the status of a direct current motor is typically monitored by mechanically measuring the torque of the motor or by electrically measuring the current drawn by the motor. Mechanical torque measuring systems tend to be cumbersome and expensive for applications where control of many small inexpensive direct current motors is desired. The use of a current monitoring technique for motor control status inquiry is somewhat cheaper but is subject to inherent inaccuracies because of the temperature and line voltage variations inherent in such a system. Another technique often used to avoid both of these systems is to utilize limit switches responsive to actual positioning of the object to send an electric signal when a limit of travel of the object is reached. Systems utilizing such limit switches are adequate and practical, but the use of such switches adds to the cost and complexity of the system with many motors since separate limit switches must be installed and wired for each motor control device. The present invention attempts to offer a different approach toward this purpose in that the only connection between the control circuit and the motor is the pair of power lines by which the motor is powered, and the back electromotive force on those lines is measured to determine when the limit of travel of the motor is reached by sensing the termination of this back electromotive force from the motor.

The prior art is generally cognizant of the concept of operating motors with microprocessor or digital control, with control being responsive to the position of the motor control device. For example in U.S. Pat. No. 4,431,954, a microprocessor controls motor operation for windshield wipers with the position of the windshield wipers at any given time being determined by position sensors. Similarly U.S. Pat. No. 3,792,332, provides an interface for multiplex motor control systems in which a microprocessor or other control box is used to operate a number of motive devices. Other window or closure operating systems are illustrated in U.S. Pat. Nos. 3,781,622 and 2,994,525.

The broad concept of sensing the electromagnetic force from motor operation as a means of controlling motor operation is not new in and of itself. For example, the disclosures of U.S. Pat. Nos. 4,119,899 and 4,358,718, disclose motor operating devices for direct current motors which are, to some degree, responsive to the counter electromotive voltage induced in the direct current motors. Both of these systems operate with conventional direct current voltage supplies.

SUMMARY OF THE INVENTION

The present invention is summarized in that a motor control circuit for a direct current permanent magnet motor includes: a full wave rectifier to rectify alternating current power to full wave rectified unregulated voltage; switching means for selectively connecting the motor to the output of the rectifier; a voltage comparator also connected to the output of the rectifier for comparing the voltage at that output with a fixed voltage level; and programmable processing means for scanning the output of the comparator and for controlling the switching means to operate the switching means to disconnect the motor from the rectifier when a motor stall condition is detected by a lack of back electromagnetic force induced voltage at the output of the rectifier.

It is an object of the present invention to provide a system for controlling direct current permanent magnet motors wherein operation of the motors is controlled by monitoring the back electromagnetic force induced in the armature of the motors by the permanent magnets therein.

It is another object of the present invention to provide such a system in which the motors are energized by a full rectified, unregulated waveform rather than a regulated direct current supply.

It is another object of the present invention to provide a system for operating closures against a fixed limit, such as a jamb, wherein the mechanical contact between the closure and its limit is determined by sensing the stall condition in the motor operating the closure.

It is yet one more object of the present invention to provide a system for remotely operating a plurality of windows with motors provided at each window wherein the motors at the windows need only be connected to the central control circuit by a pair of wires for each motor.

Other objects, advantages, and features of the present invention will become apparent from the following specification when taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a front schematic view of a window operating system constructed in accordance with the present invention.

FIGS. 2A and 2B are two parts of a circuit schematic diagram of the control circuitry contained in the control circuit module of FIG. 1.

FIGS. 3A and 3B together illustrate a flow chart for the basic method of operation for the program for the microprocessor of the control circuit of FIG. 2.

FIG. 4 is a flow chart of a subroutine called by the program of FIG. 3.

FIGS. 5A and 5B together are a flow chart which illustrates another subroutine called by the program of FIGS. 3A and 3B.

FIGS. 6A, 6B and 6C together illustrate by flow chart another subroutine called by the program of FIGS. 3A and 3B.

FIGS. 7A and 7B together constitute a flow chart of another subroutine called by the subroutines of FIGS. 4 and 5.

FIGS. 8A and 8B together illustrate another subroutine which is called by the routines of FIGS. 7A and 7B.

FIG. 9 illustrates the flow chart of a delay subroutine called by other parts of the program.

FIG. 10 illustrates a debounce subroutine called by various parts of the program.

DESCRIPTION OF THE PREFERRED EMBODIMENT

Shown in FIG. 1, and generally illustrated at 10, is a window operating and motor control system constructed in accordance with the present invention. The system in general includes three main components. The first component is a command module 12 by which the user may input commands to the system. The second major component is a control circuit module 14. A plurality of motors 16 are the third major component of the system with the motor 16 being used to do functional work. In the embodiment as illustrated in FIG. 1, the motor 16 is utilized to turn a window operator 18 which opens and closes a casement window 20. A suitable cable 22 of six conductors, as will be described in more detail below, is used to connect the command module 12 with the control circuit console 14. Motor cables 24 are provided to connect the control circuit module 14 to the various motors 16, each of the cables 24 being four wire cables, as will also be discussed in more detail below.

Shown in more detail in FIGS. 2a and 2b are the electronic circuitry of the command module 12 and the control circuit module 14. A power transformer 26 is provided connected through an off-on switch 28 to a small RC circuit consisting of a resistor 30 and a capacitor 32. A full wave rectifier in the form of a diode bridge consisting of four diodes 34 is connected to provide a full wave rectified voltage signal to a voltage regulator 36. The voltage regulator 36 is provided with a filtering circuit consisting of resistor 38, diode 40 and relatively large filtering capacity 42 on its input and also with a transient filtering capacitor 44 on its output to provide regulated DC voltage, as for example at 5 volts, to the remaining circuit elements in the control circuit.

Illustrated within the dashed lines in FIG. 2a are the components contained within the command module 12. These components consist essentially of seven identical single pole normally open push buttons 46. The push buttons 46 have been labeled corresponding to the labels contained on the exterior of the command module as can be viewed in FIG. 1. The main processing component of the circuitry of FIG. 2a is a microprocessor chip 48 which includes within it both microprocessor logic and read only memory circuitry. Three single lines of an output one of two eight bit data buses of the microprocessor, designated 50, are connected through resistors 52 to scan the three columns into which the switches in the command module 46 are arranged. Each row of the switches 46 is connected through a respective resistor 52 to a respective line 54 of the second or input eight bit data bus of the microprocessor 48. A series of resistances 56 and capacitors 58 are used to suppress noise between the microprocessor 48 and the switches 46 which might arise in the six wire cable 22. A start-up reset circuit is provided consisting of a diode 58, a capacitor 60, and a resistor 62, connected to the reset input of the microprocessor 48 to clear the registers of the microprocessor upon power up of the system. An oscillator timing circuit consisting of two capacitors 64 and 66 and an inductor 68 are connected to the oscillator pins of the microprocessor to provide a time base to the microprocessor for use in clocking its functions and monitoring time delays. The selection of a particular microprocessor to use in the system is not important as long as the operation of the circuitry is in accordance with the method described herein and the flow chart described later, but the particular microprocessor preferred for this application is the PIC 1654.

The full wave rectified output of the bridge of diodes 34 is present at the circuit mode designated by the reference numeral 70. The node 70 is connected through a resistor 72 to the non-inverting input of a comparator 74. The inverting input of the comparator 74 is connected to ground. A capacitor 76 is also connected to the terminal of the comparator connected through the resistor 72 to the node 70. The output of the comparator 74 is connected to an RC network including resistances 78 and 80 and a capacitor 82, the output of which is connected to another comparator 84 at its negative input. The positive input to the comparator 84 is biased to the positive supply voltage by a resistor 86 and is then connected through a resistor 88 to one of the lines 50 of the first data bus of the microprocessor 48. A diode 90 is connected to that line of the data bus with its cathode directed toward the microprocessor and the comparator 84. The output of the comparator 84 is connected to a single line 92 which is a part of the input data bus into the microprocessor 48 including the lines 54, the input line 92 is also connected by a resistor 94 connected to the supply voltage and to the output of another comparator 96. The positive input to the comparator 96 is connected to the junction of a pair of resistors 98 and 100 with the resistor 100 connecting to the supply voltage and the resistor 98 connected to a one of the output data bus lines 50. That data bus line 50 is also selectably connected by a switch 102 to a selected one of the data bus input lines 54. The negative input to the comparator 96 is connected to the junction of a pair of resistors 104 and 106, one of which is connected to supply and the other of which is connected to ground. Also connected to the junction of the resistors 104 and 106 is the output of another operational amplifier 108. The operational amplifier 108 has a feed back resistor 110 connected between its positive input and output and has a voltage divider consisting of resistors 112 and 114 biasing its negative input. The positive input to the operational amplifier 108 is connected to a rain sensing circuit, generally indicated at 114. In the rain sensing circuit 114, a pair of resistors 116 and 118 divide the A.C. wave form expressed at one side of capacitor 32 and are connected to the base of a transistor 120. The collector of the transistor 120 is connected to resistors 122 and 124 which connect to the base of a transistor 126. The base of the transistor 126 is also connected through a series RC circuit consisting of a capacitor 128 and a resistor 130 to a rain detector signal line 132 which is connected to rain sensor, as will be described in further detail below. The collector of the transistor 126 is connected to supply while the emitter is connected through resistors 134 and 136 to the non-inverting input of the operational amplifier 108. A capacitor 138 and a resistor 140 complete the RC timing circuit connected across the output of the transistor 128 to modify its output.

As illustrated in FIG. 2b, five single lines of the output data bus of the microprocessor 48, the lines being indicated at 142, are each biased by resistors 144 connected to the supply and are all connected to a relay driver 146. The relay driver 146, beside its connection to supply and ground, has as its output five relay driving signal lines. Four of those lines, indicated at 148, are each connected respectively to one terminal of the coil of each of a set of four motor switching relays 150. The other side of the coil of each of the relays 150 is connected directly to the node 70. The remaining output driver line of the relay driver 146, indicated at 152, is connected to one terminal of a coil of a double pole relay 154. The other terminal of the coil of the relay 154 is connected through a diode to the node 70. The double pole relay 154 is also a double throw relay. In one of its two positions it connects the ground to a motor driving line 156 and in its other throw it connects the ground to a motor driving line 158. Similarly and complimentarily, the relay connects the node 70 to the motor driving line 158 in one of its positions and to the motor driving line 156 in its other. The motor driving line 158 is connected to one of the terminals of the single pole normally open switches in each of the relays 150. The outputs of the circuitry of FIG. 2b are grouped in four output groups designated by the similar reference numerals 160. The first line in each of the output groups 160 is the motor driving line 158 switched through the respective relay 150 associated with each of the output signal groups 160. The second signal in each of the output signal groups 160 is the motor driving line 156. RC circuits are connected between each of the motor driving lines 156 and 158 associated with each of the output signal groups 160 to reduce noise thereon. The third signal in each output signal group 160 is the rain detector signal line 132. The remaining signal line in each of the output signal groups 160 is connected to ground by a resistor 162. Each of the output signal groups 160 is associated with a single one of the cables 24 connecting the control circuit module 14 to the motor 16 operating each of the particular windows.

To connect the unit up for operation, each of the output signal groups 160 is connected by a respective four wire cable 24 to the motor 16 mounted on the window operator 18 on each window. The windows can be either casement or awning type windows as long as they are operable by a rotary operator. A suitable rain sensor, indicated in phantom at 164 in FIG. 1, can be connected to one or more motors 16 by the two wires associated with the rain detector included in each of the output signal groups 160. The motor itself 16 is connected only to the motor driving lines 156 and 158 associated with each output signal group 160. The motors 16 are preferably DC permanent magnet motors adapted for operation at high torque and low RPM or geared to provide that output.

In the operation of the circuitry of FIGS. 2a and 2b, the circuitry is intended to provide power to the motors 16 and to sense the nature of the response to that power, to operate the windows 20. The microprocessor 48 in accordance with its internal programming scans the command module 12 to determine commands from the user to close or open particular windows and also is informed by the user the number of the particular window or windows to be opened or closed. The microprocessor obtains this information by selecting and outputting signals on its output data bus lines 50 and by reading the results by reading data from the input data bus lines 54. The logic of motor operation is then determined and a digital byte formulated to energize the approriate motor and that information is then outputted by suitable signals provided on the output data bus lines 142 to the relay driver 146. By providing the appropriate output data byte, the relay 154 is driven into the appropriate one of its two positions to provide power of one or the other polarity to the motor driving lines 156 and 158 connected through the output signal groups 160 to the motor 16 to be operated. The particular motor to be operated in any given time is selected by actuation of one of the four single pole relays 150. The selection of the particular relay 150, and thereby the motor to be operated, is done by the selection of a proper data output on the output data bus lines 142. The full wave rectifier of the diodes 34 functions as a wave shaping means for shaping the power waveform to be supplied to the motors 16. As will become apparent from the discussion below, it is important that this power waveform be a periodic waveform which reaches zero volts. While full rectified alternating current is preferred, it is also possible to use other periodic waveforms such as half wave rectified AC or square signals.

The comparators providing input to the input data line 92 provide additional sensing information to the microprocessor. As will be discussed in more detail below, the comparator 74 functions to examine the reverse EMF expressed on the motor 16 to detect motor stall conditions. The comparator 96 joins a signal received from the rain detecting circuit 114, designed to sense rain so that windows can be closed, with information received from the switch 102 which indicates the use of a casement window. The function of these components will be understood in more detail after description of the flow charts describing the method of operation of the microprocessor 48 of FIG. 2A.

Referring now to FIGS. 3 through 10, the flow chart of operation of the program driving the microprocessor 48 is summarized. Beginning in FIGS. 3A and 3B, the main program routine begins with a start indicated at step 200 and then proceeds to clear the rain flag bit at step 202. All output ports are then initialized to insure that all relays are off at step 204. The random access memory of the microprocessor is also cleared in step 204. The initialization of ports is done by outputting a data signal which has a zero component in each of the output data bus lines 142. The program then proceeds to call the scan keyboard subroutine indicated at 206 for relevant data entry. The scan keyboard routine is illustrated in greater detail in FIGS. 6A through 6C and will be described in greater detail below. In program step 208 the rain detector is enabled by outputting a suitable data bit on the output data bus 50 line connected to the comparator 96. A delay subroutine indicated at 210 is then called to allow operation of the rain sensor. Following the delay at 210, a branch decision is made in the program at 212 depending on whether or not rain detection occurs. If rain detection does occur then a branch is made to program step 214 where a branch decision is made determining whether or not the rain flag has been previously set. If the rain flag has been previously set then the program proceeds to step 216 clearing the accumulator and then returns through loop C to a higher point in the program as illustrated in FIG. 3A. If the rain flag is not set, then the program branches to program step 218 illustrated in FIG. 3B and then sets the rain flag bit internally in the memory of the microprocessor. The program then proceeds to clear, internally in its own memory, its register indicating the open button has been pressed at step 220, and then proceeds to step 222 to artifically set in its memory a condition that all closed buttons have been set. Then the program proceeds to set all the keyboard bits to indicate operation of all windows at step 224 as if the buttons for closing all windows had been pressed. Following that, before operation of the windows proceeds, an enabling step is made at 226 to enable a branch test condition at 228 to determine the window type. This test enable is made by enabling the appropriate output data bus line 54 and monitoring the appropriate input data bus line 50 to see if switch 102, indicating the presence of a casement window, is closed. If the window type is casement, the program proceeds to casement operating subroutine 230 before returning to loop in the program as indicated at A in FIG. 3A. If the program assumes an awning type window since it is not a casement then the program proceeds to awning subroutine operation 232 before returning to the same point A to loop into the program. Both of the subroutines for casement and awning window operation will be described in further detail below. If rain detection was not made at the branch condition 212 in FIG. 3A, the program then proceeds to clear the rain flag bit at step 234. Whether the rain flag bit has just been cleared or if the rain flag bit had been previously set but did not require action at this time, the program loops as indicated at C to the test to determine if any control buttons have been pressed at step 236. If no control buttons have been pressed, as determined by flags set during the keyboard scan subroutine, the program loops back to scan the keyboard at subroutine 206. If control buttons are pressed the program continues to another conditional branch operation at 238 to determine if the stop button has been pressed. If the stop button has been pressed the program loops back to point B so as to initialize ports and stop all motor operation in accordance with the stop instruction. If the stop number has not been pressed then the program proceeds to conditional branch 240 to determine if any numbers have been pressed. If no numbers have been pressed the program proceeds to step 242 and assumes that all windows are to be operated and therefore internally forces all numbered keyboard bits in memory to a state indicating operation of all windows. The program then reaches the conditional branch 244 either with a single window being selected at conditional branch 240 or with all of the windows having been selected through the step 242. At conditional branch 244 the program determines whether it has been instructed to open a window by scanning the flag for open window set by the keyboard scan subroutine. If it receives a yes from its scan, it then clears the direction bit outputted to the relay 154 at step 246 to indicate the direction at which window operation is to be made, i.e. in the direction of opening the windows. If no open instruction is received, the program assumes that the windows are to be closed, and proceeds to step 248 to set the direction bit in the opposite polarity to indicate closure of the windows by forcing the opposite polarity of the relay 154. In either event, the program then proceeds to branch point D1 to test for style of windows and then to operate in the appropriate subroutine either a casement or an awning window.

The operating routine for each of the type windows will now be described in detail. Referring to FIG. 4 first, the subroutine for operation of an awning type window is described. Beginning with commencing step number 250, the program then commences to a conditional branch to determine if button number 1 has been previously depressed. At this point the program is not scanning the keyboard but is scanning its internal memory set in response to keyboard scan to determine whether the appropriate button was pressed when the keyboard was scanned. If button 1 has been pressed, then the accumulator is loaded with number 1 indicating that window number 1 is to be operated, at step 254, and then subroutine 256 for operation of the motor is called. After return from the subroutine 256 a conditional branch is made at 258 to determine if the stop button is pressed. If the stop button has been pressed, then the program immediately branches to return 260 to return from the subroutine and if the stop button has not been pressed then the program branches to conditional branch 260. Conditional branch 260 tests if button number 2 has been depressed and, if it has, the program then loads the accumulator with button number 2 information at step 262, by loading a binary 2 in the accumulator, and again runs subroutine 256 operating the motor. Again a conditional branch is made at 264 to determine if the stop button is pressed and then immediately returned from the subroutine or branch to button 3. The operation of testing to operate windows 3 and 4 is similar except that a binary 4 or 8 repectively is loaded in the accumulator to operate window 3 or 4.

Illustrated in FIG. 5A is a flow chart for the casement subroutine 230 which is called in the window operation routine illustrated in FIG. 3B. The casement operating subroutine commences with step number 266 and then proceeds to conditional branch