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

0 votes
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,190 points
514 views

1 answer to this question.

0 votes

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,530 points

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 in IoT (Internet of Things) by Shubham
• 13,300 points
128 views
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,260 points
154 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,260 points
36 views
0 votes
1 answer

How to use the data I receive from Azure IoT Hub?

The payload you receive will be a ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by DataKing99
• 8,130 points
636 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,260 points
27 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,260 points
641 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,260 points
490 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 9, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
165 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,530 points
324 views