Arroyo 1 Jorge Arroyo 4/30/09 EE 290 Dr. Kachroo Gas Sensor While looking at different types of sensors, I came across a company called Figaro USA. They sell a variety of gas sensors which detect different gases. For the last project of the semester, the topic for our circuit was sustainability. Although my final circuit is not sustainable because it requires the constant use of batteries, it may be used for applications as organic vapor detectors which could enhance worker s safety in factories, and may help with the control of pollution. The sensor I bought is the TGS 2620 which is most sensitive to alcohol and organic solvent vapors. Here is a picture of the sensor: I was wondering about how the sensor actually worked and found a report on gas sensors on the web. According to the website, these sensors use a Wheatstone bridge to detect gases. Two of the four pins on the sensor are connected to a heater and the other two are connected to the sensing element as shown in the diagram below.
Arroyo 2 The sensing element is coated with a metal oxide, usually SnO 2 (tin oxide), which is oxidized when it is heated. From here, my comprehension of the chemistry is tenuous at best, but as I understand it, the SnO 2 donates electrons from itself to the O 2, resulting in negatively charged O 2 molecules and positively charged SnO 2 left on the surface of the sensor. The positively charged SnO 2 acts as a barrier to electron flow and increases the resistance of the sensor. In the presence of a deoxidizing gas, such as ethanol fumes, the ratio of available oxygen decreases, so there is less oxygen to accept the SnO 2 's donor electrons, which means that the SnO 2 is not as positively charged and the resistance of the sensor is reduced. Gas levels are determined by measuring the voltage across a load resistor which is put between the negative pin of the sensing element and ground. This change in resistance can be sent as an analog value to a microprocessor. The load resistor can vary between models, between sensors, and depending on conditions in which the sensor is being used (http://itp.nyu.edu/physcomp/sensors/reports/gassensors). The basic wiring of the sensor is simpler than the explanation of how it works. It has four pins and the figures below show where each pin has to be connected in a circuit. Pin Descriptions
Arroyo 3 Pin Connections 1. Heater Ground - Ground (0V) 2. Sensor Electrode (output) - must be connected to load resistor (R L ) and ground, the value of this pin can be sent to an analog-in on a microprocessor, R L should be between 500 and 2K ohms, but the appropriate value for R L will change with use (without 7 days pre-heating), to compensate use a variable resistor 3. Sensor Electrode (input) - (+5V) 4. Heater Power - (+5V) So this is how I plugged in my sensor to the Arduino: (Pins are drawn from top view)
Arroyo 4 I found a code to program the Arduino to read values from the sensor every half a second and display them by pressing on the serial monitor button on the Arduino environment. The code is as follows:
Arroyo 5 Now that I understood the connections of the sensor, I wanted to make the Arduino set up an alarm if the value from the sensor surpassed a certain value. This could be used for safety measures. I found a circuit displayed below on my Basic Electronic Experiments handbook. It lights up an LED and makes a speaker produce sound. The LED and the speaker will only light up and produce sound when the switch is pressed. I decided to replace that switch with a relay connection to the Arduino. The relay connection to the Arduino is as follows:
Arroyo 6 My final circuit consists of the gas sensor connected to the Arduino, and the Arduino connected to the alarm. The schematic and the actual circuit are in the pictures beneath.
Arroyo 7 The final code had the part from the gas sensor and there is also an if statement saying that if the value read from the sensor surpasses 50 it should give an output to the relay. There is also a video of the circuit working at http://www.youtube.com/watch?v=8ryzqqw-xtc