Patent ID: 8113471

Claim:
In combination, a sensor and a decoder providing switch control functions for a model railroad stationary switch machine that changes positions of a track switch connected between a main track section and at least two diverging track sections, the combination comprising: a first decoder connector connecting the decoder to the stationary switch machine; a second decoder connector connecting the decoder to at least one of the diverging track sections and making electrical contact with a trigger rail of that diverging track section, the trigger rail comprising a short section of rail that has a gap on each end from an adjacent rail such that the trigger rail is completely electrically isolated from power to a track layout; the decoder further comprising a microcontroller connected to said first and second connectors to monitor a presence or absence of voltage at the trigger rail, wherein the presence of voltage at the trigger rail is caused by a train wheel bridging a said gap, the microcontroller receiving a position signal via the first connector representing a current position of the track switch to generate control signals to the stationary switch machine via said first connector to position the track switch under control by the stationary switch machine to correctly align with the train based on the presence of voltage received through the second connector and the current position of the track switch; and connections connecting the sensor between at least one rail of the main track section and the decoder to detect when a train occupies the main track section near the track switch and provide an output signal to the decoder; wherein the decoder is responsive to said output signal from the sensor to inhibit an automatic switch control function of the decoder when a train is determined to be approaching said track switch on at least one of said diverging track sections.