MS1100 Gas Sensor
The CJMCU-1100 sensor is primarily used for detecting VOC gases such as formaldehyde, toluene, and benzene. It is a semiconductor-type sensor widely applied in ventilation devices, exhaust fans, air purifiers, range hoods, and other equipment. With high sensitivity and stability, it can detect gases as low as 0.1ppm. This sensor is suitable for detecting various organic volatile compounds in the air, including formaldehyde, benzene, and xylene. Its compact size and low cost make it widely used in various small household appliances.
Module Source
Purchase Link: https://item.taobao.com/item.htm?spm=a21n57.1.0.0.1925523cK81vXF&id=576190105535&ns=1&abbucket=0
Baidu Netdisk Download Link:
https://pan.baidu.com/s/16hOBTKXWejzmklAeRxfmTg
Password:ixqv
Specifications
Operating Voltage: 5V
Operating Current: <50uA
Output Method: ADC + GPIO
Pin Count: 4 Pins
Voltage in Clean Air: <1V
Hardware Interface
- VCC: Connect to the 5V pin of the development board.
- GND: Connect to the GND pin of the development board.
- AOUT (Analog Output): Connect to any analog input pin of the development board (e.g., A0).
- DOUT (Digital Output): This pin is usually not required to be connected unless you want to use the digital signal.
Please note that the MS1100 gas sensor may require a warm-up period during its first use.
Usage Method
/******************************************************************************
* Test Hardware: LCSC ColorEasyDuino Development Board
* Version Number: V1.0
* Modified By: www.lckfb.com
* Modification Date: April 10, 2024
* Function Overview:
*****************************************************************************
* Open-source development board hardware and software information and related projects hardware and software information on official website
* Development board official website: www.lckfb.com
* Technical support resident forum, any technical problems are welcome at any time to exchange learning
* LCSC Forum: club.szlcsc.com
* Follow our Bilibili account: [立创开发板], stay toned to our latest news!
* We focus on cultivating Chinese engineers rather than profiting from board sales.
******************************************************************************/
int gasSensorPin = A0; // 将MS1100传感器的AOUT引脚连接到模拟引脚A0
void setup() {
Serial.begin(9600); // 初始化串行通信
pinMode(gasSensorPin, INPUT); // 设置气体传感器接口为输入
}
void loop() {
int sensorValue = analogRead(gasSensorPin); // 读取传感器模拟值
float voltage = sensorValue * (5.0 / 1023.0); // 将模拟值转换为电压值
Serial.print("Sensor Value: ");
Serial.print(sensorValue);
Serial.print(" | Voltage: ");
Serial.println(voltage);
delay(1000); // 等待时间,根据需要调整
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Usage Testing
Higher voltage indicates higher concentration.