Post a new topicPost a reply Page 1 of 2   [ 16 posts ]
Go to page 1, 2  Next
Author Message
 Post subject: Calibrating TGS2611 - Methane Gas
PostPosted: Wed Mar 02, 2011 8:52 am 

Joined: Wed Nov 10, 2010 9:45 am
Posts: 271
Location: Australia
Hello I'm having troubles calibrating this sensor with this code: -
------------------------------------------------

void setup()
{
USB.begin();
SensorGas.setBoardMode(SENS_ON);
SensorGas.configureSensor(SENS_SOCKET2A,1,1);
SensorGas.setSensorMode(SENS_ON, SENS_SOCKET2A);

}

void loop()
{

USB.println("The Concentration of CH4 Gas measured is equal to:");
delay(30000);
float val = SensorGas.readValue(SENS_SOCKET2A);
USB.println(val);

}
------------------------------------------------

The output is: -

The Concentration of CH4 Gas measured is equal to:
0.2999999809
The Concentration of CH4 Gas measured is equal to:
0.3161290168
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3129032135
The Concentration of CH4 Gas measured is equal to:
0.3129032135
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3129032135
The Concentration of CH4 Gas measured is equal to:
0.3258064270
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3064516067
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3419354915
.
.
.
.
.
.
.
------------------------------------------------

What I don't understand is the graph provided and the specifications. It's given that the concentration is derived by the ratio of Rs/Ro. I assume the graph is in logarithmic scale with base=10.

Suppose I get the right voltages in my output which is Vout = 0.3 V
and
the equation given is: -
Rs = ( [ Vc x R(Load) ]/Vout ) - R(load)
then,
R(load) = 1 k(ohms)
Vout = 0.3 V
Vc = 5 V
hence,
Rs = 15.666 k(ohms)

This is where I get stuck: -
I assume that Ro which is the resistance of methane in 5000 ppm to be constant (in order to obtain the linear graph provided). However the specifications say that the value of Ro could range between 0.68 - 6.8 k(ohms). This is really confusing. Has anyone calibrated this sensor before?

Thank you so much,
Amro Quandour
CCER


Top
 Profile  
 
 Post subject: Re: Calibrating TGS2611 - Methane Gas
PostPosted: Wed Mar 02, 2011 3:48 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Hi Amro Quandour,

this is a problem we hadn't seen before. Although resistance values in Figaro sensors may vary a lot, this one is way apart from the information in the data sheet. Could you give us more information about your calibration process?

Regards.


Top
 Profile  
 
 Post subject: Re: Calibrating TGS2611 - Methane Gas
PostPosted: Wed Mar 02, 2011 4:04 pm 

Joined: Wed Nov 10, 2010 9:45 am
Posts: 271
Location: Australia
Hello,

I haven't calibrated anything yet. I am just trying to work out mathematically how to find the value of Ro and Rs. I don't understand whether or not Ro is constant or whether it is the same as R(Load).

Well the way I went about it is by getting a linear equation for the logarithmic graph. I obtained the following based on points I put in Excel and used it to estimate a trendline. so I got: -

Rs/Ro = -0.522ln(x) + 5.5071

where x = concentration of methane (ppm)

Now I say I use a result from previous values output: -

Let's use

V_out = 0.3 Volts

So I am trying to work out what Rs is using the equation from page6 from the "gas Board" manual: -

Rs = (Vc - Vout)/Vout * R(Load)

= ( ( 5 - 0.3 ) / 0.3 ) * 1000
= 15.6 kohms

Now I am stuck on how the graph from page 16 is related to each other. I don't know how to get R0 . I am not sure how to calibrate it when I have so many variables to consider. Any help would be appreciated,

Thank you,
Amro


Top
 Profile  
 
 Post subject: Re: Calibrating TGS2611 - Methane Gas
PostPosted: Thu Mar 03, 2011 10:30 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Hi Amro Quandour,

First of all, take into account that the Rs/R0 axis is also in a logarithmic scale, you will have to correct it in your approximation.

Anyway, your other calculation is right, you are getting a 15.6kohm resistance. Under what concentration conditions you got it? That resistance would correspond a very low concentration of gas, possibly even below the working range of the sensor.

In order to calibrate the sensor, we recommend you the next process:

1) Measure the resistance of the sensor under the midpoint of the working range of your application.

2) Set the load resistor at that value.

3) Take some measurements along all the working range in order to determine the sensitivity.

Hope this helps, regards.


Top
 Profile  
 
 Post subject: Re: Calibrating TGS2611 - Methane Gas
PostPosted: Thu Mar 03, 2011 5:34 pm 

Joined: Wed Nov 10, 2010 9:45 am
Posts: 271
Location: Australia
Solved ! Thanks


Top
 Profile  
 
 Post subject: Re: Calibrating TGS2611 - Methane Gas
PostPosted: Mon Mar 14, 2011 8:35 pm 

Joined: Tue Mar 08, 2011 8:56 pm
Posts: 66
AmroQuandour wrote:
void setup()
{
USB.begin();
SensorGas.setBoardMode(SENS_ON);
SensorGas.configureSensor(SENS_SOCKET2A,1,1);
SensorGas.setSensorMode(SENS_ON, SENS_SOCKET2A);

}

void loop()
{

USB.println("The Concentration of CH4 Gas measured is equal to:");
delay(30000);
float val = SensorGas.readValue(SENS_SOCKET2A);
USB.println(val);

}
------------------------------------------------

The output is: -

The Concentration of CH4 Gas measured is equal to:
0.2999999809
The Concentration of CH4 Gas measured is equal to:
0.3161290168
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3129032135
The Concentration of CH4 Gas measured is equal to:
0.3129032135
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3129032135
The Concentration of CH4 Gas measured is equal to:
0.3258064270
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3064516067
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3096774101
The Concentration of CH4 Gas measured is equal to:
0.3419354915
.
.
.
.
.
.
.
------------------------------------------------


Hello Guys,

Could someone tell me what is the unit of these values (0.3129032135, 0.3258064270...) obtained?
Also that how to get Ro.

Thanks.


Top
 Profile  
 
 Post subject: Re: Calibrating TGS2611 - Methane Gas
PostPosted: Tue Mar 15, 2011 10:34 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Hi zeus2kx,

the output read is in volts. You can find how to find out the Ro resistance value in section 2.0 of the Gas Sensor Board handbook.

http://www.libelium.com/documentation/w ... rd_esp.pdf

Regards.


Top
 Profile  
 
 Post subject: Re: Calibrating TGS2611 - Methane Gas
PostPosted: Wed Mar 16, 2011 4:20 am 

Joined: Tue Mar 08, 2011 8:56 pm
Posts: 66
Hi,

Thanks.
Okay so now I have Vout, Vc, RI which would give me a value of Rs. This is clear.
How do I find final gas concentration (in ppm) so that I can draw the graph to see if it matches with the graphs provided?
I also couldn't find how to get value of R0 in the manual (Page 6 ?).


Thanks,

Best.


Top
 Profile  
 
 Post subject: Re: Calibrating TGS2611 - Methane Gas
PostPosted: Thu Mar 17, 2011 10:46 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Hi zeus2kx,

you should use Rs to find out the gas concentration from the graphs provided in the documentation. Take into account that those graphs are a reference for an average sensor, but there is a high variability between sensors of the same model, so calibration is highly recommended.

R0 is the resistance in air (or under a determined gas concentration). Again, an approximation is provided in the documentation, but to get an accurate value calibration would be needed again.

Regards.


Top
 Profile  
 
 Post subject: Re: Calibrating TGS2611 - Methane Gas
PostPosted: Thu Mar 17, 2011 1:32 pm 

Joined: Tue Mar 08, 2011 8:56 pm
Posts: 66
Hi,

Thanks for calibration tip.
Please tell me the easiest way to rewrite the code to get the result through wifi.
This code does give me results only when device is connected with USB.

Thanks.

void setup()
{
USB.begin();
SensorGas.setBoardMode(SENS_ON);
SensorGas.configureSensor(SENS_SOCKET2A,1,1);
SensorGas.setSensorMode(SENS_ON, SENS_SOCKET2A);

}

void loop()
{

USB.println("The potential difference (Vout) is:");
delay(30000);
float val = SensorGas.readValue(SENS_SOCKET2A);
USB.println(val);

}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 2   [ 16 posts ]
Go to page 1, 2  Next


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use