Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sensor for air content analyzer with ATmega16

Status
Not open for further replies.

ravruch

Newbie level 5
Joined
Dec 31, 2011
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pune India
Activity points
1,354
hello;
i am going to build a an air content analyzer using ATMEGA16.
This device is going to show how much percentage of certain gas is present in air(eg percentage of co,co2,lpg)
For lpg ia m using a sensor in MQ SERIES **broken link removed**
Gas is measured in ppm unit,if I want to display percentage of gas on LCD ,WHAT SHOULD I do??

MQ6 is anolog sensor,so I am going to use ADC,but If I want to display exact percentage how should I do??
 

Re: air content analyzer

but If I want to display exact percentage how should I do??
Using a random number generator will produce a similar accuracy of "exact percentage". Forget about it.

Quantitative air content measurements requires:
- a selective sensor principle
- a stable sensor
- calibration
SnO2 sensors like MQ-6 can't provide selectivity or stable measurement. Calibration (applying a test gas of known concentration) is possible but not reasonable due to missing sensor stability.

These sensors serve a reasonable purpose as monitoring device, if selectivity and quantitative measurement aren't required, displaying the result in coarse steps like green - yellow - red.
 
Re: air content analyzer

Hello!

Gas is measured in ppm unit,if I want to display percentage of gas on LCD ,WHAT SHOULD I do??

What do you mean? You don't understand how to convert ppm (parts per million) to %?
Or you don't know how to use the LCD?

MQ6 is anolog sensor,so I am going to use ADC,but If I want to display exact percentage how should I do??

1. Look at the docs, find the value (in ppm) corresponding to the minimal voltage.
2. Do the same for the maximal voltage
3. Measure the output of your sensor. Its value should be between the above values.
4. Do the math to calculate the gas concentration.

And if the sensor is not linear, create a lookup table with a few points, and do the same math as
above (interpolation) between the points.

Dora.
 

Re: air content analyzer

Using a random number generator will produce a similar accuracy of "exact percentage". Forget about it.

Quantitative air content measurements requires:
- a selective sensor principle
- a stable sensor
- calibration
SnO2 sensors like MQ-6 can't provide selectivity or stable measurement. Calibration (applying a test gas of known concentration) is possible but not reasonable due to missing sensor stability.

These sensors serve a reasonable purpose as monitoring device, if selectivity and quantitative measurement aren't required, displaying the result in coarse steps like green - yellow - red.

First of all thanks for you concerns,
so,which sensor would serve the purpose,

---------- Post added at 23:16 ---------- Previous post was at 23:14 ----------

---------- Post added at 23:20 ---------- Previous post was at 23:16 ----------

Hello!



What do you mean? You don't understand how to convert ppm (parts per million) to %?
Or you don't know how to use the LCD?



1. Look at the docs, find the value (in ppm) corresponding to the minimal voltage.
2. Do the same for the maximal voltage
3. Measure the output of your sensor. Its value should be between the above values.
4. Do the math to calculate the gas concentration.

And if the sensor is not linear, create a lookup table with a few points, and do the same math as
above (interpolation) between the points.

Dora.

I knew the mathematical calculations,but I was unable to find "EXACT" percentage
 

Re: air content analyzer

Hi,

Try the program codes similar to temperature sensor ans displaying.

Use the datasheet values of sensitivity (i.e; 300-10000 ppm for MQ 2). And create a lookup table for that you need the original gas analyzer which you can use for calibration of the actual quantitative measurement.

Get a input to lookup table reference mapping using ADC.

Its simple to give idea but might be difficult to implement.

Thank You.

Sooraj
 
Re: air content analyzer

Hello!

I knew the mathematical calculations,but I was unable to find "EXACT" percentage

Could you explain what you mean by the word "EXACT". Why do you put it between quotes?
Is it exact or is it not?
There is no such thing as exact value in physics. You can measure a value with a certain accuracy.
So could you describe more accurately what you want to know?
You have an analog sensor, a micro controller, an LCD. How many bits does your ADC feature? 10? 12?
In this case, the accuracy depends on bit accuracy, noise and linearity of the sensor.

Now what's your question? Your first question was "how should I do". But that's quite wide.
Nobody is going to build it for you, so you should tell us what you have already done, what problem
you faced, etc... Describe accurately and you will get accurate replies.

Dora.
 

Re: air content analyzer

Hello!



Could you explain what you mean by the word "EXACT". Why do you put it between quotes?
Is it exact or is it not?
There is no such thing as exact value in physics. You can measure a value with a certain accuracy.
So could you describe more accurately what you want to know?
You have an analog sensor, a micro controller, an LCD. How many bits does your ADC feature? 10? 12?
In this case, the accuracy depends on bit accuracy, noise and linearity of the sensor.

Now what's your question? Your first question was "how should I do". But that's quite wide.
Nobody is going to build it for you, so you should tell us what you have already done, what problem
you faced, etc... Describe accurately and you will get accurate replies.

Dora.




hey;
For my academic project,I am trying to build an 'air content analyzer' in which I want to display the contents of gases(co2,co,lpg) in percentage on lcd
I am using ATMEGA16,and analog sensors,
adc output is stored in adch,adcl registers,which is 8 bit binary,but in formula we substitute corresponding decimal value isnt it??
so,is there any function which we can use within the program to convert ADCH content into decimal.

---------- Post added at 16:08 ---------- Previous post was at 15:53 ----------

hey;
For my academic project,I am trying to build an 'air content analyzer' in which I want to display the contents of gases(co2,co,lpg) in percentage on lcd
I am using ATMEGA16,and analog sensors,
adc output is stored in adch,adcl registers,which is 8 bit binary,but in formula we substitute corresponding decimal value isnt it??
so,is there any function which we can use within the program to convert ADCH content into decimal.
 

Re: air content analyzer

If we put the all relevant sensor physics problem aside, you are asking about printing numbers. Most people would use the convenient library functions of a C compiler for this purpose, either sprintf() or itoa().
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top