Dynamic brake assembly
REFERENCE TO APPENDIX 
     Included with this disclosure is a thirty-page appendix. Reproduction of the appendix is authorized only in connection with the printing or copying of any patent that may issue from this application. 
     1. BACKGROUND OF THE INVENTION 
     1.1 Field of the Invention 
     The present invention pertains generally to dynamic brakes, and more particularly, to dynamic brakes that permit rapid stopping of alternating current (AC) motors through the use of direct current (DC) injection to create a stationary, braking, magnetic field within the motor. 
     1.2 Description of the Prior Art 
     AC motors are widely used in industry. For example, the large machines used in most wood processing plants, e.g., chippers, band saws and planers, are almost exclusively driven by AC motors. In industrial plants where AC motors are used and relied upon, an inoperable AC motor can bring an entire production line to a full stop. Accordingly, controlling and maximizing the productive time of each AC motor is important. One way to enhance the productive time available of an AC motor is through proper control of the motor&#39;s braking cycle. 
     Generally, when the power to an AC motor is cut off, the motor does not come to an immediate stop, but rather gradually &#34;coasts&#34; to a stop. For large motors with large loads this &#34;coasting&#34; period can be quite long (20-40 minutes for massive loads) resulting in periods when the motors are unavailable for useful work. In many cases (e.g., when changing motor loads) these &#34;coasting&#34; periods result in gaps of time when both the motor and the motor&#39;s operator are unproductive. 
     In addition to the productivity problems caused by coasting, allowing a motor to gradually coast to a stop can be quite hazardous. For example, a silently coasting machine such as a radial arm saw, disc sander or band saw can cause tremendous injury to both man and machine. 
     In an effort to reduce the unproductive and hazardous coasting periods associated with AC motors, mechanical or friction brakes are often used to decrease the time required to bring a running AC motor to a stop. Such brakes rely on the frictional force created between a mechanical brake pad and a rotating part of the motor. Because the brake pad often wears away after several braking cycles, mechanical brakes require significant adjustment, repair and maintenance (e.g., brake pad replacement). A further disadvantage with many mechanical brakes is that the brake pads for which the brakes were designed are manufactured from asbestos or asbestos substitutes--potential cancer-contributing materials most industries are hesitant to use. 
     In an effort to overcome the disadvantages associated with mechanical brakes, frictionless electronic brake assemblies were developed. Such frictionless electronic brake assemblies are often referred to as &#34;electronic dynamic brakes.&#34; 
     The basic operation of a typical electronic dynamic brake assembly is illustrated in FIG. 1. As illustrated in FIG. 1, an electronic dynamic brake 10 is coupled via electrical connections 12, 12&#39;, 14 and 14&#39; to the power line inputs and to a three-phase AC motor 20. Sense leads 16 and 16&#39; detect motor contractor opening to initiate the brake cycle and are used to sense whether power is being applied to the motor. Connected across the power line inputs is a motor starter 30 that includes three contacts for controlling the power line inputs to the motor. When the START button on the motor starter is activated, the three contacts are closed, coupling the motor inputs to the power line inputs. When the STOP button of the motor starter is activated, the three contacts are opened and the three motor inputs are disconnected from the power lines. 
     The sense leads 16 and 16&#39; of the electronic brake 10 monitor the power applied to the motor 20. When sense leads 16 and 16&#39; sense that power is being supplied across the motor starter contacts to the motor, an indication that the motor is RUNNING is provided to the brake assembly. If, once the motor is running, the sense leads 16 and 16&#39; sense that the power supplied to the motor has been cut off (e.g., by activation of the STOP button) the control leads provide an indication to the dynamic brake that a braking cycle should be instigated. The dynamic brake assembly will use the power it receives from the power lines to generate direct (&#34;DC&#34;) current. This direct current is then injected, through motor input lines (a) and (c) into the stator of the AC motor 20. The injection of the DC current creates a stationary magnetic field within the motor. This stationary magnetic field forces the poles of the rotor field to align with the stationary poles of the stator, quickly brings the motor to a stop without mechanical friction. Because the braking cycle of the dynamic brake discussed above is initiated by activating the STOP button of the motor and is controlled by the motor starter, this type of brake assembly is commonly referred to as a &#34;slave brake.&#34; 
     Because it could damage both the motor and the dynamic brake if a braking cycle were initiated when three-phase power is being supplied to the motor, most electronic dynamic brake assemblies are used in conjunction with a separate, electrical interlock system. An electrical interlock system is illustrated as part of element 10 in FIG. 1. Basically, the purpose of the electrical interlock is to ensure that the motor cannot be energized by the starter contacts during a braking cycle. During normal motor running operation, the interlock circuit is closed and power from the power lines is applied to the motor starter. During a braking cycle, the interlock opens up, thus &#34;locking out&#34; the motor starter and ensuring that power cannot pass through the motor starter to the motor. The installation and operation of electrical interlocks is understood by those skilled in the art and will not be further addressed herein. 
     When using an electronic dynamic brake, the length of the braking cycle (i.e., the time necessary to bring the motor to a complete stop) will vary depending on the magnitude of the DC braking current applied to the motor, the size and type of motor, and the size and type of load attached to the motor. In many prior art brake assemblies, a timer is used to ensure that the DC braking current is applied to the motor for a sufficient time period to bring the motor to a stop. 
     When a timer is used with a electronic dynamic brake, the brake is initially set so that when a braking cycle is initiated, the brake will apply DC current to the motor for a preselected time period. The time period is usually set--through trial and error--to be of sufficient length to bring the motor to a complete stop. Because variables such as the line voltage, temperature of the motor and slight load changes can affect the time required to brake a motor, the braking time period is usually selected to be longer than the maximum expected stopping time. 
     One disadvantage of &#34;timed&#34; electronic dynamic brakes is that the set time period (the maximum braking time) is often longer than the actual time period required to stop the motor. Accordingly, with timed dynamic drakes, there are often periods--referred to as dead time--when the motor has come to a stop, but the dynamic brake assembly continues to inject DC current into the motor. Excessive dead time frequently occurs when the load applied to the motor is smaller than normal. Such dead time periods, like the coasting periods discussed above, render the motor unproductive. Additionally, such periods waste power as DC current is unnecessarily being supplied to a stopped motor. 
     A further disadvantage of timed electronic dynamic brakes is that the preselected time period is generally optimized for a single motor and a single load. Accordingly, if the load changes, or the brake assembly is moved to a different motor, the brake assembly must be tested and reset to properly brake the new motor or load. Such resetting periods are inefficient in that during such periods it is difficult to efficiently use the brake assembly, the new motor, the new load or the technician who is responsible for resetting the brake. A still further disadvantage with timed electronic dynamic brakes is if, for some reason, the preselected time period is too short, the brake will stop injecting DC current into the motor before the motor is stopped, resulting in a &#34;coasting&#34; period like the ones discussed above. 
     In an effort to overcome the disadvantages associated with timed dynamic brakes, some in the prior art began to use &#34;stop sensors&#34; or &#34;zero speed sensors&#34; in conjunction with typical electronic dynamic brakes. These prior art zero speed sensors would detect the rotation of a three-phase motor by sensing the voltage at the motor input terminals. For example, as illustrated in FIG. 1, a lead 17 could be used to serve the voltage at a motor input terminal. 
     One type of prior art zero-speed detector is illustrated in FIGS. 2A and 2B. FIG. 2A is a partial schematic diagram of one prior art zero-speed sensor. The sensor generally comprises a differential sense amplifier that receives as its inputs the signals T1 and T2, from two input terminals of an AC motor. The differential amplifier 53 receives the two signals and produces an output signal proportional to their difference. The differential output signal is then applied to a low pass filter 54 and the output of the low pass filter is applied to a 60 Hz. notch filter 55. The notch filter is used to filter out any voltage waveforms caused by the 60 Hz. AC power typically applied through the power input lines to AC motors. The output from the notch filter 55 is then applied to four sample and hold circuits 56. The sample and hold circuits are configured such that two of the circuits are clocked every 60 Hz. cycle. The outputs form the sample and hold circuits 56 are then applied to additional circuitry 57 (not illustrated in detail) that produce a ZERO SPEED signal when certain conditions are met. 
     During a braking cycle the rotational speed of the motor being braked will normally be constantly decreasing. Because the rotational speed of the motor is constantly changing, so too are the voltages generated by the motor at its input terminals. When the motor has come to a complete stop, the voltage at the output terminals will be essentially constant. Accordingly, by monitoring the change in the voltages at the motor input terminals, and determining when the voltages cease to change, it is possible to sense when the motor has come to a stop. 
     The prior art zero-speed circuit of FIG. 2A generally operates as follow: First, two times during each 60 Hz. cycle, samples are taken of the output of the 60 Hz. notch filter 55. This is illustrated in FIG. 2B, where samples are shown being taken at points A and B. The two samples are then stored in two of the sample and hold circuits (A, B) 56. During the immediately following 60 Hz. cycle, two more samples are taken (A&#39;, B&#39;) and stored in sample and hold circuits (A&#39;, B&#39;) 56. The most recent samples are then compared to the previously taken two samples by circuitry 57. If the sample for A does not match the sample for A&#39; (or if B does not match B&#39;) then there is no zero speed. If, however the pairs of samples match, then there is a chance that the motor is at zero-speed. In most prior art devices, the samples must match for a sufficient number of cycles, e.g., 40-100, before a zero-speed signal is generated. Accordingly, circuitry 57 monitors the outputs of the sample and hold circuits 56 and generates a ZERO-SPEED signal whenever the sample and hold pairs match for the preselected number of times. 
     One problem with prior art zero-speed detectors is that for most motors, there are periods during a braking cycle where portions of the output voltage at the terminals do not change, even though the motor is rotating. These periods are referred to as &#34;dead spots.&#34; If the zero-speed sensor happens to take samples of the voltages from these &#34;dead spots&#34;, it can be fooled into reporting that a motor is stopped when, in fact, the motor is still rotating. In order to avoid false zero speed detections, manual adjustments are required in many prior art zero speed detectors. Common adjustments included altering the time during the 60 Hz. cycle when the two samples are taken, and increasing the number of matches that must be detected before a ZERO-SPEED signal is generated. 
     The location of the &#34;dead spots,&#34; discussed above, varies from motor to motor and load to load. Furthermore, the location of dead spots for the same motor and load can vary as the motor wears, the load changes, the line voltage varies or the temperature of the motor or load changes. Accordingly, it is quite difficult to set prior art zero-detectors for a particular motor/load/temperature range combination and--once the brake is set--it is difficult to move the brake to another motor/load/temperature combination without extensive resetting. In many instances, the &#34;worst-case&#34; scenario is used to set the zero-detector. In other words, the zero-speed detector is set to produce a ZERO-SPEED signal only after the number of matches indicated is such that it exceeds the worst case dead spot. Accordingly, in many cases, prior art zero-speed detectors require more matches prior to the generation of a zero-speed signal than are actually necessary. 
     Another problem with prior art zero-speed detectors is that they are operable at a sub-optimum time in the firing procedure. In most prior art zero-speed detectors, the zero speed sensing occurs after a delay and after a SCR firing. Thus there is a three-step procedure: (1) delay; (2) fire; and (3) zero-speed sensing. This is believed to provide sub-optimum results as the firing of the SCR immediately before the zero-speed sense is believed to negatively impact the zero-speed sensing. 
     The prior art zero-speed detectors are used with a variety of electronic brake assemblies. Generally, there are three different types of prior art brake assemblies: 
     (1) Slave Brakes--Discussed above, where the activation of the braking cycle is dependent on the position of the motor contacts in the motor starter (i.e., the motor contacts control the brake assembly); 
     (2) Pre-Stop Brakes--where the brake brings the motor to a complete stop before each start; and 
     (3) Holding Brakes--where the brake, when activated, continuously supplies DC current to the motor to prevent it from rotating (when the START button is activated, the brake releases). 
     As discussed above, slave brakes are generally used to simply bring a motor to a stop when the STOP button is activated. 
     Pre-stop brakes are used in situations (such as in wind tunnels with fans) where there is chance that, prior to starting, the shaft of the motor will be rotating opposite to the desired direction of rotation. Such opposite rotation is referred to as &#34;windmilling.&#34; Sever damage can occur to the motor and the load if it is started while the motor is windmilling. Pre-stop brakes overcome the windmilling problem by sensing when the START button has been activated, bringing the motor to a complete stop, and then releasing the brake and allowing the motor contacts to close, starting the motor. Unlike slave brakes, where the status of the motor contacts determines the status of the brake, in a pre-stop brake circuitry within the pre-stop brake assembly controls the status of the contacts in the motor starter. 
     Holding brakes are used when it is necessary to ensure that the motor does not rotate after it has been stopped. Holding brakes, when activated, bring the motor to a stop and then continuously apply DC current to the motor to ensure that the shaft does not rotate. Holding brakes are often used with dangerous equipment when it is important to ensure that the equipment does not move when not in operation or where a positive hold on the motor shaft must be maintained to prevent backward coasting (e.g., inclined conveyors). 
     In the prior art, each type of brake (slave, pre-stop and holding) requires a discrete and separate brake assembly. Accordingly, if one wants a holding brake, one purchases and installs a holding brake assembly. If one wants a pre-stop brake, a pre-stop brake must be installed. One difficulty with these separate prior art devices is that it is often difficult to accurately determine what type of brake is needed for a particular application. For example, one may initially determine that a slave brake is needed but, after observing wind and rotational effects, realize that a pre-stop brake is required. With prior art brake assemblies, one is forced to remove the installed slave brake and replace it with a different pre-stop unit. Such replacement of installed brake assemblies results in a loss of both the time and cost of replacement as well as the extra time the motor is unproductive. 
     2. SUMMARY OF THE INVENTION 
     The present invention addresses the aforementioned and other disadvantages or prior art dynamic brake assemblies by providing an improved dynamic brake assembly compatible with conventional AC motors. In particular, the dynamic brake assembly of the present invention provides a single dynamic brake assembly that is operable in a slave-mode, pre-stop mode, holding mode and a master mode. The present invention also provides an improved method for dynamically braking a motor and, in particular, and improved method for detecting the zero-speed of a motor. 
     Use of the dynamic brake of present invention may result in the use of a single multi-mode dynamic brake where, in the past, several brakes were required. Use of the method of the present invention may result in improved braking and zero speed detection. The dynamic brake of the present invention may be used in most all AC motor applications including use with woodworking and metal working machines such as saws, lathes, grinders and the like. 
     Other advantages will be apparent to one of skill in the art upon review of this disclosure. 
    
    
     3. BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 illustrates the basic operation of a typical electronic dynamic brake assembly. 
     FIGS. 2A and 2B illustrate a prior art zero-speed sensor. 
     FIG. 3 generally illustrates the brake assembly of the present invention. 
     FIGS. 4A-4D illustrates the brake contacts and silicon controlled rectifier (&#34;SCR&#34;) circuitry of the present invention. 
     FIG. 5 illustrates a manner in which DC braking currents are generating by the SCR circuitry of the present invention. 
     FIG. 6 is a block diagram of the dynamic brake assembly of the present invention. 
     FIGS. 7A-7B illustrate the enclosure and circuitry associated with the control buttons of the present invention. 
     FIGS. 8A-8C illustrate the circuitry and settings for the control switches of the present invention. 
     FIGS. 9A-9B illustrate the circuitry and operation of the variable analog control signals of the present invention. 
     FIG. 10 illustrates circuitry for generating the ZERO CROSS signal. 
     FIG. 11 illustrates circuitry for generating the SENSE signal. 
     FIG. 12 illustrates circuitry for generating the ZERO SPEED signal. 
     FIG. 13 illustrates a circuit for generating the MOTOR CONTACT control signal and for controlling the motor contacts. 
     FIG. 14 illustrates the SCR trigger circuitry of the present invention. 
     FIG. 15 is a flow diagram of the main program routine used in the control logic of the present invention. 
     FIGS. 16A-16B represent a flow diagram of the control logic for a BASIC BRAKE routine in accordance with the present invention. 
     FIGS. 17A-17B illustrate a logic flow diagram for a FIRE routine in accordance with the present invention. 
     FIG. 18 illustrates a flow logic for a ZERO CROSS routine in accordance with the present invention. 
     FIGS. 19A-19B are a flow diagram illustrating the logic flow of a ZERO SPEED DETECTION routine in accordance with the present invention. 
     FIGS. 20A-20B illustrate features of a FIRE routine in accordance with the present invention. 
     FIG. 21 illustrates the control logic for a PRE-STOP routine in accordance with the present invention. 
     FIGS. 22A-22B illustrate a logic flow diagram of a HOLDING BRAKE routine in accordance with the present invention. 
     FIGS. 23A-23D illustrate a logic flow diagram of a MASTER BRAKE routine in accordance with the present invention. 
    
    
     4. DESCRIPTION OF A PREFERRED EMBODIMENT 
     4.1 The Dynamic Brake Assembly of the Present Invention--An Overview 
     FIG. 3 generally illustrates the brake assembly of the present invention in combination with an AC motor 90 and motor starter 50. As illustrated in FIG. 3, the brake assembly of the present invention 60 is coupled via brake contacts and silicon controlled rectifier (&#34;SCR&#34;) circuitry 80 to an AC motor 90. The brake assembly is coupled in parallel with a motor starter 50. The motor starter 50, with appropriate controls 55, is coupled to the AC motor 90 in a manner similar to that for the prior art device illustrated in FIG. 1. 
     FIGS. 4A-4D illustrate in greater detail the brake contacts and SCR circuitry 80 of the present invention. 
     As illustrated in FIG. 4A, three motor starter contacts 52 couple three phase power lines (L1, L2, L3) 51 to the three motor input terminals (T1, T2, T3) 90. In the present invention, the status of the motor contacts 52 (i.e., open or closed) is determined by the controls 55 associated with the motor starter 50 or with the controls 70 associated with the dynamic brake assembly 60. When the motor contacts 52 are closed three phase power is passed from the line 51 to the stator of the motor 90. This is illustrated in FIG. 4B where the dark lines represent current paths. Note that the brake contacts 61a-61c are open when the motor contacts are closed. 
     In addition to the three motor contacts, FIG. 4A also illustrates three brake contacts 61a-61c. These brake contacts couple the brake assembly of the present invention to both the power lines 51 and to the motor input terminals. When the brake contacts 61 are closed the brake is coupled to both the motor and the power supply; when the contacts are open, the brake is decoupled from the motor. FIG. 4C illustrates the status of the circuit when the brake contactors are closed. As before, the dark lines represent current paths. As discussed in more detail below, the present invention includes circuitry for ensuring that the motor contacts and the brake contacts are never closed simultaneously. 
     In addition to the motor and brake contacts, the circuitry of the present invention includes a diode and a silicon controlled rectifier (&#34;SCR&#34;) coupled through various leads to a master control unit (not illustrated in FIGS. 4A-4D). 
     As illustrated in FIG. 4A, an electrically conductive lead 62 is coupled to the power line L2 as is another lead 63 to the second motor terminal T2. Coupled to the junction of these leads (after lead 63 passes through brake contact 61b) is a diode 64. Diode 64 is often referred as a &#34;free-wheeling&#34; diode for reasons to be discussed below. Diode 64 is used to set up the stationary DC field in the motor that is needed for braking. Without diode 64, the voltage and current applied to the motor would look like a pulsating current and a stationary magnetic field would not be established. 
     As illustrated, leads 65 and 66 are respectively coupled to power line L1 and motor terminal T1. An SCR 67 is coupled between the two leads. Leads from the cathode 67K, gate 67G and anode 67A of the SCR 67 are provided to the master control unit (not illustrated). Another lead 68 (the sense lead S) couples the signal at T1 to the master control unit. Further, a conductive lead 69 is attached to the third motor input terminal T3. This lead 69 is coupled to the master control unit of the present invention and is used for zero-speed sensing. 
     The operation of the motor when the motor contacts are closed and the brake contacts open (as illustrated in FIG. 4B) will be apparent to those skilled in the art and will not be discussed herein. The operation of the motor when the brake contacts are closed and the motor contacts open is discussed with reference to FIG. 4D. 
     FIG. 4D is a simplified representation of the above circuitry when the brake contacts are closed and the motor contacts open. Because only two terminals of the motor (T1 and T2) are coupled to the SCR circuitry when the brake contacts are closed the motor is illustrated as a two terminal device. For similar reasons, the power line is illustrated as having only two output supplies. The current paths of the circuit illustrated in FIG. 4D depends on the status of the SCR 67. As understood by those skilled in the art SCR 67 can be gated on or off, depending on the voltages of the cathode, anode and gate of the SCR. When the SCR is gated on, there is a current path P1 coupling the motor 90 to the power lines L1 and L2. Accordingly, current will flow along path P1 and current will flow from lines L1 and L2 through the motor. When, however, the SCR is off, there is no direct current path between the motor 90 and the power lines L1 and L2 and the only path for the current to flow is along the path P2. 
     As explained below, the SCR 67 may be gated on and off in such a manner that a controlled amount of direct current (DC current) is applied to the motor. The manner in which this occurs is illustrated in FIG. 5. Waveform (A) in FIG. 5 illustrates the voltage across power lines L2-L1. Waveform (B) illustrated the gating current applied to SCR 67. As understood by those skilled in the art, SCR 67 will turn on and conduct whenever the voltage across the SCR (i.e., the anode to cathode voltage) is positive and a positive current is applied to the gate. Waveform (C) illustrates the voltage signal applied to the motor across terminals T2-T1. As illustrated, a positive voltage is applied to the motor terminals whenever the SCR 67 is gated on. Waveform (D) illustrated the current flowing through the motor terminals T1-T2. As illustrated, the current through motor terminals T1 and T2 (labeled Im for the motor current) increases whenever a positive voltage from the power lines is applied to the motor (i.e., when the SCR is gated on) and decreases otherwise (i.e., when the motor current is flowing through the diode 64). Although the motor current Im has a slight ripple, it is essentially a DC current that will create a stationary magnetic braking field in the motor. The magnitude of the DC braking current varies in response to the voltage applied to the motor and can be controlled by adjusting the gating of the SCR. 
     In waveform (A) of FIG. 5 the positive gating current is first applied at a time X. If however, the gating current were applied at an earlier time (illustrated as X&#39;) there would be a longer period of time in which positive voltage is applied the motor and thus a longer time for the motor current Im to increase in magnitude. As understood by those skilled in the art, the magnitude of the effective DC current Im applied to the motor can be controlled by adjusting the time at which the gating pulse is applied to the SCR. 
     In the art, periodic waveforms such as the one illustrated in waveform (A) of FIG. 5, although functions of time, are often referred to in terms of degrees, where 360° represents one period of the waveform. For example, when the waveform (A) in FIG. 5 is viewed in this light, the point X may be considered to occur at an angular position of 86°, while the point X&#39; may be considered as having an angular position of 30°. In the art, the angular position at which the SCR is gated on is referred to as the &#34;firing angle.&#34; For reasons discussed above, the value of the &#34;firing angle&#34; corresponds to the magnitude of the DC braking current applied to the motor. 
     Through minor adjustments that will be apparent to one skilled in the art, the embodiment described herein may be adapted for use with most all AC motors. Retrofitting older machines with mechanical brakes is easy with the brake of the present invention since no mechanical connections are required. 
     4.2 The Structure of the Dynamic Brake Assembly of the Present Invention 
     FIG. 6 is a block diagram of the dynamic brake assembly of the present invention. As illustrated, a master control unit 70 is coupled to various other control circuits. In one embodiment, the master control unit is a microprocessor, such as the 68HC05P9 available from Motorola, Austin, Tex., although other microprocessors and other controllers (e.g., a discrete circuit controller) may be used. Additional information concerning the 68HC05P9 may be found in technical literature available from Motorola. 
     One circuit coupled to the master control unit 70 is an oscillator circuit comprising resistor 71, capacitors 72 and 73, and crystal oscillator 74. In one embodiment, the crystal oscillator 74 is a 4 mHz HC25UV oscillator, available from Motorola, although other oscillators may be used. The purpose of the oscillator circuit is to provide clock signals to the master control unit. An understanding of the design and operation of oscillator circuits such as the one illustrated in FIG. 6, is not essential to an understanding of the present invention and will not be discussed herein in any detail. 
     Also coupled to the master control unit is reset circuitry 76 comprising a voltage source 77, a resistor 78 and reset switch 79. As understood by those skilled in the art, the activation of the reset switch 79 will reset the master control unit 70 to a predetermined initial state. The use of reset circuitry with microprocessor control units is well understood and is discussed below only as it related to the present invention. 
     In addition to the oscillator and reset circuits, a reference voltage 80 is applied to the master control unit 70. The reference voltage is established through resistor 81 and capacitor 82 and is used to provide a base against which various control signals can be compared. In a preferred embodiment of the invention, the reference voltage is 5 volts. 
     A light emitting diode (LED) circuit 83, comprising resistor 84 and LED 85 is also coupled to the master control unit 70. In the embodiment illustrated in FIG. 6, the LED circuit 83 is used by the master control information 70 to convey information to the human user of the brake assembly. For example, the LED light can indicate a first state when off, a second state when on continuously, and a third state when blinking. In other embodiments of the invention, master control unit 70 can control the timing of the blinking of LED 85 such that specific information concerning the operation of the dynamic brake is conveyed through the use of a digital code. Although an LED circuit is illustrated in FIG. 6, other communicating devices (e.g., LED display, small video display) may be used to convey the same types of information. 
     4.2.1 The Control Buttons 
     In one embodiment of the present invention, five control buttons (START, STOP, E-STOP, JOG and BRAKE RELEASE) are used to control the operation of the dynamic brake assembly. These control buttons and their associated circuitry are collectively represented by Box 80 in FIG. 6 and are coupled to the master control unit 70 by five input lines PA0-PA4. These control buttons and their associated circuitry may be located in a properly configured NEMA enclosure, positioned in a location accessible to the operator of the motor. One such enclosure, with the five control buttons is illustrated in FIGS. 7A. 
     FIG. 7B illustrates the basic circuitry associated with the control buttons. Only one button circuit is illustrated as the circuits are identical for each of the five buttons. A button or switch 86 is coupled to a control signal line 87 through an inverting buffer 88. Coupled to both outputs of the inverter are resistors 89 and 90 whose other end is coupled to the supply voltage. As understood by those skilled in the art the basic circuit arrangement in FIG. 7B provides for a relatively clear, noise-free signal at the control signals lines to which the circuits are attached. The control signals generated by the five control button circuits are referred to herein as PA0--the START signal, PA1--the STOP signal, PA2--the E-STOP signal, PA3--JOG signal; and PA4--the BRAKE RELEASE signal. The use of these signals by the master control unit 70 is discussed in detail below. 
     4.2.2 The Status Control Switches 
     Referring back to FIG. 6, in addition to the five control signals from the control buttons, the master control unit 70 receives five digital status control signals (PC0, PC1, PC2, PB7, PD7) from five status control switches represented by Box 95 in FIG. 6. Two of the digital control signals (PB7, PC0) are referred to as the TIME signals; two others (PC1, PC2) as the MODE signals and one (PD7) as the ZERO SPEED DISABLE signal. As with the control buttons, the status control switches and their associated circuitry may be located in a NEMA enclosure. 
     FIG. 8A illustrates the circuitry used to generate the digital status control signals. Only one control circuit is illustrated as the circuitry is identical for all five of the digital signals. Basically, the circuitry consists of a resistor 96 coupled between voltage source and ground through a control switch 97. In one embodiment of the present invention DIP switches may be used for the five switches 97. An output terminal is provided at the junction of the control switch 97 and the end of resistor 96 not coupled to the voltage source. As understood by those skilled in the art, when the switch is closed the voltage at the output terminal will be near ground (a logic &#34;0&#34;) and, when the switch is open the output voltage will be near the voltage of the voltage source (a logic &#34;1&#34;). 
     In one embodiment of the present invention the control signals PB7 and PC0 operate together to set the rough maximum brake time for the brake assembly of the present invention. The rough maximum brake time is roughly the maximum time allowed for a braking cycle. Thus, if a brake cycle is initiated (e.g., by activation of the STOP button) the dynamic brake assembly of the present invention will not apply DC current to the motor after expiration of the preselected maximum braking time. 
     In a preferred embodiment of the present invention control signals PB7 and PC0 allow the operator to select one of four maximum rough time periods: 15 seconds, 30 seconds, 45 seconds or 60 seconds. FIG. 8B illustrates the settings for the control switches and the corresponding maximum rough times. As understood by those skilled in the art, other setting codes and other rough time settings may be used. 
     In a manner similar to that discussed above with respect to control signals PB7 and PC0, control signals PC1 and PC2 are used to select the operating mode of the present invention. As discussed above, the dynamic brake assembly of the present invention is capable of operating in four modes: BASIC (similar to a slave mode), PRE-STOP, HOLDING and MASTER. FIG. 8C illustrates the settings of the MODE control switches for each of the four modes. 
     The BASIC mode of the brake assembly of the present invention is similar to the slave mode of prior art assemblies discussed above. 
     The BASIC, PRE-STOP and HOLDING modes of the single brake assembly are similar to those discussed above for the separate brake assemblies of the prior art. The MASTER mode is a mode unique to the brake assembly of the present invention which is discussed in greater detail below. 
     Control signal PD7 is used to control the operation of the zero-speed detector. When the switch accompanying control signal PD7 is set, zero-speed sensing is enabled; otherwise zero-speed sensing is disabled. 
     4.2.3 The Analog Control Potentiometers 
     Referring back to FIG. 6 it may be noted that in addition to the control button signals and the signals from the status control switches, the master control unit also receives three analog signals (AN0, AN1 and AN2) from the analog control potentiometers represented by Box 100. The analog control signals AN0, AN1 and AN2 are respectively referred to as the MAGNITUDE-1 signal (AN0), the MAGNITUDE-2 signal (AN1) and the FINE TIME signal (AN2). 
     FIG. 9A illustrates the circuitry for generating the variable analog control signals AN0, AN1 and AN2. Again only one circuit is illustrated as the circuitry is identical for all three signals. Such circuitry comprises a variable potentiometer 101 connected between a voltage source and ground. As understood by those skilled in the art, the resistance of the potentiometer 101 may be manually adjusted to vary the analog voltage on output line 102 from a voltage near ground to a voltage near the voltage source to which the potentiometer is coupled. 
     As discussed above, analog control signal AN0 is the MAGNITUDE-1 signal while signal AN1 is the MAGNITUDE-2 signal. These two signals are used to determine the magnitude of the DC braking current applied to the motor when the dynamic brake of the present invention is activated. As discussed above, the magnitude of the DC braking current applied to the motor directly corresponds to the firing angle of the SCR circuit. AN0 and AN1 are used to set voltage levels which determine the firing angle of the SCR 67. The operation of AN0 and AN1 in setting the firing angle is illustrated in FIG. 9B. 
     FIG. 9B illustrates a AC voltage waveform 103, such as waveform (A) in FIG. 5, applied to the SCR circuit. The lines AN x  represent the voltage values of control signals AN0 and AN1. In the present invention, the master control unit 70 is configured to initiate the firing of the SCR circuit whenever the input voltage exceeds the value of AN. As illustrated, by raising or lowering the voltage AN0 and AN1 it is possible to vary the firing angle of the SCR circuit. For example, a low value of AN0 or AN1 (represented by AN 1 ) results in a smaller firing angle, a greater pulse width and greater DC current magnitude than a high value of AN0 or AN1 (represented by AN h ). As discussed in more detail below the brake assembly of the present invention monitors the zero crossing of waveform 103 and utilizes a time delay before firing to ensure proper firing of the SCR. 
     In one embodiment of the present invention AN0 is used to set the magnitude of the DC braking current for a normal braking cycle and AN1 is used to set the magnitude for the DC braking cycle for an emergency braking (E-STOP) cycle. In many instances, for purposes of maintaining the motor and equipment to which it is attached, it is desirable to brake a motor at a rate less than the maximum braking rate the motor can accommodate. Accordingly, in a normal braking operation, the DC braking current applied to the motor will generally be less than the maximum DC braking current that the motor can handle. Control signal AN0 is used to set the magnitude of this normal braking current. 
     While it is desirable in most instances to brake the motor with less than the maximum braking current, in certain emergency situations it is important to brake the motor as fast as possible. Accordingly, the dynamic brake assembly of the present invention includes an emergency stop (&#34;E-STOP&#34;) feature for braking the motor as fast as possible in emergency situations. Thus, the magnitude of the emergency DC braking current is normally greater than the magnitude of the normal braking current. AN1 is used to set the value of the emergency braking current. 
     Analog control signal AN2 is the fine braking time. By adjusting the potentiometer associated with AN2 the voltage of AN2 may be made to vary from a value of close to ground, which corresponds to a fine braking time of zero seconds, to a value close to the supply voltage, which corresponds to a fine braking time of 17 seconds. As discussed above in §4.2.2, the rough braking time is set by control signals PB7 and PC0. This rough braking time is used in conjunction with the fine braking time to determine the actual maximum braking time. In one embodiment, the master control logic sets the actual maximum braking time to the value of the rough braking time (defined by signals PB7 and PC0) plus the value of the fine braking time determined by the analog value of AN2. In this embodiment, by adjusting the rough braking time and the fine braking time signals, the actual maximum braking time may be set anywhere between 0 seconds and 62 seconds. 
     4.2.4 Sensed Input Signals 
     In addition to the control signals discussed in §§4.2.1-4.2.3 above, the dynamic brake assembly of the present invention utilizes several control signals that are derived from voltages sensed at the motor terminals. In a preferred embodiment of the present invention the sensed signals are: the ZERO CROSS signal (PB5); the SENSE signal (PB6) and the ZERO SPEED SENSE signal (AN3). The circuits for generating the sensed input signals are represented by Box 105 in FIG. 6. 
     FIG. 10 illustrates the circuitry for generating the ZERO CROSS signal. As illustrated in the Figure the ZERO CROSS circuitry comprises two input leads 106 and 107 which are electrically coupled to the cathode 67K and anode 67A of the SCR 67 as illustrated in FIG. 10. The signal from the anode 67K is coupled to a resistor 109 and a capacitor 109 by lead 107 and the output of the capacitor 109 is coupled to the cathode 67K of the SCR 67 by lead 106. The signal from the cathode 67K of SCR 67 is coupled by lead 108 to a circuit comprising resistors 109, 110; diode 111; capacitor 112; and transistor 113. The collector of transistor 113 is coupled to V cc  through resistor 114. The node 115 at which resistor 114 meets the collector of transistor 113 provides the ZERO CROSS signal PB5. The ZERO CROSS signal PB5 will provide a pulse whenever the voltage across the SCR equals zero. As discussed below, the ZERO CROSS signal PB5 is used by the control logic of the master control unit 70 to control the firing of the SCR 67 during a braking operation. 
     FIG. 11 illustrates the circuitry for generating the SENSE signal. The input to the SENSE signal circuitry is coupled to terminal T1 of the motor lead 66 as illustrated in FIGS. 4A and 11. Referring to FIG. 11, the input signal 68 is passed through the sense circuit 116, which is substantially identical to the lower portion of the ZERO CROSS circuit discussed above. The output of transistor 117 in the SENSE circuit produces a SENSE signal PB6 that will pulse whenever the voltage at T1 is approximately 0 Volts. When the motor is running, SENSE signal PB6 is a pulsed signal whose frequency is substantially equal to the line frequency of the AC voltage applied to the motor 90. In a preferred embodiment, the frequency of PB6 when the motor is running is between 50 and 60 Hz. As discussed more fully below, the SENSE signal PB6 is used by the master control unit 70 to determine when the motor is running. 
     FIG. 12 illustrates the circuitry for generating the ZERO SPEED signal AN3. The ZERO SPEED signal circuit receives two inputs 120 and 121. The two input leads to the ZERO SPEED signal circuit are coupled to the common terminal 63 and the third terminal of the motor T3 69 as illustrated in FIGS. 4A and 12. Referring to FIG. 12, the two inputs to the ZERO SPEED signal are passed though input resistors 122, 123 and 124 to a differential amplifier arrangement comprising differential amplifier 125 and resistor 127. The output of differential amplifier 125 is an analog signal that corresponds to the difference between the voltages at the common terminal 63 and the third terminal T3 69. This differential analog voltage is passed through a high-pass filter comprising differential amplifier 126 and accompanying resistors 128, 129, 130, 132, 133 and capacitor 134. The output of the high-pass filter comprising differential amplifier 126 is applied as the ZERO SPEED SENSE analog input AN3 to the master control unit 70. This analog signal AN3 is used in zero speed sensing as discussed in greater detail below. 
     4.2.5 The Output Signals 
     In addition to receiving digital and analog control and sense signals as discussed above, the master control unit 70 also provides output signals for controlling the brake contacts, for firing the SCR circuit and for controlling the motor contacts. These output signals are illustrated as Box 130 in FIG. 6. Each of these output signals and their associated circuitry is discussed in detail below. 
     As illustrated in FIG. 6, the master control unit 70 generates two output control signals for controlling the state of the motor contacts 52 (MOTOR CONTACT signal PA7 and BRAKE CONTACT signal PA5). In operation the corresponding contact is closed whenever the respective contact signal is asserted. A circuit for generating the MOTOR CONTACT control signal and for controlling the motor contacts 52 is illustrated in FIG. 13. The circuitry for generating the BRAKE CONTACT signal and controlling the brake contacts 61 is substantially similar and is not discussed herein. 
     As illustrated in FIG. 13, the control circuitry receives a MOTOR CONTACT signal PA7 from the master control unit 70. The signal is passed through an inverter 140 and is coupled to a high voltage source through a light emitting diode 141 and a resistor 142. The output of the resistor is also coupled to a relay 143, which controls the status of the motor contacts 52. 
     FIG. 14 illustrates the SCR trigger circuitry of the present invention. Through the use of this circuitry the SCR 67 is triggered. As illustrated in FIG. 6, the master control unit 70 generates a SCR TRIGGER signal that is applied to the gate 67G of the SCR 67 to fire the SCR. Referring to FIG. 14, the SCR trigger circuitry is illustrated. As indicated in FIG. 14, the SCR trigger circuitry receives a SCR TRIGGER signal PA6 from the master control unit 70. Signal PA6 is passed through an inverter 145 and a step-up transformer circuit comprising transformer 146, diode 147, resistors 148, 149 and capacitors 150 and 151. The two outputs from the transformer circuit are applied to the gate 67G and cathode 67K of the SCR 67 to control the firing of SCR 67. 
     4.3 The Control Logic for the Brake Assembly of the Present Invention 
     In addition to the hardware comprising the master control unit and the input and output circuitry, the present invention also comprises the control logic used to implement the novel brake assembly of the present invention. In an embodiment where the master control unit is a microprocessor or microcontroller such as the 68HC0P59 the control logic may be implemented through software control routines stored in a memory device, such as a random access memory device, located internal or external to the master control unit 70. One set of such software control routines that can be used with the 68HC0P59 microprocessor is set forth in the Appendix to this disclosure. Copies of the appendix are available from the United States Patent and Trademark Office. The information set forth in the appendix is part of this disclosure. 
     For master control units 70 other than the 68HC0P59, the control logic may be implemented through hardwired digital or analog logic (e.g., PLAs and the like) or a software routing similar in function to that set forth in the appendix. Although the control logic may be implemented in any of the above described ways, only a software control routine is discussed in detail herein. 
     4.3.1 The MAIN Routine 
     FIG. 15 is a flow diagram of the main program routine used in the control logic of the present invention. One acceptable control routine may be found at lines 227-35 of the appendix. Basically, the main routine can be divided into three discrete steps and functions: (1) initialization, (2) mode selection and (3) mode execution. Each step is discussed below. 
     *Initialization 
     A flow diagram for an initialization routine for the present invention is illustrated in FIG. 15. One acceptable initialization routine may be found at lines 236-303 of the attached appendix. 
     As illustrated in FIG. 15, the initialization program general establishes the various ports of the master control unit as either inputs or outputs (block 200); initializes the START/STOP control register (block 202) and initializes the line frequency detection registers (block 204). The setting of the various ports as inputs and outputs and the initialization of certain control registers is generally understood by those skilled in the art and is explained in materials on the 68COP59 available from Motorola and will not be discussed in any detail herein. 
     *Mode Selection 
     Following the execution of the Initialization Routing, the Mode Select routing is executed. Basically, the Mode Select Routine reads the values of PC1 and PC2 to determine which mode setting was selected by the operator. A simple routine, such as the one illustrated in FIG. 15, performs this function and ensures a proper mode selection according to the switch settings discussed in §4.2.2 with respect to FIG. 8C. 
     *Mode Execution 
     Once the Mode Select routine is complete, the logic control will jump to the selected execution mode and begin executing. As discussed above, in the brake assembly of the present invention, there are four execution modes: BASIC mode, PRE-STOP mode, HOLDING mode and MASTER mode. The control logic for each of the four modes is discussed in the following sections. 
     4.3.2 The BASIC Mode Control Logic 
     FIGS. 16A-16B represent a flow diagram of the control logic for the BASIC BRAKE ROUTINE. One acceptable BASIC BRAKE ROUTINE is listed at line 320-44 of the attached appendix. 
     As illustrated in FIGS. 16A-16B, the control logic for the BASIC BRAKE ROUTINE first opens the motor relay, thus cutting off the power to the motor (block 206). This is accomplished by simply setting the MOTOR CONTACT output PA7, refer to §4.2.5 above, to turn the relay off. Once the motor relay is turned off (i.e., open) the control logic then clears a flag register that, when set, indicates that the E-STOP control switch has been activated (block 207). The control logic then closes the motor contactor in the manner described above, thus allowing power to be applied to the motor (block 208). 
     As discussed above the activation of a slave brake depends on the power applied to the motor. In a manner similar to the prior art slave brakes, the brake assembly of the present invention, when operating in the BASIC MODE, initiates a braking cycle when the power to the motor is cut off after the motor has been running. In the brake assembly of the present invention, a SENSE routine is used to determine when power is no longer applied to the motor. After closing the motor relay the control logic executes the SENSE routine (block 210). 
     4.3.2(a) The SENSE Routine 
     The SENSE routine of the present invention is illustrated as block 210 in FIG. 16A. One acceptable SENSE routine may be found at lines 734-800 of the attached appendix. 
     As illustrated in FIG. 16A the SENSE routine first determines whether AC power is being applied to the motor (block 211). This step is necessary because the motor must be running (i.e., AC power must have been applied to the motor) before a braking cycle is initiated. Once it is determined that the AC power is being supplied the motor (and the motor is therefor running) the sense cycle then monitors the sense signal to determine when AC power is no longer applied to the motor (e.g., if the operator opens the motor contact in an effort to brake the motor)(block 212). As the above indicates, the SENSE routine looks for the motor contacts to be closed first, then open (or for AC power to be applied to the motor and then cut off) to ensure that a braking cycle is initiated only after the motor is running. Once it is determined that the AC power is no longer applied to the motor, the SENSE routine will return to the SLAVE routine to initiate a braking cycle. 
     Once the SENSE routine determines that AC power is no longer being applied to the motor it will return to the SLAVE routine (block 213). The control logic for the SLAVE routine then opens the motor relay (block 216) through deactivating the MOTOR CONTACT signal PA7 and will not further execute until the motor relay is verified to be open. One acceptable routine for opening the motor contact and verifying its state may be found at lines 599-611 of the attached appendix. 
     As illustrated in FIGS. 16A-16B the control logic for the basic brake routine first provides a signal to open the motor relay thus cutting off power to the motor. As discussed above, this is accomplished by setting the MOTOR CONTACT output PA7 to turn the relay off. Once the signal has been provided to open the motor relay the control logic then verifies the motor relay as open. This is accomplished by starting a timer and then checking at block 217 to determine whether AC powers apply to the motor. This is accomplished through use of the SENSE signal (PB6) in a manner similar to that previously discussed. If the control logic determines that AC power is being applied to the motor (i.e., that the motor relay is still closed) it restarts the timer and again checks to determine whether AC power is being applied. If, however, the control logic determines that AC power is not being applied to the motor it then determines whether the timer has timed out at block 218. If the time has not timed out the control logic will loop back to block 217 and again determine whether AC power is being applied to the motor. If the control logic determines at block 218 that the time has timed out it will set a timer and delay and then return to the main SLAVE routine. In this manner the control logic determines that AC power is not being applied to the motor for a preselected time period to verify that the motor relay is open. 
     Even if the motor relay was previously open, this step is executed to ensure that the Brake contacts are never closed at the same time as the motor contacts are closed. 
     After the control logic verifies that the motor contactor is open, it closes the brake contactor, coupling the SCR circuitry of the brake assembly of the present invention to the input terminals of the motor and executes a FIRE routine to initiate firing of the SCR circuitry so that a DC braking current is applied to the motor (block 218). The FIRE routine of the present invention is discussed in detail below. 
     4.3.2(b) The FIRE Routine 
     FIGS. 17A-17B illustrate a logic flow diagram for the FIRE routine of the present invention. One acceptable FIRE routine may be found at lines 830-69 of the attached appendix. 
     As illustrated in FIGS. 17A-17B, the control logic for the FIRE routine first executes a ZERO CROSS routine to detect the zero crossing of the AC voltage waveform applied to the SCR 67 (when the brake contactors are closed) and to the motor (when the motor contactors are closed)(block 220). Flow logic for one ZERO CROSS routine is illustrated in FIG. 18. 
     4.3.2(b)(1) The ZERO CROSS Routine 
     Referring to the ZERO CROSS flow logic in FIG. 18, the manner in which a ZERO CROSS is detected will be explained. First, the control logic monitors the voltage of the ZERO CROSS input PB5, see §4.2.4 above, to determine when the voltage changes from low (e.g., negative) to high (e.g., positive) thus indicating a negative to positive transaction which is necessarily accompanied by a zero cross. (blocks 232-38). When a low to high transition is detected, the ZERO CROSS routine stores the clock value at the time the zero cross is detected (block 242) and returns to the FIRE routine (block 244). One acceptable ZERO CROSS routine may be found at lines 801-29 of the attached appendix. 
     4.3.2(b)(2) The FREQUENCY DETECTION Routine 
     Once the ZERO CROSS routine has determined that a zero crossing has occurred, control then passes back to the FIRE routine. The FIRE routine then executes a frequency detection routine which determines the frequency of the input AC waveform that is applied to the motor 90 and the SCR circuitry and sets control parameters accordingly (block 250). The value of the frequency of the AC waveform applied to the motor and the SCR circuitry must be determined, among other reasons, to set the firing angle of the SCR. In one embodiment, the FREQUENCY DETECTION routine does not actually determine the exact frequency, but instead determines whether the actual frequency is closer to one limit (e.g., 50 Hz.) than to another (e.g., 60 Hz.) and selects one of two parameter settings (50 Hz. or 60 Hz.) depending on the value of the actual input AC waveform. In this embodiment, control logic may be used to ensure that the frequency of the input waveform is within a predefined range (e.g., 48-60 Hz.) by generating an error when the actual input frequency is outside this range. Frequency detection control logic is generally understood in the art and will not be discussed in any detail herein. However, one acceptable FREQUENCY DETECTION routine may be found at lines 612-71 of the attached appendix. 
     4.3.2(b)(3) The PRE-MAGNITUDE PROCESSING Routine 
     Having detected the zero crossing and determining the frequency of the input the control logic executes a PRE-MAGNITUDE PROCESSING routine (block 252). The PRE-MAGNITUDE PROCESSING routine is used to determine the firing angle of the SCR and thus the magnitude of the DC current to be injected into the motor for braking purposes. As discussed in §4.2 above, the actual value of the firing angle is determined by the settings on the magnitude control potentiometers. One acceptable PRE-MAGNITUDE PROCESSING routine may be found at lines 672-694 of the attached appendix. 
     As discussed above the PRE-MAGNITUDE PROCESSING routine determines the magnitude of the DC current that will be injected into the motor for braking purposes. Because the magnitude of the DC braking current depends on whether the STOP or the E-STOP control switch has been activated, the control logic first determines whether the E-STOP flag is set (i.e., whether the E-STOP control switch has been activated). If the E-STOP detected then the setting of the E-MAGNITUDE potentiometer, signal AN1, (refer to §4.2, above) will control the magnitude of the DC braking current; otherwise the magnitude will be controlled by the setting on the MAGNITUDE potentiometer, signal AN0. After determining the value corresponding to the appropriate braking potentiometer, the control logic then multiples the determined value by a multiplier factor that is based on the previously measured AC line frequency. Appropriate control logic for determining the multiplier factor and multiplying the same may be found in the attached appendix. 
     After generating the appropriate DC magnitude factor, the logic control then returns to the main FIRE routine and then executes a ZERO SPEED DETECTION subroutine (block 260). When enabled, the ZERO SPEED DETECTION subroutine is an important part of the present invention and accordingly is discussed in some detail in the following section. 
     4.4.2(b)(4) The ZERO SPEED DETECTION Subroutine 
     Basically, the ZERO SPEED DETECTION subroutine determines when a motor has stopped rotating or has reached &#34;zero speed.&#34; The ZERO SPEED DETECTION routing of the present invention detects the zero speed of a motor by sampling the waveform appearing between the common terminal COM 63 and the third terminal T3 69 of the motor at various positions (i.e., the zero speed signal AN3, see FIG. 12 and corresponding text) and comparing the samples to samples previously taken at the same position. In one embodiment of the present invention, eight different waveform positions are sample in each cycle. These samples are compared to their respective references. When a sample matches the reference, the reference is not changed and a &#34;Match Counter&#34; is incremented. In the sample does not match the reference, the reference is set to the new reference value and the Match Counter is cleared. After the Match Counter reaches a predefined value, each time a match is indicated for a particular waveform position a bit corresponding to the waveform position is set in a &#34;Match Register.&#34; When all eight bits of the Match Resistor (corresponding the eight waveform position) are set, zero speed has been detected. 
     In one embodiment of the present invention the predefined value that the match counter must meet before the bits in the Match Register begin to be set is determined by the maximum brake time setting signals provided by the user (e.g., time signals PB7, PC0 and AN2, see §4.2). In this embodiment, the predefined value will be relatively large when a relatively large maximum brake time setting is selected by the used. Similarly, a relatively low predefined value will be selected whenever the maximum braking time is short. The advantage of varying the predefine value according to the maximum braking time is that short braking times generally indicates that the load is small or that the motor must be stopped quickly. For small loads the number of matches required to avoid &#34;dead spots&#34; is generally low and thus a low predefined value can be selected. Accordingly, the predefined value can be reduced without significantly impacting the accuracy of zero speed detection. Likewise, long maximum braking times generally correspond to large loads where a large number of matches may be required to overcome the dead spots associated with large loads and ensure the accuracy of the zero speed detection. Other embodiments are envisioned where the predefined value varies as a function of motor load, motor speed at the time of braking, or other user settings. 
     As the above indicates, in order for a zero speed detection, all eight waveform positions must hold steady for at least the predefined number of matches that must be made before the Match Counter exceed the preselected value. 
     FIGS. 19A-19B provide a flow diagram illustrating the logic flow of an acceptable ZERO SPEED DETECTION routine. The logic control for an acceptable ZERO SPEED DETECTION routine may be found at lines 1221-1327 of the attached appendix. 
     Referring back to the main FIRE routine illustrated in FIGS. 17A-17B, it may be noted that there is a loop consisting of blocks 260, 280 and 290 where the ZERO SPEED DETECTION routine and a DELAY routine (discussed below) are executed and reexecuted until the position counter reaches a value of zero. As discussed above, in one embodiment of the invention, samples of the ZERO SPEED signal AN3 are taken eight times during each period of the AC waveform (i.e., at eight different positions). In that embodiment, the initial position counter will be set to seven and the loop comprising blocks 260, 280 and 290 will execute eight times (once for each position 0-7). A Position Counter is used to keep track of the current position. In the following discussion the ZERO SPEED DETECTION routine is discussed as to a single position (&#34;the present position&#34;) only. It must be remembered, however, that during one execution of the FIRE routine the ZERO SPEED DETECTION routine will execute eight times, once for each position 0-7. 
     Referring back to FIGS. 19A-19B, it may be noted that the ZERO SPEED DETECTION control logic first establishes a sample accumulation register for receiving four samples of the ZERO SPEED SENSE signal AN3 (block 261). The control logic then configures the input port that receives the voltage waveform appearing between the third terminal and the common terminal, see discussion at §4.2.4, to perform an A/D conversion. The control logic then takes four digital samples of the input waveform and sums them together in the sample accumulation register and divides the sum by four to obtain an average sample value (block 262). The average sample value is then compared to the average sample value of the present waveform position from the previous cycle. The average value of the waveform position sample from the previous cycle is referred to herein as the &#34;reference value.&#34; 
     If the average sample value is larger than the reference value then the reference value is subtracted from the reference value by taking the two&#39;s complement of the reference value and adding it to the average sample value. If, on the other hand, the average sample value is smaller than the reference value then the average sample value is subtracted from the reference value by taking the two&#39;s complement of the average sample value and adding it to the reference value. The result of either subtraction operation is then compared to a window constant to determine whether a match exists (block 263). 
     Because an exact numerical match between the average sample value and the reference value is unnecessary for proper zero speed detection a &#34;tolerance window constant&#34; may be established such that a match will be indicated whenever the absolute value of the difference between the reference voltage and the average sample value is less than the tolerance window constant. In one embodiment of the present invention the tolerance window constant is selected to have a value of between one and two. 
     If the absolute value of the difference between the reference value and the average sample value is greater than the tolerance window constant then there is a &#34;miss.&#34; The control logic will then store the new average sample value as the reference value for that waveform position (block 264) and will clear: (1) all of the bits of the Match Register and (2) the Match Count. The control logic will then determine if the value of the waveform position is zero (block 265). If the waveform position is not zero the control logic will decrement the Position Counter and return to the main FIRE routine (blocks 266, 267). If, however, the Position Counter is zero, the control logic will reset the Position Counter count to seven and will then return to the main FIRE routine (blocks 268, 267). 
     Going back to block 263, if the absolute value of the difference between the reference value and the average sampled value is less than the tolerance window constant then there is a &#34;match.&#34; The control logic will first increment the Match Count and the determine whether the Match Count is higher than the Match Stop Constant (blocks 269, 270). If the Match Count is lower than the Match Stop constant then that is an indication that the current number of matches between the reference values and the average sampled values is smaller than their preselected amount for a zero detection. The control logic will then check the value of the present position and decrement the position counter if the Position Counter is other than zero or set the Position Counter to seven if the waveform position is zero (blocks 265-68). If the Match Count is equal to the Match Stop Constant then that is an indication that the number of matches between reference and average values meets or exceeds the minimum number required for a zero detection. Accordingly, the control logic will then determine what waveform position corresponds to the match and will set the bit in the Match Register that corresponds to the waveform position (block 271). The control logic will then check the value of the present position, decrement the Position Counter if it is non-zero, set it to seven if it is zero, and return to the main FIRE routine (blocks 265-67). 
     4.4.2(b)(5) The DELAY Routine 
     Returning back to the main FIRE routine in FIGS. 17A-17B, after executing the ZERO SPEED DETECTION routine for a particular waveform location position, the FIRE routine will then execute a DELAY routine in which a delay period is introduced. The delay routine may be executed by setting a counter corresponding the desired delay time and repeatedly decrementing the counter until the desired delay period has expired. The execution of delay routines is generally understood by those skilled in the art and will not be discussed herein in detail. One acceptable DELAY routine may be found at lines 695-708 of the attached appendix. 
     The purpose of the delay routine is to control the firing angle of the SCR and thus to control the magnitude of the DC braking current applied to the motor. As discussed above, the magnitude of the DC braking current directly corresponds to the length of time between the time the input AC waveform crosses zero and the time when a gating pulse is applied to the SCR 67. See §§4.2.3 and 4.2.5, above. In the present invention, the DELAY routine is used to set the time period between the zero cross of the input AC waveform and the firing of the SCR 67. 
     As discussed above, the DELAY routine at block 280 is executed eight times (once for each waveform position) for each firing of the SCR. Accordingly, the delay period for each execution of the delay routine should be set to slightly less than one-eight of the total desired delay period. The actual delay should be slightly less than one-eight of the desired delay to accommodate the execution time of the ZERO SPEED DETECTION routine, which is also executed eight times per SCR 67 firing. The actual value of the delay period in the present invention is determined by first setting a base delay that corresponds directly to the MAGNITUDE (AN0) or E-MAGNITUDE (AN1) signals and adding to that base value a value to correct for the actual AC waveform frequency (e.g., 60 or 50 Hz.). After the DELAY routine delays for approximately one-eight of the total desired delay time, control passes back to the main FIRE routine. 
     Referring back to FIGS. 17A-17B, once the control logic returns to the main FIRE routine it checks the current value of the Position Counter to determine whether the current Position Count is zero (block 290). A Position Count of zero is an indication that the appropriate number of samples for zero speed detection has been taken and that the total desired delay has expired. If the Position Counter is not zero, the program initiates another ZERO SPEED DETECTION and DELAY cycle where samples will be taken of the waveform location corresponding to the next waveform position. 
     4.4.2(b)(6) The SCR TRIGGER Routine 
     After all eight samples of the waveform have been taken and after the DELAY routine has ensured that the required delay period has passed, the FIRE routine will execute a SCR TRIGGER routine to generate a firing pulse for the SCR 67 (block 292). The control logic in the SCR TRIGGER routine simply generates an SCR TRIGGER output signal that cause the SCR circuitry to generate a gating pulse for the SCR. See FIG. 14 and accompanying text. One acceptable SCR TRIGGER routine may be found at lines 491-517 of the attached appendix. The SCR TRIGGER output signal should be of sufficient duration to ensure that the SCR 67 is gated on. In one embodiment of the present invention, the SCR TRIGGER routine is set such that the gating pulse for the SCR 67 has a duration of approximately 100 micro-seconds. After the gating pulse is applied to the SCR circuitry, the control logic returns to the main FIRE ROUTINE. 
     As illustrated in FIGS. 17A-17B, after generating a firing pulse to the SCR 67 the control logic for the main FIRE routine and determines whether additional firing of the SCR 67 is required. In other words, the control logic determines whether it should continue to provide DC braking current to the motor. There are at least three instances when the control logic should stop providing DC braking current to the motor: (1) when the maximum braking time has expired; (2) when the brake has been manually released; and (3) when zero speed has been detected. To test for these conditions, the FIRE routine first determines whether the maximum braking time has expired (i.e., whether the brake has timed out)(block 294). This is done by comparing the bytes in the timer counter to the maximum timer setting determined by the control signals PB7, PC0 and AN2 discussed in §4.2, above. If the timer counter meets or exceeds the maximum timer setting then the maximum braking time has been met or exceeded. As indicated in blocks 296 and 299 of FIGS. 17A-17B, when the maximum braking time has been met or exceeded, the FIRE routine will (1) clear the timer count; (2) clear the zero cross time register; (3) clear the Match Register used for zero speed detection and (4) return to the execution routine that called the FIRE routine--here, the main SLAVE routine. 
     If the maximum brake time has not been exceeded, the control logic for the FIRE routine will then determine whether a manual brake release switch has been activated (not illustrated in FIGS. 17A-17B). If the manual brake release switch has been activated, the main routine will clear the counters and registers discussed above and return to the main execution routine. If, however, the manual release was not activated, the control logic will then test to determent if zero speed sensing is enabled (block 297). If zero speed sensing is not enabled, then the control logic will loop back to the start of the FIRE routine and will continue to repeat the FIRE cycle until (1) the maximum brake time expires or is met or (2) the manual brake release switch is activated. If, on the other hand, zero speed sensing is enabled, the control logic will check the Match Register discussed in §4.4.3(b)(4) (block 298), and, if all eight bits in the Match Register are set, will end the FIRE routine by executing the steps at blocks 296 and 299. If the Match Register used by the ZERO SPEED DETECTION routine does not indicate zero speed, then the control logic will loop to the initiation of the FIRE routine and will continue to do so until (1) the maximum brake time is met or exceeded; (2) the manual brake release switch is activated; or (3) the match register for the zero speed detection circuit indicates that zero speed is detected. 
     4.3.2(b)(7) Additional Discussion of the FIRE Routine 
     One feature of the FIRE routine discussed above is that is flexible both in terms of both the AC input frequency and the firing angle defined by the user settings of the MAGNITUDE control potentiometer. See §4.2. This flexibility is demonstrated by the fact that the FIRE routine will always take eight samples for zero speed detection within the time period beginning after a zero cross is detected and ending when the SCR 67 is fired as illustrated in FIGS. 20A and 20B. 
     FIGS. 20A and 20B illustrate an input AC waveform 300 having a zero crossing point 301. In FIG. 20A a gating pulse having a firing angle at point X is illustrated. During the time between the zero cross, samples are taken at eight waveform positions (7-0) and there are eight delay periods of equal magnitude represented by the hatched regions. As FIG. 20A indicates, during the FIRE routine of the present invention the execution of the DELAY routine and the ZERO SPEED DETECTION routine are interleaved much in the same way the slice portions are interleaved with bread pieces in a loaf of bread. 
     FIG. 20B illustrated the waveform sampling locations and delay periods for the same AC waveform but with a different selected firing angle X&#39;. Note that the FIRE routine still allows for the same number of sample and delay periods, although the length of the delay periods is somewhat shortened. 
     It should also be noted from FIGS. 20A and 20B that in the present invention the samples for the zero speed detection are taken before the trigger pulse for the SCR pulse is generated and during the first 90° of the input AC waveform. This is significant in that it is believed that the optimum waveform positions for sampling to determine zero speed are those positions occurring in the first 90°-180° of the input AC waveform. 
     Once the FIRE routine is completed for one of the reasons discussed above, the control logic will return to the main execution routine from which it began. In this present discussion, the FIRE routine was initiated from the BASIC BRAKE routine and thus the control logic will return thereto. Accordingly, once the FIRE routine is complete the control logic will return to block 310 of FIG. 16A. As the braking cycle will have been completed at this point, the control logic will open the brake contactor and then verify that the brake contactor is open. Once the brake contactor is opened by the control logic, the control logic will loop to the initiation of the BASIC BRAKE routine and await another signal indicating the initiation of a braking cycle (i.e., and indication that AC power has been applied to the motor and then cut off). 
     4.3.3 The PRE-STOP Routine 
     The preceding discussion was of the operation of the brake assembly of the present invention when the MODE selection switches were configured such that the BASIC mode of operation was selected. This section discusses the operation of the brake assembly of the present invention when the PRE-STOP mode of operation is selected. 
     As briefly discussed above, the PRE-STOP mode is desirable when a motor is attached to loads that may be windmilling when the motor is desired to be started. 
     The control logic for the PRE-STOP routine is illustrated in the logic flow diagram of FIG. 21. One acceptable PRE-STOP routine may be found at lines 421-59 of the attached appendix. 
     As illustrated in FIG. 21, once the PRE-STOP routine is entered and begins executing, it continually looks for an indication that the START command has been issued or that the START switch has been activated. (block 320). The control logic will continue to loop to block 320 until it senses a START signal. Once a START signal is sensed, the control logic will first check to ensure that the motor contacts are open (in a manner similar to that discussed above) and then will close the brake contacts coupling the SCR circuitry to the motor (blocks 322 and 324). 
     Once the brake contactors are closed and the brake is electrically coupled to the motor, the main PRE-STOP program will call the PRE-STOP INTERRUPTABLE FIRE routine (block 326), which will execute in a manner substantially to the FIRE routine discussed above. One acceptable PRE-STOP INTERRUPTABLE FIRE routine may be found at lines 907-944 of the microfiche appendix. 
     Upon conclusion of the PRE-STOP INTERRUPTABLE FIRE routine (e.g., because the maximum braking time was met or exceeded or because a zero speed was detected) the PRE-STOP routine will open the brake contacts verify that it they are open (block 328) and then close the motor relay allowing AC power to flow to the motor thus starting the motor (block 330). The control logic for the PRE-STOP routine will then monitor the output form the STOP control button to determine whether an E-STOP signal has been asserted (block 331) or whether a STOP signal has been asserted (block 332). If an E-STOP signal is detected, the control logic will bring the motor to a stop through the firing of the SCR circuitry in a manner substantially similar to that discussed above. Upon sensing the STOP signal the control logic will open the motor contactor, thus cutting power off to the motor and loop to the initiation of the PRE-STOP routine where it will await the assertion of the START signal, upon which the above cycle will be repeated. 
     4.3.4 The HOLDING BRAKE Routine 
     As discussed above, in certain instances holding brakes--i.e., brakes that bring the motor to a stop and then continue to apply DC braking current to inhibit rotation of the rotor--are desirable. The brake assembly of the present invention, when properly configured, can operate as a holding brake. 
     FIGS. 22A-22B illustrate a logic flow diagram of a Holding Brake routine that may be used with the brake assembly of the present invention. The Holding Brake routine is executed when the status switches configured by the user indicate that the Holding Mode has been selected. One possible Holding Brake routine may be found at lines 460-90 of the attached appendix. 
     As illustrated at block 335 of FIGS. 22A-22B, the control logic for the Holding Brake routine first looks for an assertion of the START signal (PA0). See §4.2.1. When the START signal is detected, the Holding Brake routine ensures that the brake contactor is open and then closes the motor contactor allowing AC power to flow to the motor, thus starting the motor (blocks 336-37). The Holding Brake routine then monitors the looks for an indication that the STOP signal (PA1) has been activated (block 338). Upon detection of the STOP signal, the control logic for the Holding Brake routine (1) opens the motor relay, thus cutting off AC power to the motor (block 339); and (2) closes the brake contactor, thus coupling the brake assembly to the motor (block 340). The Holding Brake routine then executes a fire routine, which in many way is similar to the FIRE routine discussed in §4.3.2(b). 
     As illustrated in FIGS. 22A-22B, in executing its fire routine, the Holding Brake routine first determines whether the START signal has been asserted, indicating that the braking of the motor should be terminated and the motor started (block 341). If a START signal is detected, the control logic returns to the main Holding Brake routine at block 336, opens the brake contactor and closes the motor contactor to start the motor (block 337). If, however, the control logic does not detect the START signal, it then detects a zero crossing in a manner similar to that discussed above with respect to the slave mode. (block 342). After a zero crossing is detected, the control logic then executes a delay cycle to ensure that the proper firing angle is maintained (block 343). In the holding fire routine, the magnitude of the DC braking current may be determined by a holding magnitude potentiometer, in a manner similar to that discussed in §4.2.3 above. In most instances, the holding magnitude potentiometer will be set such that the magnitude of the DC braking current during a holding brake cycle is less than that for a SLAVE brake cycle. Embodiments are anticipated where a regular DC braking cycle is applied until zero speed is detected and thereafter a reduced holding brake DC current is applied until a START signal is detected. 
     After delaying the necessary time period, the control logic generates an SCR trigger pulse to fire the SCR 67 in a manner similar to that discussed above with respect the SLAVE mode operation (block 344). After firing the SCR 67, the control logic then loops back to the initiation of the HOLDING FIRE routine and will continue to fire the SCR 67 and apply a DC braking current to the motor until a START signal is detected. 
     4.3.5 The MASTER MODE Routine 
     As discussed above the dynamic brake assembly of the present invention includes a MASTER MODE of operation in which a jog feature may be used. The jog feature allows the motor operator to selectively apply AC current to the motor to force the motor to, for example to rotate in incremental steps. The jog feature is particularly useful when the motor is used with machinery that must be accurately positioned or with an assembly line that must be incrementally advanced. FIGS. 23A and 23B illustrate a logic flow diagram of a MASTER brake routine that may be used with the brake assembly of the present invention. The MASTER brake routine is executed when the status switches configured by the user indicate that the MASTER mode has been selected. One possible MASTER brake routine may be found at lines 345-420 of the attached appendix. 
     As illustrated at block 402 of FIG. 23A the first step in the MASTER mode routine is to read the E-stop flag (block 402) and then determine whether the E-stop is pressed (block 404). It should be noted that prior to each decision step the flag value upon which the decision is based should be read; the read steps for the remaining decision blocks of FIG. 23A and 23B are not illustrated and should be implied. 
     If the logic control circuitry determines that E-stop is pressed (block 404) it turns off a ready LED (block 406) and returns to the starting point of the master routine. The ready LED is used during the master routine to indicate to the operator that the brake assembly is in a ready state. 
     If the decision at block 404 indicates that the E-stop has not been pressed the control logic will turn the ready LED on (block 408) and then read and determine whether the jog button is pressed (block 410). 
     When the jog button is pressed AC current is to be applied to the motor as long as the jog button is activated. Accordingly, if the decision at block 410 indicates that the jog button is pressed, the control logic will then turn the radio LED off (block 402) and then recheck the jog button to insure that it is pressed (block 414). The second check of the jog button is to insure that a momentary depression does not activate the motor. Accordingly, if the second jog check at block 414 indicates that the button is not longer pressed the control logic will then loop back to the starting point of the MASTER routine. If, however, the control logic determines at block 414 that the jog button is pressed, it will then check whether the brake contactor is open (block 416). As the brake contactor should be open at this stage the control logic will generate an error should the brake contact be closed. If, however, the brake contactor is open, the control logic will then close the motor contactor in a manner discussed above (block 418) and AC current will be applied to the motor. The control logic will then continuously monitor the jog button at block 420 to determine if it is pressed. As long as the jog button is activated the control logic will loop back and continue to apply AC current to the motor. When, however, the jog button is released the control logic will open the motor contactor (block 422) and verify that it is open (block 424). Once the motor contactor is open, the control logic will loop back to the initial step of the MASTER routine. 
     Referring back to block 410 if the control logic had determined that the jog button was not pressed, it would then determine whether the start button was activated (block 426). If the start button was not depressed, the control logic will loop back to the initial step of the MASTER routine. 
     If, however, the start button is activated, the control logic will then turn the ready LED off (block 428) and again check the start button (block 430). If upon the second checking of the start button, the start button is not activated the control logic will then determine whether the stop button is pressed (block 432). If at this time the control logic determines that the stop button has been activated it will loop to the initial step of the master routine. If it is determined at this point that the stop button is not activated it will proceed to start the motor. 
     Referring to FIGS. 23A-23D it may be noted that if the start button is pressed and the stop button is not detected, the control logic will first verify that the brake contactor is open (block 434) and then close the motor contactor thus applying AC voltage to the motor (block 436). 
     While the motor is running because of the application of AC current, the control logic will monitor the E-stop START and STOP buttons as illustrated in FIGS. 23A-23B. Initially, the control logic will monitor and determine whether the E-stop button is pressed (block 438). If the E-stop button has been pressed the control logic will loop to a braking routine where the magnitude of the braking current is determined by the previously defined E-stop magnitude. If, however, the control logic determines that the E-stop button is not pressed, it will then monitor the START button (block 440). If the START button is activated, the control logic will continue to apply AC current to the motor. If, however, it is determined that the START button is not activated, the control logic will then determine whether the STOP button is activated (block 442). If the STOP button is not activated the control logic will continue to apply AC current and allow the motor to run. 
     If it is determined at block 442 if the STOP button has been activated, or if it was previously determined at block 438 that the E-stop button was activated, the control logic will initiate a braking operation. First, the control logic will open the motor contactor (block 444) and verify that the contactor is open (block 446). Once it is determined that the motor contactor is open the control logic will close the brake contactor (block 448) and then initiate a firing of the SCR to brake the motor (450). The fire routine is substantially similar to that previously discussed for the other brake modes. Once the braking routine is completed (e.g., through a time out or through a zero speed detection) the control logic will monitor the START button to determine whether it has been pressed (block 452). If the START button has been activated the control logic will open the brake contactor (block 454) and then loop to the initiation of block 432 where it will again apply AC current to the motor and monitor the E-stop, START and STOP buttons. Alternatively, if it is determined at block 452 that the STOP button has not been activated the control logic will open the brake contactor (block 456), verify that the brake contactor is open (block 458), and loop to the initial step of the MASTER routine. 
     Although the present invention has been described in terms of one or more embodiments, it is not intended to be so limited. The scope and extent of the present invention is set forth in the following claims. ##SPC1##