To get smoke data from MAX30105

I am using smoke sensor MAX30105 for sensing the smoke in terms of PPM.
The code available at the website gives the raw values of the data , but I am not available to interpret the values in terms of PPM of smoke.

The code for getting the raw values from the sensor.

/*
  MAX30105 Breakout: Output all the raw Red/IR/Green readings
  By: Nathan Seidle @ SparkFun Electronics
  Date: October 2nd, 2016
  https://github.com/sparkfun/MAX30105_Breakout

  Outputs all Red/IR/Green values.

  Hardware Connections (Breakoutboard to Arduino):
  -5V = 5V (3.3V is allowed)
  -GND = GND
  -SDA = A4 (or SDA)
  -SCL = A5 (or SCL)
  -INT = Not connected

  The MAX30105 Breakout can handle 5V or 3.3V I2C logic. We recommend powering the board with 5V
  but it will also run at 3.3V.

  This code is released under the [MIT License](http://opensource.org/licenses/MIT).
*/

#include <Wire.h>
#include "MAX30105.h"

MAX30105 particleSensor;

#define debug Serial //Uncomment this line if you're using an Uno or ESP
//#define debug SerialUSB //Uncomment this line if you're using a SAMD21

void setup()
{
  debug.begin(9600);
  debug.println("MAX30105 Basic Readings Example");

  // Initialize sensor
  if (particleSensor.begin() == false)
  {
    debug.println("MAX30105 was not found. Please check wiring/power. ");
    while (1);
  }

  particleSensor.setup(); //Configure sensor. Use 6.4mA for LED drive
}

void loop()
{
  debug.print(" R[");
  debug.print(particleSensor.getRed());
  debug.print("] IR[");
  debug.print(particleSensor.getIR());
  debug.print("] G[");
  debug.print(particleSensor.getGreen());
  debug.print("]");

  debug.println();
}

Please tell me how to interpret this data into PPM of smoke.

I am using the driver for this sensor , provided by the company.

There's no such thing as PPM of smoke. PPM means parts per million. Parts of what? Smoke? Define what smoke is!

If you want to have absolute values from such a sensor, you have to calibrate it.

Maxim doesn't seem to provide documentation for using the MAX30105 as a particle sensor, which is surprising, as the chip has great potential.

You might find this article helpful: https://hackaday.io/project/18518-iteration-8/log/55721-a-first-attempt-at-figuring-out-the-max30105-air-particle-sensor

The author comments:

I e-mailed technical support with my data to see if any additional help or application notes were available. They were only able to say that the MAX30105 requires "very smart algorithms" to function, and that they were happy to sell those algorithms through a third-party distributor.

Particle Sensors of any accuracy (and they are not accurate) measure in mircogrammes per cubic meter. Put in perspective a 10K USD instrument gets ±10% of a known dust at known temp and humidity: any of those parameters change and its off accuracy.

So a 30 dollar sensor is unlikely to be better than ±20% in reality (despite what the data sheet says), so don’t get too optimistic about the output.

Having said all that they are of use, and it is interesting watching values rise and fall as known pollutants can be seen, builders work, cooking, heavy traffic all will effect output.

I can’t speak how you are going to get your sensor to work reasonably, we do open source code for ours to help developers.

So a 30 dollar sensor is unlikely to be better than ±20% in reality

It is completely unreasonable, to the point of being nonsensical, to make any sort of guess or estimate of the "accuracy" of this sensor when used as a smoke quantification device.

The device can be used to measure backscattering of light by particles in the air, and it can do that quite accurately.

The rest is entirely up to the user and his/her skills at interpreting the backscatter measurements, in terms of some definition of what "smoke" is, and how to quantify it.

It's like I am trying to sense the presence of Fire by detecting the presence of smoke using this sensor. I need a code for that. Please help someone!

Measure the detector output in the presence and absence of a fire, and use that information to write an appropriate "if statement".

chandantaluja:
I am using smoke sensor MAX30105 for sensing the smoke in terms of PPM.
The code available at the website gives the raw values of the data , but I am not available to interpret the values in terms of PPM of smoke.

The code for getting the raw values from the sensor.

/*

MAX30105 Breakout: Output all the raw Red/IR/Green readings
  By: Nathan Seidle @ SparkFun Electronics
  Date: October 2nd, 2016
  https://github.com/sparkfun/MAX30105_Breakout

Outputs all Red/IR/Green values.

Hardware Connections (Breakoutboard to Arduino):
  -5V = 5V (3.3V is allowed)
  -GND = GND
  -SDA = A4 (or SDA)
  -SCL = A5 (or SCL)
  -INT = Not connected

The MAX30105 Breakout can handle 5V or 3.3V I2C logic. We recommend powering the board with 5V
  but it will also run at 3.3V.

This code is released under the MIT License.
*/

#include <Wire.h>
#include “MAX30105.h”

MAX30105 particleSensor;

#define debug Serial //Uncomment this line if you’re using an Uno or ESP
//#define debug SerialUSB //Uncomment this line if you’re using a SAMD21

void setup()
{
  debug.begin(9600);
  debug.println(“MAX30105 Basic Readings Example”);

// Initialize sensor
  if (particleSensor.begin() == false)
  {
    debug.println("MAX30105 was not found. Please check wiring/power. ");
    while (1);
  }

particleSensor.setup(); //Configure sensor. Use 6.4mA for LED drive
}

void loop()
{
  debug.print(" R[");
  debug.print(particleSensor.getRed());
  debug.print("] IR[");
  debug.print(particleSensor.getIR());
  debug.print("] G[");
  debug.print(particleSensor.getGreen());
  debug.print("]");

debug.println();
}





Please tell me how to interpret this data into PPM of smoke.

I am using the driver for this sensor , provided by the company.

Can anyone help me writing a code for this purpose.