ECG Simulation using MATLAB
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a new project which is ECG Simulation using MATLAB. In this project, I have designed a complete simulation in MATLAB which is acting as ECG Simulator. This ECG Simulation also extracts ECG features and performs different functions which are explained in detail below. We have put a lot of effort in designing this project that's why its not free and we have placed a very small amount of $50 so that engineering students can buy it easily. You should also have a look at ECG Averaging in MATLAB.
Moreover, I have also designed a user friendly GUI which is quite easy to operate and you can simulate any kind of ECG data on this ECG Simulator. I have also extracted ECG features and then showed them separately. I have taken ECG data from PhsioBank website. Before buying this project must read this tutorial completely and also watch the video given at the end of this tutorial so that you are sure what you are buying. So, let's get started with ECG Simulation using MATLAB:
ECG Simulation using MATLAB
- You can buy this ECG Simulation using MATLAB by clicking the below button:
- When you buy this Simulation then you will get a lot of files and you need to run the ECGFinalGUI.m file.
- When you run this file, a GUI will open up as shown in below figure:
- As you can see this GUI contains two portions, the first portion is the Common ECG Diseases section:
- In this section, I have designed some basic ECG diseases signals.
- From the ECG curve, doctors find the disease so I have designed few curves which will show different ECG diseases.
- Like if the patient is suffering from Atrial Flutter then its curve will be something as shown in below figure and it comes when you click the Atrial Flutter button:
- I have designed curves of six ECG Diseases which are as follows:
- Normal Sinus Rhythm
- Junctional Rhythm
- Atrial Fibrillation
- Ventricular Fibrillation
- Ventricular Tachycardia
- Sinus Tachycardia
- Sinus Bradycardia
- Atrial Flutter
- You can check their ECG graphs by clicking each of these buttons.
- The last button in the common ECG Diseases is for filtering of ECG Signals.
- When you click this button then the program will filter the real ECG signal and remove noise from it as shown in below figure:
- Now let's have a look at the feature extraction from ECG Signal.
- I have downloaded around 12 signals from PhsioBank Website and here's my settings on this website:
- I have downloaded each signal of 10 sec duration as shown in above figure and saved it in txt form and then copied the data in txt files.
- So, this simulation contains total 12 signals.
- Now once you saved your signal in txt format now you need to use the Load ECG Signal button on the GUI and it will ask for browse.
- So, select your ECG signal and it will show its features like Heart Rate, R-R interval, QRS interval etc as shown in below figure:
- You can see in the above figure that as I selected the ECG signal, first of all GUI extracted the first ECG curve and shown it separately in the above window.
- After that I have extracted the P, Q, R, S and T peaks.
- After that I have also extracted the Heart Rate, R - R interval and QRS interval.
- Next phase is to diagnose the disease, which is Normal in this case.
- If this patient had some disease then it will be displayed in this Diagnosis section.
- Next section is Severity section, in which I have displayed the Condition of the Patient i.e. its severe or mild etc.
- So, let me load some other ECG signal and let's have a look at its results:
- Now in this set of ECG data we have detected that the patient is suffering with Sinus Bradycardia.
- The below video will give you a better idea of How this project works, so before buying it must watch this video first:
So, that's all for today. I hope you guys have enjoyed today's tutorial on ECG Simulation using MATLAB. Till next tutorial, take care and have fun !!! :)
How to use C# if else Statement
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to show you How to use C# if else statement. Previously we have seen the Introduction of C# Windows Forms an then we have also discussed different data types and variables used for programming in C#, you can read these tutorials on C# Tutorial page.
So, before starting this C# if else tutorial, I would suggest you to first read all of those basic C# tutorials so that you know how to use different data types. Before starting this tutorial, you should also read How to add C# Control in Windows Form because we are gonna use three C# controls in this tutorial.So, let's get started with How to use C# if else statement:
How to use C# if else Statement ???
- First of all, let's have an overview of C# if else statement.
Overview
- If Else Statements are named as conditional logic.
- C# If statements are essential for any kind of project , IF statement is the most basic conditional logic of C# and is used in almost every project.
- It acts as if and then you have to specify some statement which is a check statement. In simple words it acts as if this condition is true then do this task. :)
- Let's have a look at its pseudo code:
IF ( Condition is TRUE )Â ====>Â Then do this TASK. Â Â Â Â
- Now let me give you an example suppose you are designing some calculator then it must have some buttons on it like Multiply.
- And you want to multiply any two integers when you click this MULTIPLY button.
- Now in your code you need to add something like:
IF ( MULTIPLY button is pressed ) ====> Then multiply the two Integer variables
- So, you can see in the above C# IF statement that clicking of MULTIPLY button is the condition and the multiplication of two integers is the TASK.
- This C# IF Statement is making the relation between the Condition and the Task.
- So, now let's have a look at the real C# IF Statement syntax:
C# IF Syntax
- In C# IF Statements, first of all we place the word "IF".
- After that, we place the condition in small brackets ( ), the condition must be a comparison which should be either true or false. We will shortly have a look at some example.
- Now after specifying the condition, next thing we need to do is to specify the task, which comes in curly brackets { }.
- So, the overall if statement looks something as shown below:
If ( CONDITION comes here ) {
TASKS are specified here.
}
- Now, I hope that you have got the complete understanding of this C# IF Statement so let's design a simple example so that I can show you How to use this IF Statement.
Example
- Now let's design a simple C# Windows Form application and add some Control in it.
- I have added one Button, one TextBox and one Label and it looks like as shown in below figure:
- Now I have created a small IF condition that if TEP is written in the Text box then the Label Text will be changed to My Blog.
- Its just a random logic but quite simple so I thought that it will better explain the logic.
- So, when you click this button then if TEP is written in the Text Box then we will get My Blog as shown in below figure:
- You can see in the above figure that when I click the button then it checked the textbox and because TEP is written there that's why Label text is changed to My Blog.
- Here's the code for the button click function which is quite simple:
if (txtClick.Text == "TEP")
{
label1.Text = "My Blog";
}
- So, that's our IF logic as I discussed earlier the condition is in ( ) small brackets and then in curly brackets { } we have our task.
- But there's a little problem in above condition that I have mentioned to display My blog on TEP but I haven't mentioned what to type when there's no TEP in Text Box.
- So, what should happen when there's something else in Text box.
- That's where we encountered with ELSE Statement.
- In ELSE we specify that TASK which will occur when IF condition is FALSE.
- So ,let's change our code a little:
if (txtClick.Text == "TEP")
{
label1.Text = "My Blog";
}
else
{
label1.Text = " NOT my Blog";
}
- Now you can see in the above code that I have added the ELSE statement, in which I have mentioned that Not my Blog.
- So, now when the IF condition is TRUE then Label text will be My Blog and when its FALSE then ELSE will work and we will get NOT My Blog.
- Check the below image:
- So, that's how C# if else statement works.
That's all for today. I hope you have enjoyed today's tutorial. I will cover more conditional logic in the coming tutorials. Till then Take care and have fun !!! :)
LPG Gas Leak Detector using Arduino
Hello friends, hope you all are fine and having fun with your lives. Today, I am going to share a new project named LPG Gas Leak Detector using Arduino in Proteus ISIS. Before reading this tutorial, you must first download the Gas Sensor Library for Proteus because we are gonna use that Library and will simulate the Gas Sensor in Proteus.
In this library you will find eight sensors and all of them works exactly the same so that's why we are gonna use one of them. For LPG Gas Leak Detector Project I have used MQ-2 sensor which is used for detection of LPG gas. I have also used Arduino UNO board which you can simulate in Proteus using Arduino Library for Proteus. Moreover, I have also placed an LCD which will display either LPG gas Leak Detected or not. So, let's get started with LPG Gas Leak Detector using Arduino in Proteus ISIS.
LPG Gas Leak Detector using Arduino in Proteus ISIS
- First of all, download the Gas Sensor Library for Proteus and install it in your Proteus software so that you can it in Proteus.
- After installing the Gas Sensor Library, now download the LPG Gas Leak Detector Project's simulation and programming code by clicking the below button:
Download Proteus Simulation & Code
- Now, let's design this project so that you can get a better idea of how it works.
- First of all, design a small circuit in your Proteus software as shown in below figure:
- Now you can see in the above figure that I have used Arduino UNO board along with 20 x 4 LCD and Gas Sensor MQ-2.
- You can use this LCD by download this New LCD Library for Proteus.
- Next thing you need to do is to download the below code and get your hex file.
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
int Gas = 7;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.setCursor(0,0);
lcd.print("Gas Detected :");
lcd.setCursor(1,2);
lcd.print("www.TheEngineering");
lcd.setCursor(4,3);
lcd.print("Projects.com");
pinMode(Gas , INPUT);
}
void loop() {
if(digitalRead(Gas) == HIGH){lcd.setCursor(14,0);lcd.print(" Yes");}
if(digitalRead(Gas) == LOW){lcd.setCursor(14,0);lcd.print(" No ");}
}
- If you don't know about Hex file then read How to Get Hex file from Arduino Software.
- Upload this Hex File in your Proteus Arduino software and then run your simulation.
- If everything goes fine then you will get results as shown in below figure:
- So, you can see in the above figure that when Gas Sensor is HIGH then its written on the LCD that Gas Detected: Yes.
- Here's a video which will explain this LPG Gas Leak Detection using Arduino in Proteus ISIS:
So, that's all for today. I hope you have enjoyed this project named LPG Gas Leak Detection using Arduino in Proteus ISIS. Will meet you guys in the next tutorial. Till then take care and have fun !!! :)
Line Following Robotic Waiter using Arduino
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a new project which is Line Following Robotic Waiter. I hope you guys are gonna enjoy it. I have shared all the details below so that if you wanna design it then you can easily do it. I have designed this project for a client and it worked quite perfectly so I thought to share it with you guys as well.
I have designed this Line Following Robotic Waiter using Arduino UNO board. I have also shared the code below and have given all the instructions but still if you got into any problem then ask in comments and I will solve your problems. I have also shared a video below which will show you the working of Line Following robotic Waiter. So, let's get started with it:
Line Following Robotic Waiter
First of all, let's have an overview of this Line Following Robotic Waiter:
Overview
- In this project, I have designed an arena which has four tables on it as shown in below figure:
- The robot will start from the Table 1 side and whenever someone call it from any table then it will reach that table and take the order.
- After taking the order it will move back and will reach to the starting point again and wait for the next table call.
- Now let's have a look at the components required to design thi Line Following Robotic Waiter:
Components
- Let's have a look at the components list, which is required for designing this Robot. Here it is:
- Arduino UNO
- DC Motors
- RF Module
- 2 Relay Board
- IR Sensors
- These are the components required in order to design this Line following robotic waiter.
Mechanical Design
- I have designed a three wheeler robot in which there were two wheels at the front side with DC motors while a free caster wheel at the back side.
- I have used Acrylic Sheet as the body of the robot.
- The DC Motor I have used for designing this project is shown in the below figure:
- The caster wheel used is shown in below figure:
- The coupled DC gear Motor with wheel is shown in below figure:
- So I have designed two of such coupled motors and then combining all the above things together, we finally designed our Line Following Robotic Waiter as shown in below figure:
- Now our mechanical Design is ready so let's design the electronic hardware:
Electronic Circuit Design
- First of all, I have designed the DC Motor Driver which is also called 2 Relay Board.
- This circuit diagram is shown in below figure:
- Now in order to apply the signals to move the Motors I have used Arduino UNO board.
- Moreover I have placed four IR sensors below this robot.
- Two of these IR sensors are used for line tracking while the remaining two were placed on the sides for detecting the tables on both sides.
- I have also designed a power supply to convert 12V into 5V.
- The circuit diagram of power supply is as follows:
- So, now let's have a look at the Arduino code required for Line Following Robotic Waiter:
Arduino Code
- Here's the Arduino Code requried for Line Following Robotic Waiter.
#define motorL1 8
#define motorL2 9
#define motorR1 10
#define motorR2 11
#define PwmLeft 5
#define PwmRight 6
#define SensorR 2
#define SensorL 3
#define Sensor3 A0
#define Sensor4 A1
#define TableA A4
#define TableB A2
#define TableC A5
#define TableD A3
int OriginalSpeed = 200;
int TableCount = 0;
int TableCheck = 0;
int RFCheck = 10;
void setup()
{
Serial.begin (9600);
pinMode(motorR1, OUTPUT);
pinMode(motorR2, OUTPUT);
pinMode(motorL1, OUTPUT);
pinMode(motorL2, OUTPUT);
pinMode(PwmLeft, OUTPUT);
pinMode(PwmRight, OUTPUT);
pinMode(SensorL, INPUT);
pinMode(SensorR, INPUT);
pinMode(Sensor3, INPUT);
pinMode(Sensor4, INPUT);
pinMode(TableA, INPUT);
pinMode(TableB, INPUT);
pinMode(TableC, INPUT);
pinMode(TableD, INPUT);
MotorsStop();
analogWrite(PwmLeft, 0);
analogWrite(PwmRight, 0);
delay(2000);
// Serial.println("fghfg");
}
void loop() {
MotorsForward();
if((digitalRead(Sensor3) == LOW) && (TableCheck == 0)){TableCount++; TableCheck = 1;}
if((digitalRead(Sensor3) == HIGH) && (TableCheck == 1)){TableCheck = 2;}
if((digitalRead(Sensor3) == LOW) && (TableCheck == 2)){TableCount++; TableCheck = 3;}
if((digitalRead(Sensor3) == HIGH) && (TableCheck == 3)){TableCheck = 4;}
if((digitalRead(Sensor3) == LOW) && (TableCheck == 4)){TableCount++; TableCheck = 5;}
if((digitalRead(Sensor3) == HIGH) && (TableCheck == 5)){TableCheck = 0;}
if(digitalRead(TableA) == HIGH){RFCheck = 1;}
if(digitalRead(TableB) == HIGH){RFCheck = 2;}
if(digitalRead(TableC) == HIGH){RFCheck = 3;}
if(digitalRead(TableD) == HIGH){RFCheck = 4;}
if(RFCheck == TableCount){Table1();}
PIDController();
}
void MotorsBackward()
{
digitalWrite(motorL1, HIGH);
digitalWrite(motorL2, LOW);
digitalWrite(motorR1, HIGH);
digitalWrite(motorR2, LOW);
}
void MotorsForward()
{
digitalWrite(motorL1, LOW);
digitalWrite(motorL2, HIGH);
digitalWrite(motorR1, LOW);
digitalWrite(motorR2, HIGH);
}
void MotorsStop()
{
digitalWrite(motorL1, HIGH);
digitalWrite(motorL2, HIGH);
digitalWrite(motorR1, HIGH);
digitalWrite(motorR2, HIGH);
}
void MotorsLeft()
{
analogWrite(PwmLeft, 0);
analogWrite(PwmRight, 0);
digitalWrite(motorR1, HIGH);
digitalWrite(motorR2, HIGH);
digitalWrite(motorL1, LOW);
digitalWrite(motorL2, HIGH);
}
void MotorsRight()
{
analogWrite(PwmLeft, 0);
analogWrite(PwmRight, 0);
digitalWrite(motorR1, LOW);
digitalWrite(motorR2, HIGH);
digitalWrite(motorL1, HIGH);
digitalWrite(motorL2, HIGH);
}
void Motors180()
{
analogWrite(PwmLeft, 0);
analogWrite(PwmRight, 0);
digitalWrite(motorL1, HIGH);
digitalWrite(motorL2, LOW);
digitalWrite(motorR1, LOW);
digitalWrite(motorR2, HIGH);
}
void PIDController()
{
if(digitalRead(SensorL) == HIGH){analogWrite(PwmRight, 250);analogWrite(PwmLeft, 0);}
if(digitalRead(SensorR) == HIGH){analogWrite(PwmLeft, 250);analogWrite(PwmRight,0);}
if((digitalRead(SensorL) == LOW) && (digitalRead(SensorR) == LOW)){analogWrite(PwmRight, 0);analogWrite(PwmLeft, 0);}
}
void Table1()
{
TableCount = 0;
MotorsRight();
delay(4000);
while(digitalRead(SensorR) == HIGH);
while(digitalRead(SensorL) == HIGH);
while(1)
{
MotorsForward();
PIDController();
if(digitalRead(Sensor3) == LOW){break;}
}
MotorsStop();
delay(1000);
Motors180();
delay(2000);
while(digitalRead(Sensor3) == HIGH);
while(digitalRead(Sensor3) == LOW);
while(digitalRead(SensorL) == HIGH);
//delay(500);
while(1)
{
MotorsForward();
PIDController();
if(digitalRead(Sensor3) == LOW){break;}
}
//delay(1000);
MotorsLeft();
delay(4000);
while(digitalRead(SensorL) == HIGH);
while(digitalRead(SensorR) == LOW);
while(1)
{
MotorsForward();
PIDController();
if(digitalRead(Sensor3) == LOW){break;}
}
MotorsStop();
delay(1000);
}
- This code will not work for you exactly.
- The robot is following the line so I have placed some value for IR sensors so that my robot can follow.
- When right IR sensor is HIGH then right motor moves a little faster and left motor slows down.
- In this way I am making it to follow the line so you have to change such values in the code.
- If you got into any issue regarding this project then add us on Skype and we will help you out.
- Here's our final robot looks like:
- Here's the video of Line following Robotic Waiter which will give you the better idea of how it worked:
That's all for today, I hope you have enjoyed today's project. Will meet you guys in the next tutorial. till then take care and have fun !!! :)
New Proteus Libraries for Engineering Students
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a list of New Proteus Libraries for Engineering Students. I have shared many Proteus Libraries till now but they all are randomly spread in blog posts, so I thought to post all those Proteus Libraries links in today's post. So that engineering students can get benefit from these awesome libraries. You should also have a look at How to add new Library in Proteus 8 Professional, if you are new to Proteus.
You can download them from their respective links and then can use them in your Proteus Projects. These modules are all compatible with Arduino and PIC Microcontroller. So, if you got into any trouble regarding these New Proteus Libraries, you can ask in the comments and I will try my best to resolve your issues. So, let's get started with these New Proteus Libraries for Engineering Students. If you don't have the Proteus software then you should read How to Install and Download Proteus Software?
Note:
You should also have a look at these Proteus Libraries as well:
Here's a video in which I have explained all these Proteus Libraries:
1) Arduino Library for Proteus
First of all, you should download Arduino Library for Proteus. Using this Library you can easily simulate Arduino boards in Proteus and can design any kind of circuit. This Arduino Library is the first one in this Proteus Libraries list. Once you install this Arduino Library for Proteus, you will be able to easily simulate Arduino boards in Proteus:
Download Proteus library zip file download and more details about this Arduino Library for Proteus by clicking the below button:
Download Arduino Library for Proteus
2) Genuino Library for Proteus
You all have heard about this new Genuino boards which are launched by Arduino group after Arduino boards. They are almost similar to Arduino baords. So, we have also designed these Genuino boards in Proteus. This Genuino Library for Proteus includes following Genuino boards:
- Genuino UNO
- Genuino Mega 2560
- Genuino Mega 1280
- Genuino Mini
- Genuino Pro Mini
- Genuino Nano
The Proteus library zip file download link is as follows:
Download Genuino Library for Proteus
3) GPS Library for Proteus
GPS is used in almost every navigation project. GPS is used for the detection of user location. It works in NMEA coding and gives longitude and latitude. Most of the GPS modules are operated through Serial Port i.e. they give data via serial ports. We have designed this GPS module for Proteus using which you can easily simulate this GPS module. I have skm53 in mind while designing this GPS Library for Proteus but still, you can use it for any kind of GPS module because most of them work on NMEA coding so all NMEA-coded modules follow this GPS module. The Proteus library zip file download link is as follows:
Download GPS Library for Proteus
Note:
4) GSM Library for Proteus
Next is the GSM Library for Proteus. Using this Library you can easily simulate the GSM Module in Proteus. This GSM module is used for SMS sending and receiving. We can send SMS or receive SMS using this GSM module. There are different types of GSM modules available in the market. I have designed the library of the GSM Module named SIM900D in Proteus. I hope you guys are gonna enjoy it. This GSM module works on AT Commands and the list of these AT commands is given in the below post from where you will download it. You can download Proteus Library for GSM, by clicking the below button:
Download GSM Library for Proteus
Note:
5) XBee Library for Proteus
XBee modules are used for wireless communication. They work on radio frequency (RF) and are very helpful in those projects where wireless communication is required. Using XBee modules we can communicate between nodes etc. We have designed XBee Library for Proteus which you can download by clicking the below button. The XBee module works on Serial protocol and can send data wirelessly. In the below post, I have also shown you how to send data between two XBees. If you got into some trouble then ask in the comments below and I will resolve them.
These XBee modules are not fully functional because we are still working on them. Rite now only TX and RX pins are working but soon we will update all other pins too. So, stay tuned. :) You can download the Proteus library, by clicking the below button:
Download XBee Library for Proteus
Note:
6) Bluetooth Library for Proteus
Bluetooth modules are also used for wireless communication just like XBee modules. But Bluetooth modules use Bluetooth as a way of communication instead of RF. These Bluetooth modules are used in those projects where low-range communication is required because they don't work in high range. These Bluetooth modules also work on Serial Protocol and you have to connect them with your device and get your data. This Library includes two Bluetooth modules, which are:
- Bluetooth Module HC - 05
- Bluetooth Module HC - 06
You can download the Proteus library by clicking the below button:
Download Bluetooth Library for Proteus
7) DS1307 Library for Proteus
DS1307 module is an RTC module that is used in projects where the current time is required. This module is basically a clock and you have to program it for once and then it keeps on ticking forever. These are used mostly in attendance projects and are quite helpful. Proteus already has this module in its database but it's not much attractive and looks like a simple module. So, we have given it a stylish look and it's just a click away from you.
I have also posted a project DS1307 Arduino-based Digital Clock in Proteus in which I have shown how to use this DS1307 in Proteus ISIS. I will also post a tutorial soon in which I will interface this DS1307 sensor with PIC Microcontroller and 8051 Microcontroller but you have to wait a little. :P I hope you guys are gonna enjoy it. We have designed its Proteus library, zip file download link is given below:
Download DS1307 Library for Proteus
8) New LCD Library for Proteus
LCDs are available in Proteus in very simple form so we have done a little work and designed New LCD Library for Proteus using which you can now get these stylish LCDs in Proteus. As you can see in the image, these new LCDs now look more attractive and more realistic. I hope you guys will enjoy them. As functionality is concerned they are exactly the same as the normal Proteus LCDs but they are different in looks so you can use the same code for these new LCDs as well.
In this below link, I have also interfaced this NEW LCD with an Arduino board which is also given in the below link for download. This example will help you in understanding how to use this LCD. This Library includes two such LCDs, which are:
The Proteus library zip file download link is as follows:
Download New LCD Library for Proteus
9) Ultrasonic Sensor Library for Proteus
Ultrasonic Sensors are used for obstacle avoidance and hurdle detection. Ultrasonic sensors are used in almost every robotics project and are very easy to interface with Arduino or PIC Microcontroller. We have designed this Ultrasonic Sensor Library for Proteus using which you can easily simulate this Ultrasonic sensor in Proteus and can also interface it with Arduino boards.
I have also posted examples that will help you in understanding of how to use these ultrasonic sensors in Proteus. I have posted three different examples as well, which will are dealing with different scenarios in which these ultrasonic sensors can work. I hope you guys are gonna enjoy them. You can download this ultrasonic sensor library for Proteus by clicking the below button:
Download Ultrasonic Sensor Library for Proteus
Note:
10) PIR Sensor Library for Proteus
PIR Sensors are used for motion detection. They work on thermal detection, they detect human heat and then detect the presence of the human body in the surroundings. They are used for security purposes and are mostly installed in projects like Home Security Systems, Bank Security Systems etc.
As we can't detect the real motion in Proteus ISIS so that's why I have placed a TestPin in this PIR Sensor. When you give +5V to this pin, the sensor will act as its detecting motion and when it's ground(0V), it will act as no motion detected. We have designed its Proteus Library and the proteus library zip file download link is as follows:
Download PIR Sensor Library for Proteus
11) Gas Sensor Library for Proteus
Gas Sensors are used for Gas Leakage Detection. It's an essential sensor for most industries because Gas Leakages in industry cause fatal incidents. So using these Gas Sensors one can easily detect the Gas Leakage. We have designed their Proteus Library using which you can easily simulate these Gas Sensors in Proteus. This Gas Sensor Library includes the following Gas Sensors:
- MQ - 2
- MQ - 3
- MQ - 4
- MQ - 5
- MQ - 6
- MQ - 7
- MQ - 8
- MQ - 9
The Proteus library zip file download link is as follows:
Download Gas Sensor Library for Proteus
12) Flame Sensor Library for Proteus
Flame Sensors are used for Fire Detection and are normally used for Security purposes. Flame Sensors are best for Fire Detection. So, you must get an idea about its importance. They are used in almost all kinds of projects where fire security is required.
As we can't actually produce Fire in the Proteus environment that's why I have placed a TestPin which will be used for the detection of Fire. If this TestPin is HIGH then it means there's fire and if it's LOW then it means there's no fire around the sensor. You can download Proteus Library for Flame Sensor by clicking the below button:
Download Flame Sensor Library for Proteus
13) Vibration Sensor Library for Proteus
Vibration Sensors are used for vibration detection. They are mostly used in those projects where vibration detection is necessary like we can use it for security purposes and can place them on doors and windows. So if someone tried to break the doors or windows then the vibrations will be detected by this sensor and a buzzer can trigger.
Moreover, you can also place them on heavy machinery to detect whether there are vibrations in those machines or not. I have also used this sensor in my project GSM-based Home Security System. You can download this Vibration Sensor Library for Proteus by clicking the below button:
Download Vibration Sensor Library for Proteus
14) Flex Sensor Library for Proteus
Flex Sensors are actually used for detecting the bending angle. So, its normally used in projects where you need to detect the fingers bending. For example, I once designed a project in which I have to use sign language and then convert it into words, so in that project, I used Flex Sensors on all of my fingers & thumb and then by detecting the bending, I converted the sign language to text.
So, I have designed the Flex Sensor Library for Proteus and I hope you are gonna enjoy it and are gonna use it in your projects. You can download this Proteus Library by clicking the below button:
Download Flex Sensor Library for Proteus
15) L298 Motor Driver Library for Proteus
L298 Motor Driver is used for controlling the speed and direction of different Motors. We can use it to control DC Motors as well as Stepper Motors. It's quite widely used in Engineering Projects and has an L298 module in it.
Proteus doesn't contain L298 Motor Driver in it so, our team has designed it in Proteus and it's now ready to simulate in it. You can download this L298 Motor Driver Library for Proteus by clicking the below button:
Download L298 Motor Driver Library for Proteus
16) Heart Beat Sensor Library for Proteus
Heart Beat Sensor is used to count the Heart Beat of a human being. You need to place your finger on this sensor and then it detects your beating and you can count this beating via Arduino or any other Microcontroller.
Heart Beat Sensor is not available in Proteus and we have designed two versions of Heart Beat Sensor. The first version has just a single heartbeat pattern, while the second version has multiple heartbeat samples in it. You can download them by clicking the below buttons:
Download Heart Beat Sensor Library for Proteus
Download Heart Beat Sensor Library V2.0 for Proteus
17) C945 Library for Proteus
C945 is an NPN transistor used in many engineering projects. Its main purpose is to use as an automatic switch or in some cases, it is also used for generating a PWM pulse. C945 is not available in the Proteus Components list. Our team has designed this transistor and you can download it by clicking the below button:
Download C945 Library for Proteus
18) Infrared Sensor Library for Proteus
An infrared Sensor is used for the detection of obstacles in the path. It uses infrared waves which are transmitted from the transmitter and are received by the receiver of this sensor, which tells us whether we have some obstacle or not. It is normally used for security purposes but also has a wide application in robotics.
Download Infrared Sensor Library for Proteus
19) Solar Panel Library for Proteus
The solar panel is a new and free renewable energy source, and it is widely used today because it only uses solar energy and converts it to electrical energy. It is used a lot in final year and semester projects where teachers force to use solar panels instead of common sources.
Proteus doesn't have solar panels in its database that's why we have designed this new library and using it you can now easily simulate Solar panels in Proteus. Click the below button to download this Library.
Download Solar Panel Library for Proteus
20) Magnetic Reed Switch Library for Proteus
Magnetic Reed Switch is used to detect the magnetic field in the surroundings. It is normally used in electromagnetic projects where magnetic field intensity etc is required.
Proteus doesn't have this sensor in its database that's why we have designed it. You can download it by clicking the below button:
Download Magnetic Reed Switch Library for Proteus
21) Rain Sensor Library for Proteus
Rain Sensor, as the name suggests, is used for rain detection. It's normally used in home automation or security projects.
Proteus lacks this sensor so we have designed its library so that you can easily create your projects' simulation. You can download this sensor by clicking the below button:
Download Rain Sensor Library for Proteus
Conclusion
I have posted 16 New Proteus Libraries above and I hope you guys are gonna like them and will use them in your engineering projects. Our team will keep on designing more New Proteus Libraries for engineering students and I will keep them posted here so stay tuned with this post so that you remain aware of New Proteus Libraries.
So, that's all for today. Will see you guys in the next tutorial. Till then take care and have fun !!! :)
Receive SMS with Sim900 & PIC
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a new project which is Receive SMS with Sim900 & PIC Microcontroller using AT Commands. I have already posted this same project on Arduino named as Receive SMS with AT Commands using Sim900 & Arduino. In that project, I have interfaced SIM900 module with Arduino but today I am gonna interface it with PIC Microcontroller.
I have also designed a GSM Library for Proteus using which you can easily now simulate your SIM900D module in Proteus. Sim900 Module is used to send and receive SMS and it is widely used in automation and security projects. I have also posted another Project in which I have designed the Proteus simulation of GSM based Home Security System. I have already posted the Send SMS with PIC Microcontroller & SIM900 project in which we have seen How to send SMS from your GSM module to your mobile phone but today we will send SMS from our mobile phone and then will receive this SMS on the SIM900 module and will perform certain action. Forexample you want to turn your Light ON using GSM then what you need to do is to send SMS from your mobile to SIM900 module and when it receives the message, it will do the required task. Moreover if you are working on Sending SMS instead of receiving then you should have a look at How to Send SMS with PIC Microcontroller & SIM900d and if this sending is via Arduino board then there's How to Send SMS with Arduino and Sim900.
I have used PIC18F452 for this project but you can use this code for any PIC Microcontroller but it has to support the serial port. Moreover, I have used MikroC Pro for PIC Compiler to design code for receive SMS with AT commands using SIM900 & PIC Microcontroller. So, let's have a look at How to Receive SMS with Sim900 & PIC Microcontroller using AT command.
Receive SMS with Sim900 & PIC Microcontroller
- SIM900 module works on Serial Protocol. If you don't know much about Serial Port then you should read What is Serial Port?
- In serial Port we have two pins for communication, one is named as TX (transmitting) and other as RX (receiving).
- In order to Receive SMS with Sim900 & PIC Microcontroller using AT command, connections are exactly the same as we did in Send SMS with PIC Microcontroller & SIM900.
- The SIM900 module I have used for receiving SMS is shown in the below figure:
- If you have a different GSM module then there's no need to get panicked because most of the GSM modules work on Serial protocol so what you need to do is to simply find the TX and RX pins of your SIM900 module.
- As you can see inthe above SIM900 image that it has TX and RX Pins so you all need to find these pins on your SIM900 module and then connect them with RX and TX pin of your PIC Microcontroller.
- RX pin of Sim900 into Pin # 25 (TX) of PIC Microcontroller.
- TX pin of Sim900 into Pin # 26 (RX) of PIC Microcontroller.
- Moreover, you will also need to common the GND of SIM900 and PIC Microcontroller, if you are using separate power supplies for PIC Microcontroller and SIM900.
- One more thing you will also need the basic circuit of PIC Microcontroller, which is as follows:
- Here's my design for How to Receive SMS with Sim900 & PIC Microcontroller using AT command on Vero Board:
- The above hardware design on Vero Board is exactly the same and I have done the connections of my SIM900 module with PIC Microcontrolelr on the back side.
Note:
- The TX Pin of PIC Microcontroller will be connected with RX Pin of GSM Module.
- The RX Pin of PIC Microcontroller will be connected with TX Pin of GSM Module.
- GND of both GSM and PIC Microcontroller must be common.
- Now upload the hex file of the below code in your PIC Microcontroller so that we can Receive SMS with Sim900 & PIC Microcontroller using AT command.
char IncData;
int x = 0;
char RcvdMsg[60] = "";
int RcvdCheck = 0;
int RcvdConf = 0;
int index = 0;
int RcvdEnd = 0;
char MsgMob[15];
char MsgTxt[10];
int MsgLength = 0;
void RecSMS();
void ClearBuffers();
void Config();
void main() {
TRISC.F7 = 1;
UART1_Init(9600); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize
Config();
while(1)
{
RecSMS();
}
}
void RecSMS() // Receiving the SMS and extracting the Sender Mobile number & Message Text
{
if (UART1_Data_Ready())
{
IncData = UART1_Read();
//UART1_Write_Text(IncData);
if(IncData == '+'){RcvdCheck = 1;}
if((IncData == 'C') && (RcvdCheck == 1)){RcvdCheck = 2;}
if((IncData == 'M') && (RcvdCheck == 2)){RcvdCheck = 3;}
if((IncData == 'T') && (RcvdCheck == 3)){RcvdCheck = 4;}
if(RcvdCheck == 4){index = 0;RcvdConf = 1; RcvdCheck = 0;}
if(RcvdConf == 1)
{
if(IncData == 'n'){RcvdEnd++;}
if(RcvdEnd == 3){RcvdEnd = 0;}
RcvdMsg[index] = IncData;
index++;
if(RcvdEnd == 2){RcvdConf = 0;MsgLength = index-2;index = 0;}
if(RcvdConf == 0)
{
//PortD.F3 = 1;
//UART1_Write_Text("Mobile Number is: ");
for(x = 4;x < 17;x++)
{
MsgMob[x-4] = RcvdMsg[x];
//UART1_Write(MsgMob[x-4]);
}
// UART1_Write_Text("Message Text: ");
for(x = 46;x < MsgLength;x++)
{
MsgTxt[x-46] = RcvdMsg[x];
//UART1_Write(MsgTxt[x-46]);
}
if(MsgTxt[0] == 'A'){ PortD.F0 = 1;}//L1ON();}
if(MsgTxt[0] == 'B'){ PortD.F0 = 0;}//L1OF();}
if(MsgTxt[0] == 'C'){ PortD.F1 = 1;}//L2ON();}
if(MsgTxt[0] == 'D'){ PortD.F1 = 0;}//L2OF();}
if(MsgTxt[0] == 'E'){ PortD.F2 = 1;}//L3ON();}
if(MsgTxt[0] == 'F'){ PortD.F2 = 0;}//L3OF();}
if(MsgTxt[0] == 'G'){ PortD.F3 = 1;}//L4ON();}
if(MsgTxt[0] == 'H'){ PortD.F3 = 0;}//L4OF();}
ClearBuffers();
}
}
}
}
void ClearBuffers()
{
strcpy(RcvdMsg,"");
RcvdCheck = 0;
RcvdConf = 0;
index = 0;
RcvdEnd = 0;
strcpy(MsgMob,"");
strcpy(MsgTxt,"");
MsgLength = 0;
}
void Config()
{
   Delay_ms(2000);
   UART1_Write_Text("ATE0rn");
   Delay_ms(1000);
   UART1_Write_Text("ATrn");
   Delay_ms(1000);
   UART1_Write_Text("AT+CMGF=1rn");
   Delay_ms(1000);
   UART1_Write_Text("AT+CNMI=1,2,0,0,0rn");
   Delay_ms(1000);
}
- The above code is quite self explanatory but let's have a quick explanation of this code for How to Receive SMS with Sim900 & PIC Microcontroller using AT command.
Code Explanation
- This code is designed in MikroC Pro For PIC Compiler and its written for PIC18F4520 but you can use it with any PIC Microcontroller which supports Serial Port.
- I have shown the working of the code in a block diagram in below figure:
- In this code I am using three functions other than the main function, named as:
- Config();
- RecSMS();
- ClearBuffers();
- First of all, I have used the Config() function, which is doing the Configuration settings of our GSM Module.
- In these configurations, I am making the Echo OFF and also converting my GSM modem to text messages.
- In the RecSMS() function, I am checking for +CMT, once its received then I have extracted the SMS body and the mobile number from it.
- In the ClearBuffers() function, I am clearing all the variables so that we can receive the next SMS.
So, that's all for today. I hope you guys are gonna enjoy this project How to Receive SMS with Sim900 & PIC Microcontroller using AT command. So, will meet you guys in the next tutorial. Till then take care and have fun !!! :)
GSM Based Home Security System
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a complete project named as GSM Based Home Security System. I have designed its complete working simulation in Proteus and have used different libraries which you can also download from our blog. In the previous post, I have posted Home Automation Project using XBee & Arduino and today we are gonna work on Home Security System.
We have designed this simulation after a lot of efforts that's why we have placed a very small amount of $50 on it so that engineering students can download it and get knowledge from it. Moreover, as its a complex project so when you buy it then there's a chance that you can't run it by yourself so we also offer a free service. If you got into any trouble while running this simulation then use our Contact Form we will help you out personally within 24 hours.
GSM based Home Security System
- You can buy this complete project by clicking the below button:
Buy This Project
- When you will click the above button, you will be taken to the sale page for this project and you can buy this project using PayPal.
- When you buy it you will get the complete code along with working Proteus simulation.
- So, let's have an overview of this GSM Based Home Security System.
- This GSM based Home Security System contains seven sensors which will be installed theoretically in your home. :)
- These seven sensors are:
- PIR Sensor: For Motion Detection.
- Smoke Sensor: For Smoke Detection.
- Flame Sensor: For Fire Detection.
- Vibration Sensor for Window: For Detection of vibrations on Window.
- Vibration Sensor for Door: For Detection of vibrations on Door.
- Ultrasonic Sensor for Window: For intruder Detection on Window.
- Ultrasonic Sensor for Door: For intruder Detection on Door.
- When we are talking about security then we have to take care of door and windows.
- That's why I have placed two sensors on each of them. If someone tries to break the window then the vibration sensor will sense it and if someone tries to open the window then ultrasonic sensor will detect it.
- The same will happen for the door.
- So, whenever any of these seven sensors will get activated then the buzzer will go on and at the same time the user will receive a warning message.
- Moreover, I have also placed an LCD which will display the sensors' condition.
- Here's the Proteus Simulation for this GSM based Home Security System:
- You can see in the above figure that I have used all these seven sensors mentioned above.
- Moreover, I have used the GSM module, you can read more about it on GSM Library for Proteus.
- Moreover, we have the Power circuit and the Buzzer Driver Circuit at the bottom.
- Arduino UNO acting as the brain of this GSM Based Home Security System.
- Now, let's run this simulation and if everything goes fine then you will get something as shown in below figure:
- First of all, the system will configure the GSM module and then it will display two screens on LCD side by side.
- First LCD screen is shown in below figure:
- The first screen will show the status of first three sensors.
- Now here's the screenshot of second screen showing the status for next four sensors:
- That's how this project is working, now when any of these sensors got HIGH then buzzer will go ON and a message will be sent to the given number:
- Now, you can see when I click the Smoke Sensor HIGH, it got detected immediately and a warning message is sent to my number.
- I have explained this GSM based Home Security System in detail in the below video:
So, that's all for today. I hope you guys have enjoyed this awesome project. Before buying it, you must read it completely and also watch the video so that you are sure about what you are buying.
Vibration Sensor Library for Proteus
Update: We have created a new version of this library, which you can check here:
Vibration Sensor Library for Proteus V2.0.
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a new Proteus Library named Vibration Sensor Library for Proteus. This Library is designed by our team on TEP and it's not yet published anywhere. We are the first creator of this Vibration Sensor Library for Proteus. This Library contains just one Vibration Sensor named SW-420. I will post a tutorial soon on interfacing this SW-420 Vibration Sensor with Arduino. This library is compatible with all the microcontrollers like Arduino, PIC Microcontroller or 8051 Microcontroller etc. You should also have a look at Analog Vibration Sensor Library for Proteus.
Using this Library you can now easily Simulate your Vibration Sensor in Proteus ISIS software. As we can't produce real vibration in the Proteus environment so that's why I have placed a TestPin in this Vibration sensor. If you send 0 at this TestPin then it means no vibration and if you sent 1 then it means we have some vibration. The Library is given below for download along with a simple simulation of this vibration sensor. So, let's get started with Vibration Sensor Library for Proteus:
Note: Other
Proteus Libraries are as follows:
Vibration Sensor Library for Proteus
- First of all, download the Library Files for Vibration Sensor Library for Proteus by clicking the below button:
Vibration Sensor Library for Proteus
- When you download the file then it will contain three files named as:
- VibrationSensorTEP.IDX
- VibrationSensorTEP.LIB
- VibrationSensorTEP.HEX
- Place all these three files in the Library folder of Proteus software.
Note:
- Now restart your Proteus software if it's already open.
- In the components search box, you have to search for Vibration Sensor, and you will get Vibration Sensor SW-420.
- Now place it on your Proteus workspace and it will look something as shown in the below figure:
- You can see in the above figure that our sensor has four pins, which are:
- The first one is Vcc so apply +5V here.
- The second Pin is GND so apply ground here.
- The third Pin is OUT, it's the output pin from where you get whether there's vibration or not.
- The fourth Pin is TestPin and if it's HIGH then it means you have vibration and the OUT PIn will go HIGH and if it's LOW then it means there's no vibration and OUT Pin will also be LOW.
- Now the last thing you need to do is to double click this sensor to open its Properties.
- In the properties, you will find a Program File, in this section browse to your file VibrationSensorTEP.HEX which we just downloaded and placed in the Library folder of Proteus software.
- Once uploaded now you can use your Vibration Sensor in Proteus, the hex file is adding the functionality in this Vibration Sensor.
- Now let's design a simple example to get an idea of how this sensor works.
- So, in order to do that, design a simple circuit as shown in the below figure:
- Now run your simulation, when you make TestPIN LOW, the sensor won't give any output and when you make TestPIn HIGH, the sensor will give an output, which means vibration is detected as shown in the below figure:
- The above image is quite self-explanatory. :P
- The below video will give you a better idea of how it works:
That's all for today. I hope you will enjoy this Vibration Sensor Library for Proteus. I have just added one module right now but I am gonna add more soon. You should also have a look at these New Proteus Libraries for Embedded Systems Projects. Take care !!! :)
Home Automation Project using XBee & Arduino
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a new Home Automation Project using XBee & Arduino. Home Automation Project is a most commonly designed project by the engineering students. So, that's why I have thought to create a complete Home Automation Project so that engineering students can get benefit out of it.
We all know about automation which is originated from automate or automatic. In automation the task is done automatically and you don't need to control it. In normal Home automation project, there are few sensors which are displayed wirelessly to user and there are few controls like user can ON or OFF Lights, Fans etc via remote or mobile App.
In this Project, I have used Arduino UNO board and I have designed its complete working simulation in Proteus software, so that users got sure that its working perfectly. Because we have to work a lot in designing this complete working simulation of home Automation Project that's why its not free but you can buy it for a small price of $50. In this price, you will get the compelte Arduino code along with the working Proteus Simulation. But before buying this project, must have a look at the details below so that you are sure what you are buying. So, let's get started with Home Automation Project using XBee & Arduino.
Home Automation Project using XBee & Arduino
- You can buy the complete working Proteus Simulation along with the Arduino Programming Code by clicking the below button.
- You can pay via Paypal and the download link will be instantly available to you and if you don't have the PayPal account then use our Contact Us Form and we will find some other way for you.
Buy This Project
1: Overview
- First of all, let's have an overview of this Home Automation Project.
- In this Project, I have designed two simulations, one simulation is for Remote using which we are gonna control our appliances and the second simulation is for the controlling of these appliances.
- So, when you press buttons from your remote section, a wireless command will be sent to the control board and it will turn ON or OFF the respective load.
- Moreover, there's an LCD on the Remote on which you will also check the values of the sensors.
- So, in simple words, the remote will be in your hand and using this remote you can easily turn ON or OFF your appliances and can also check the status of your different sensors wirelessly.
- Let's first have a look at the remote section:
Remote Control:
- In Remote Control Section, I have used the below main modules:
- Arduino UNO: Microcontroller Board.
- KeyPad: Commands will be sent by clicking this Keypad's buttons.
- LCD (20 x 4): For Displaying Sensor's Data & Commands.
- XBee Module: It's an RF Module used for sending wireless commands.
- Now when you click any button on your Keypad, a command is sent from Arduino to XBee Module and the XBee module then forwards that command to other XBee on the Control Unit.
- Moreover, when the Control Unit sends the Sensors' data on xbee then Arduino receives that data and then displayed that data on LCD.
- Here's the block diagram of Remote control section which will give you a better idea of its working:
- Here's the Proteus Diagram of our Remote Section:
- In the above Proteus Simulation of Remote Control, you can see that we have Arduino UNO board which is connected with LCD, KeyPad and XBee Module.
- Working of this Remote section will be discussed in the later section.
- Now let's have a look at the Control Unit Side of Home Automation Project.
Note:You must also have a look at below tutorials because I have interfaced these modules separately with Arduino as well:
Control Unit:
- In the previous section, we had an overview of the Remote section, now let's have a look at the Control Unit.
- The Control Unit is the Unit which is being controlled by the Remote Control.
- The Main components of Control Unit are:
- Arduino UNO: Microcontroller Board.
- Relays: Used to control the appliances. I have added eight relays so you can control eight appliances.
- Lamps: Indicating the Bulbs.
- DC Motors: Indicating the Fans.
- Smoke Sensor: Used to detect the Smoke.
- Flame Sensor: Used for Fire detection.
- DS18B20: Used to measure atmospheric temperature.
Note:
- On this Control unit, the Arduino UNO is getting the data from the smoke sensors and then sending this data via XBee to Remote Control.
- We have seen in the previous section that this data is then displayed over LCD.
- Moreover, when any button is pressed from the Remote Control, the command is received by this Arduino via XBee.
- On receiving this command, Arduino UNO then turns ON or OFF the respective relay which in turn ON or OFF the respective appliance.
- Here's the block diagram of this control unit:
- You can see in the above block diagram that I have connected three sensors with Arduino and Arduino is receving their values and then sending these values to the remote control via XBee.
- Moreover Relays are also connected to Arduino and then loads are further connected to these Relays.
- So, Arduino is controlling these Relays which in turn are controlling the loads.
- I have used eight relays and hence eight loads.
- The Loads I have used are all DC loads because Proteus doesn't have AC active loads in it but you can place AC loads as well.
- Here's the Proteus Simulation of Control Unit:
- You can see all the modules are present in it.
- Eight relays are present on the right side and their outputs are going into the loads.
- I have used four lamps and four DC Motors.
- Now let's have a look at their operation.
Note:You should also have a look at below tutorials in which I have interfaced these sensors separately with Arduino:
2: Operation
- I have already mentioned their operation in above section so I am not gonna discuss it in detail.
- But let's have a little talk about their operation.
- First I am gonna discuss the operation of Remote Control:
Remote Control:
- The remote Control has an XBee module which is used for wireless communication.
- The Keypad has buttons on it so now when you press button "1" on the keypad then the Signal is sent via XBee to Control Unit.
- The control unit will automatically turn on the first load when it will receive the command from button "1" of Remote Control.
- When you press "1" for the first time then the first load will turn ON but when you press button "1" again then the first load will go off.
- So, its like if you want to turn it ON then press it and if you want to turn it OFF then press again. (Quite simple :P)
- As there are eigth loads, so button "1" to "8" are working for loads "1" to "8" respectively.
- Moreover, when sensor's data come from control unit then it is updated in the LCD of Remote Control.
- Now let's have a look at the operation of Control Unit:
Control Unit:
- As the Control Unit is concerned, it keeps on waiting for the command from remote and whenever a command is received from the Remote Control, it turns ON or OFF the respective load.
- Moreover, it also sends the data of sensors continuously to the Remote Control.
- For this wireless communication, XBee is used here.
3: Working
- This is the last section of this project where will will have a look at the working of the project.
- I haven't divided this section in parts instead I have create a video which will explain the working in detail.
- Here's the First look of Remote section image while working:
- Now when the Sensor's data come from the remote Section then it will be displayed in the LCD as shown in below figure:
- You can see in the above figure that both sensors are detecting and the temperature is also displayed in the LCD.
- Now the complete working of this project is shown in the below video which will give you complete idea of this project:
Note:
- If you buy this project and you are unable to run it properly then we will provide you free service and will make it work on your laptop perfectly. :)
So, that's all for today. I hope you have liked this Home Automation Project and are gonna buy this one. But again before buying it must read this tutorial and also watch the video so that you get complete understanding of this project.
Interfacing of Flame Sensor with Arduino
Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a new tutorial which is Interfacing of Flame Sensor with Arduino. I have recently posted a tutorial in which I have shared the Flame Sensor Library for Proteus. Now in this tutorial, I am gonna use that Flame Sensor Library and will interface this Flame Sensor with Arduino. So, if you haven't downloaded this file then I suggest you to download this Flame Sensor Library so that you can easily simulate this flame Sensor in Proteus.
I am sharing interfacing of this Flame Sensor with Arduino today, but soon I will also post a tutorial on Interfacing of Flame Sensor with PIC Microcontroller. If you guys have any questions then ask in comments. I have also given the Simulation file and the Programming code below to download. But I would recommend you to design this proejct on your own so that you make mistakes and then learn from them. So, let's get started with Interfacing of Flame Sensor with Arduino:
Interfacing of Flame Sensor with Arduino
- You can download the complete Proteus Simulation along with Arduino programming code from the below button:
Download the Simulation
- Now design a small Arduino code as given below:
#include <LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
int Flame = 7;
void setup() {
Serial.begin(9600);
pinMode(Flame, INPUT_PULLUP);
lcd.begin(20, 4);
lcd.setCursor(0,0);
lcd.print("Flame : ");
lcd.setCursor(1,2);
lcd.print("www.TheEngineering");
lcd.setCursor(4,3);
lcd.print("Projects.com");
}
void loop() {
if(digitalRead(Flame) == HIGH){lcd.setCursor(8,0);lcd.print("Detected ");}
if(digitalRead(Flame) == LOW ){lcd.setCursor(8,0);lcd.print("Not Detected");}
}
- Add this code in your Arduino software and compile it to get the Hex File from Arduino Software.
- Upload this hex file in your simulation and then run your simulation and if everything goes fine then you will get something as shown in below figure:
- In the above figure, you can see the sensor is off that's why in the LCD its written that no smoke detected.
- Now, let's bring some Flame by clicking the Logic State on Flame Sensor and you will see the below results:
- Now you can see in the above figure that when the Flame is detected then the LCD indicated that Flame has detected.
- That's how we can easily simulate the Flame Sensor with Arduino.
- I have explained this project in detail in the below video:
That's all for today. I hope you have enjoyed this project and now you can easily interface your Flame Sensor with Arduino in Proteus ISIS.