How to get percentage value of different gases using the MQ135 gas sensor

+1 vote
How can I get percentage values of co2, nh3, alcohol, smoke and benzene from a MQ135 gas sensor  . I've been using raspberry pi 3 and arduino for the project. thanks.
Aug 23, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
4,000 views

1 answer to this question.

+1 vote

I don't think the MQ135 can do what you are asking. It basically shows a value representing air quality and not individual pollutants. Use the datasheet if you want to understand what it reports if calibrated properly.

If you're working with a naked sensor (no breakout board or printed circuit board), then you can try this:

Read the datasheet to make sense of the given wiring diagram. 

Then code your sketch as follows:

int value;
int sensorPin = A0;
int sensorValue = 0;

void setup()
{
  Serial.begin(9600);      // sets the serial port to 9600
}

void loop()
{
  sensorvalue = analogRead(sensorPin);   
  Serial.println(value, DEC);  // print decimal value
  delay(100);                  // wait at least 100 milliseconds 
}

answered Aug 23, 2018 by Upasana
• 8,620 points
Thanks for sharing this article.
Thanks for sharing this nice information
If MQ135 cannot do this then which sensor should I go for?

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Azure IoT Hub : How to set Epoch Value of an Azure Function?

Try using Azure IoT Hub consumer groups, if ...READ MORE

answered Feb 21, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
1,274 views
0 votes
0 answers
0 votes
1 answer

How to get Unicast, Dns and Gateway Address in UWP?

Try this code Snippet I found here: https://social.msdn.microsoft.com/Forums/en-US/27a8b7a8-8071-4bc1-bbd4-e7c1fc2bd8d7/windows-10-iot-core-how-do-you-create-a-tcp-server-and-client?forum=WindowsIoT ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,214 views
0 votes
1 answer

How to connect Raspberry Pi and lighting the LED?

You might want to try instead to ...READ MORE

answered Jul 23, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
665 views
0 votes
1 answer

Are there sensors that are platform Dependent ?

The short answer is: yes probably it ...READ MORE

answered Sep 6, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
605 views
0 votes
1 answer

Using Google Maps to track GPS enabled Arduino Board

What is the GPS Module which you ...READ MORE

answered Sep 6, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
2,556 views
0 votes
1 answer

Downloading source code of Android Things

No because AndroidThings is still in preview ...READ MORE

answered Jul 5, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,880 views
0 votes
1 answer

Setting-up a RFID RC522 chip in Raspberry Pi?

First, let me congratulate you on buying ...READ MORE

answered Jul 10, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,686 views
0 votes
1 answer
0 votes
1 answer

How safe is it to expose rabbitmq amqp port over the internet?

Talking about whether it is a good ...READ MORE

answered Nov 29, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
3,020 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP