This circuit was taken from the December 1986 issue of "NMRA Bulletin".
This is a circuit of a regulated 5 volt power supply using the voltage from the tracks. The output voltage polarity is always the same regardless of voltage polarity on the tracks.