This GSM-based device will keep the concerned officer informed about the track temperature on his mobile phone with a text message from a designated SIM card in the circuit on hourly basis. The author’s prototype is shown in Fig. 1.
Circuit and working
Circuit diagram of the rail track temperature monitoring system with hourly updates is shown in Fig. 2. It comprises an Arduino Nano board, an A6 GSM module, and a DS18B20 temperature sensor.
The circuit can be powered by any 5-volt, 2-amp regulated DC power supply connected across CON1. The 5-volt supply thus goes to Vin pin of Arduino Nano and Vcc pins of GSM module and DS18B20 sensor.
Pins uTX and uRX of the GSM module are connected to pins D3 and D2 of Arduino Nano, respectively. Both of its ground pins are connected to GND pin of the power supply.
The temperature sensor (DS18B20) has three pins, one of which is connected to 5-volt supply, another to GND pin, and the third to pin D4 of Arduino. The 4.7-kilo-ohm resistor R1 works as pull-up resistor.
The GSM module needs an antenna to get proper signal strength to connect to the mobile network. The SIM card in GSM module should get uninterrupted SMS service.
Software and programming
Arduino Nano is a compact board based on ATmega328 microcontroller that has easy USB connectivity for programming on Arduino IDE. It has Vin and ground pins to power it from external power supply.
For programming the source code using Arduino IDE, first connect the Arduino board to a computer through USB and then select Arduino Nano board and COM port from Tools menu. Then upload the code (labtest1railtrack.ino) to Arduino board.
Note that first you need to include the SoftwareSreial.h, OneWire.h, and Dallas Temperature.h in Arduino IDE before compiling and uploading the source code. You also need to include two mobile numbers in the source code: one mobile number for sending the alert messages and another mobile number for receiving the messages.
Construction and testing
After assembling the circuit on a Veroboard, connect it to a 5-volt DC power supply rated at two amperes—like a mobile charger. Now, as per the program, the set up condition will start and send AT code ATH to stop any incoming call (in SIM card), so that it may enter into the loop section.
In loop section, it will again send an ATH code and then send AT command to the GSM module for sending a text message. After the sending process is complete, it includes the temperature sensor data, packs it, and then sends alert message, such as “Rail Track Temperature is 40°C.”
Note that you need to connect a metal strip as antenna to the GSM module. The author’s prototype with antenna (ANT) assembled on a Veroboard is shown in Fig. 3. Enclose the circuit in a suitable plastic box and install it close to the railway track to be monitored, as shown in Fig. 4.
Download Source Code
Kamal Das is a track maintainer in Eastern Railway and also an electronics hobbyist