Why the MQ-3 Alcohol sensor give random number?

I tried to create project with MQ-3 alcohol sensor with arduino. I already attached all the cable to the sensor and arduino and i code it too. But when I uploaded it and looked at the serial monitor, the sensor show weird value, i don't know whats wrong..

Here is the values :

This is the code :

const int ledPin=13;
const int AOUTpin = A0;
const int DOUTpin=2;

int limit;
int values;
void setup() {
Serial.begin(115200);//sets the baud rate
pinMode(DOUTpin, INPUT);//sets the pin as an input to the arduino
pinMode(ledPin, OUTPUT);//sets the pin as an output of the arduino
}

void loop() {
values= analogRead(AOUTpin);
limit= digitalRead(DOUTpin);
Serial.print("Alcohol value: ");
Serial.println(values);//prints the alcohol value
Serial.print("Limit: ");
Serial.print(limit);//prints the limit reached as either LOW or HIGH (above or underneath)
delay(100);
if (limit == HIGH){
digitalWrite(ledPin, HIGH);//if limit has been reached, LED turns on as status indicator
}
else{
digitalWrite(ledPin, LOW);//if threshold not reached, LED remains off
}
}

This is the circuit diagram, i follow a tutorial :

Do you have an idea whats wrong here? Is the sensor too cheap or it already broke?

You get output fluctuations like that if the analog input pin is open, which might be the case if the sensor is not receiving power.

Check that the sensor has 5V, and check continuity of all connections using your multimeter.

This line just prints the analog input reading, which is not the "alcohol value".

Serial.println(values);//prints the alcohol value

Finally, the MQ series sensors usually need to be "burned in" for 24 hours or more before use. Just turn it on and leave it on for a couple of days, otherwise it might behave quite erratically. See this tutorial.

jremington:
You get output fluctuations like that if the analog input pin is open, which might be the case if the sensor is not receiving power.

Check that the sensor has 5V, and check continuity of all connections using your multimeter.

This line just prints the analog input reading, which is not the "alcohol value".

Serial.println(values);//prints the alcohol value

Okey i will try to check it again.
So, how can i print the alcohol value?
Is there any calibrating first before that?

Have you read the MQ-3 data sheet? It is admittedly limited, so check other tutorials.

Note the addition above about burning in the sensor.

jremington:
Have you read the MQ-3 data sheet? It is admittedly limited, so check other tutorials.

Note the addition above about burning in the sensor.

Can you explain me what is the function of this code ? :
void setup()
{
Serial.begin(9600);
}

void loop()
{
float sensor_volt;
float RS; // Get the value of RS via in a clear air
float R0; // Get the value of R0 via in Alcohol
float sensorValue;

for(int i = 0 ; i < 100 ; i++)
{
sensorValue = sensorValue + analogRead(A0);
}

sensorValue = sensorValue/100.0; //get average of reading
sensor_volt = sensorValue/1024*5.0;
RS = (5.0-sensor_volt)/sensor_volt; //
R0 = RS/60.0; // 60 is found using interpolation
Serial.print("R0 = ");
Serial.println(R0);
delay(1000);

}

And why we need to calculate the R0 first before find the BAC?

Take a look at the graph in the data sheet, which shows typical values of Rs/R0 for several gases and concentrations.

For reasonable results, you need to calibrate your sensor by determining its resistance R0 at 0.4 mg/l ethanol.

jremington:
Take a look at the graph in the data sheet, which shows typical values of Rs/R0 for several gases and concentrations.

For reasonable results, you need to calibrate your sensor by determining its resistance R0 at 0.4 mg/l ethanol.

So, it means that i need to give the MQ-3 0.4 mg/l alcohol and use the RO value that come when i give the 0.4 mg/l alcohol to the sensor??
I'am sorry, i realy dont get it how to calibrating the sensor, i am really new in this subject

Correct. Calibration tutorial Why Calibrate? | Calibrating Sensors | Adafruit Learning System