Warning: putenv() has been disabled for security reasons in /home/users4/d/debrouilloweb/www/wikidebrouillard/LocalSettings.php on line 193

Warning: putenv() has been disabled for security reasons in /home/users4/d/debrouilloweb/www/wikidebrouillard/LocalSettings.php on line 197

Warning: putenv() has been disabled for security reasons in /home/users4/d/debrouilloweb/www/wikidebrouillard/includes/parser/Parser.php on line 2338

Warning: putenv() has been disabled for security reasons in /home/users4/d/debrouilloweb/www/wikidebrouillard/includes/parser/Parser.php on line 2338

Warning: putenv() has been disabled for security reasons in /home/users4/d/debrouilloweb/www/wikidebrouillard/includes/parser/Parser.php on line 2338

Warning: putenv() has been disabled for security reasons in /home/users4/d/debrouilloweb/www/wikidebrouillard/includes/parser/Parser.php on line 2338

Warning: putenv() has been disabled for security reasons in /home/users4/d/debrouilloweb/www/wikidebrouillard/includes/parser/Parser.php on line 2338
[ Wikidébrouillard ] Grove : capteur de qualité de l'air

Grove : capteur de qualité de l'air

De Wikidebrouillard.

Article incomplet en cours de rédaction

Sommaire

Introduction

This sensor is designed for comprehensive monitor over indoor air condition.

It's responsive to a wide scope of harmful gases, as carbon monixide, alcohol, acetone, thinner, formaldehyde and so on. Due to the measuring mechanism, this sensor can not output specific data to describe target gases' concentrations quantitatively. But it's still competent enough to be used in applications that require only qualitative results, like auto refresher sprayers and auto air cycling systems.


Grove - capteur de qualité de l'air

Features

  • Responsive to a wide scope of target gases
  • Cost efficient
  • Durable

Cautions

Usage

As described in Introduction, this sensor does better in providing qualitative results over a wide scope of target gases. In this demo, we difine 4 statuses for reference in the .cpp file. They are:

a. air fresh -- indicating a good air condition
b. low pollution -- indicating a rather low concentration of target gases exist.
c. high pollution(without "Force signal active" messeage printed on serial monitor) -- you should be aware of the pollution level and think if some measures should be taken.
d. high pollution(with "Force signal active" messeage printed on serial monitor) -- instant measures should be taken to improve the air quality.

We encapsulated the judge structure in .cpp file. You can find your way to modify the threholds in it.

Let's start to try it out!


1. Connect the Sensor to A0 port of Grove - Base Shield.
Image:Air_Quality_Sensor Connector.jpg
2. Download the File :AirQuality_Sensor Library.

3. Wait 2 min for heat-up of the sensor. Then open the example below by the path:File -> Example ->AirQuality_Sensor->AirQuality_Sensor.

/*
AirQuality Demo V1.0.
connect to A1 to start testing. it will needs about 20s to start
* By: http://www.seeedstudio.com
*/
#include "AirQuality.h"
#include "Arduino.h"
AirQuality airqualitysensor;
int current_quality =-1;
void setup()
{
Serial.begin(9600);
airqualitysensor.init(14);
}
void loop()
{
current_quality=airqualitysensor.slope();
if (current_quality >= 0)// if a valid data returned.
{
if (current_quality==0)
Serial.println("High pollution! Force signal active");
else if (current_quality==1)
Serial.println("High pollution!");
else if (current_quality==2)
Serial.println("Low pollution!");
else if (current_quality ==3)
Serial.println("Fresh air");
}
}
ISR(TIMER2_OVF_vect)
{
if(airqualitysensor.counter==122)//set 2 seconds as a detected duty
{

airqualitysensor.last_vol=airqualitysensor.first_vol;
airqualitysensor.first_vol=analogRead(A0);
airqualitysensor.counter=0;
airqualitysensor.timer_index=1;
PORTB=PORTB^0x20;
}
else
{
airqualitysensor.counter++;
}
}

4. Upload the code. Please click here if you do not know how to upload it.
5. Open serial monitor. 

Image:Air Quility Sensor1.jpg


To adjust the threholds and indicating messeages, refer the judge structure below in .cpp file.

 int AirQuality::slope(void)
{
while(timer_index)
{
if(first_vol-last_vol>400||first_vol>700)
{
Serial.println("High pollution! Force signal active."); 
timer_index=0; 
avg_voltage(); 
return 0; 

}
else if((first_vol-last_vol>400&&first_vol<700)||first_vol-vol_standard>150)
{ 
Serial.print("sensor_value:"); 
Serial.print(first_vol); 
Serial.println("\t High pollution!"); 
timer_index=0; 
avg_voltage();
return 1;

}
else if((first_vol-last_vol>200&&first_vol<700)||first_vol-vol_standard>50)
{
//Serial.println(first_vol-last_vol);
Serial.print("sensor_value:");
Serial.print(first_vol); 
Serial.println("\t Low pollution!"); 
timer_index=0;
avg_voltage();
return 2; 
}
else
{
avg_voltage(); 
Serial.print("sensor_value:");
Serial.print(first_vol);
Serial.println("\t Air fresh");
timer_index=0;
return 3;
}
}
return -1;
}

Resources

AirQuality Sensor Library.zip

Fichier:Air quality sensor egale file.zip

Fichier:Air quality sensor schematic.pdf

Fichier:TP-401A Indoor Air quality gas sensor.pdf

Support

If you have questions or other better design ideas, you can go to our forum or wish to discuss.

{{|}}[[Catégorie:]]

Crédits

Cette page est la traduction de celle-ci : http://www.seeedstudio.com/wiki/Grove_-_Air_Quality_Sensor

Traducteurs : machine et bidule - 2013 dans le cadre de Master 2 rédacteur traducteur 2013‎‎

Portail des ExplorateursWikidébrouillardLéon DitFLOGPhoto mystèreJ'ai FaitPortraits
AR
CO

Grove : capteur de qualité de l'air

Rechercher

Page Discussion Historique
Powered by MediaWiki
Creative Commons - Paternite Partage a l

© Graphisme : Les Petits Débrouillards Grand Ouest (Patrice Guinche - Jessica Romero) | Développement web : Libre Informatique