design and construction of an automatic railway gate control system using 8051 microcontroller