MQ2 and MQ135 sensors: connecting to Arduino and detecting gasoline vapors and CO2

Customer:

Can your sensor be connected to a standard PLC and how quickly does it respond to gasoline vapors?

Original message (Croatian)

Bok,dal se vaš senzor može spojiti na klasični PLC i kak brzo reagira na pare benzina?

Originally submitted via email support on 6 February 2025. Migrated to the forum for community visibility.

Soldered Support:

Our sensors are designed for use with Arduino, and there are code examples available for how to use them. Not for PLC.

Original message (Croatian)

hvala na upitu, preko svog softvera za odgovaranje na upite na koji senzor misliš, možeš li poslati link za proizvod?

Ali ukratko, naši senzori su namijenjeni za korištenje s Arduinom, i za njega postoji primjeri u kodu kako se mogu koristiti. Ne na PLC.

Customer:

It’s fine to connect to Arduino. I need to detect the presence of special gasoline 80/110 (hydrocarbons, negligible quantity, in traces) in the shortest possible time. With the options offered, it’s difficult to choose because not all characteristics are listed, so I’m asking if you can recommend which one.

Soldered Support:

We have the MQ2 sensor: https://soldered.com/product/butane-lpg-smoke-sensor-mq2-breakout/

It is used for detecting gases like LPG, methane and smoke, and it can also respond to gasoline (hydrocarbons), so I think it meets your criteria.

It is simple because it has one analog output (for analogRead - the voltage measured from the microcontroller) and a digital output (for digitalWrite - gas is present above some threshold value or not). So I would recommend that sensor. I encourage you to study its datasheet for all details about which chemicals it is sensitive to: https://soldered.com/productdata/2015/02/Soldered_MQ-2_datasheet.pdf

Original message (Croatian)

imamo ovaj MQ2 senzor: https://soldered.com/product/butane-lpg-smoke-sensor-mq2-breakout/

On se koristi za detekciju plinova poput LPG-a, metana i dima, može reagirati i na benzin (ugljikovodike) tako da mislim da zadovoljava kriterije.

Jednostavan je jer ima jedan analogni izlaz (za analogread - napon koji se mjeri sa mikroupravljačem) i digitalni izlaz (za digitalRead - plina ima preko neke granične vrijednosti ili nema). Tako da, preporučio bi taj senzor. Pozivam te da proučiš njegov datasheet za sve detalje oko toga na koje kemikalije je osjetljiv: https://soldered.com/productdata/2015/02/Soldered_MQ-2_datasheet.pdf

Customer:

Okay, I’ll order that one and another that would primarily detect carbon dioxide (CO2). Which do you recommend for CO2, it’s important to me that it detects in the shortest possible time.

Original message (Croatian)

Ok,naručit ću taj i još jedan koji bi prije svega detektiral ugljični dioksid(CO2).Koji predlažete za co2,važno mi je da detektira u što kračem vremenu.

Soldered Support:

You can use this one for CO2: https://soldered.com/product/air-quality-sensor-mq135-breakout/

Some useful notes for the sensors:

  • Both can be read with a single microcontroller, you don’t need 2
  • Because the sensors work on simple principles, I recommend you calibrate them in code by exposing them to the environment where the gas you’re detecting actually exists, then see what the response is
  • This sensor for example has a response after 30 to 60 seconds of exposure to gas, and once the response is measured, the output is instantaneous from the microcontroller
  • MQ sensors have a warm-up time where for the first 48 hours they won’t work ideally, and then once they warm up they work normally
Original message (Croatian)

može ovaj za CO2 https://soldered.com/product/air-quality-sensor-mq135-breakout/

Neke korisne napomene za senzore:
Isti se mogu čitati sa jednim mikroupravljačem, nije potrebno 2 Zbog toga što su senzori jednostavnog principa rada preporučujem svakako da ih probate kalibrirati u kodu tako što ćete ih dovesti u okruženje gdje zapravo ima plina koji detektirate i onda vidite koliki je odziv Ovaj senzor npr ima odziv nakon 30 do 60 sekundi izlaganja plinu i onda kad se odziv izmjeri, izlaz je trenutačan sa mirkoupravljača MQ senzori imaju vrijeme zagrijavanja gdje prvih 48 sati neće raditi idealno i onda kad se zagriju rade normalno
Nadam se da će informacije biti korisne.