|
Description  |
|
|
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 | | |