How to use a MQ-7 carbon monoxide detector module

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

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

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

    The Arduino can genereate PWM Signals with 0V-5V, so you could adjust the voltage from D13 in this example from 5v to 1,4v. Why is the Mosfet and 5V Pin used, when you can directly change the voltage of D13 ?

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

      The port can‘t provide the current needed for the heater. The voltage would break down, possibly damaging the port.

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

      @@AReResearch Yes I noticed that, thanks. But as I see, the heating resistance of the sensor is 33 ohm and if I'm right the current with 5V supply is 5V/33ohm = 151mA. If I supply it with 1.4V its 1.4V/33ohm = 42mA. As I know it is possible to get 40 mA from a PWM Pin like D13. If I switch the 5V out pin after the 60s to the 1.4 V PWM pin with a relay, the PWM pin would be only get 42mA and should not burn if it can provide 40mA. Am I right?

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

      So that there are 2 different power supplys, which are switched with a relay.

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

      @@renozerus5396 You should be fine taking the power from the 5v regulator of the Arduino.

  •  7 лет назад +2

    Nice video about the MQ7. I played with them (and burned one) a few years ago. If remember correctly the data sheet recommended a 48h burn in period.
    Most people skip the 5V/1.4V Vcc toggling. At constant Vcc the sensitivity of the sensor decreases with time.

    • @AReResearch
      @AReResearch  7 лет назад

      Have you tried to figure out if using the 1.4V as per specification helps to differenciate between CO and the other gasses (H2, LPG) the sensor reacts to? I can't find anything in the datasheets about that.

    •  7 лет назад +1

      AReResearch, Alas no. Cross sensitivity is a "feature" of the metal oxide sensors. Some of the more expensive ones include filters to reduce the cross sensitivity.
      In the case of the MQ7, the 5V periods are supposed to "clean" the sensor.
      The main issue I had with this kind of sensors is that they need to be individually calibrated in order to provide quantitative measurements.
      I have read that NDIR sensors are supposed to provide quantitative CO measurements out of the box, but this are considerably more expensive.

    •  7 лет назад +2

      correction, NDIR sensors are for CO2

  • @9duckman9
    @9duckman9 5 лет назад +3

    Noob here. I seem to have missed a basic conceptual step that most people would consider common sense. I'm confused as why we need to take the voltage down and why we need to heat.
    My guess is that heating is necessary for expelling moisture that might interfere with readings and that the 1.4v period is cooling to prevent heat messing up the reading.
    Close?

    • @AReResearch
      @AReResearch  5 лет назад +2

      Close, but not quite: The CO (and unfortunately others) binds to the SnO2 in the detector at low temperatures and lowers it's resistance. That is when we measure the gas concentration. In order to prepare the sensor for the next measurement, the sensor is regenerated by heating it.

    • @9duckman9
      @9duckman9 5 лет назад

      Thanks! One more question, I’m running the sensor circuit as you detailed but am getting readings of around 140. Im still alive so I think I must have done something wrong. I’ve run it for 48 hours. I do have an lcd screen attached so I don’t know if that affects it.

    • @9duckman9
      @9duckman9 5 лет назад

      @@AReResearch hmm i detached the LCD and the readings are normal. Maybe the potentiometer affects the voltage.

    • @Devviiiii
      @Devviiiii 4 года назад +1

      @@9duckman9 did you burned it in? very imnportant, clean air and 48h 5V heating...

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

    Hello sir, according to the datasheet must heat the sensor for 48 hours.
    Is it within 48 hours that the voltage used is 5V (60s) and 1.4 (90s) or only 5V?
    Or are 5V (60s) and 1.4 (90s) used when starting the measurement after being heated to 5V for 48 hours?
    Thank you...

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

      Untuk pemanasan 48 jam pertama sebaiknya menggunakan tegangan 5v kontinyu biar element nya "matang". Mulai hari ketiga barulah gunakan tegangan heater High Low. Ambil sampling data hanya di tegangan heater LOW saja khususnya di detik 70 keatas. 48 jam itu minimal preheating time saja. Pemakaian 2 minggu keatas baru benar2 "matang" element nya. CMIIW...

    • @LaraNatalia-hp9pi
      @LaraNatalia-hp9pi Год назад

      @@muhammadbasir83 Kak, buat baca datasheet sensor itu dimana ya? aku bingung banget

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

    Hello, can you please explain why the 10k resistor is needed and why for that exact place? Thanks!

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

      That is an excellent point! As the PWM output is either at high or at low level, the resistor is totally pointless and can be left out. - I obviously hadn‘t thought that through property and used the design I use when the gate would otherwise be left floating. (Or on a high impedance tri-state output)

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

    what's the purpose of MOSFET implementation for this sensor?

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

      The output pins of the Arduino can‘t supply that high a current. I opted for that mosfet rather than a bipolar transistor because it behaves pretty much like a switch.

  • @Soho9111
    @Soho9111 Год назад +9

    your voice is sooooo deep 😬

  • @camurgo
    @camurgo 7 лет назад +1

    The datasheet for the MQ-7 says that oxygen(O2) concentration affects the sensitivity of the sensor.

    • @AReResearch
      @AReResearch  7 лет назад

      I hadn't read about O2, but quite a lot of common stuff like alcohol do affect the sensor as well. So you won't really know what the sensor is really reacting to.
      Other sensors have similar but slightly different characteristics, so I can imagine a differential system with more sensors to get a better idea of which substance the sensors are dealing with.

    • @Devviiiii
      @Devviiiii 4 года назад

      @@AReResearch he means, if O2 is very low/high, the sensor couldn't react properly on his normal chemicals....

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

    Thank you so much! It's a great job and very helpful!!!

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

    Hi! I have a question, heating cycle must be between H-H (heater) terminal, but using flying fish board you modificate H-H and A-B (circuit) voltaje too... Should I connect sensor Mq-7 without flying fish board?
    And another question, did you probe this sensor with a ESP32? Thanks a lot!

  • @Tafmie
    @Tafmie 7 лет назад +1

    Hello, in the Arduino sketch you are using delay(6000) and delay(9000). This does not correspond with the 60 and 90 seconds warming time of the sensor as required in the datasheet. Is there a reason for this

    • @AReResearch
      @AReResearch  7 лет назад

      Ooops! You are quite right. I have corrected that on the blog. Thank you!

    • @Devviiiii
      @Devviiiii 4 года назад

      delay is not accounting for execution of Code before and after its used, so its the (delay+execution of code >= delay)...

  • @mokranlechat
    @mokranlechat 5 лет назад +3

    Hi sir, could you share how did you do for calibration the MQ7?
    Tks.

    • @Devviiiii
      @Devviiiii 4 года назад

      he didnt do it.... for calibration you need two known ppm values of CO in some air, then you put it in the 0ppm (for example) thing, then look at your value and correct your values up or down until they are perfect and then you put hte sensor in 150ppm for example and you do the samething, measure and correct the values....now you have known values for 0/150ppm and you can calculate the other values inbetween and above..... plot a graph and you know what i mean....

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

    Hello, very good work and well explained, I have a question, do you know why it specifically needs to be 1.4 volts in the low stage? I know it's because of the resistive behavior of tin oxide on the surface of the sensor, as oxygen is an inert gas that interrupts the flow of electrons, but in the presence of CO its resistivity decreases. However, I don't know why it specifically needs to be 1.4 volts? What happens at 1.4 volts on the surface of the oxide?

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

      Honestly: I don’t know either. I have it from the manufacturer‘s data sheet.

  • @rhettherring4846
    @rhettherring4846 7 лет назад +1

    Excellent video... thanks!

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

    Is it necessary to put the mosfet transistor for some time and then if I can remove it? or should it always be connected?

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

      It is not only needed for the initial „burn in“ of the sensor, but also through each measuring cycle. (To regenerate the sensor) - So it needs to be there permanently.

  • @its_harkrishan
    @its_harkrishan 7 лет назад

    Sir, your circuit doesn't go down to 1.4V, it cycles only between 5V and 0V. I have tried simulating the same circuit on LTspice and even the video shows the same (4:26-4:30). Am I missing something?

    • @AReResearch
      @AReResearch  7 лет назад +2

      +Harkrishan Singh You probably didn‘t take into account the true rms of the PWM signal. At the given duty-cycle, this should be equivalent of 1,4V. As the PWM signal heats a filament, the thermal capacity of the heater smoothes out the PWM ripple and keeps a thermal equilibrium.

    • @mortentovborg
      @mortentovborg 6 лет назад

      So no need for a capacitor?

    • @AReResearch
      @AReResearch  6 лет назад +1

      A capacitor does not seem to be necessary. We‘re just heating the sensor. At the time of the actual measurement, wen need to apply the full 5v for a very short time. This IMHO a design flaw of the module.

    • @Devviiiii
      @Devviiiii 4 года назад

      @@AReResearch where do you get this information with 5V during the measurement? does it have to be in the beginning or end of the measuring and what happens if i dont do this? you got 5V for 60s, why should you use it again?! doesnt make sense to me (:

  • @belectroart
    @belectroart 5 лет назад +1

    What about getting exact values for PPM?

    • @AReResearch
      @AReResearch  5 лет назад +1

      There is a voltage vs ppi graph here in the datasheet: cdn.sparkfun.com/datasheets/Sensors/Biometric/MQ-7%20Ver1.3%20-%20Manual.pdf
      But as the readings also depend on temperature, moisture and presence of other substances, I would not trust them with my life.

    • @Devviiiii
      @Devviiiii 4 года назад

      you need to calibrate them by two known CO ppm values in air.... hold it in there, look what it shows you and correct it mathematically..... and with the second value same and you got your own graph from which you can read your values....

  • @fredfredburger2454
    @fredfredburger2454 7 лет назад +5

    what a voice//

  • @stefangaillot1561
    @stefangaillot1561 6 лет назад

    Thank you! Very useful and pleasant .

  • @mariotorres4017
    @mariotorres4017 7 лет назад

    Hello, analyzing the video I realized that the connection is different from the diagram, which is correct?
    1 (GATE) TO 13PWM
    2 (DRAIN) TO GND (MODULE ICSTATION)
    3 (SOURCE) TO GND (MQ7 SENSOR)
    OR
    1 (GATE) TO 13PWM
    2 (DRAIN) TO GND (MQ7 SENSOR)
    3 (SOURCE) TO GND (MODULE ICSTATION)
    ??

    • @AReResearch
      @AReResearch  7 лет назад +1

      +Alberto Torres The source connects to the Arduino's GND. Where in the video or in the blog did I get that wrong? I'll correct that ASAP.

    • @mariotorres4017
      @mariotorres4017 7 лет назад +1

      In the diagram of the blog, it appears that the pin 3 (source) it's connected to GND (MQ7)

    • @AReResearch
      @AReResearch  7 лет назад

      +AReResearch Oh yes! I see. For the Fritzing schematic I took some random N-channel mosfet from the library. But that has a different pin layout.
      I'll correct that as soon as I can.
      Thanks for reporting that!

    • @mariotorres4017
      @mariotorres4017 7 лет назад

      Thanks to you for the video, it has been a great help.
      Regards!

  • @mariotorres4017
    @mariotorres4017 7 лет назад

    hello again, is it possible to do this with a NodeMCU module?
    I'm trying to do this, but the readings always go wrong. In Arduino Leonardo works great, but in NodeMCU I have not been able to make it work.

    • @AReResearch
      @AReResearch  7 лет назад

      This is a really interesting question!
      I have thought a little about it and it can be done. How depends on your particular module. The TOUT (=ADC input) pin of the ESP8266 has a range up to 1V.
      The MQ7 needs 5V/1,5V for heating. In case of the ICSTATION module, the 5v also feed the sensor. This results in an output voltage of 2,5-4,3V. Much too high for the ADC to handle.
      You'll have to scale (with a voltage divider) that down to a maximum of 1V or modify the module so the sensor (not the heater!) is fed with a lower voltage.

    • @mariotorres4017
      @mariotorres4017 7 лет назад

      The module I have it's the NODEMCU (Lolin). It has a new output of 5v, I have verified with a multimeter the voltage that reaches the sensor and varies between 4.77v and 1.35v. The voltages are very similar to those of the arduino leonardo, the problem is that the analogue reading it's incorrect.
      always tells me a reading of 1024 (sensor value). It is as if the sensor were saturated with monoxide.

    • @AReResearch
      @AReResearch  7 лет назад

      Yes, this is the correct behaviour. The ADC only goes from 0-1V, so the 1.35V already maxes out the ADC. Try a voltage divider to scale that down. Something like a 4.7K / 1k Ohm divider should be ok.

  • @martindeang7035
    @martindeang7035 6 лет назад

    Sir is it okay just to have 5v and 0v cycle instead of 5v and 1.4v? . I've tried your circuit but it gives me 5v and 0v. does that affect the readings of the sensor??

    • @AReResearch
      @AReResearch  6 лет назад +2

      Hi Martin, you are right in so far as the circuit can only deliver 5v or 0v. The 1.4 V are the effective voltage the PWM signal generated on pin 13. The thermal inertia of the filament will smooth the PWM out and the heater will reach the same temperature as if it was run at 1,4V.

    • @martindeang7035
      @martindeang7035 6 лет назад +2

      @@AReResearch ohw.. thanks a lot :) .I'm doing an mq7 sensor for my project and this will help me alot thanks . i've subscribed please do more tutorials about arduino sensors because i really want to learn it :)

    • @Devviiiii
      @Devviiiii 4 года назад

      @@martindeang7035 this sensor is one of the complex ones in the way you need to heat cycle it... but simply said:
      Every Sensor has an Analog-Out between GND and VCC, every voltage stands for an Sensor-Values..... thats not hard.....
      and he shows in his video, if you just read the values with 5V heating, there are less sensitive.....
      in which way you measured your voltage in the measuring cycle (1.4V)? you just switch the 5V voltage on and off very fast, if its on 100% of the time, its 5V if its on just half the time, its 2.5V.... search for videos with PWM voltage regulation, in best case with an oscilloscope, then you should understand whats happening (:

  • @lazarosstrakosi5708
    @lazarosstrakosi5708 5 лет назад

    Hello, i just bought an analog carbon monoxide sensor (MQ7) for a project but it only has 3 pins (VCC,GND, and output) , is there a way to create the duty cycle that we need from 1.4-5 V and not from 0-5V ?

    • @AReResearch
      @AReResearch  5 лет назад

      Possibly just the way I did it with PWM for this sensor. Can you post a product link?

    • @Devviiiii
      @Devviiiii 4 года назад

      It works the same way.... and you dont need PWM if you got 1.4V...... i dont understand your question.... your board has 3 Pins, VCC is for 5V heating and 1.4V measuring, this pin gets controlled by a PWM Signal and a Transistor which in one case is always on, that means 5V and in the other case the arduino pulse it (PWM) and the "average" voltage is than 1.4V...... GND should be GND.....and the Output is your Analog out.....

    • @Devviiiii
      @Devviiiii 4 года назад

      you need 1.4 and 5V, if you got them, you dont need PWM... if you only have 5V or Nothing, you use the 5V and chop it into pieces....
      The Sensor doesnt need PWM....we just use it to generate the 5V for heating/cleaning the sensor for 60sec and 1.4V for measuring inbetween for around 90sec

  • @aqilabbasi4702
    @aqilabbasi4702 7 лет назад

    hi Sir.i have a question that should i give always 5(60s)--1.4(90s)v to mq7 when measure CO or for only preheating time i,e 48 hrs?

    • @AReResearch
      @AReResearch  7 лет назад +2

      You can pre-heat at 5V. That makes it more stable (ensures thermal equilibrium and cleans the sensor). When you have it in operation to measure use the 5V/1,4V cycle.

    • @aqilabbasi4702
      @aqilabbasi4702 7 лет назад +1

      thanx alot sir...I appreciate this

    • @aqilabbasi4702
      @aqilabbasi4702 7 лет назад

      Hi again sir..I tried this circuit but when 1.4 v cycle begins i get ov on mq7 input not 1.4v?

    • @AReResearch
      @AReResearch  7 лет назад

      I take the supply voltage to 5v, just a few milliseconds before measuring. So the sensor does not have time to heat up.

  • @exilasmos
    @exilasmos 7 лет назад

    Heloo sir, excellent video, i am trying with an Arduino UNO but it appears as if there are not any measurements when i try to read the serial port. What am i doing wrong?

    • @AReResearch
      @AReResearch  7 лет назад

      The sensor has to be connected to one of the analog-in pins of the uno. When you read from that pin, do you get results?

    • @Devviiiii
      @Devviiiii 4 года назад

      why serial port? its an Analog-out, means that it just outputs a values between 0-5V (in this case)...the serial port is use when you got serial data......

    • @AReResearch
      @AReResearch  4 года назад

      @@Devviiiii I suppose he does not get any values on the serial monitor. Hard to diagnose from the information he gives.

  • @gingerminfer3784
    @gingerminfer3784 4 года назад

    Good job

  • @josephjames7509
    @josephjames7509 5 лет назад

    Sir
    Can mq3 be used for making smoke detection
    Pls reply
    Fast
    Its urgent

    • @AReResearch
      @AReResearch  5 лет назад +1

      No, that would not be as reliable as a smoke detector. Optical or ionizaion detectors do a much better job there. Still: in case of an indoor fire, CO levels rise quickly to lethal levels and trigger the sensor. But that's not smoke detection.

    • @Devviiiii
      @Devviiiii 4 года назад +1

      If its fast and urgent than google it and dont wait on some people on youtube.... DONT BUILT A SMOKE-DETECTOR FOR YOUR VALUABLES AND YOUR LIFE ON YOUR OWN! BUY ONE!
      if you just want to play with it, than listen on that, what AReResearch said, if you want to have a smoke-detector, use and luight-emitter and collector and if the light is obstructed it smokes :D
      if you want to look for fire instead, then look for CO levels and heat..... or IR-Sensor work also.... or just a microfon to hear for crackling noises?

  • @elizabetharana2224
    @elizabetharana2224 6 лет назад +1

    jeje

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

    And how can I determine the parts per million from this value?

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

      You might want to check out the data sheet: cdn.sparkfun.com/datasheets/Sensors/Biometric/MQ-7%20Ver1.3%20-%20Manual.pdf
      But I wouldn't put much faith in absolute values from such a simple setup. There are too many factors influencing the results.

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

    Y'all gotta ease off the treble in your audio. You gotta low voice but your s's and t's are ear piercing. Lowering the treble in your audio might make your voice easier to listen to.
    Just fyi.

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

    ,

  • @nielsdaemen
    @nielsdaemen 6 лет назад +3

    Buy a better microphone, this sounds horrible!

    •  6 лет назад +2

      Get better headphones :) It sounds good

    • @9duckman9
      @9duckman9 5 лет назад +2

      It's fine. Clean your ears 👂