Hi,
I am trying to wire MQ-7 (
http://www.sgbotic.com/products/datasheets/sensors/MQ-7.pdf) with Arduino but it doesn't seem to be working.
MQ-7 requires a pulse of 1.4V for 60 seconds and 5V for 90 seconds.
By calculation the pulsewidth should be 255 for 60 seconds and and 71.4 for 90 seconds.
Here is my code:
int sensorValue;
int pulsewidth;
void setup()
{
Serial.begin(9600); // sets the serial port to 9600
}
void loop()
{
pulsewidth=255; //set to 5 V
analogWrite(11, pulsewidth);
delay(60000);
pulsewidth=71.4; //set to 1.4 V
analogWrite(11, pulsewidth);
delay(90000);
sensorValue = analogRead(0);
//Serial.println(sensorValue, DEC);
Serial.println(sensorValue);
}
I am using Sparkfun gas sensor breakboard
http://www.sparkfun.com/products/8891 where H1 is connected to PWM pin 11.
With this arrangement I am only getting value 0 even though I blow cigarette smoke on the sensor.
I am not sure what is wrong with the circuit.
Please help.
Thanks
Z