Difference between revisions of "Template:MQ-7 Gas Sensor Arduino Guide"

From Waveshare Wiki
Jump to: navigation, search
Line 19: Line 19:
 
*Please download and install Arduino IDE to your PC.
 
*Please download and install Arduino IDE to your PC.
 
**[https://www.arduino.cc/en/software Arduino Website]
 
**[https://www.arduino.cc/en/software Arduino Website]
*Download the demo codes, unzip and find the Arduino examples
+
*Download the demo codes, unzip and find the Arduino examples.
*Open the Gas_Sensor.ino file by the Arduino IDE
+
*Open the Gas_Sensor.ino file by the Arduino IDE.
 
:[[File:MQ5 Arduino 1.jpg|400px]]
 
:[[File:MQ5 Arduino 1.jpg|400px]]
*Build and upload the codes to the UNO board
+
*Build and upload the codes to the UNO board.
*After uploading, you can open the Serial Monitor of IDE and check the data
+
*After downloading, you can run SSCOM to connect the MQ2 module so as to check the sensor.
 +
[[File:MQ-7 Gas Sensor Arduino Guide01.jpg]]
 +
 
 
==Expected result==
 
==Expected result==
 
*The sensor needs to preheat for about a minute to heat the internal sensitive materials of the sensor.
 
*The sensor needs to preheat for about a minute to heat the internal sensitive materials of the sensor.
 
*Put the sensor inside the device containing sensitive gas, and the indicator on the module lights up. The indicator goes off when the sensor is removed from the device.
 
*Put the sensor inside the device containing sensitive gas, and the indicator on the module lights up. The indicator goes off when the sensor is removed from the device.

Revision as of 06:40, 20 July 2022

The examples provided are based on the Arduino UNO, if you need to use other Arduino boards, please check if the board is compatible with the UNO.

Arduino

Hardware connection

Hardware connection-Arduino
Connect to Arduino UNO
MQ7 Arduino Description
VCC 5V Power input
GND GND Ground
AOUT A0 Analog data output
DOUT D2 Digital data output

Examples

  • Please download and install Arduino IDE to your PC.
  • Download the demo codes, unzip and find the Arduino examples.
  • Open the Gas_Sensor.ino file by the Arduino IDE.
MQ5 Arduino 1.jpg
  • Build and upload the codes to the UNO board.
  • After downloading, you can run SSCOM to connect the MQ2 module so as to check the sensor.

File:MQ-7 Gas Sensor Arduino Guide01.jpg

Expected result

  • The sensor needs to preheat for about a minute to heat the internal sensitive materials of the sensor.
  • Put the sensor inside the device containing sensitive gas, and the indicator on the module lights up. The indicator goes off when the sensor is removed from the device.