DCC, Digital Command Control, is THE standard for digital control of model railroads. It is based on developments of the german company Lenz and was declared a standard by the NMRA and in the meantime got a lot of enhancements and extensions.
The +/-12 volt signal on the rail is a stream of short (binary 1) and long (binary 0) pulses, for example

More info you can find on wikipedia.org - Digital_Command_Control - and lots of details, open hardware designs and open source software on OpenDCC .
| The author of this website is currently building a few - very simple - projects around DCC, like | |
| a throttle with interface to the Lenz system | ![]() |
| a very basic and simple DCC command station (not yet finished) | |
| a "processing" program for the offline evaluation of DCC signals. | |
| ..... | |