Header Ads

MQ3 Gas sensor - Arduino Code - Connection Diagram - Pin Detials

    1.   MQ3 Gas Sensor
This is an alcohol 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 is used as part of the breathalyzers or breath testers for the detection of ethanol in the human breath.

2. 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. Arduino Code Sample and Demo

Here is the sample codes for the arduino and processing.
int gasPin = 0;
int value = 0;
void setup() {
void loop() {
value = analogRead(0)/2;

No comments:

(C) Arshad Pathan. [Do not copy any contain without permission]. Powered by Blogger.