How to calibrate an MQ-2 gas sensor || Arduino tutorial

แชร์
ฝัง

ความคิดเห็น • 141

  • @adailyllama4786
    @adailyllama4786 3 ปีที่แล้ว +1

    Many Thanks! Exactly what I needed for my air monitoring project.

  • @rahatkataria1755
    @rahatkataria1755 4 ปีที่แล้ว +1

    Dude, That was superb. Thanks for sharing it!

  • @refrion_robotica_automacao
    @refrion_robotica_automacao 4 ปีที่แล้ว

    CONGRATULATIONS. YOUR VIDEO WAS VERY USEFULL AND THANK YOU VERY MUCH FOR SHARING THIS INFORMATION. I WAS FACING SOME PROBLEMS WITH FALSE ALARMS , NOW WITH THIS CALIBRATION IT IS WORKING PERFECTELLY.

  • @rmus6085
    @rmus6085 3 ปีที่แล้ว +2

    hi thanks for the video its really helps me a lot. But i have one question. For mq-6 how do i set the RL value since mq-6 using the potentiometer?

  • @madanmohanraok3649
    @madanmohanraok3649 5 ปีที่แล้ว +1

    Hi,
    Great video,
    We are looking for calibration of PMS-5003 Particulate matter sensor.
    Any suggestions?

  • @mouaddibi4491
    @mouaddibi4491 6 ปีที่แล้ว

    HI! thank you for the big job , can you help me for why separated the smoke and an other gaz and thanks .

  • @onjianye9491
    @onjianye9491 6 ปีที่แล้ว

    Hi may i know does this example included the adjustment of temperature and humidity around the environment?

  • @amvip5929
    @amvip5929 7 ปีที่แล้ว +2

    Hi There, Thanks for the code, I tried the code with my MQ sensor and edison board, it gives me values as 0 only. How do I get it to read different values?

  • @MrLiohemanth
    @MrLiohemanth 4 ปีที่แล้ว

    Hi there nice video btw can we use same code for mq4 sensor

  • @charanr3387
    @charanr3387 5 ปีที่แล้ว

    bro In case we are having different ranges of Air flow sensor(i mean 100 sensors) in a textile industry in which I want to get the exact value by calibrating in it????????????

  • @vibhor6685
    @vibhor6685 3 ปีที่แล้ว

    Thanks for sharing dude. Can you please guide how can i get same results with MQ2 sensor with I2C module.

  • @anitakenchannavar6493
    @anitakenchannavar6493 4 ปีที่แล้ว +2

    how to detect only the oxygen levels in the air, which sensor i shld use

  • @rolandberendonck3900
    @rolandberendonck3900 3 ปีที่แล้ว +1

    Do you or anybody know what is a sensative sensor for detecting secondhand smoke (cigarette smoke). I still cannot find such a sensor and a dust laser sensor does not fit because it doesn't distingquish cigarette smoke from any other smoke. Please help.

  • @rudygabrielsichahuaman321
    @rudygabrielsichahuaman321 3 ปีที่แล้ว

    the 10K resistor is the same for the MQ131 ?

  • @matcha5831
    @matcha5831 6 ปีที่แล้ว

    Hi i wonder know how to you get this value LPGCurve[3] = {2.3,0.21,-0.47}; and i confused how u can get point2: (lg10000, -0.59) --0.59 from the datasheet given?

  • @najeebkhan7336
    @najeebkhan7336 7 ปีที่แล้ว +1

    Hello Sir. I am Using this calibration code for MQ-7 CO sensor, its work good. But Why sensor does not give any value with out giving smoke?? Please Suggest any Help

  • @TobiasDettinger
    @TobiasDettinger 3 ปีที่แล้ว +2

    I have the arduino ads1015, how to write the code for my board properly?

  • @____________________________.x
    @____________________________.x 7 ปีที่แล้ว

    This was useful, thanks

  • @alexpiaro9449
    @alexpiaro9449 7 ปีที่แล้ว +1

    Hey thanks for the video , can you help with circuit diagram for MQ7 co detector and its block diagram thanks

  • @electronic7979
    @electronic7979 5 ปีที่แล้ว

    Excellent

  • @vunnammaniprashanth5604
    @vunnammaniprashanth5604 5 ปีที่แล้ว

    there is no link found for coding can you please
    provide that

  • @primevigilante7259
    @primevigilante7259 2 ปีที่แล้ว

    does it work with MQ 6 sensor too?

  • @idhamidris3481
    @idhamidris3481 7 ปีที่แล้ว +1

    Hi ElectronFun,
    I'm currently working on an MQ-3B sensor to detect ethanol. I'm wondering if that sandbox electronics would work for MQ-3 too. If not, have you seen other sites that provide arduino code for that?
    Love your videos. Keep up your good work.

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      Hi Idham,
      Unfortunately the code was written specifically for the MQ-2 and I'm not aware of any equivalent for the MQ-3.
      Thank you so much for your kind words :)

  • @DhirubhaisNayak
    @DhirubhaisNayak 6 ปีที่แล้ว

    How did u connect those 6 wires to mq2 sensor

  • @jumbo999614
    @jumbo999614 ปีที่แล้ว

    What is difference between sensor ( 6 pin ) and sensor module (4 pin)?
    Do you have diagram for wiring 6 pin?

  • @andreaspapadakis8097
    @andreaspapadakis8097 7 ปีที่แล้ว +1

    Hey, I am using an mq4 and mq7 to detect CO and Methane Concetrations. Do u think the sanbox electronics code will work for those mq sensors when I input the Load resistance i have put for them?

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      The code will not work properly with your configuration. It was created specifically for the MQ-2.

    • @andreaspapadakis8097
      @andreaspapadakis8097 7 ปีที่แล้ว

      Thanks for replying so soon, do you have any tips for how to find the correct Load Resistance for the MQ7 which has an adjustable one, and how to calibrate it afterwards?

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      No problem :)
      I haven't experimented with the MQ7. I'm afraid the only way to have reliable readings could be the proper calibration.

    • @deepaksubhedar5737
      @deepaksubhedar5737 6 ปีที่แล้ว

      Do you get any solution of this problem. Plz help me if you get ???

  • @clip8327
    @clip8327 7 ปีที่แล้ว +1

    When hook up MQ-2 with 5V onboard pin, the voltage drop to 4.86V
    Is it better to use the external very smooth 5V regulator ?

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว +1

      It's better to use an external power supply, because the MQ-2 consumes up to 160mA, while Arduino Uno can deliver 200mA maximum. If you connect something more than just the sensor, you can burn out your Arduino.

  • @warkopproduction9510
    @warkopproduction9510 4 ปีที่แล้ว

    can i use the code with MQ135?

  • @gopikabg5403
    @gopikabg5403 7 ปีที่แล้ว +2

    Any caliberation tips for TGS822(acetone sensor)

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      I haven't tested anything similar, sorry.

  • @hilman9032
    @hilman9032 4 ปีที่แล้ว

    can someone tell me please, where did i can get code for mq 135 is?

  • @vanshgupta24
    @vanshgupta24 7 ปีที่แล้ว +1

    Sir what can i do for mq2 Sensor with 3 Pins for connection on arduino and breadboard

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว +2

      You can simplify your circuit. Just connect 5V and GND to your sensor. Next connect the remaining pin to your Arduino's analog input. You don't have to worry about additional resistors.

  • @muhammedakbas9004
    @muhammedakbas9004 7 ปีที่แล้ว +1

    thx for help :)

  • @robotic1413
    @robotic1413 7 ปีที่แล้ว +1

    How do i select the RL value if the sensor i have is already fixed with a potentiometer?

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      I guess you don't have to, because the resistor is probably already there :)

  • @azliluissembanawan4659
    @azliluissembanawan4659 5 หลายเดือนก่อน

    I need the mq 131 and the mq135 for our research

  • @jilljill3712
    @jilljill3712 6 ปีที่แล้ว +1

    hi thanks for the video,can you help me ,How do I can make it alert through speakers?

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      Thanks for your comment :)
      You could use the tone function, see here: www.arduino.cc/en/Reference/Tone.

    • @jilljill3712
      @jilljill3712 6 ปีที่แล้ว +1

      thank you :)

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      No problem :)

  • @peacecheap
    @peacecheap 8 ปีที่แล้ว +2

    In datasheet, mq-2 only can detect LPG in 200-5000 ppm, but in demo it can detect lower than 200 ppm.
    Is it really accurate for measurement of LPG concentration?

    • @ElectronFunCom
      @ElectronFunCom  8 ปีที่แล้ว +1

      +Agsen Setyo You are an attentive observer and you are right - the datasheet says 200-5000ppm for LPG. The Sandbox Electronics guys didn't take this into account. This method of calibration will never be as accurate as the "proper" way, but it's free.

  • @fannym.ninalaura4160
    @fannym.ninalaura4160 6 ปีที่แล้ว +1

    a query how can I calibrate the MQ-8 sensor, I can use the same code that you used to calibrate MQ-2

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      Unfortunately you can't use the same code, it is sensor specific. I haven't found an equivalent for the MQ-8.

  • @edsonpachecojunior6797
    @edsonpachecojunior6797 7 ปีที่แล้ว

    This calibration is applicapable for all sensors or only for MQ-2? I aks this because I want to calibrate my ozone gas sensor (MQ-131).

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      This is only for the MQ-2.

    • @behnamghassaban1718
      @behnamghassaban1718 3 ปีที่แล้ว

      I want to calibrate my ozone gas sensor (MQ131) please help me if you find anything.

  • @shaikhahmed7929
    @shaikhahmed7929 7 ปีที่แล้ว +1

    I am confused how to translate the different levels of different gases from one ADC level as they all are in an air mixture. Any ideas on that? I mean how one ADC level translates into different ppms for different gases?

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว +2

      It is confusing, I agree. The sensor can detect a range of gasses, but it is not able to differentiate which gas it is exposed to. The MQ gas sensors are good to experiment with, for DIY projects, but I wouldn't trust these if you're working on a professional project.

    • @syamilfuad5098
      @syamilfuad5098 5 ปีที่แล้ว

      so do u have a solution on what sensor specifically detect what gas??

  • @syamilfuad5098
    @syamilfuad5098 5 ปีที่แล้ว +1

    may i know how do u get LPG, carbon monoxide and smoke tested at the same time??

    • @calirific3503
      @calirific3503 3 ปีที่แล้ว

      you can't, they're combined. So it is all approximates

  • @labspedia1480
    @labspedia1480 7 ปีที่แล้ว

    Good video! I need a code that allow me calibrate my sensor of alcohol (MQ-3)

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      Thanks! I'm afraid there is no such code for an MQ-3.

  • @2012isRonPaul
    @2012isRonPaul 6 ปีที่แล้ว +2

    why do i get a reading with 10-digit number (2643534534ppm etc) and the resistance varies after every reboot of the board? (from 3.26 to 15.7kOhms etc) ....

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      To tell you the truth, I have no idea. Which code have you been using? Have you tried pre-heating your sensor?

  • @gurpreetkourkamthekar8630
    @gurpreetkourkamthekar8630 6 ปีที่แล้ว +1

    Can u tell me how much area this mq2 sensor can cover???

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      There is no such info in the datasheet as far as I remember, but I can tell you it's not a large area. I'd say a couple of centimeters/inches.

  • @turgayolgay3381
    @turgayolgay3381 7 ปีที่แล้ว +2

    can you make this software for CH4, H2S, CO2, H2, O2, and CO ?
    Thank you

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      Unfortunately it's not as easy. The code presented in this video was created by a company called Sandbox Electronics.

    • @syamilfuad5098
      @syamilfuad5098 5 ปีที่แล้ว

      have u got the software? if u have may i know where?

  • @junerilllayna252
    @junerilllayna252 6 ปีที่แล้ว

    Aside from MQ 2, do you have codes for MQ 136 and MQ 131? waiting for your response.

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      No, I don't have any other codes, sorry.

  • @Mohammadsharifoffical.
    @Mohammadsharifoffical. 6 ปีที่แล้ว

    How to implement the formula....

  • @sikerusipatah
    @sikerusipatah 7 ปีที่แล้ว

    hello.does this code also same with any sensor such mq4?
    tq

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      You can use the same code for MQ-4, but it's not for every single sensor.

  • @parthpatel4101
    @parthpatel4101 8 ปีที่แล้ว

    How did you determine that Rl=5.1 works for you?

    • @ElectronFunCom
      @ElectronFunCom  8 ปีที่แล้ว +1

      +Parth Patel The sensitivity seemed the most reasonable with about 5kohms. However, each individual sensor may react a little bit differently, so there's no specific recipe.

  • @konstantinost3185
    @konstantinost3185 7 ปีที่แล้ว +1

    This is free air calibration, after calibration when the code is running, the CO ppm result the serial shows is 0, shouldn't it be 20000 (2%) which is the known atmospheric CO% concentrate?

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว +1

      As far as I know the sensor omits the atmospheric CO concentration and measures everything above that value. It treats clean air as point 0, but don't cite me on this.

  • @simplesecomumcidadao7592
    @simplesecomumcidadao7592 5 หลายเดือนก่อน

    Thank you friend, I asked including chatGPT, it just says calibrate, thank you for your simple and understandable explanation. Can I do the same operations on MQ-135?

    • @prestyboy678
      @prestyboy678 4 หลายเดือนก่อน

      Did it work? I’m trying to do the same with the MQ-135 just measuring carbon dioxide instead.

    • @amnieyzulfikri1789
      @amnieyzulfikri1789 3 หลายเดือนก่อน

      have you tried on MQ-135? i urgently need it for my project for CO2 detection :(@@prestyboy678

  • @abdulkreemalsultan134
    @abdulkreemalsultan134 4 ปีที่แล้ว

    Where to find gas mass flow meter? Any one can help me

  • @walkindream3908
    @walkindream3908 7 ปีที่แล้ว +1

    hi! i'm using mq-2.
    Why the output value is zero?

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      Have you connected everything correctly? If you're using a breadboard I would also check your jumper wires - some of them might be faulty.

  • @ghulammehdibhutto1548
    @ghulammehdibhutto1548 7 ปีที่แล้ว

    It is helpful video dear but sorry to say this not what we call calibration.. we are still unaware that whether these concentrations of gases are correct or not.. to confirm this we must need a expensive device as u shown in your video.. so problem is still there.. Keep this thing aside i want to know that how to adjust its sensitivity using potentiometer on the circuit board.. when i was testing it i just place it over stove then it was showing readings otherwise not LOL even not by burning a paper.. Do you have any solution..??

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      It's true, the software calibration is only a cheap substitute of the proper calibration.
      To adjust sensitivity just replace the resistor with a potentiometer.

  • @revandyrizky4406
    @revandyrizky4406 3 ปีที่แล้ว

    How to calibrate mq7

  • @iamnotyou1886
    @iamnotyou1886 6 ปีที่แล้ว +1

    Can u post the schematic for this?

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      Sure, you can find more details on my website: electronfun.com/project_2.php.

  • @ashzz999
    @ashzz999 8 ปีที่แล้ว

    any calibration tips for h2 gas?

    • @ElectronFunCom
      @ElectronFunCom  8 ปีที่แล้ว

      +ashraf zin Sorry, Sandbox Electronics didn't include H2 in the code, so I guess the only way is to go through the "proper" calibration.

    • @jeromejones8164
      @jeromejones8164 8 ปีที่แล้ว +1

      what is the proper method of calibration?

    • @ElectronFunCom
      @ElectronFunCom  8 ปีที่แล้ว

      +Jerome Jones There are special kits on the market, thanks to which you are able to get a specific gas concentration in PPM units. You can expose your sensor to the gas and map the value you're getting from your sensor.

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      You need special equipment for it.

    • @samunibay9014
      @samunibay9014 7 ปีที่แล้ว +1

      Hi would it be possible to post a link to the calibration equipment you found for calibrating the sensors?

  • @didikwahyu8339
    @didikwahyu8339 5 ปีที่แล้ว

    hi sir how to get LPGCurve[3] = {2.3,0.21,-0.47} ?

    • @ExtantFrodo2
      @ExtantFrodo2 5 ปีที่แล้ว

      LPGCurve[3] = {2.3,0.21,-0.47};
      //two points are taken from the curve.
      //with these two points, a line is formed which is "approximately equivalent" to the original curve.
      //data format:{ x, y, slope}; point1: (lg200, 0.21), point2: (lg10000, -0.59)

  • @myprojects1991
    @myprojects1991 7 ปีที่แล้ว

    thanks

  • @trixiemagdua4583
    @trixiemagdua4583 2 ปีที่แล้ว

    Hello sir can i ask how can i improve the range of a sensor?

  • @hadjer7998
    @hadjer7998 4 ปีที่แล้ว

    I nées code of MQ4

  • @mdtowhidurrahmankha4237
    @mdtowhidurrahmankha4237 7 ปีที่แล้ว

    bro can i use more then 1 mq 2 in anduino bord???

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      Sure you can, just use one individual analog pin for every sensor connected to your Arduino.

  • @user-ru7yp7gd2q
    @user-ru7yp7gd2q 7 ปีที่แล้ว +1

    can you write the arduino code

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว +1

      The code is available here: sandboxelectronics.com/?p=165.

  • @Alexelectricalengineering
    @Alexelectricalengineering 8 ปีที่แล้ว

    Thumbs up :)
    Alex

  • @imturki6217
    @imturki6217 6 ปีที่แล้ว

    programe plesea

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      You can find the project page and code here: electronfun.com/project_2.php.

  • @fatihustaoglu1995
    @fatihustaoglu1995 4 ปีที่แล้ว

    This URL is for those who cannot find the code;
    sandboxelectronics.com/?p=165

    • @Chupria
      @Chupria 4 ปีที่แล้ว

      Thank you...I thought they removed the code for some reason...but it's up and alive.

  • @scorpion7434
    @scorpion7434 6 ปีที่แล้ว +1

    I challenge you to give me explanation of the weird use of the natural logarithm in the final step of the code. Even the maths experts couldn't tell me. COPY_PASTE baby!
    Added to that, can you provide a clean air -- a real clean air, for detecting CO2 for example, where can ya find an air that doesn't contain any CO2 to be a reference to your R0?
    Using those sensors are not accurate at all. they're just to detect if gas exists or not. To make them accurate you need a huge knowledge in maths, and that what I'm trying to do in my project (a real work project)!

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      The piece of code is taken from a company called Sandbox Electronics. You can find this information in the video description.
      These sensors are good for DIY builds, but I wouldn't use them in any commercial project, which I mentioned many times in the comments section.
      Good luck with your project.

    • @scorpion7434
      @scorpion7434 6 ปีที่แล้ว

      Thanks for your reply. FINALLY someone of those who publsih videos responded to me (I just used the word "challenge" trying to make you move as I thought you're like some others who just ain't respond). Indeed it should not be used for commercial purpose, but I am in a research unit, so I will not use them until I make sure that I'm getting enough accurate readings, I'm working around this problem. I will use a certified device to compare my result with it for the particular gases. However, thanks for your wishes :)
      P.S and BTW SandBox is not responding to any query. I wonder if they also just copy-paste the code ;-)

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      My channel is quite small, so at that point I'm able to reply to pretty much every single comment. Sometimes it takes a few days to a week, because I have a 'regular' job and a life outside of TH-cam :) Some TH-cam creators receive hundreds of comments a day and more, so they reply to very few of them.
      I didn't realize research units use TH-cam as a source of knowledge/inspiration.
      You want to compare a commercial sensor with the MQ series - I wonder what results you will get.
      I haven't contacted SandBox Electronics, but I know this project is quite old. I'm not sure if they still support it. However, it would look much more professional if they replied to your query.

    • @scorpion7434
      @scorpion7434 6 ปีที่แล้ว

      Ya assumed they have big channel, believe me, most of who I asked have smaller than yours.
      I'm a software developer, and I'm doing my internship in IoT Unit (actually it's a research centre), I've been assigned a whole project in a field that I'm not familiar to. That's why I'm looking at every single source I come across. A lot of explanation needed and are not available from the source (a nice looking video with a title of "How to" but with no deep explanation), I now have a full view of the logic behind all of this, but one more left which is the use of this weird and unexpected natural logarithm (ln(y)) in the final step of the calculation. If ya have any query about the code or the logic please don't hesitate.
      P.S the idea of the project is to DIY from scratch and achieve very impressive and accurate device as a prototype with very low cost.

    • @ElectronFunCom
      @ElectronFunCom  6 ปีที่แล้ว

      That's a very ambitious project, as cutting cost usually makes the whole thing less accurate and reliable.
      What kind of software do you develop, if it's not a secret?

  • @pong301275cmu
    @pong301275cmu 7 ปีที่แล้ว +1

    this is not a calibration method.

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว

      How would you call it?

    • @pong301275cmu
      @pong301275cmu 7 ปีที่แล้ว

      copy and paste

    • @ElectronFunCom
      @ElectronFunCom  7 ปีที่แล้ว +3

      Everyone has the right to have their own opinions, this one is yours.