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: