See Electronics for Model Railways Book 1!
Add a relay output to any digital output of your layout.
A very sensitive relay that can be driven by a low current or a low voltage
source at the input.
With a DPDT (Double Pole Double Throw) relay it can switch two isolated
circuits.
It can be used to switch street lamps or motor driven accessories, it can
also be used to deaden blocks of track in an automatic signaling system and
also used as a track direction indicator.