I have wired the 5V to the VCC pin, the GND to the GND, AOUT to A0 and DOUT to D13. I just want to confirm that this is correct. Do I need any resistors, diodes, etc.?
Follow-up: When I attach an LM35 temperature sensor to A1 at the same time as the gas sensor is attached I get temp values which are very high. If I remove the gas sensor, the numbers for temperature are correct. What causes this incorrect temperature reading?
Guess: Might this be related to amperage supplied. Maybe the 5V pin doesn't provide enough. I tried to power the thermometer from a digital pin but I got the same values so I am still unsure.
Thanks in advance for your help! I hope to be able to learn enough to answer your questions in the future
The MQ gas sensors have a heated element and they use more current than other sensors. Is the Arduino powered by the USB power ? Do you have a multimeter to measure the 5V pin ?
What is a lot higher ?
When you measure the LM35, the 5V is the reference. As long as the 5V is not stable and accurate, the LM35 can never measure an accurate temperature.
If you have both the MQ-7 and the LM35 on the same breadboard, the current through the MQ-7 might have a large influence on the LM35 measurement.
I think most of us start with a LM35, and later we use a digital temperature sensor like the DS18B20.
Thanks, you solved this one for me. I used a wall adapter along with the USB and got the desired results. After testing with a multimeter, it was indeed a lack of power needed to operate both components. I ordered some of the other sensors as well for use in future projects.
One other question, does the MQ-7 actually draw 180mAH? If so will I ruin my board if I were to attach 3 of them by drawing too much power from the 5V pin?
What is the best way to do that? Can I just clip off the usb end of a 5v phone charger and run the MQ-7 Vin and GND pins from that while running the Analog out back to the Arduino?
You always have to connect the grounds, otherwise the MQ-7 ouput is kind of floating in free air. So connect the 5V power supply GND to Arduino GND.
There are good 5V power supplies and there are also some bad chargers that supply more than 5V. You need a good and nice regulated 5V power supply.
I use a switching power supply that can select a few voltages.
It is possible (but dangerous) to power the Arduino at the 5V pin with a 5V power supply.
It needs to be 5.0V, not above 5.5V.
You have to add a diode from the 5V pin to the VIN pin, to protect the voltage regualtor.
If you accidently do something wrong, the current is no longer limited, so it is easy to damage the Arduino board.
If you consider all of that, you can use a single 5V power supply.