Go Down

Topic: about the mq2 / mq7 sensor (Read 4899 times) previous topic - next topic

fakeid

hi, i hope i got the right place asking a question here,

so, recently, i have a school project about arduino, and i want to create a simple gas driven project,

so, i follow this link to connect the mq2 / mq7 gas sensor,
http://nootropicdesign.com/projectlab/2010/09/17/arduino-breathalyzer/

yet, no matter how many times i tried, the readings are so strange and i have no idea of what i could deal with the problem

here is some readings
23
0
0
0
0
1023
1023
1023
0
0
0
0
1023
1023
1023
0
0
0
285
1023
1023
327
0
0
1023
1023
1023
0
0
0
622
1023

anyone could help??

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

fakeid

int sensorValue = 0;
int sensorPin = 9;

void setup()
{
  Serial.begin(9600);      // sets the serial port to 9600
  pinMode(sensorPin, INPUT);
}

void loop()
{
  sensorValue = analogRead(sensorPin);     // read analog input pin 9
  Serial.print(sensorValue);  // prints the value read
  Serial.print(" ");      // prints a space between the numbers
  delay(1000);              // wait 100ms for next reading
}


johnwasser

pinMode(9, INPUT)  will set Digital I/O pin 9 to be a digital input.
analogRead(9) will read Analog Input pin 9 ?!?  Do you have an Arduino that has more than the usual 6 analog input pins (0-5)?!?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

fakeid

thx for reply first,

actually, i have try to connect into analogue A0 at the bottom right of the arduino,
yet, the outcome is also almost the same, strange readings

johnwasser

From the readings it appears that you may have a bad connection somewhere or some bad noise in the input.  When you hook a multimeter between the input pin and ground do you get a nice steady voltage reading? 
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

fakeid

thx again, and i have checked immediately, i have gaineded steady voltage reading, and i have also checked the data sheet, http://www.winsensor.com/english/products/sms/jsq.asp?filename=MQ7.pdf, so, i am sure i am supplying 5.2 - 5.4 voltage to the circuit correctly, and the readings are still not ok ...

btw, is it necessary to pre-heat this sensor? i have found one point in the datasheet saying that it takes 2 days to re-heat the sensor,
so does it mean i have to supply 5 volt to the circuit for 2 days for reasonable readings?


sorry, i have a fairly ok knowledge only, thx for your patience, thxthxthx

robtillaart

Quote
btw, is it necessary to pre-heat this sensor? i have found one point in the datasheet saying that it takes 2 days to re-heat the sensor,
so does it mean i have to supply 5 volt to the circuit for 2 days for reasonable readings?


IIRC it is needed for calibration (only once). To use this sensor you have to apply 60sec 5Volts and then 90sec 1.4 Volts. Can be done with PWM. Measure at the end of a 1.4V cycle. So one reading every 2.5 minutes is possible.

This thread may be helpfull - http://arduino.cc/forum/index.php/topic,55780.0.html - Contact cronus as you learn about the same sensor.


Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

fakeid

sorry... i am still clueless of what i could do after i have tried several times...

so, now, how to wiring the sensor to give it a 60sec 5Volts and then 90sec 1.4 Volts?

fakeid


sorry... i am still clueless of what i could do after i have tried several times...

so, now, how to wiring the sensor to give it a 60sec 5Volts and then 90sec 1.4 Volts?


since i don't have the breakout kit.. i don't have TOG Pin from sensor board, but six PINs AHA, BHA............

omg

vhenamae

Hi guys.. anyone knows how to convert the analog input of mq-7 to ppm?

uzz3

Hello all,
I have exact the same problem, and readings as you. Did you managed to make it work? or does anyone has a solution for this?

Go Up