Abstract:
An electronic control system for model railroads incorporates a motor control unit, an electronic state generator that generates particular operating state signals responsive to multiple reset conditions. A first reset condition initiates sequencing of motor control states and a second super reset condition independently controls system initialization conditions increasing the overall number and accessibility of controller generated operating states.

Description:
This is a continuation application of U.S. Ser. No. 08/240,974, filed May 9, 1994, now abandoned, which is a continuation application of U.S. Ser. No. 07/905,502, filed Jun. 24, 1992, now abandoned, which is a continuation application of U.S. Ser. No. 07/479,985, filed Feb. 14, 1990, now abandoned, which is a divisional application of U.S. Ser. No. 07/037,721, filed Apr. 13, 1987, now U.S. Pat. No. 4,914,431, which is a continuation-in-part of U.S. Ser. No. 06/672,397, filed Nov. 16, 1984, now abandoned. 
    
    
     FIELD OF THE INVENTION 
     This invention relates to an electronic control system and in particular to a reset initiated control state that provides two levels of reset control for remote control of features and functions on AC power ed model railroad locomotives. 
     BACKGROUND OF THE INVENTION 
     Ever since the beginning of model railroading the user has desired more and more control over the operation of his model trains. The first electric model railroad locomotives had only a single remote feature--the engine was either on or it was off. 
     Later, variable power was added and the operator could then also control the speed of his model trains. This was a definite advantage but still somewhat limiting since the operator could not back the train up. The Lionel Company first introduced a slide switch on the engine that could be thrown by hand that would reverse the engine and later introduced an innovative electrical-mechanical on-board (in the engine) motor control unit that would change the engine&#39;s direction by simply interrupting the applied AC track power. This unit was later improved by adding a neutral state to allow the train to stand idle when track voltage was applied. This motor control unit had a state sequence that moved from &#34;forward&#34; to &#34;neutral&#34; to &#34;reverse&#34; to &#34;neutral&#34; to &#34;forward&#34; etc. each time the AC power was interrupted. The motor control unit is often referred to as a &#34;reverse unit&#34; or &#34;E unit&#34;. 
     Today most model train engines are equipped with DC motors and the remote control of the train&#39;s direction is accomplished by applying either positive or negative DC power to the track. However, when Lionel developed their reverse switch it was difficult to produce DC power and good DC motors were not available. To this day the Lionel Company uses AC power with the same basic electrical-mechanical motor control unit design. 
     The Lionel Company also introduced an innovative remote control concept for their on-board whistle. Here a DC voltage of either polarity applied to the track would actuate a DC receiver in the engine that in turn connected track power to the whistle sound device, allowing the operator to blow the whistle when the engine was standing idle or moving, all by remote control. 
     No manufacturer of miniature AC powered trains has ever taken advantage of the fact that both polarities of DC voltage were available. However, model railroad enthusiasts soon discovered that judicious placement of diodes in the engine would allow them to control two trains on the same track independently or to expand their remote control options to two on a single engine. 
     Model railroaders that used DC track voltage did not have independent remote control options since the two DC polarities were already used to control train direction. Only dependent options were available such as a reverse headlight coming on when the train was moving in reverse. 
     Another capability that the model railroad enthusiast would like is a way to move engines independently on the same track so that multiple unit consists (more than one engine operating in a single train) could be constructed or taken down in the model railroad yard or a pusher engine brought up to aid a train stranded on a grade. For the operator that uses DC track voltage, it is difficult to couple a moving engine to a stationary engine that occupies the same section of electrified track since both engines would respond to the same applied voltage. For the operator that uses AC track voltage where each engine is equipped with a motor control unit, it is possible to couple a moving engine to a stationary engine since the stationary engine could be in a neutral state. However, once coupled, the two engines would remain out of synchopation since each attempt to change the state of one motor control unit would also change the state of the other. 
     Over the last ten to fifteen years a number of electronic control systems have been developed that attempt to solve one or both of the problems of independent train control and expanded remote control ability. One approach is called command control and uses transmitter/receiver techniques to address single engines at a time. With this technique, each engine is equipped with a receiver that is specifically coded or tuned to receive only one of a number of transmissions that are being sent down the track. In this way each operator equipped with a transmitter can move his engine independently of other operators that have engines on the same section of electrified track. One disadvantage of these control systems has been that only a small number of codes or train addresses are practical for a given system which means that additional engines over this number will be given codes that are already used. 
     Some of these systems also have remote control options where an operator can turn on a bell or light on his engine independent of other operators. Most of these command control systems have a means of controlling slaving engines together so that multiple unit consists can be made up. 
     For the operator of an AC train equipped with a motor control unit, the solution for multiple unit consists was a little less complicated. In one instance an electronic motor control unit was developed that performed the same function as the original motor control unit but would reset to a specified state if the power was off for more then a specified period (in this case it was about six to eight seconds). This way if two or more engines were out of synchopation the entire consist could be shut down for eight seconds and once power was restored all engines would be in the same state. 
     Although this motor control unit solved the problem of multiple unit operation it did nothing for expanding the remote control options. 
     One application of this invention is to increase the number of remote control options of AC powered electric trains where the locomotives contain on-board reversing units. The motor control units are generally sequenced through their states by interrupting the AC power. The motor control unit used in Lionel trains have four distinct states: 1) forward 2) neutral before reverse 3) reverse, and 4) neutral before forward. For remote control, the Lionel Company used a DC remote control voltage for their on-board whistle sound effect generator. For this case the polarity did not matter since either a positive or negative DC voltage would turn on the whistle. Although, this is a very limited electric train control system, it has been around for some time and most operators of Lionel trains are very comfortable with it. They tend to resist using complicated digital remote control systems for a variety of reasons. First, they are accustomed to using the simple power interrupt to change the direction of their locomotives--there is a quality of delightful simplicity in this. They also do not want to alter their engines to the point where they would not work on other peoples train layouts that use original Lionel transformers, etc. However, there is some dissatisfaction with the limited number of remote options that are available and some operators have used both positive and negative DC voltages to at least increase the number of remote control features to two. 
     Adding the additional DC remote control voltage is about as complex a remote signaling system as most Lionel train operators want to go. The challenge for a new AC remote control system is to increase the number of remote options and not change the basic simple and universal operation of the old Lionel control system that has been around for the last fifty years or so. 
     SUMMARY OF THE INVENTION 
     In accordance with the present invention a control system has been developed for AC powered trains that uses the state of the motor control unit along with any remote control signals available to the system to actuate a number of remote on-board features. On-board means it is attached to the remote object (a miniature locomotive in this case) that is addressed by the remote control signals. 
     The object of this invention is to increase the number of remote control functions from that which would normally correspond to the number of control signals available on an electronic control system by using an on-board electronic state generator (104) along with a combination logic block (108) to select groups of operating effects where a particular effect within each group can then be selected and/or operated by the limited number of remote control signals that are available to the system. 
     In other words, each state of the on-board generator corresponds to a different group of remote control options that can each be selected and/or operated by the remote control signals. If the on-board state generator has &#34;n&#34; stages that select groups of &#34;m&#34; effects each that can in turn be selected and/or operated by the remote control signals, then there are &#34;n×m&#34; (n times m) total remote control options available to be operated by the remote control signals. The on-board state generator has made it possible to increase the number of remote control functions that would be available from the remote control signals alone. 
     A feature of this invention is to allow the user to choose the remote control features that he would like to use by connecting the desired effect generator (i.e. horn, bell, etc.) into the combination logic block. In other words, if he wants to select remote option &#34;a&#34; or &#34;b&#34; when the on-board state generator is in state &#34;c&#34;, he need only connect this option module to desired output from the combination logic block (108) where signal &#34;c&#34; will enable the two effects, &#34;a&#34; and &#34;b&#34; signals to affect either &#34;a&#34; or &#34;b&#34; separately. This gives him a great deal of latitude in choice of options and also allows him to change options at a later time without having to also change the on-board state generator or the combination logic block (108). 
     Another feature of this invention is to establish a preferred set of signals between the on-board state generator and the various options modules. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a general system block diagram; 
     FIGS. 2A-2B show the electronic motor control unit states; 
     FIG. 3 is a schematic electrical drawing of the electronic motor control unit used for AC motors in one embodiment of the invention; 
     FIG. 4 is a schematic electrical drawing of the electronic motor control unit used for DC motors in one embodiment of the invention; 
     FIG. 5 is block diagram of the on-board state generator and electronic motor control unit used in one embodiment of the invention; 
     FIG. 6 is a schematic electrical drawing of the DC remote control signal detector used in one embodiment of this invention; 
     FIG. 7 is a schematic electrical drawing of the DC signal generator used in one embodiment of this invention; 
     FIG. 8 is a table listing the model train diesel engine remote control options used in one embodiment of this invention; 
     FIG. 9 is a table listing the model train steam engine remote control options used in another embodiment of this invention; 
     FIG. 10 is a block diagram showing a horn sound generator; 
     FIG. 11 is a block diagram showing an electrical latch used to remember the momentary presence of one of the remote control signals; 
     FIG. 12 is a block diagram showing how the diesel engine options listed in FIG. 8 are electrically implemented; 
     FIG. 13 is a block diagram showing select signal generation using AC power in excess of a predetermined value. 
     FIG. 14 is a block diagram showing coil uncoupler remote control latch and operation circuitry; and 
     FIG. 15 is a block diagram of the preferred embodiment. 
    
    
     DESCRIPTION OF THE INVENTION 
     FIG. 1 shows the most general case. Here the state of the remote object is indicated by the box 100 labeled &#34;remote object state&#34;. The state of a remote object is defined as any aspect of the object that can be distinguished as different. In other words, its temperature, size, mass, velocity, age, etc. could be descriptors of its state. Of the &#34;k+p+r+q&#34; total remote control lines 101 available to the system, &#34;k&#34; lines 102 are reserved for changing the state of the remote object. A box 103 labeled &#34;other inputs to the remote object&#34; is included to indicate that the state of the remote object may not be precisely determined by the &#34;k&#34; remote control lines 102. For instance, the temperature of the remote object may be used to change its state. The added on-board electronic state generator 104 is shown receiving inputs from the state of the remote object 100, internal programming 105, &#34;p&#34; lines 115 of the available remote control signals and a box 106 labeled &#34;other inputs to the on-board electronic state generator&#34;. In other words, the state of the on-board electronic state generator can be determined from a variety of inputs and only has as a limiting case the same state as the remote object. 
     The on-board state generator will have only one state at a time. Each state will enable signal gating in the combination logic block, 108, to select and/or operate &#34;m&#34; remote control options for each of the &#34;n&#34; operating state signals 109. This has multiplied the number of remote control options that would be available from the &#34;m&#34; effect control signals, 107, by the total number of states &#34;n&#34; of the on-board electronic state generator. In other words, each time the state of the on-board state generator changes it will enable another set of &#34;m&#34; different remote control effects to be actuated by the same &#34;m&#34; effect control signals. 
     The state generator could, in principle, have an indefinite number of states limited only by the on-board electronics. In reality, however, it would most likely cycle through a finite number of states to allow the operator to revisit remote control options that have already been addressed. 
     The &#34;m&#34; effect control signals can either select each of the &#34;m&#34; effects in a group or they can both select and operate each of the &#34;m&#34; effects. If the &#34;m&#34; effect control signals simply select the different effects, then &#34;q&#34; additional signals are provided for operating the selected effects. For this configuration, there are a possible (n×m×q) different choices since different effect operating signals could have different affects on each of the (n×m) effects. 
     The box, 110, is used to generate the &#34;m&#34; effect control signals from the &#34;r&#34; detected remote control signals. If there are enough remote control signals available to the system, the &#34;r&#34; lines could be used directly as effect control signals. However, if there are limited remote control signals, 110 can be used to generate additional signals to select the different available &#34;m&#34; effects from the &#34;r&#34; remote control signals. For instance, the select state generator, 110, could simply count the number of times that a particular remote control signal, r1, is applied in a given amount of time and generate one of the effect control signals corresponding to this count. If 110 receives five applications of r1, then the fifth effect control signal is activated. For our train control systems, where there may only be two DC remote control signals available, it&#39;s important to increase the number of effect control signals. The signal, 120, from the on-board state generator can be used to alter how the select generator interprets the &#34;r&#34; select signals. 
     One of the n×m effects, 111, could be used to enable address and command storage, 119, to be activated. This allows unique addresses and commands to be received from some combination of the remote control lines r+q+k+p, 131, through combination logic block, 108, and stored in memory located in 119. 
     For stored commands, the output of 119 through control signals 132, can control how some of the n×m effects are programmed to respond to the &#34;n&#34; operating state signals and the &#34;q&#34; effect operating signals, and the &#34;m&#34; effect control signals. In this way, the remote object can learn or be programmed by the user in any of a number of ways. 
     Another of the n×m effects, 111, can be used to enable 119 to receive and store unique addresses from the incoming remote control lines. Thereafter, effect 112 is used to enable 119 to receive address information from 131 and compare it to the previously stored addresses. Depending on whether there is a match or not, 119 can, in turn, control how the m effect control signals, and q effect operating signals are interpreted by the combination logic block 108 through signals 132. In addition, 119, can through signal 117 and signal gating block, 118, control the incoming r+q+p+k remote control signals. The idea of programming separate address and commands for each locomotive is new to model railroading. 
     The box 114 labeled &#34;signal detector&#34; is used to change the incoming remote control signals, k+p+r+q to signals that can be used by the system. For instance, it may detect an incoming fifty kilohertz signal and produce a five volt DC logic signal that can be used by C-MOS AND gates in the combination logic block 108. 
     The manner in which the on-board state generator 104 changes state can be a function of internal programming 115; to on-board sensors (ie light, temperature etc.) 106 or the state can be sequenced by the &#34;p&#34; 106 remote control signals or it may correspond exactly to the state of the remote object 100 or any combination of the above. 
     The state of the on-board state generator can be used to activate or control some effect or it may be exclusively reserved to select what options are available to the remaining remote control signals. If the on-board state generator itself corresponds to a remote effect, that effect will be unavoidably present regardless of which of the other &#34;m&#34; effects are available for that state. There will be &#34;n&#34; of these state dependent effects shown as boxes 121, 122, and 123. Combination logic block, 125, determines which of the &#34;n&#34; possible effects are activated by the &#34;n&#34; operating state signals. 
     It is assumed here that knowledge of the state of the remote on-board state generator is known at the origin of the remote control signals either through, for example, visual contact with the remote object or because the remote state is known or kept track of by the operator control remote effect. However, it is not implied that the operator necessarily has remote control over the state of the on-board state generator. For instance, the state may be uniquely determined by the temperature in the remove objects environment which may in the case of model train layout be the same at the origin of the remote signals. Here the operator of the remote signals &#34;knows&#34; what the state of the on-board state generator is and &#34;knows&#34; what effects each of the remote control signals will have on the remote object. If the number of states and remote options becomes large, an identical electronic state generator at the transmitter could be used to keep track of the on-board electronic state generator. No physical or electrical connection between the two state generators is implied; only that the inputs to both state generators are designed to be the same. 
     As an example of how more effects can be generated than the total number of remote control signals, consider the case where an operator has only a total of three remote control signals on an electronic control system: signal #1, signal #2 and signal #3. Assume that there are a total of five unique states of the remote object and that the on-board state generator will correspond exactly to the same five unique states. Each time signal #1 is applied, the remote object and the on-board state generator sequences to the next state (this remote control signal corresponds to the k signals shown in FIG. 1). Assume the operator has done this twice which establishes state #2 in the on-board state generator. In this state there are two remote control functions available (this corresponds to the r or to the m signals in FIG. 1 since there is no select state generator in this example). If signal #2 is applied a red light comes on; if signal #3 is applied a green light comes on. If the operator applied signal #2 and then signal #3 then he would witness the red light coming on and then the green light coming on. If he did neither then the remote function would either be nothing at all or the state-dependent remote function designated for state #2. Assume he now applies signal #1 again and the on-board state generator sequences to state #3. Here again the operator has two choices for the remaining remote control signals plus the remote function designated for the state of the on-board state generator. From this example, it is apparent that there are ten remote control options for signals #1 and #2 (two signals×five states) plus an additional five functions associated with the states of the on-board state generator (state dependent options); a total of fifteen. If the control signals alone had been used, there would only be a total of three. 
     It is not implied that the control signals are exclusively digital, analog, or that each is limited to only one function. Even without the on-board state generator, each signal could control a vast number of remote options. For instance, each signal might be a digital word encoded on a carrier signal; here the remote features associated with it would only be limited by the length of the word. However, the increase in the remote options available when an on-board state generator is used is still multiplied by the number of states. 
     Also, the on-board state generator could select a number of remote features that will respond to the control signals in an analog manner. An example would be a remote-control sound feature where the volume would respond to the amplitude or perhaps the frequency of the control signal. 
     DESCRIPTION OF EMBODIMENTS OF THE INVENTION 
     Embodiment One 
     One embodiment of this invention for the control of AC powered model trains uses both positive and negative applied signals superimposed on the AC track voltage as remote control signals. We use short interruptions of AC power to change the state of the on-board motor control unit. We consider the state of the motor control unit to be the state of the remote object (a model locomotive in this case). Our on-board electronic state generator will correspond in part to the state of the motor control unit. However, since the old Lionel motor control units were mechanically operated, it is difficult to translate the state of the motor control unit to an electrical signal that can be used to generate the state of the on-board state generator. Also, the old mechanical design has other problems that are annoying. 
     In order to implement our remote option idea more easily, we have developed a new electronic motor control unit that has become an important part of this design. Our unit will sequence through the same four states that correspond to the mechanical design when AC power is briefly turned off (short power interrupt) but can also be &#34;reset&#34;, which will establish the motor control unit in a known state when power has been off for more than three seconds (long power interrupt). We have constructed the unit to allow for easy access of internal electrical states by connecting important signals to two electrical busses on either side of the circuit board. Although there are a total of sixteen signals on the two busses, only four signals are used to define the state of the unit. These are Q1, Q2, Reset and Clk; see FIG. 5. The state diagram and output logic values that distinguish the states of the unit is shown in FIG. 2. Q1 and Q2 decode to the four reverse states, Clk is an output pulse that corresponds to the short power interrupt and reset is an output pulse that corresponds to the &#34;reset&#34;, or long power interrupt. The reset 201 is shown as the forward (1,1) state, but it may be programmed by the user for any state. 
     Actually we have developed two versions; one to control the state of DC or permanent magnet motors and the other to control the state of AC or universal motors. Circuit descriptions for both of these units are given below. Circuit diagrams are shown in FIGS. 3 and 4. Although the two motor control units control different kinds of motors, both have the same states and bus connections to option modules, and both are powered from AC. 
     The on-board electronic state generator that we used is shown in FIG. 5. There are a total of five states; including four motor control unit states and an additional reset state. Four AND gates 501, 502, 503, 504 are used to generate the four distinct motor control unit states from the Q1 505 and Q2 506 output signals. In order to establish the reset condition as a unique state, a D flip-flop 507 is used to latch the reset pulse 508. When the motor control unit is turned on after a three second power down, the RS output 509 will be logic &#34;1&#34;. When the motor control unit is sequenced to the next state, the clk signal 510 will return the RS output to logic &#34;0&#34; and it will remain at that value through all further short power interruptions. Since the user can program which motor control unit state will correspond to reset (long power interrupt) the &#34;RS&#34; output is shown applied as &#34;not RS&#34; to the four decode AND gates 501, 502, 503, 504. This way, no matter what motor control unit state is selected to come up in reset, there will only be one state corresponding to reset in the on-board electronic state generator. 
     Since there is a total of five distinct on-board states and two control signals there is a possible ten remote control options. If the state of the on-board state generator is also used for remote control there are an additional five &#34;state dependent&#34; effects possible. In other words, if we use the state of the on-board state generator to actuate a remote feature, that feature will also be present when any of the possible remote functions for that state are actuated by the other two remote control voltages (+DC or -DC). 
     Our signal detector is shown in FIG. 6. It will produce logic signals acceptable to our decode logic that correspond to the positive and negative DC superimposed remote control signals. A circuit description is given below. 
     A system for transmitting both positive and negative DC control voltages is shown in FIG. 7. Moving the switch arm 701 to &#34;A&#34; 702 or &#34;B&#34; 703 will produce a positive or negative DC voltage respectively superimposed on the AC track power 704. 
     FIGS. 8 and 9 show two possible embodiments of remote options for this particular system; one for a diesel and one for a steam engine. The first column in each table shows the state of the on-board state generator, and the last column shows the possible remote control effects for each state. The two middle columns show the state of the applied DC remote control signals. A &#34;0&#34; means that no remote signal is applied, a &#34;0-11&#34; indicates that a the remote effect is actuated when the signal is applied, a &#34;1-0&#34; means that the remote effect is actuated when the remote signal is turned off, and a &#34;0-1-0&#34; means the remote effect is actuated and remains on even after the remote signal is removed. 
     An example of the last type of control voltage is for our remote control bell shown in FIG. 11. When a momentary negative DC remote control voltage is applied in the forward state to the clock input 1100 of the D-latch 1102, the output 1101 will toggle between logic &#34;1&#34; or &#34;0&#34; and turn the bell sound effect on or off. 
     An example of a remote function responding to the continued presence of a remote control signal is our horn sound generator shown in FIG. 11. When a positive DC remote control is signal is applied (0-1) in the forward, reverse or neutral before forward states, the horn sound effect will be actuated as long as the remote control signal is applied. 
     An example of a remote function responding to removing the remote control signal is the diesel motor start effect. For this option the user applies a positive DC control signal (0-1) in the reset state which starts the sound effect of a large diesel motor turning over trying to start. When he stops the signal (1-0), the motor then starts and continues running. Here two separate effects were generated by a single remote control voltage. 
     Note that some of the remote control functions depend on whether or not the engine is in slave mode. This is a feature for multiple unit consists. On prototype railroads the first engine is the only one that has a headlight on or the only one that will blow the horn or ring the bell. Other engines (slaves) in the consist are there only to provide power and perform no other functions. For our model diesel locomotives we provide a way of disconnecting some of these remote control options for the slave units so only the first or master unit will respond to the plus and minus DC remote control signals. This can be done with a switch on the engine itself or slave mode can be entered and exited as a remote option. 
     An electrical schematic diagram for the AC train control system for the diesel example above is shown in FIG. 12. The electronic on-board state generator is the same as FIG. 5 and is redrawn here to show its connections to other parts of the system. 
     The diesel locomotive (remote object) 1200 is connected to the AC power supply 1202 and the plus and minus signal generator 1203 via the track. The three lines 1201, 1230, 1231 are drawn in to show that there are three kinds on remote control signals available. Short power interrupts 1201 from the AC power supply 1202 sequence the state of the motor control unit 510 directly through the basic four states. Long power interrupts 1201 from the AC power supply 1201 reset the motor control unit into a known state. This plus and minus DC remote control signal generator 1203 is shown connected to the AC power supply 1202 since it applies the DC signals superimposed on the AC track voltage. The DC signals are shown connected to the signal detector 1232 that puts them in a form usable by the system. 
     The on-board state generator FIG. 5 generates one and only one of five states at a time. The state signals 509, 512-15 are shown connected to signal gating AND gates 1210-1224 along with the plus 1225 and minus 1226 DC logic signals from the signal detector 1232. The output of each AND gate is shown connected to remote functions such as headlights or bells or is shown not connected to anything if there is no remote feature designated for that option. 
     As an example if the on-board state generator is in &#34;reverse&#34; the output 514 of the AND gate 503 is logic &#34;1&#34;. This signal is applied to both inputs of AND gate 1219 which will in turn apply a logic one to the input of AND gate 1240. If the locomotive is in the master mode then the output of master/slave latch 1241 is also logic &#34;1&#34; and the reverse light 1242 will light. This is an example of a state dependent effect. 
     If a positive DC voltage is applied to the track from the plus and minus DC signal generator 1203, then a logic &#34;1&#34; will also be generated on the +DC logic line 1226 and applied to AND gates 1211, 1214, 1217, 1220, 1223. This will produce a logic &#34;1&#34; at the output of AND gate 1220 the only one with two logic &#34;1&#34;s at its input. This signal is applied to OR gate 1243 which produces a logic &#34;1&#34; at the input of the AND gate 1244. If the locomotive is in the master mode the horn will blow. 
     Circuit Descriptions for the AC and DC Reversing Units (FIG. 3 and FIG. 4, Respectively) 
     The two reversing units have much circuitry in common. In fact, circuit items 302-340 from FIG. 3 match exactly circuit items 402-440 from FIG. 4. Numbers in parenthesis which follow a FIG. 3 drawing reference number refer to items on FIG. 4. The circuit description will be divided into three sections: Common Circuitry, AC Specific Circuitry, and DC Specific Circuitry. 
     Common Circuitry 
     Logic 
     The flip flops 338(438), 340(440) are wired as a two stage clocked ring counter which can have four possible states, which correspond to the four motor power states. They are (Q1,Q2): (1,1) forward, (0,1) neutral before reverse, (0,0) reverse, and (1,0) neutral before forward. Two of these four states are decoded into signals F (forward), and R (reverse) by 334(434) and 336(436), two of the four NAND gates. These two signals (F,R) are active low. That is when F is low and R is high then the &#34;forward&#34; power state is activated. The other two NAND gates 332(432) and 330(430) are used as a buffer in front of the clock to the flip flops (CLK) and as a buffer which delivers a reset (RES) command to the flip flops, respectively. These Schmitt buffers are needed to insure the flip flops will reliably be put into the expected state, since without them, the CLK and RES signals would have rise times of several milliseconds(ms). 
     Power Supply 
     The components which comprise the negative VEE supply are: resistor 310(410) diode 308(408) diode 312(412) capacitor 328(428) and rectifying bridge 306(406). Resistor 310(410) is for current limiting. Zener diode 308(408) works with resistor 310(410) to create a stable voltage at the cathode of diode 312(412). This voltage is passed through Diode 312(412) to charge capacitor 328(428), the power supply filter cap to form the negative power supply (VEE). Diode 308(408) is used to isolate the power supply to prevent capacitor 328(428) from discharging when the input AC is returned to ground. One additional significant discharge path for capacitor 328(428) exists when the AC input is returned to zero when either F or R are low. This is from the current flowing into whichever NAND gate (334 or 336) is in the low state. This is the purpose of disconnect transistor 350(450) to stop this discharge of capacitor 328. The disconnect of all power drains when AC power is interrupted is extremely important as it allows VCC to remain constant independent of state. Without this feature it would be impossible to control the timing accuracy of the reset period much better than 3011 seconds. With this disconnect the reset timing is controlled to 1.5-3 seconds. When AC input power is applied (across AC and ACG) the base of transistor 350(450) is pulled low saturating it. This applies a ground connection to the power control section. When AC is removed, the base of transistor 350(450) (terminal strip connection &#34;D&#34;) is pulled to ground by resistor 354(454) thus turning off transistor 350(450) and removing the loads on the NAND gates as well as shutting down the power control section. 
     Timing Circuitry 
     The purpose of the timing circuitry is to produce the proper RES and CLK signals in response to interruptions in AC power. 
     Reset Circuitry 
     Whenever AC power is interrupted the anode of diode 308(408) rises from its usual -4.3V to ground. When the AC is applied, the anode of diode 314(414) is at -3.6V and capacitor 324(424) is charged to -3.6V as well, the + side of capacitor 324(424) (and the input to the &#34;reset&#34; NAND gate 330(430)) is pulled to ground by resistor 322(422). When AC is interrupted diode 314(414) removes the loading of the input leaving capacitor 324(424) to be discharged by resistor sum 322(422)+326(426). With AC interruptions of less than 3 seconds capacitor 324(424) discharges to less than 1/2 VEE. Thus, when AC is reapplied, the input to the &#34;reset&#34; NAND 330(430) does not fall low enough to cause a low-to-high transition on the RES line. Therefore, no reset will occur. However, if the AC is interrupted for longer than 3 seconds, capacitor 324(424) discharges to less than 1/2 VEE and RES will go through a low/high/low transition, resetting the flip flops to their correct state. At power up, after some time (say, 30 seconds), 324(424) will have completely discharged. But, since VEE is still up (328(428) charged to -3.6V) RES will stay low (-3.6V) all the while. Thus, at power up, RES goes low/high/low resetting the flip flops. At power up, after a long time (more than 1 hour), VEE will be at ground as well. At power up, both VEE and the input to the &#34;reset&#34; NAND jump to -3.6V and the RES line jumps hi. The flip flop Set and Reset lines are &#34;level sensitive and will asynchronously operate whenever the set(reset) lines are high (0V). Thus, at initial power up the motor control units will &#34;reset&#34;. The &#34;reset&#34; time is determined by time constant 324×(326+322) {or for the DC motor control unit, 424×(426+422)}. This is completely dominated by 326×324 (426×424). Time constant 322×324 (422×424) is selected only to be long enough to ensure that RES stays high (0V) long enough to effect a proper resetting of the flip flops. It would appear that you could get by with leaving out either 316(416) or 314(414) (but not both). However they were both included to stabilize the reset timing against radically different AC power settings before and after a reset interruption. 
     Clock Circuitry 
     Whenever AC power has been on for some time the anode of 308(408) is at -4.3V and the anode of 316(416) has charged to -3.6V (a logic low). The output of the &#34;clock&#34; NAND is therefore hi. Since flip flops 338(438) and 340(440) are positive-edge triggered, nothing in particular happens yet. When the AC power is interrupted for longer than about 1/4 second, the anode of 316(416) changes far enough toward ground to cause the output of the &#34;clock&#34; NAND 332(432) gate to go from high to low. When power is re-applied this NAND gate output goes low to high and clocks the flip flops. If the AC power has been off longer than 3 seconds a &#34;reset&#34; occurs as described above. 
     AC Specific Circuitry 
     Input Rectifiers 
     There are two rectifiers: one is a full wave bridge 306 to power the logic, disconnect circuitry and provide the input signals to the timing circuitry 306; the other is also a full wave bridge made up of diodes 302,304 and two diodes in the bridge 306 to provide the return path to ground. This rectifier charges 360 to provide the negative supply for operating the two relays 356 and 358. The value of this voltage is approximately (-Vpeak+0.7V). It is significant to note that the use of a full-wave bridge 360 allows proper operation from either AC or DC track power. 
     Disconnect Circuitry 
     In the AC unit, the disconnect circuitry consists of 350,346,344, and 342. When AC power is applied a negatively pulsating voltage is applied to the base of transistor 350 through current limiting resistor 346. This saturates 350, applying a ground connection to 348 and thus enabling the motor control section. Capacitor 342 serves to filter the 120 Hz pulsating DC so that the relays don&#39;t chatter. Resistor 344 exists to discharge 342 and turn off 350 when AC power is removed. 
     Relays and Relay Drive Circuitry 
     With 350 on, DC power will be routed through either 354 or 352 (or neither) depending on the logic state of lines F and R. If F is low current flows through 354. If R is low current flows through 352. If F and R are both high then neither 354 or 352 conducts. The logic signal voltage on F  R! works with 348 forming a current source which is passed through 354  352! energizing relay coil 358  356!. The motor field winding 370 is wired to ACG. It is the armature 362 whose current is change by the relays. The field winding and armature winding are connected in series. 
     DC Specific Circuitry 
     Input Rectifiers 
     There are two rectifiers: one is a full wave bridge 406 to power the power transistors and motor; the other is also a full wave bridge made up of diodes 402,404 and two diodes in the bridge 406 to provide the return path to ground. The latter rectifier supplies power for the logic, part of the disconnect circuitry and provides the input signals to the timing circuitry. Because we use full wave rectifiers this unit can be operated from either DC or AC track power. 
     Disconnect and Low-Voltage Control Circuitry 
     The disconnect circuitry consists of 450,456,466, and 456,454,458,462,494,464, and 460. The best way to understand the disconnect circuitry is to first imagine 456,466,454,458,442,494, and 464 are not present in the circuit. Then you would notice that whenever AC power is applied the base of 350 is pulled low through 460 and 462+456 thus saturating 450 and applying power to the power control section. You will also note that whenever the input AC power drops below about 2.1V peak 450 will turn off. This happens 120 times per second when power is applied independent of the AC amplitude, (so long as the AC power is above 2.1V peak). At higher voltage settings this effect is not even noticeable. This is all there would be to the disconnect circuitry were it not for one serious problem. The AC power supplies for toy trains often start at six to nine volts and increase to twenty. Most of the DC motors that are easily available start at two to three volts and are at peak power at twelve. In order to have locomotives equipped with DC motors start out at a low velocity when the AC power supply is just turned on, a way must be provided to keep the full power from being applied at lower AC amplitudes. This is the idea behind circuit 454. 454 operates as a voltage divider with 456 keeping 450 off whenever the input AC power is below approximately 1.4V+(0.7V)×(RATIO). Where, RATIO=(456+454)/454. The purpose of 494,460,464, and 466 is to provide a timing delay between when power is available to the power control section and when it is actually turned on. The voltage at the emitter of 466 becomes large enough to turn on 450 only after 464 has been charged through 462. Thus, as the ratio of 454/456 is varied, the duty cycle of the applied full-wave rectified power is varied for a given transformer setting. 460 insures that 464 is not discharged as the power waveform passes over its peak. Otherwise, 450 would turn off before the end of the power cycle. When the end of the power cycle is reached, 464 must be rapidly discharged. This is achieved by 466. The instantaneous voltage on the base of 466 can never fall below -4.3V wince it is clamped by Zener diode 408. As the instantaneous input voltage rises to 0V diodes 402 and 404 turn off and a path for 466&#39;s base current is provided by 494. This turns on 466 which in turn discharges 464. With 464 discharged 450/60 now shuts off. If 464 were not discharged at the end of each half power cycle it would not provide the expected delay in applying the next power half cycle. 
     A significant advantage of this type of drive is that the DC motor receives &#34;pulse drive&#34; at lower power settings. This is an especially attractive way to start up a DC motor. Its performance is steady and controllable. This performs well, but the drive turning 450 on and off is too gradual and 450 spends far too much time in its active region (remember it is being cycled on and off at a 120 Hz rate). Without 452 and 458, 450 would overheat. 452 is connected to 450 in such a way as to form a &#34;discrete SCR&#34;. 458 provides the hold current to keep 452 on once it has been triggered from the AC power input. Also the resistor ratio 454/458 plays an important role in determining the loop gain around 450-452 and thus the exact turn on voltage for 452. The exact expression for turn-on is complicated by the presence of 448 and 446. A smooth pulse driven turn-on beginning at the lowest obtainable transformer voltages (-6Vpeak) can readily be obtained. 
     Power Control Circuitry 
     When logic signal F R! is low, base current is drawn through resistor 442 444! saturating transistor 446 448! and thus applying a ground connection through resistors 468 470! and 474 472! to the bases of transistors 486 490! and 476 482! respectively. This connection turns on transistors 486 490! and 476 482! which in turn causes heavy conduction of 484 488! and 478 480! respectively. Under this condition, current flows into motor terminal M2 M1!, through the motor 492 (or whatever DC load device is desired), and out terminal M1 M2! and is returned to the negative terminal of 406 through 484 488!. 
     By rereading the last paragraph using the terms in brackets one notices that the current that flows through the motor connected across terminals M1-M2 will have its current reversed when logic signal R is low instead of F. If signals F and R are both high then no power is applied to the motor. This is the case for either of the two &#34;neutral&#34; settings. The condition F and R both low would be disastrous. Fortunately, this cannot occur as long as NAND gates 434 or 436 are not defective. 
     It is interesting to note that the transistor pair 482-480 (or 476-478, 486-484, 490-488) operate as a compound &#34;super&#34; pnp transistor. 
     Plus and Minus DC Signal Detectors 
     The DC signal detectors along with our DC power supply for all of our on-board electronics is shown in FIG. 6. AC track power applied between `B` 620 and `A` 621 is rectified by the bridge circuit made up by diodes 601-604. A dropping resistor 606 along with a Zener diode 605 produce a negative supply at `C` 623 equal to Vz. The capacitor 607 is used as a power supply filter. 
     The RC networks made up of 608 and 610 for circuit 1 and 613 and 615 for circuit 2 are low pass filters that prevent the sixty cycle line voltage at 620 and 621 from turning on either transistor 609 or transistor 614. If a small DC (&gt;0.7 volts) is applied at 620 and 621 in addition to the line current the base emitter junction of either 609 or 614 will be turned on depending on the polarity. If `A` 621 is DC positive with respect to `B` 620 then transistor 609 will be on and collector current will flow as long as `C` 623 is more negative then `A` 621. This will occur during the entire positive cycle of `A` 621 when diodes 603 and 604 in the bridge rectifier are forward biased. In addition collector current will flow during part of the negative cycle until 604 is back biased by the a voltage equal to Vz of the power supply Zener 605. As `A` 621 continues more negative diode 619 prevents the forward biased base-collector junction of transistor 609 from taking current form the Zener supply. Circuit 2 works in the same way if `B` 620 is DC positive with respect to `A` 621. 
     Note that with capacitor 612 placed across 611 the voltage at `D` 624 will charge to Vsat of transistor 609 below `B` 620 and diode 619 will conduct only during positive half cycles, assuming the time constant of the low pass filters is much greater then the period of the applied AC power. 
     Applying a positive DC remote control signal at `A` with respect to `B` results in a logic `1` at `D` 624 (approximately zero volts with respect to power supply ground 625). Applying a negative DC remote control signal at `A` with respect to `B` results in a logic `1` at `E` 626 (approximately zero volts with respect to power supply ground 625). If no DC signal is applied, the voltage at `D` 624 or `E` 626 is a logic `0` (-Vz with respect to power supply ground 625). 
     EMBODIMENT TWO 
     This embodiment also employs the state of the reverse unit and the five stat electronic state generator described in the first embodiment. However, instead of using &#34;-DC&#34; as a remote control signal, applied AC power supply voltage in excess of a predetermined value is used as an additional remote control signal. This system will be more limited than the first but will be easier for the Lionel user since it will not require him to purchase or construct a -DC generator. The main disadvantage of this approach is that the applied &#34;AC&#34; power supply voltage also controls the speed of the locomotive which makes it difficult to use a particular value of AC power voltage as a remote control signal when the locomotive is in forward or reverse. However, in the three other states of &#34;neutral before forward&#34;, neutral before reverse&#34; and &#34;reset (in neutral)&#34; AC power voltage as a remote control signal is useful. 
     One particular approach is shown in FIG. 13. The peak detector 1301 responds to income AC power by producing a DC voltage, 1302, proportional to the peak AC power supply voltage 1314. The peak detector contains electronic filters to insure that motor or other electrical noise does not get detected and also produces a smooth DC voltage with little AC ripple. Capacitor, 1309, is used to block DC remote control voltages on the track from interfering with the detection of AC power supply voltage. Comparator, 1303, compares peak voltage, 1302, with DC reference source, 1315 and responds with logic signal 1304. The select state generator, responds with one of &#34;m&#34; effect control signals by counting the number of times signal, 1304, is applied. If peak AC power voltage is applied &#34;j&#34; times such that DC signal, 1302, exceeds reference, 1315, each time, then select state generator will respond with the &#34;j&#34;th effect control signal. The electronic state generator is a ring counter and will return to its first state if it is in the &#34;m&#34;th state and one more signal, 1304, is applied. Signal, 1305, from the electronic state generator, will also reset the select state generator, 1306, to its first state when any change in the electronic state generator occurs. 
     The &#34;+DC&#34; detector, 1308, responds to applied DC voltage that is superimposed on the AC power supply voltage, 1314, in the same manner as detector, 1232, in FIG. 12 except only the &#34;+DC&#34; logic signal, 1226, is generated. 
     One effect for Lionel model trains that is particularly well suited to this embodiment is shown in FIG. 14. Lionel produced an automatic model train coupler that used a solenoid in the coupler assemble to open the coupler knuckle when power was applied to a special sliding shoe from a special operating track section on the layout. In some engines, Lionel used the DC remote control signal to operate the coupler anywhere on the layout but it eliminated using this DC remote control signal for a remote horn. Also, when the engines had both front and rear couplers, both would open when the DC remote control signal was applied. Since power for the couplers came from the engine, when the engine was moving slowly there was often not enough voltage present on the track to actuate the coupler solenoid. 
     Our invention eliminates these problems. When the appropriate effect control signal, 1321, is applied the rear coupler arming latch, 1403, or front coupler arming latch, 1404, can be set from AND gates, 1401, or 1402, if the engine is &#34;neutral before forward&#34;, 515, or &#34;neutral before reverse&#34;, 513, respectively. Once the coupler arming latches are set, they will remain in that state until they receive a reset signal, 1411, or 1412. If a &#34;+DC&#34; logic signal is applied, the selected switch, 1407, or switch, 1408, 1 will close and apply voltage from the coupler supply power supply, 1409, to the connected coupler coil. The coupler arming latch resets 1411 and 1412 are generated from the output of AND gates, 1405, and 1406, respectively. 
     The coupler power supply, 1416, contains capacitors to store energy from the peak applied AC power supply voltage. This will provide extra power for the couplers when the engine is moving slowly and there is not sufficient voltage on the track. It is convenient that the coupler power supply will charge at the same time that the coupler latches are armed since a high DC voltage is needed to select this effect in the first place. 
     PREFERRED EMBODIMENT 
     Referring to FIG. 15, this embodiment also employs the state of the reverse unit and the five state electronic state generator described in the first embodiment, also using &#34;-DC&#34; as a remote control signal. 
     This system will be similar to the first embodiment but will include several extensions. A block diagram for this embodiment is shown in FIG. 15. This system shows three primary control inputs: 1201, the AC power which goes to FIG. 5, the on-board state generator, 1230 which is the presence of a small +DC signal superimposed on the basic AC power, and 1231 which is the presence of a small -DC signal superimposed on the basic AC power. As discussed earlier, the AC power signal is also used by the remote object itself as a source of energy to operate the motor(s) in the remote object (a toy locomotive.) 
     The purpose of signal detector 1232 is to extract the information that the +DC (or -DC) signals were superimposed on the AC power and produce a logic control signal at the output which is of a proper format as to be used by the remainder of the system. In this case we envision using CMOS logic. Line 1225 is the -DC logic output control line (called &#34;select&#34; signal) which corresponds to signal 1230 being active. Line 1226 is the +DC logic output control line (called &#34;operate&#34; signal or effect operating signal) which corresponds to signal 1231 being active. In this system, it would not make sense for signals 1230 and 1231 to be active at the same time. 
     Similar to the previous two embodiments, this system utilizes five control lines 509, 512-515 from the on-board electronic state generator FIG. 5 in combination with m &#34;effect control signals&#34; 107 which are combined at combination logic block 108 with an effect operating signal 1226 to activate a large number of remote-control effects 1505-1514, etc. A new feature here is the presence of 110, the select state generator. This block is a resettable counter plus decode logic which takes the single logic signal (&#34;select&#34;) from signal detector 1232 and outputs a number, m (larger than one) of effect control signals 107 by using various aspects of the past history of applied &#34;select&#34; signals 1225 to decide which of the m effect control signals 107 would be active at a time. 
     This system contains yet one further aspect by which the organization can be improved and the sheer number of possible effects can be extended: this is by using one of the m control positions of 107 irrespective of the condition of the five operating state signals, as what might be called &#34;page advance&#34;. This is shown as effect 1512. When 1512 has been enabled via the correct effect control signal 107 and operated via the &#34;operate&#34; signal then the page select state generator will advance to its next state. Page select lines 1507 are fed back to the combination logic block 108 as to direct what would have been the same set of effects, to be chosen from a different set (page). This permits 5×m (five times m) effects for each page (state) of the page select state generator. Rather than simply generating huge numbers of possible controllable effects, this feature provides an excellent way to organize the effects into meaningful groups. 
     The rest of FIG. 15 consists of several &#34;special&#34; effects which need to be described. By &#34;special&#34;, we mean to imply &#34;beyond the obvious set of toy locomotive remote control effects--perhaps, such as &#34;bell&#34;, &#34;horn&#34;, &#34;uncoupler&#34;, &#34;overhead blinking light&#34;, etc. These common effects are alluded to be effects blocks 1513, 1514 . . . and so forth. The first of these &#34;special&#34; effects to be described is &#34;sequence&#34;, 1515. The &#34;sequence&#34; option is used in the following way: when the &#34;sequence&#34; option has been selected by the proper combination of 107, 509, 512-515, then &#34;sequence enable&#34; signal 1505 is activated. What this does is set up the on-board electronic state generator FIG. 5 to no longer respond to power interruptions on AC power signal 1201 with state changes which would have sequenced the locomotive through its normal direction changes. Instead of responding to 1201, the on-board electronic state generator will respond to changes is the &#34;sequence&#34; signal 1506 coming from the sequence effect 1515. The &#34;sequence&#34; signal 1506 will be activated every time the &#34;operate&#34; signal 1226 is activated--so long as the &#34;sequence&#34; effect is activated (sequence enable, 1505 activated.) 
     When properly &#34;selected&#34; via control signals 107, 509, 512-515 effect 1511 called &#34;reversal&#34; will reverse the direction that the locomotive considers to be its forward direction every time that the &#34;operate&#34; signal 1226 is activated. 
     When properly &#34;selected&#34; via control signals 107, 509, 512-515 effect 1510 called &#34;master/slave (latch)&#34; will alternately put the locomotive into a &#34;slave&#34; status or into a &#34;master&#34; status every time that the &#34;operate&#34; signal 1226 is activated. In &#34;master&#34; status the locomotive performs in its normal manner described in this embodiment. However, when the locomotive is in &#34;slave&#34; status, none of the &#34;obvious&#34; effects (such as bells, lights, horns) that the locomotive might display are operable. The locomotive will still respond to direction changes via AC power interrupts, the &#34;sequence&#34; effect, the &#34;reversal&#34; effect, the &#34;latch&#34; effect and the &#34;Disconnect&#34; effect as well as the &#34;master/slave&#34; effect. That is to say, by re-operating the &#34;master/slave&#34; effect the locomotive can be restored to &#34;master&#34; status. 
     When properly &#34;selected&#34; via control signals 107, 509, 512-515 effect 1509 called &#34;lock&#34; will alternately put the locomotive into a condition where the direction of the locomotive cannot be changed via the usual power interruptions on signal 1201 (&#34;locked&#34; mode) and a condition where the locomotive responds in its usual manner to power interruptions on signal 1201 (&#34;normal&#34; or &#34;unlocked&#34; mode). In the &#34;locked&#34; mode the locomotive will still respond to direction changes via the &#34;sequence&#34; effect 1505 &amp; 1506 if they are properly selected and operated. The important feature here is that whatever direction the locomotive was going (forward, neutral, reverse) prior to the locomotive being put int &#34;lock&#34; mode, it will remain locked into that direction until it is changed via the &#34;sequence&#34; effect or it is taken out of &#34;lock&#34; mode and sequenced in the normal fashion via AC power interruptions on signal 1201. 
     When properly &#34;selected&#34; via control signals 107, 509, 512-515 effect 1508 called &#34;disconnect&#34; will alternately put the locomotive into a condition where the locomotive behaves as if it were in &#34;slave&#34; with regard to its &#34;obvious&#34; effects and the motor power is forced into an off or &#34;disconnected&#34; status (this is called the &#34;disconnected&#34; mode) and into a condition where the locomotive operates in its usual manner.