Tuesday, December 24, 2024

Develop a Smart Android App for Temperature Alert System

This project presents an Android app to generate an alert (alarm) on a smartphone when temperature of the process under consideration exceeds user-defined maximum temperature.

Alarm and annunciator instrumentation systems are widely used in the control room of process plants. When process variables being monitored by various on-field sensors exceed maximum/critical value, an alarm is generated on the PC or annunciator in the control room. This helps notify the operator to take necessary action to avoid any industrial disaster. This project is a smart temperature alert system based on a customised Android app, Arduino Uno and Bluetooth. The authors’ prototype of the project is shown in Fig. 1.

Fig. 1: Authors’ prototype wired on breadboard
Fig. 1: Authors’ prototype wired on breadboard

Circuit and working

The circuit diagram of the Android app for over-temperature alert is shown in Fig. 2. It is built around Arduino Uno board (Board1), Bluetooth module HC-05, temperature sensor LM35 and a few other components.

- Advertisement -
Fig. 2: Circuit diagram of the Android app for temperature alert
Fig. 2: Circuit diagram of the Android app for temperature alert

The system consists of a transmitter and a receiver unit. The circuit forms the transmitter unit, while the Android smartphone is the receiver unit. Temperature data, collected by LM35 IC temperature sensor from the field or surrounding area, is transmitted to the smartphone via Bluetooth. LM35 outputs analogue signal, and Arduino performs necessary voltage-to-temperature conversion before sending the bit pattern serially to Bluetooth module.

Components used in this project are detailed below.

- Advertisement -

LM35

This is a precision IC temperature sensor with its output voltage proportional to temperature (in °C). LM35 possesses low self-heating, and its measurement (sensing) range is from -55°C to 150°C.

In this project, pin 2 of LM35 is connected to analogue input pin A1 of Arduino. Power supply to LM35 is provided from 5V and GND pins of Arduino.

Arduino Uno

Arduino Uno is an AVR ATmega328P microcontroller (MCU)-based development board with six analogue input pins and fourteen digital I/O pins. The MCU has 32kB ISP flash memory, 2kB RAM and 1kB EEPROM.

In this project, Arduino is used to convert output voltage of LM35 into a corresponding temperature (in °C), and transmit temperature values to Bluetooth module via Tx pin of Arduino.

HC-05 Bluetooth module

HC-05 module is an easy-to-use Bluetooth SPP (Serial Port Protocol) module designed for wireless serial connection setup. It is a fully-qualified Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps modulation with complete 2.4GHz radio transceiver and baseband. It uses CSR’s BlueCore4-Ext single-chip Bluetooth system with CMOS technology and adaptive frequency hopping (AFH) feature.

In this project, Bluetooth module is used to wirelessly transmit sensed temperature to the smartphone.

Android smartphone

The over-temperature alert generation app is based on Android and has been designed using MIT App Inventor. MIT App Inventor is an intuitive, visual programming environment that allows the user to build fully-functional apps for smartphones and tablet PCs.

When this custom-designed app runs on the smartphone, data sent by HC-05 Bluetooth module is received and displayed on the smartphone. When sensed temperature exceeds critical temperature, an alarm is sounded on the smartphone. This app has been tested on Redmi 3S smartphone.

Testing procedure

The steps for testing are as follows:

1. Upload Arduino source code (bt.ino) file to Arduino. In the program, Serial.println () function helps transmit temperature value from Tx pin of Arduino to Bluetooth.

2. Install Android app Temp_Monit.apk on the smartphone. After successful installation, turn on Bluetooth connection of the smartphone. After successfully pairing HC-05 Bluetooth module with Bluetooth of the smartphone, open the app in the smartphone, and press the pushbutton with Bluetooth logo.

From the paired devices list, choose HC-05. After successful connection is established, ‘Connected’ will be displayed on the app. The Android application will display temperature data. A screenshot of temperature as observed on the smartphone is shown in Fig. 3.

Fig. 3: Screenshot of temperature data as observed on the smartphone
Fig. 3: Screenshot of temperature data as observed on the smartphone

Screenshots of Designer and Blocks sections, as designed using MIT App Inventor, are shown in Figs 4 and 5, respectively. If the temperature exceeds a critical value (here, 30°C is used for testing purposes), a buzzing sound will be produced on the smartphone.

Fig. 4: Screenshot of Designer section as designed on MIT App Inventor
Fig. 4: Screenshot of Designer section as designed on MIT App Inventor
Fig. 5: Screenshot of Blocks section as designed on MIT App Inventor
Fig. 5: Screenshot of Blocks section as designed on MIT App Inventor

While the Android source code uses a temperature of 30°C as over-temperature value for alert generation, you can use any other value of maximum temperature by changing number 30 in ‘If compare texts’ line of the code in Blocks section.

Download source folder: click here


Aniket Subham has a keen interest in MCU-based embedded systems

Shibendu Mahata is M.Tech (gold medalist) in instrumentation and electronics engineering from Jadavpur University. He has keen interest in MCU-based real-time embedded signal processing and process control systems.

1 COMMENT

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Truly Innovative Electronics

Electronics News

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics