Using serial TFT LCD to detect fire based on Arduino

In electronics projects, creating an interface between user and system is very important. This interface could be created by displaying useful data, a menu, and ease of access. A beautiful design is also very important. There are several components to achieve this like TFT Displays.

Here are what you will need:

  1. Arduino UNO
  2. Flame Sensor
  3. STONE HMI display
1 Like

Description

A Flame Sensor is a device that can be used to detect the presence of a fire source or any other bright light source. There are several ways to implement a Flame Sensor but the module used in this project is an Infrared Radiation Sensitive Sensor.
ๅ›พ็‰‡2

Working

Flame Sensor has three pins (some may have four pins): VCC, GND, and DO. Connect VCC and GND to +5V and GND of the power supply (can be connected to Arduinoโ€™s +5V). the DO (short for Digital Output) is connected to Digital I/O Pin 3 of Arduino. In order to indicate the detection of a flame or fire, a LED is used.


After that this signal goes to the Arduino and then Arduino sending the stop and start value to the display according to this display setup.

GUI Design

Step-1

In step first you have to download the GUI software. After that open that software and click for new project,than select your screenn size according to you screen size in this project we are using 800x480 screen size so we have selected this size.

Step-2

Now copy all image and icon file in particular folder of your project file ,you can download these images from here. After paste it just goto project and first add image in the image section.

Step-3

Now generate icon file for indication of fire ,after generating add a icon animation function then add it in this function.Also add address for this function here we have added address as โ€˜0096โ€™ you can choose another address also.

Step-4

Now add a switch on screen-0 to switch from screen 0 to 1,after that save the project and then click on configure buttonn this will generate your project file and then you can check it virtually by clicking on screen serial button and check it

Step-5

After done with these steps just click on upload button and upload it on your pen-drive and plug inn display to upload the project file on it.

Code

#include <SoftwareSerial.h>
SoftwareSerial screenserial(2, 3); // RX, TX
#define ta 0x96
unsigned char ta_send[8]= {0xA5, 0x5A, 0x05, 0x82, 0x00, ta, 0x00, 0x00};

int x=0;
const int buttonPin = 3;     
const int ledPin =  7;     
int buttonState = 0;        
void setup() 

{
  Serial.begin(115200);
  screenserial.begin(115200);
  pinMode(ledPin, OUTPUT);
  pinMode(buttonPin, INPUT);
}

void loop() 
{
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH)
  {
    x=10;
    ta_send[6]=x/256;
    ta_send[7]=x%256;
    screenserial.write(ta_send,8);
    digitalWrite(ledPin, HIGH);
   }
  else
  {
    x=0;
    ta_send[6]=x/256;
    ta_send[7]=x%256;
    screenserial.write(ta_send,8);
    digitalWrite(ledPin, LOW);
  }

  Serial.print("value :- ");
  Serial.println(x);
 
}

This is the code for Arduino ,in this I am using software serial library for communication between display and arduino as I have mentioned above.

As you can see in the code I am sending two x values for displaying fire icon.For the fire icon I am sending x=10 and for blank screen x=0 so in this way I am displaying fire icon according to the sensor input.

You can copy this code from here or you can download it from given folder which have every-thing about project.

Circuit-Diagram

Do all the connections as per the circuit.

Moved here because I think this is an advertisement for Stone HMI. If it's not then I don't understand the purpose of the post.

@vincomgo if you are asking for help please make that clear, at the moment your post seems to me to be bordering on spam.

I just simply want to share my project here, not to advertise.

Thanks, I have moved to the appropriate place for sharing a project.