How to interface MQ-2 Gas Sensor with Arduino Uno (with Code and Library)

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

Комментарии •

  • @shramiksalgaonkar8635
    @shramiksalgaonkar8635 3 года назад +13

    One of the most detailed video on youtube. Great work sir...

  • @denzilpillay7986
    @denzilpillay7986 3 года назад +3

    I am using this video as part of my project and when you listed all the materials I bought them , you mentioned that we should but Male to Female but went on to use Male to Male.

    • @rolanpereira7643
      @rolanpereira7643 3 года назад

      Female to male is preferably. But a jumper cable set is what is mentioned in the video.

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  3 года назад

      Jumper cable set is listed in the components.
      Please use the links below.
      If you have existing jumper cables then male to female are preferred as they would replace the use of even a breadboard.

  • @satishmohitsatish1730
    @satishmohitsatish1730 2 года назад +4

    Sir how to connect alarm in this project if lpg or another harmful gas leakage happened

  • @bhaskarg8438
    @bhaskarg8438 2 года назад +16

    Better if you also explain the code logic with respective to the components assembled to Arduino, Thank you

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад +1

      I have started doing this in my newer videos. Considering your suggestion.

  • @ayushtiwari46
    @ayushtiwari46 2 года назад +3

    Bro I want to add gsm module in it also how may I do that
    ????????........plz reply

  • @akshaypatil8467
    @akshaypatil8467 Год назад +2

    Can we used multiple gas detector sensor

  • @shashanktg08
    @shashanktg08 2 года назад +1

    i did the same way as shown it turned on as it was to be but there is no reading on the lcd what is the problem

  • @trinican2
    @trinican2 3 года назад +5

    I enjoyed your tutorial but I have two questions. 1. Does the MQ2 library automatically includes the calibration in gas type and ppm ? 2. I would like to do the same with an MQ9 to measure natural gas in ppm. Is there an equivalent MQ9 library and would the command syntax be the same ? Thanks very much.

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  3 года назад

      1.The library of MQ2 includes the calibration for all the gases MQ2 sensor can detect.
      2. github.com/mdsiraj1992/Gassensors visit this link and access all the libraries for MQ gas sensors.
      Thank you!

  • @arunkarthik2961
    @arunkarthik2961 Месяц назад +1

    nandri nanbare 🥺🙏🙏

  • @Arman-v9f4i
    @Arman-v9f4i 3 года назад +2

    Broh! At 3:25 uh said to connect A0 to Analog Pin 0 on Arduino, but uh connected GND to A0 .Can uh plzz tell me which is correct??

    • @rolanpereira7643
      @rolanpereira7643 3 года назад +1

      Connect A0 to Analog Pin 0 on Arduino, that's correct.

    • @rolanpereira7643
      @rolanpereira7643 3 года назад +1

      Don't go by the wire colors. They are a little similar. And i see why you are confused.

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  3 года назад +2

      Please see that A0 on the MQ will be connected to A0 pin on the Arduino. Don't refer the wire colors. See the circuit diagrams. Bingo.

    • @Arman-v9f4i
      @Arman-v9f4i 3 года назад +1

      @@ElectronicsSimplified7 Ok broh.. Thanks for helping. Im confused by colours.

    • @Arman-v9f4i
      @Arman-v9f4i 3 года назад +1

      @@rolanpereira7643 Thanks broh!

  • @2JSinc
    @2JSinc Год назад +2

    Thanks for this, would it be possible for you to add a LPG tank weight monitoring with low level alert, thanks

  • @nsagrawal5444
    @nsagrawal5444 Год назад +1

    Can you siplyfy the wire connection

  • @prashadnaik1208
    @prashadnaik1208 3 года назад +4

    Well explained Sir

  • @johnpatrickabsalon2221
    @johnpatrickabsalon2221 Год назад +1

    what type of Arduino is this? can i use arduino uno r3 DIP?

  • @muhammadnawzad1680
    @muhammadnawzad1680 10 месяцев назад

    Hi i have some question
    1- for the measurement how to calibrate it ?
    2- what is the range that read for LPG in PPM ? Maximum & Minimum?

  • @dr.mithilfaldesai3561
    @dr.mithilfaldesai3561 2 года назад +2

    What is the output unit from A0? resistance in milliohms? current in mA?

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад +1

      It's neither. It will always be voltage levels. That would be ranging from 0V to Vcc (in this case its 0V to 5V)

  • @AnshumanAtrey
    @AnshumanAtrey 2 года назад +2

    will it work directly with a laptop and no battery?
    my LCD only shows blue light
    I am using 400 point breadboard
    The I2C module is already connected to LCD
    please help sir

    • @bhuvaneswarporandla
      @bhuvaneswarporandla 6 часов назад

      If lcd only shows blue screen that means potentiometer in l2C module is low

    • @bhuvaneswarporandla
      @bhuvaneswarporandla 6 часов назад

      Try changing it
      I think this reply is bit late 😅

  • @sriyakanuri4453
    @sriyakanuri4453 11 месяцев назад +1

    Hi, i've the lcd but do not have the i2c coverter, so how do i interface it?

    • @sriyakanuri4453
      @sriyakanuri4453 11 месяцев назад

      Can I still use an lcd shield instead?

  • @awiawi117
    @awiawi117 Год назад

    i didn t understand the last step in in 9:18 how do it?

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад

      You can just upload the code. By selecting your board.

    • @awiawi117
      @awiawi117 Год назад

      @@ElectronicsSimplified7 what board sorry i am a beginner can you explain a bit more i did everything like the vid i am just stuck at the last part and i need it for tomrow

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад

      You can check some basic videos on how to upload code to Arduino Uno.

  • @carson5702
    @carson5702 3 года назад +1

    loved the vid but where can you find the MQ2 sensor library normally because I can't find it.

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  3 года назад

      www.amazon.com/Butane-Hydrogen-Sensor-Detector-Module/dp/B0786DH3BW/ref=mp_s_a_1_2?keywords=mq2%2Bsensor&qid=1638064300&sr=8-2&th=1&psc=1

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад

      github.com/rolan37/MQ-2-Sensor-Interfaced-with-Arduino

  • @manojmodapalli1635
    @manojmodapalli1635 Год назад +1

    sir i did the same connection shown in the viedo , lcd display was working but it didnt show the detection percentage as shown in the viedo how can i fix this problem , thank you

  • @nauvalalzidane8235
    @nauvalalzidane8235 2 месяца назад +1

    can it detect motorcycle/car exhaust gas? can i put it outside?

  • @khessclarksereno6327
    @khessclarksereno6327 Год назад

    Is it possible to measure the level of methane gas only in the mq2 library?

  • @RitheshMoolya
    @RitheshMoolya 2 года назад +1

    I need ammonia sensor with display...

  • @erasaniswaroopkumar9124
    @erasaniswaroopkumar9124 Год назад

    can u explain the mq7,and mq8 gas sensors interface with arduino uno output data displays in 20*4 display with code

  • @kagisopilane1000
    @kagisopilane1000 Год назад

    Hi, this is great. My LCd displays lpg: 0 CO:0 Smoke: 0%. Is the problem with the calibration maybe

  • @TheIQ127
    @TheIQ127 Год назад +1

    can you please give me the vision of liquidi2c library please

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад

      www.electronicssimplified.in/wp-content/uploads/2023/06/LiquidCrystal_I2C.zip

  • @MuhammadSyamil-me8vw
    @MuhammadSyamil-me8vw 8 месяцев назад

    bro in the library there is only lpg,co,and smoke, how do i detect the ch4 then?

  • @gourabhaldar6627
    @gourabhaldar6627 Год назад +1

    If I use MQ135 instead of MQ2 will the code change?

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад

      Yes it will change

    • @gourabhaldar6627
      @gourabhaldar6627 Год назад

      @@ElectronicsSimplified7 ok sir, thanks for the reply. Actually I'm doing this with MQ135 sensor. So can you please tell what changes I need to do in order to run this successfully.
      Thanks in advance.

  • @NBAK-jx5ud
    @NBAK-jx5ud 3 года назад +1

    where's the link for the LCD not display.

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  3 года назад

      ruclips.net/video/UezoCbBSavQ/видео.html

    • @NBAK-jx5ud
      @NBAK-jx5ud 3 года назад +1

      oh wow! very responsive thank you!. hoping you gain million of subscribers! ❤️

  • @kushals2538
    @kushals2538 9 месяцев назад

    i have given the correct commands and connections but the lcd is not powering up

  • @AmanKumar-es4wp
    @AmanKumar-es4wp 2 года назад +1

    Sir I have urgent need of this program

  • @AswiniS-t1q
    @AswiniS-t1q Год назад +1

    Why it is taking too long to upload the program into Arduino Uno?

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад

      Sometimes the compilation can take longer than expected. It's completely normal.

  • @razzheenshyrickadelacruz5233
    @razzheenshyrickadelacruz5233 2 года назад +4

    I tried doing this project. However, the smoke cannot be detected. The value displayed for smoke is at 0% only. Only the values of LPG and CO are read. How can I fix this?

    • @thatwasparticia6671
      @thatwasparticia6671 Год назад

      Help, what did you do

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад +1

      You probably have changed the code and failed to display it.

    • @bryanlanchimba4740
      @bryanlanchimba4740 Год назад

      ​@@thatwasparticia6671 I think it is because we transformed the smoke reading into a percentage. The value is very small and could not be read. I removed this 100/1000000 part and started reading the smoke.

  • @azuraaishah61
    @azuraaishah61 5 месяцев назад

    lcd.print((smoke*100)/1000000);
    what is the purpose of this formula?

  • @157vaibhavibhalerao5
    @157vaibhavibhalerao5 Год назад +1

    overall price ?

  • @sanjaykhatri6093
    @sanjaykhatri6093 6 месяцев назад

    My code is loaded sucessfully but all the values are showing 0 then what to does we have to wait for 5 minutes for heating and even after bringing the smoke near the mq2 sensor there is no reading on LCD

  • @joycechong8907
    @joycechong8907 2 года назад +1

    Well explanation!! Nice!
    I have a little question. Since most of the tutorials are used to test for smoke and gas, is that possible to test the human breathing? Thanks!

  • @ujjwalsinha7385
    @ujjwalsinha7385 Год назад

    the output is not displayed on the LCD
    what to do?

  • @boraicho6276
    @boraicho6276 2 года назад

    Does this sensor (MQ-2) detect Carbon Dioxide concentration ? I only see Carbon Monoxide reading in the video.

  • @nandagustiawan6237
    @nandagustiawan6237 2 года назад +1

    please library MQ4

  • @deadlyvenom5804
    @deadlyvenom5804 Год назад +1

    Dude smoke ppml is not calculating any solution??

    • @dilj1439
      @dilj1439 11 месяцев назад

      Where is the code .?.???

  • @mariyamansari5526
    @mariyamansari5526 Год назад +1

    Sir i am getting the output on serial monitor but not on LCD

  • @karthik3889
    @karthik3889 Год назад +1

    Please give mq 4 library

  • @NotGreig
    @NotGreig Год назад

    hello sir, i am receiving a compiling error with my lcd screen. It say's no matching function

  • @T-he_End
    @T-he_End Год назад

    lcd.begin();//Defining 16 columns and 2 rows of lcd display . Bro in this line i am getting error. Pls help me .its an emergency pls . I have school project

  • @rafaelbendigo6270
    @rafaelbendigo6270 2 года назад +1

    is it necessary to solder his 16pins to work?

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад +1

      Necessary... If you do not want to solder... Then use a breadboard

    • @rafaelbendigo6270
      @rafaelbendigo6270 2 года назад +1

      @@ElectronicsSimplified7 can i pm you ? my lcd doesn't work like yours. the wires are the same how it is in the video.

    • @rafaelbendigo6270
      @rafaelbendigo6270 2 года назад +1

      @@ElectronicsSimplified7 i like your video and explanation but the only is not working is my LCD
      pls help .

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад

      Visit electronicssimplified.in and contact me

  • @AmanKumar-es4wp
    @AmanKumar-es4wp 2 года назад +1

    If any one u have and you know how to program them plzz help

  • @david-tracy
    @david-tracy Год назад +1

    Great work bro

  • @manmangy
    @manmangy 2 года назад

    Can we use this to test Chlorine

  • @diabolsensei
    @diabolsensei 2 года назад +1

    hi can i get ckt diagram for this project.

  • @the_hyper_here3236
    @the_hyper_here3236 Год назад +1

    sir can you send me working of block diagram

  • @wanfiq3191
    @wanfiq3191 Год назад +1

    can i get example the coding?

  • @DavidDavis-se8ns
    @DavidDavis-se8ns Год назад +2

    His "MQ-2" sensor looks like an MQ-135. I know because I bought the same. Only in the Fritzing schematic, an MQ-2 is depicted. MQ-2 is not even suited for carbon dioxide but MQ-135, which he handles at the beginning (I quit watching) does.

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад +2

      As an example, a methane (molecular) concentration of 2% means that 2 out of every 100 air molecules is methane. Similarly, a methane concentration of 2 ppm means that 2 out of every 1 million air molecules is methane. Can MQ-2 detect CO2? A short and simple answer to this question is yes, it can detect CO2.
      You can refer to how smoke is mostly a combination of carbon monoxide and carbon dioxide. Mq-2 sensor has the ability to detect. But the measurements are derived from other gas concentration values.

    • @DavidDavis-se8ns
      @DavidDavis-se8ns Год назад

      @@ElectronicsSimplified7 You are quite right that there is a mathematical correlation between the two. It's just that we do not exhale methane. I believe cows do produce a lot of methane. So there could be one useful application for it 🙂. If you don't want to spend some 30 bucks on a real CO2 sensor you could get the SGP30 from Ali.... for a few dollars. It does a pretty good job in indirectly calculating the CO2 value in the air. Some smart folks on RUclips already found out. I probably will get one too, later on. ...

  • @ShiwonPrecious
    @ShiwonPrecious 8 месяцев назад

    Sir please which code did you use for the gas detector

  • @Arman-v9f4i
    @Arman-v9f4i 3 года назад +1

    Broh! Can uh plzz give MQ5 library

  • @MariyamAnsari-m1v
    @MariyamAnsari-m1v Год назад

    Sir i am getting the output displayed on serial monitor but not on lcd .There are no errors and connections are also proper

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад

      Why is the LCD working with other programs? Just check if the LCD can receive data and display some data on it. You might have to adjust your potentiometer at the back of your I2C module.

  • @ShiwonPrecious
    @ShiwonPrecious 8 месяцев назад

    Is it possible to detect the gas and actually direct it in a particular place

  • @XyzSrivastava
    @XyzSrivastava Год назад

    How i code into the laptop

  • @poornahs-n8o
    @poornahs-n8o 9 месяцев назад

    bro can we use c2h4 gas sensor fof same steps behalf of using gas sensor

  • @edscelavancena2133
    @edscelavancena2133 2 года назад

    how to connect alarm in this project if lpg or another harmful gas leakage happened

  • @RajaboinaPoojitha
    @RajaboinaPoojitha Месяц назад

    needed circuit diagram also plz upload

  • @flemyjose4036
    @flemyjose4036 2 года назад

    why the analog output of sensor is being used instead of digital output

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад

      Digital will just tell us if any particle is sensed or not sensed (0 and 1 - digital).

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад

      We need to figure out what particle is sensed so we take the analog reading to decided what type of particle is being sensed.

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад

      Particle ----> Gas (Thats the simplification).
      Thank you for your question!

  • @loveislikedream
    @loveislikedream 3 года назад +1

    bro i we do this project without 12 c module

  • @imransaeed5536
    @imransaeed5536 2 года назад +1

    I am looking to someone to make me whole unit with my logo on it, with packing and detail instructions, how to install it . I need big production of it. Thanks

  • @Amazon_offers2
    @Amazon_offers2 Год назад

    bro can you make this without i2c

  • @kaushikmistry3438
    @kaushikmistry3438 Год назад +1

    Bro mq2 library is not installing

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад

      You have to remove it from your Arduino/library folder
      And then reinstall it.

  • @lydianandaputri1582
    @lydianandaputri1582 Год назад +1

    mq-6??

  • @Drxxx
    @Drxxx 3 года назад +2

    Great channel!!

  • @sakshisuvarna3902
    @sakshisuvarna3902 2 года назад

    hello, is it okay to add MQ9 sensor instead of MQ2 and how about library ?
    thanks in advance

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад

      No it's not okay ...
      They are two different sensors. They do almost the same job but have been built different over the years.

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад +1

      You could download the MQ9 Sensor library from the internet

  • @novestkuvimba1469
    @novestkuvimba1469 2 года назад +1

    Hie sir, can you sent us the code for the Arduino.

  • @_TranKhanhTruc
    @_TranKhanhTruc Месяц назад

    you conect com 3 or 4 or 5 ?

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Месяц назад +1

      You can connect any com port. It is based on your computer where your Arduino is installed. You can go to device manager on your computer and check the universal serial Bus section

    • @_TranKhanhTruc
      @_TranKhanhTruc Месяц назад +1

      @@ElectronicsSimplified7 thank you, i got it. because my ardunio has problem so it doesn't show Com pin. I will change my Ardunio

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Месяц назад

      Mostly the arduinos don't blow up... Check your USB cable first. And then also check if the Arduino has any LED indicators ON. If yes, then you need to just change your data cable and not the whole Arduino.

  • @karthik-gz3oz
    @karthik-gz3oz Год назад +1

    bro i want zip files

  • @venkateshakula7373
    @venkateshakula7373 3 года назад +1

    Bro can I have algorithm of this project tonight same project I have doing in my clg.if u interest to help comment your any social media accounts

  • @AmanKumar-es4wp
    @AmanKumar-es4wp 2 года назад +1

    Sir I am new student I don't know how to program so plzzz help

  • @advance-maths
    @advance-maths Год назад +2

    Yesir

  • @nirajkalamkar3107
    @nirajkalamkar3107 8 месяцев назад

    I did the same process which you did but it didn't work the code failed in uploading i didn't changed the code even but still it failed i asked my uncle who is engineer he said this cannot be worked i tried for 4-5 times but it failed

  • @patiencemtonhodza2477
    @patiencemtonhodza2477 2 года назад +1

    can l get the code for this project bro

  • @shamilsalman9175
    @shamilsalman9175 2 года назад +1

    add buzzer and gsm module to it

  • @nagakowshik578
    @nagakowshik578 3 года назад

    sir can u plz help me connection of mu project sir
    my project is fire and gas detection system with IOT sir

  • @vidhyakoranga9067
    @vidhyakoranga9067 7 месяцев назад

    Sir please provide the ges sensor code.

  • @rsiinvestor450
    @rsiinvestor450 3 года назад +2

    *Recomemd by Emanul Perreira*

  • @AhsanAli-z6i
    @AhsanAli-z6i 6 месяцев назад

    Sir kindly code and library send kr dy

  • @dextrond.5557
    @dextrond.5557 7 месяцев назад

    Mq2 sensor can’t differentiate gasses,

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  7 месяцев назад

      It can detect all those gases. But it can't find out which gas was detected particularly. But by concentration. It can be predicted.
      So in a LPG prone leakage zone. You can set the value. That's the whole purpose.

  • @T-he_End
    @T-he_End Год назад +1

    Not working bro 😭

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  Год назад

      Please explain what is not working in detail. Happy New Year!

    • @T-he_End
      @T-he_End Год назад

      @@ElectronicsSimplified7 i have given all connections everything as per u said when uploading code i uploaded library and i have upload that time problem occurs "16 columns and 2 rows of lcd display" this code is wrong showing i removed that code and uploaded lcd display not show reading

    • @T-he_End
      @T-he_End Год назад

      Pls tell bro very urgent project bro pls 🙏🙏🙏

  • @satishmohitsatish1730
    @satishmohitsatish1730 2 года назад

    Led have no lights

  • @venkateshakula7373
    @venkateshakula7373 3 года назад

    Vision of arduino pls bro it's an urgent

  • @hemanthjami1287
    @hemanthjami1287 2 года назад

    bro code

    • @ElectronicsSimplified7
      @ElectronicsSimplified7  2 года назад

      Codes are usually in the description and always on github and my website : www.electronissimplified.in

  • @gregbennett2437
    @gregbennett2437 Год назад

    DID NOT WORK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @rampagegaming5645
    @rampagegaming5645 Год назад +2

    Is this working by using MQ135 sensor?

  • @fakegamer8336
    @fakegamer8336 2 года назад +1

    does mq-2 measure co2 or co?