This small test layout has a lot of possibilities on a minimum space; H0=240x30cm. It becomes really transportable if a joint is made in the middle of it.
An old implementation, made with the Märklin metal tracks, can even be operated with analog equipment.
The sensors are realized with switching tracks which are activated by the pickup shoe of the locomotives.