The objective of this paper is to control the railway tracks by using anti-collision techniques. The model of railway track controller is designed to avoid railway accidents. When we go through the daily newspapers we come across many railway accidents occurring at unmanned railway crossings. This is mainly due to the carelessness in manual operations or lack of workers. And also the collision of two trains due to the same track. This model is implemented using sensor technique. We placed the sensors at a certain distance from the gate detects the approaching train and accordingly controls the operation of the gate. Also an indicator light has been provided to alert the motorists about the approaching train. The arrival and leaving of the system is monitored and the gate is operated accordingly