Sunday, April 27, 2008

Sensor Report - MQ3 Gas sensor

1. MQ3 Gas Sensor
This is an alcohol sensor from futurlec, named MQ-3, which detects ethanol in the air. It is one of the straightforward gas sensors so it works almost the same way with other gas sensors. It costs $6.90.Typically, it is used as part of the breathalyzers or breath testers for the detection of ethanol in the human breath.

2. Datasheet
Here is a datasheet, only 2 pages. It shows features, applications, specifications and configurations etc. It is a pretty simple datasheet. Since this datasheet was not prepared in English, the translation is not very accurate.

3. How it looks like :
Basically, it has 6pins, the cover and the body. Even though it has 6 pins, you can use only 4 of them. Two of them are for the heating system, which I call H and the other 2 are for connecting power and ground, which I called A and B.

If you look at the inside of the sensor, you will find the little tube. Basically, this tube is a heating system that is made of aluminum oxide and tin dioxide and inside of it there are heater coils, which practically produce the heat. And you can also find 6 pins. 2 pins that I called Pin H are connected to the heater coils and the other ones are connected to the tube.

4. How it works :
How does it work? The core system is the cube. As you can see in this cross-sectional view, basically, it is an Alumina tube cover by SnO2, which is tin dioxide. And between them there is an Aurum electrode, the black one. And also you can see how the wires are connected. So, why do we need them? Basically, the alumina tube and the coils are the heating system, the yellow, brown parts and the coils in the picture.
5. Working Process :
If the coil is heated up,

SnO2 ceramics will become the semi - conductor, so there are more movable electrons, which means that it is ready to make more current flow.
Then, when the alcohol molecules in the air meet the electrode that is between alumina and tin dioxide, ethanol burns into acetic acid then more current is produced. So the more alcohol molecules there are, the more current we will get. Because of this current change, we get the different values from the sensor.
6. Microcontroller Connections
Here is the schematic. It is pretty simple. First, you can use 5v. And as you can see one of H pins goes to the power and the other one is connected to the ground. And the pin A is connected between the power and the pin H and the pin B is goes to the microcontroller. Also between the ground and the Arduino, you need the resistor. Before you connect the resistor if you use the pot, you can tune the resistor for getting more accurate values. In the datasheet they say you can used 100k om to 470k om.

7. Typical Behavior
If you blow, it will react. Depending on the environment, it gives you little bit of different values. But in my case, it gives me 200 as the lowest value and 1000 as the highest value. And when it detects the alcohol in the air, actually it is pretty sensitive, the value gets higher very quickly but you have to wait for about 1 to 5 minutes to reset it. So that means getting values is fast but resetting is so slow. And the sensitivity of this sensor is affected by time span. When I used an old sensor, the range of value was smaller than the new one's.

8. Code Sample and Demo

Here is the sample codes for the arduino and processing.
Arduino
Processing

**Actually, I could not drink whenever I wanted to test it so I used the hand gel, which is really strong instead of drinking. You can just rub your hands the hand gel and blow it.

I made a simple demo with this sensor. So when users blow their breath to the sensor and the sensor detects the alcohol then my face in the screen is getting red.
video
codes for processing and arduino

Also I did the events, actions and filtering assignment with this sensor. I think this one might be a better demo. Here is a video. If the users blow their breath to the sensor, the foam of beer will go up and after a while it will go down itself. And you can see more details here.
video
code for arduino

13 comments:

Bill Knouse said...

Cool project!! I just received my order of these sensors and have had a fun time playing around with them. I'm also using the arduino environment to interface to the MQ-3. Have you had any luck converting the adc value (0-1024) to the BAC or ppm levels? I thought the data sheet was poor and there wasn't much information out there. Any help you can give will be much appreciated. Thanks

jane park said...

Eun jung!! This is jae eun park!
I sent you an email about a month ago and didn't hear from you..
so I thought may be you no more use that address and googled you..
couldn't find any other address of you but here.. hope to hear from you! I really miss you and wish you have a happy holidays!write me back to hellojanepark(at)gmail(dot)com Love. Jane.

TLP said...

Hi
I Have been trying to use the MQ-3 Sensor. btw thank you for putting up the tutorial i could follow it easily and wire up the sensor. How ever i am going to be using a PIC microchip to get the analog signal from the sensor. How can i check it is working ? withcout writing the code. I checked for the voltage between GND and Vout, when i Check the voltage before bringing any alcohol near it i get a reading of 4.76 is this ok ? or am i supposed to get a lower value ? and can u give me some information so as to calibrate the sensor ?

Thank you in advance :)

Vinod said...

i did not get wht u were talking about the values 1000 and 200 ? like the digital data ? plz tell me the analog output range of this plz? im in confusion ..waiting 4 ur response

Jakub said...

Hi there!
Im currently working on the breathalyzer and I have used the sensor MQ3. Here is my question to the person which is more experienced with that :)
I have connected stable 5 (~4.98) V to the sensor H and, say, A pins. (The other H to ground). And then I have got the 200k resistor. The voltage range that I could notice is about 4.4 to 4.9V. 4.9 when I was drunk - 4.4 otherwise ;) Are those correct? How can I interpret these values? There is a note in a datasheet, that the sensor resistance is given for 4mg/L of alcohol in clean air. How can I find this value? How can I convert the voltage on the output to some more relevant stuff (I mean what should be the lower bound for 0mg/L and the upper bound of voltage for max mg/L)? Thank you in advance for the reply!
Cheers.

Gianni said...

Hi, good job. I'm making a circuit, using MQ3, a picmicro and an LCD display. When finished, i will publish a post (in Italian language) on my blog (http://www.settorezero.com), can I use your images? I'll put a backlink to your page

RaghuRam said...

Hi

Thank u very very very very much

for giving me this information which helped a lot for our final year project.

Once again THANK YOU very much.

Have a Nice Day

Good Luck

RaghuRam said...

Hi

Thank u very very very very much

for giving me this information which helped a lot for our final year project.

Once again THANK YOU very much.

Have a Nice Day

Good Luck

Guilherme said...

I am using the MQ-3 sensor in my project, but the output voltage is always 0 (zero). What am i doing wrong?

paidi123 said...

verry nice info, thankyou veryy much

WILDSCAR said...

Hi dude
could u plz tell me an approximated o/p voltage from MQ3 sensor....
is it between 300mv-3.7v?
In case of testing d ckt without any alcohol i need 2 provide an equal amount of voltage at normal condition from sensor...

supunsridhara said...

dear sir,tel me presser of the air sample must be consider for the calculations

supunsridhara said...

tel me the presser of the air sample must be considered for the calcullactions