Go Down

Topic: Problem with connecting and reading value from MQ - 4 to arduino (Read 1 time) previous topic - next topic


I got a  MQ - 4 sensor and breakout board,
the data sheet of the breakout board is like that:
GND -------------- gnd of arduino
B1 ---------------- ???????
A1 ----------------?????????
Please if you know which pin i should connect them please replay
i searched internet and read the datasheet but i couldn't get any information for that pins.
and i got this code online for reading value:
Code: [Select]
int sensorValue;

void setup()
  Serial.begin(9600);      // sets the serial port to 9600

void loop()
  sensorValue = analogRead(0);       // read analog input pin 0
  Serial.println(sensorValue, DEC);  // prints the value read
  delay(100);                        // wait 100ms for next reading

best regards


This is basic information for the MQ sensors : http://playground.arduino.cc/Main/MQGasSensors

Can you check the breakout board ? Perhaps you can figure out if the heater is also connected to ground and both the 'A' pins are connected together, and both the 'B' pins are connected together.


I used this breakout board


Feb 05, 2013, 02:39 pm Last Edit: Feb 05, 2013, 02:42 pm by Krodal Reason: 1
Nice, SparkFun provides the schematics and a link to a example.
It seems that the A2 and B2 are not connected at all. That's no problem.

The heater uses 5V.
Connect the GND to GND, and H1 (the heater) to 5V. The sensor will get warm if the heater is on.
Perhaps you need a seperate adapter of 5V for the sensor. If you use the USB bus to power the Arduino, the voltage and current might be too low. Also the voltage regulator for 5V on the Arduino board might get too hot if you use the 5V from the Arduino board.

Connect A1 to +5V.
Connect B1 to an analog input of the Arduino.
Use 10k (or a variable resistor) from B1 to GND, that is the load resistor.

If you let gas flow near the sensor, the values read by the Arduino should get up a lot.
After the burn-in time, you can select a better load resistor.

Don't forget to read this page also: https://www.sparkfun.com/products/9404




Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131