Thursday, October 7, 2010

How To Smell Pollutants

step 1Gather Your Supplies

You'll need:
-an Arduino (or equivalent)
-a cable to hook the Arduino up to your computer / provide power
-a computer to read values
-a potentiometer or resistor of known value. anywhere from 500-1k ohms should work
-the gas sensor: a pain to buy in small quantities. i bought 2 and they cost like $22 each, but volume orders get way cheaper... the specific sensor i used was figaro sensors's 2620.

Here's what I used:
-the arduino kit I used
-the different sensors available from Figaro (use different sensors to 'smell' different things)

It' useful but not necessary to have a multimeter and wire stripper handy...

The pdf included with this step is the price list from the sensor manufacturer as of March 2008.

step 2Set Up Your Arduino

1. Get your Arduino connected to your computer and functional
This should be pretty straightforward, especially with any newer Arduino. This guide worked for me.
2. Program your Arduino to read the value from an analog input and display this on-screen. I used
-this guide for using a potentiometer with an arduino and basically just modified the frequency with which it reads input value (delay(100) = read 10 times per second) to get the following code, which works for me:

//this outputs pot value to screen in ohms

int gasSensor = 0; // select input pin for gasSensor
int val = 0; // variable to store the value coming from the sensor

void setup() {

void loop() {
val = analogRead(gasSensor); // read the value from the pot
Serial.println( val );

If you're using this as your first excuse to play with an Arduino, you might want to try just wiring up the potentiometer and reading the value from it before adding the sensor.

step 3Create Your Circuit

The picture attached is an image of the circuit from above (meaning that the sensor's leads are pointing towards the ground; there's a little metal tab protruding from the sensor to let you understand which pin is which. Also, check out the figaro guide for the specific sensor you choose. Attached is the datasheet, with some example circuits, for the 2620.

For the 2620, the datasheet specifies at least 450 ohms resistance needed. I tuned my potentiometer to ~right around 450 ohms.

In plain english, here are the connections you'll want to make:
-sensor pin 1 to an outer pin of potentiometer and ground (arduino ground)
-sensor pin 2 to other outer pin of potentiometer
-sensor pin 3 to arduino +5 v and sensor pin 4
-middle pin of potentiometer to arduino analog 0 input

You can solder this (read Figaro note on which type of solder and temperature exposure of sensors), but a breadboard is good enough for my purposes.

step 5Build Away!

Without burning in this circuit for a week and adding a thermistor, this is really only good for reading relative concentrations of chemicals: eg, if you want a 'lower-VOC' paint, you could hold this over different open bottles of paint (in a room of constant temperature) and reasonably feel a bit safer using the paint that registers the lowest value. Obviously, there are nasties (and probably some VOCs: I don't know) that this doesn't detect, but it's definitely a bit better than nothing:-)

Attached is a pdf Figaro Sensors provided, detailing the response of thermistors at different temperatures. Definitely not the only thermistor you can use, but may be useful as you explore your own, better version of this project.

A cool expansion I want to see is to display the approximate level in parts per million (ppm) of air pollution on my back as I ride my bike through traffic, maybe with an LED 'Mr. Yuck' sign that turns on above a certain concentration as well. Let me know what you build, and have fun!
Related Posts Plugin for WordPress, Blogger...
Disclaimer: All the information in this blog is just gathered from different sites in the web and placed here and I am not the owner for these content

Popular Projects


My Blog List

Give Support

Give Support
Encourage me Through Comments & by Following