Build a DCC++ base stationPlaced on
DCC stands for Digital Command Control. It is a system made for digital (= independent commands) control of trains on a model railway. The power and communication run over 2 wires. This is because power is applied to the rails, which changes polarity to pass on messages.
A DCC system has a base station that sends the signals onto the track. This base station generates the signals to send to the decoders in the locomotives. Each decoder has a unique identification number. These decoders can decode the signals on the track and supply power to the motor, or other accessories such as headlights. Other things can also be connected to a DCC system, such as switches, lighting or signals. These therefore need a decoder that can decode the signals and supply the power.
The main problem with the system is that the base stations are often very expensive. Fortunately, Gregg Berman's DCC++ system (GitHub, YouTube) has a solution for this. His system uses the well-known Arduino boards combined with a motor shield to generate the signal.