This document describes a railway safety system that alerts authorities to fires on trains. The system has three main sections: at signal points, on trains, and at railway stations. A microcontroller controls the whole system and provides instructions to external devices. The system helps avoid accidents when trains pass red signals. It senses fires, automatically fights fires using extinguishers, and implements a real-time embedded system with hardware and software interaction for railway safety.