Raspberry Pi Conversion of ADS1115 output to PPM

Thread Starter

sijey

Joined Dec 30, 2020
2
Hi! How do you convert an ADC reading from an MQ3 sensor using ADS1115 to ppm? I am trying to measure the amount of alcohol.

This is the link to the datasheet of the MQ3 sensor https://www.sparkfun.com/datasheets/Sensors/MQ-3.pdf .

I am getting ADC values which ranges from 3000-4500 when not exposed to alcohol and up to 8000 when exposed to alcohol.

My MQ3 sensor is connected to the ADS1115 via A0 pin and my ADS1115 is connected to my Raspberry Pi via the SCL and SDA pins.

My code is basically:

import Adafruit_ADS1x15
adc = Adafruit_ADS1x15.ADS1115()
GAIN = 1
mq3reading = adc.read_adc(0, gain=GAIN)

Thank you very much!
 

MrChips

Joined Oct 2, 2009
30,809
By calibration. You need a sample of known concentration around the range you are trying to measure.
Ideally, you should have a number of known concentrations that covers the entire range of interest since the relationship of concentration to ADC value might not be linear.
 

Thread Starter

sijey

Joined Dec 30, 2020
2
Hi! I'm sorry sir but I'm new to all of these but can you suggest steps on how to do that? That would be greatly appreciated. Thank you!
 

Reloadron

Joined Jan 15, 2015
7,517
You need a known sample gas. I am guessing breath alcohol sensor. The MQ 3 sensor is not quite a high end sensor. Normally for alcohol they use a Compressed Ethanol Gas mixture of a known value. That or a "wet bath" simulation. The data sheets on these things are terrible.

"SENSITVITY ADJUSTMENT Resistance value of MQ-3 is difference to various kinds and various concentration gases. So,When using this components, sensitivity adjustment is very necessary. we recommend that you calibrate the detector for 0.4mg/L ( approximately 200ppm ) of Alcohol concentration in air and use value of Load resistance that( RL) about 200 KΩ(100KΩ to 470 KΩ)".

You want an Ethanol Gas Standard of known concentration. You choose a concentration based on where you want your sensor to be accurate but the calibration mixture will likely be expensive. They forget to tell you that when you buy the sensor.

Measure the Vout (output voltage) and then choose a good gain setting for your ADS1115.

Ron
 
Top