A locomotive equipped with digital decoder can run in DCC and also in DC layouts, but if it isn't equipped with a digital decoder only can run in DC layouts
If we have a scale model in which there is a circuit for digital DCC and another one for analog, we can pass a train with digital decoder between both sections, but when the wheels of the train crosses, it will create a short circuit between the two sections, normally the digital system will shut off immediately indicating the short circuit. We can avoid it, if we have an isolated section long enough to locate to the longest train equipped with its own DC power connected to the DCC-DC Breaker.
The DCC-DC Breaker when detects a connection due to the wheels between both sections interrupt the connection of the DC power pack to the track, preventing the short circuit and avoiding the damage. The track is supplied with digital voltage during this time, so that the train can continue operating. Once the train has completely crossed the gap and the systems can no longer be combined the DCC-DC Breaker will reconnect the analog system and the train will continue his trip within the new section.
The circuit is based on a current limiter constituted by both transistors. The D1 diodes to D4 cause that the current always crosses the limiter in the same sense independently of the polarity of the track. The 0.47 ohm resistor fixes the maximum current to 1,5A.
The optocouplers will be activated depending on the polarity of the track, with DC current only one will be activated, but with DCC the two optocouplers will be activated causing the cut of the transistor T1, this isolate the DC current from track.
A train equipped with decoder digital going from DCC section to the analog, if the polarity of the track is the same that the direction of travel, it continued its march without stopping. The speed will however depend on the voltage level in the conventional section.
However, if the polarity does not match with the direction of travel, then the locomotive will stop, using the braking momentum programmed in the decoder. This can be used to stop a train before a semaphore, in this case DCC-DC Breaker acts like braking generator, the isolated section gets the feeding through a double pole switch from DCC if the semaphore shows green or from DCC-DC Breaker if it shows red
If a locomotive goes from the conventional layout part back into the digital part, then the built-in locomotive decoder is again able to receive the digital information, DCC-DC Breaker will disconnect the analog voltage.
Download the design of the PCB here in PDF format, if you want to build your own PCB or identify componets see this tutorials.