Hi i am new here, And i am currently working on a project for a biogas monitoring system. I am currently working on the sensor as i am speaking. And i would like to ask about how do i make sure that the sensor i am using is calibrated properly for its intended use. And for more information this is a sensor that i bought online with the module included. This is the source code i am working on:
#define MQ136_PIN 34
#define VCC 5.0
float Ro = 17000;
void setup() {
Serial.begin(115200);
Serial.println("MQ-136 H2S Sensor Initialization...");
}
void loop() {
int sensorValue = analogRead(MQ136_PIN);
float Vout = sensorValue * (VCC / 4095.0); // Convert ADC value to voltage
float Rs = (VCC - Vout) * Ro / Vout;
float ratio = Rs / Ro;
float H2S_ppm = 10 * pow(ratio, -1.43);
// Print results
Serial.print("Raw ADC Value: ");
Serial.print(sensorValue);
Serial.print(" | Voltage: ");
Serial.print(Vout, 2);
Serial.print("V | Rs: ");
Serial.print(Rs);
Serial.print(" ohms | H2S Concentration: ");
Serial.print(H2S_ppm, 2);
Serial.println(" ppm");
delay(1000);
}
I am just aking opinions on should i go to company that has a calibration service to help me on making sure that the sensors are producing the right outputs or should i just stick to the datasheet and experiment more?
This is the sensor i am using for refrence, and also the datasheet i am using is this one:
MQ-136 Datasheet(PDF) - Hanwei Electronics Group Corporation
To calibrate a gas sensor requires exposing it to mixtures with known concentrations of the gas, measuring the output and calculating an offset and scale factor.
Unfortunately, the MQ sensors all respond to more than one gas. The MQ-136 data sheet shows (see below) that it responds to ammonia just as well as H2S, so if both are present, it is impossible to distinguish them.
If you are want to measure a particular gas, you need an industrial sensor specific to that gas.
1 Like
Agree, however it might be possible to have several different sensors that can detect H2S among others and combine the results. The sensors should be as disjunct as possible (except for H2S) .
Suppose sensor A detects { NH3, H2S } and sensor B detects { H2S, CO }
Then there are 4 possible measurements
both sensors are quiet => no known gas
sensor A triggers and B not ==> possibly NH3
sensor B triggers and A not ==> possibly CO
both sensors trigger ==> possibly H2S or { NH3, CO } mix or all gasses
Still not 100% fail safe but better than using just one.
Yes, and that has been done. This is an elegant example using the MQ series:
1 Like
My experience may or may not relate to your project.
I purchased a nitrogen generation system from an old, well known company. They could not get the nitrogen purity and volume to be at the advertised levels. They used an oxygen sensor to tell how pure the nitrogen was, ignoring all the trace levels of other gasses.
A factory tech tried to calibrate the O2 sensor. He had 3 sealed cans of test oxygen and used all three and did not have the required volume to finish the test and could not get more cans of O2. So he gave up and said the O2 sensor was actually ok.
The point is you MUST calibrate the instrument in the environment you are going to use it!
And I might add: You can do it yourself much cheaper that having someone else do it. You may have to do it quite often.