On a railway, a treadle is a device that detects the passing of a train, a bit like a track circuit, and might be used to put a railway signal to stop. The earliest treadles were mechanical devices which looked a bit like a pedal, hence the name, although later electrical and electronic versions lack this physical feature.