Seven-in-One Air Quality Gas Sensor with LCD Display CO2, Formaldehyde, Temperature & Humidity, TVOC, PM2.5, PM10
M701 or M701A is an all-in-one gas sensor module that can simultaneously measure multiple gas indicators. The sensor module uses laser particulate matter sensors, non-dispersive infrared carbon dioxide sensors, electrochemical formaldehyde sensors, and VOC sensors to obtain particulate matter concentration, carbon dioxide and formaldehyde, and TVOC concentration respectively. The sensor module also has a built-in temperature and humidity sensor chip. Multiple parameters are uniformly output in the form of an RS485 digital interface. It can perform real-time and comprehensive detection of the surrounding environment, has good stability, and is very convenient for customers to use.
Key Features:
- Simultaneously outputs seven sets of data: CO2, formaldehyde, TVOC, PM2.5, PM10, temperature, and humidity.
- CO2 uses a single-pass NDIR method with 24-hour self-calibration function.
- Formaldehyde uses an electrochemical sensor.
- PM2.5 is based on the TS18530 standard and is consistent with most measurement bureau testing equipment.
- VOC test results are relative values.
- Temperature is accurate to 0.1℃, and humidity is accurate to 0.1%.
- Automatically output seven sets of sensor monitoring data through UART signal every 2 seconds
Applications:
This sensor is widely used in various applications, including:
-
-
- Air quality monitoring (indoor and outdoor).
- Hotel room air quality monitoring
- Fresh air ventilation systems
- Air purifiers, air conditioners
- Air quality monitoring equipment
- Kitchen and bathroom ventilation control systems
- Smart home devices
- Environmental monitoring.
- Agricultural applications (e.g., in greenhouses).
- Industrial process control.
- HVAC (heating, ventilation, and air conditioning) systems.
-
Considerations:
-
- A warm-up of 5 minutes or more is required upon initial power-on.
- Do not apply this module to systems involving personal safety.
- Do not place this module in a high concentration of organic gas for extended periods.
- Do not install and use this module in a strong air convection environment.
- The metal casing is connected to the internal power ground of the sensor. Be careful not to short-circuit it with other external circuits or the chassis casing.
- The optimal installation method is to have the plane where the air inlet and outlet are located tightly against the user’s machine’s inner wall, with air holes connected to the outside. Ensure no obstructions within 2cm around the air outlet. There should be airflow isolation between the air inlet and outlet to prevent airflow from directly returning from the outlet to the inlet inside the device.
- The opening size of the device’s air inlet and outlet should not be smaller than the opening size of the sensor’s air inlet.
- When applied to purifier products, avoid placing the sensor directly in the purifier’s own air duct. Design a separate structural space to place the sensor within it, isolating it from the purifier’s own air duct.
- The sensor installation position should be 15-20CM above the ground. Otherwise, ground dust, floating objects, and other large dust particles or even flocculent contamination may cause the fan to become entangled and blocked. It is recommended that the device use appropriate pre-filtration treatment.
- Do not disassemble the sensor, including the metal shielding case, to prevent irreversible damage.
- Sensor data ensures consistency between individual units at the factory and does not use third-party testing instruments or data as a comparison standard. If the user wants the final measurement results to be consistent with a certain third-party testing device, the user can perform data fitting and calibration based on the actual collected results.
- This sensor is suitable for ordinary indoor environments. If the user’s device is used in the following actual environments, the sensor may experience a decrease in data consistency due to excessive dust accumulation, oil accumulation, or water ingress: a) Annual dust concentration greater than 300 micrograms/cubic meter for more than 50% of the time, or greater than 500 micrograms/cubic meter for more than 20% of the time; b) Oily fume environment; c) High water mist environment; d) Outdoor.
M701 Communication Protocol Ver2.0
Overview
The communication protocol describes in detail the input and output commands, information, and data of the M701, for third-party use and development.
Physical Interface:
The main communication port connected to the host computer uses a standard UART communication port.
The information transmission method is asynchronous, with 1 start bit, 8 data bits, 1 stop bit, and no parity.
The default data transmission rate is 9600 bps.
M701 Communication Protocol Details
-
All loop communications should follow the master/slave method. In this method, information and data are transmitted between a single master station and slave stations (monitoring devices).
-
Broadcast mode is not supported.
-
Communication cannot start from a slave station under any circumstances.
-
If the master station or any slave station receives a packet containing an unknown command, the packet will be ignored, and the receiving station will not respond.
2.2 Description of Returned Data Frame Structure
Each data frame is composed as follows: (RTU mode)
Address
Function Code
Data Quantity
Data 1
…
Data n
CRC 16-bit Checksum
Transmission Format
(1) Command Message Format
Host Sends Read Data Command:
Address | Function Code | Data Start Address High Byte | Data Start Address Low Byte | Return Data Count High Byte | Return Data Count Low Byte | CRC 16-bit Checksum |
---|---|---|---|---|---|---|
XX | 03 | 00 | 02 | 00 | 07 | Low byte first |
(Currently, only reading all data is supported, starting from address 0002, reading 7 data values). There are only 7 data values, corresponding to 7 addresses. The high byte of the address and the high byte of the data are not processed in the module and are defaulted to 0. It is recommended that the high byte of the data start address and the high byte of the data count on the host side be sent as 0x00.
Internal Message Information
Starting Address | Data Count | Description |
---|---|---|
Must be as follows: | ||
0x0002 | 1 | CO2 Concentration |
0x0004 | 1 | Formaldehyde Concentration |
0x0006 | 1 | TVOC Concentration |
0x0008 | 1 | PM2.5 Concentration |
0x000A | 1 | PM10 Concentration |
0x000C | 1 | Temperature Value |
0x000E | 1 | Humidity Value |
The starting address can only use the addresses in the list above, otherwise there will be no response. If the data count exceeds the limit, there will also be no response. For example, if the starting address is 0x000C, the number of data returned can only be 1 or 2. If 3 data are to be returned, there will be no response. Similarly, for address 0x000E, the number of data returned can only be 1. Returning a data count of 0 will also result in no response.
Slave Sensor Return Value:
Slave Address | Function Code | Data Count | Data N | CRC |
---|---|---|---|---|
XX | 03 | XX | XX | XXXX |
Byte length refers only to data length.
N0 | N1 | N2 | N3 | N4 | N5 | N6 | N7 | N8 | N9 | N10 | N11 | N12 | N13 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CO2 High Byte | CO2 Low Byte | Formaldehyde High Byte | Formaldehyde Low Byte | TVOC High Byte | TVOC Low Byte | PM2.5 High Byte | PM2.5 Low Byte | PM10 High Byte | PM10 Low Byte | Temperature High Byte | Temperature Low Byte | Humidity High Byte | Humidity Low Byte |
Host Sends Read Address Command:
Address | Function Code | Data Start Address High Byte | Data Start Address Low Byte | Data Count High Byte | Data Count Low Byte | CRC 16-bit Checksum |
---|---|---|---|---|---|---|
00 | 02 | 00 | 00 | 00 | 02 | XXXX Low byte first |
Slave Returns Address:
Address | Function Code | Byte Length | Address High Byte | Address Low Byte | CRC 16-bit Checksum |
---|---|---|---|---|---|
00 | 02 | 02 | 00 | XX | XXXX Low byte first |
Host Data Sampling Frequency:
When reading temperature and humidity sensor data, the time interval between each data read by the host computer should not be less than 500ms, with a recommended value of 1s.
Function Codes
- 03: Read Data
- 02: Read Address
Command Examples:
Serial Port Settings: Asynchronous communication, 1 start bit, 8 data bits, no parity, 1 stop bit.
Default Data Transmission Rate: 9600 bps
Host Sends: 01 03 00 02 00 07 CRCL, CRCH (Read 7 data values from address 01 starting from 00 02. Slave does not check the checksum)
M701 Returns:
0x01, 0x01, 0x07, CO2H, CO2L, FormaldehydeH, FormaldehydeL, TVOCH, TVOCL, PM2.5H, PM2.5L, PM10H, PM10L, TemperatureH, TemperatureL, HumidityH, HumidityL, CRCL, CRCH
Example 1:
TX: 01 03 00 02 00 07 CRCL, CRCH
RX: 01 03 0E 01 E2 00 05 00 24 00 20 00 38 01 31 02 86 CRCL, CRCH
CO2 Concentration = CO2H x 256 + CO2L PPM (BYTE3 x256 + BYTE4)
Formaldehyde Concentration = FormaldehydeH x 256 + FormaldehydeL ug (BYTE5 x256 + BYTE6)
TVOC Concentration = TVOCH x 256 + TVOCL ug (BYTE7 x256 + BYTE8)
PM2.5 Concentration = PM2.5H x 256 + PM2.5L ug (BYTE9 x256 + BYTE10)
PM10 Concentration = PM10H x 256 + PM10L ug (BYTE11 x256 + BYTE12)
Temperature = ((BYTE13) x 256 + (BYTE14)) / 10
Humidity = ((BYTE15) x 256 + (BYTE16)) / 10
Above, CO2 = 482, Formaldehyde = 5, TVOC = 36, PM2.5 = 45, PM10 = 56, Temperature = 30.5, Humidity = 64.6
Example 2:
TX: 01 03 00 0C 00 02 CRCL, CRCH (10:43:52:001) (Read 2 data values from address 01 starting from 00 0C) The two data values starting from 0x000C correspond to temperature and humidity.
RX: 01 03 02 01 27 02 45 03 57 (10:43:52:159)
Returned Temperature Value = 0x0127, corresponding to decimal 295, representing temperature 29.5°C
Returned Humidity Value = 0x0245, corresponding to decimal 581, representing humidity 58.1%RH
Note:
The temperature and humidity data returned by the slave are represented by two bytes respectively, with the high byte first and the low byte last.
The returned data range is -32768 to 32767. The actual temperature and humidity data need to have the returned value divided by 10.
For example:
Returned Humidity 16-bit Data: 0x0311, corresponding to decimal 785, representing humidity of 78.5%RH
Returned Temperature 16-bit Data: 0x00FF, corresponding to decimal 255, representing temperature of 25.5°C
Returned Temperature 16-bit Data: 0x8064, the highest bit being 1 indicates a negative number, corresponding to decimal -100, representing temperature of -10.0°C
Read Address Value:
Host Sends: 00 02 00 00 00 01 CRCL, CRCH
Transmitter Returns: 00 02 02 00, Address L, CRCL, CRCH
Address Setting Instructions:
There are 4 DIP switches, 3 of which are used, the fourth can be ignored, the microcontroller does not read it.
Pins 1, 2, and 3 correspond to b0, b1, and b2 respectively. As shown in the figure above, flipping the DIP switch upward (ON direction) sets the corresponding bit to high, and flipping it downward sets it to low.
Address Code = (b0 | b1<<1 | b2<<2) (Avoid using 00 if possible)
There may be a difference between the address code used by the module and the address code read by sending a command. The address used by the module is read only once at power-on. If the address is changed after power-on, the address used by the module will not change, and it needs to be powered on again to change. The address code read by sending a command is a real-time reflection of the current DIP switch. If the address is not changed after power-on, the address used by the module is consistent with the address read by sending a command. If a change occurs, the address read by sending a command is the changed address, and the module uses the address at power-on.
Address List:
b2 | b1 | b0 | ADDR |
---|---|---|---|
0 | 0 | 0 | 0x00 |
0 | 0 | 1 | 0x01 |
0 | 1 | 0 | 0x02 |
0 | 1 | 1 | 0x03 |
1 | 0 | 0 | 0x04 |
1 | 0 | 1 | 0x05 |
1 | 1 | 0 | 0x06 |
1 | 1 | 1 | 0x07 |
CRC Check reference:
CRC High byte value table: static char auchCRCHi [] = {0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40};
CRC Check reference:
CRC Low byte value table: static char auchCRCLo [] = {0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80,
0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00,
0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,
0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81,
0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01,
0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1,
0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40,
0x01, 0xC0, 0x80,
0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41,
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00,
0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1,
0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40};
CRC 低位字节值表: static char auchCRCLo[] = {0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03,
0x02, 0xC2, 0xC6, 0x06, 0x07, 0xC7, 0x05, 0xC5, 0xC4, 0x04, 0xCC, 0x0C, 0x0D,
0xCD, 0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09, 0x08, 0xC8,
0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A, 0x1E, 0xDE, 0xDF, 0x1F, 0xDD,
0x1D, 0x1C, 0xDC, 0x14, 0xD4, 0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6, 0xD2, 0x12,
0x13, 0xD3, 0x11, 0xD1, 0xD0, 0x10, 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3, 0xF2,
0x32, 0x36, 0xF6, 0xF7, 0x37, 0xF5, 0x35, 0x34, 0xF4, 0x3C, 0xFC, 0xFD, 0x3D,
0xFF, 0x3F, 0x3E, 0xFE, 0xFA, 0x3A, 0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28,
0xE8, 0xE9, 0x29, 0xEB, 0x2B, 0x2A, 0xEA, 0xEE, 0x2E, 0x2F, 0xEF, 0x2D, 0xED,
0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26, 0x22, 0xE2, 0xE3,
0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60, 0x61, 0xA1, 0x63, 0xA3, 0xA2, 0x62,
0x66, 0xA6, 0xA7, 0x67, 0xA5, 0x65, 0x64, 0xA4, 0x6C, 0xAC, 0xAD, 0x6D, 0xAF,
0x6F, 0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68, 0x78, 0xB8,
0xB9, 0x79, 0xBB, 0x7B, 0x7A, 0xBA, 0xBE, 0x7E, 0x7F, 0xBF, 0x7D, 0xBD, 0xBC,
0x7C, 0xB4, 0x74, 0x75, 0xB5, 0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73,
0xB1, 0x71, 0x70, 0xB0, 0x50, 0x90, 0x91, 0x51, 0x93, 0x53, 0x52, 0x92, 0x96,
0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C, 0x5D, 0x9D, 0x5F, 0x9F,
0x9E, 0x5E, 0x5A, 0x9A, 0x9B, 0x5B, 0x99, 0x59, 0x58, 0x98, 0x88, 0x48, 0x49,
0x89, 0x4B, 0x8B, 0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C,
0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42, 0x43, 0x83, 0x41,
0x81, 0x80, 0x40};
CRC Function Calculation Method:
- Preset a 16-bit register to hexadecimal 0xFFFF (all bits set to 1); this register is called the CRC register.
- Take the first 8-bit binary data (the first byte of the communication frame) and perform an XOR operation with the lower 8 bits of the 16-bit CRC register, and store the result in the CRC register.
- Shift the contents of the CRC register right by one bit (towards the least significant bit), fill the most significant bit with 0, and check the shifted-out bit.
- If the shifted-out bit is 0: Repeat step 3 (shift right again).
- If the shifted-out bit is 1: Perform an XOR operation between the CRC register and the polynomial A001 (1010 0000 0000 0001).
- Repeat steps 3 and 4 until the register has been shifted right 8 times, thus processing the entire 8-bit data.
- Repeat steps 2 to 5 to process the next byte of the communication frame.
- After calculating all bytes of the communication frame using the above steps, swap the high and low bytes of the resulting 16-bit CRC register.
- The final content of the CRC register is the CRC code.
CRC Function Example:
C
// *pushMsg is a pointer to the array of data to be checked, usDataLen is the number of data bytes to be checked
void CRC16(char *pushMsg, unsigned short usDataLen) {
char uchCRCHi = 0xFF; // Initialize high CRC byte
char uchCRCLo = 0xFF; // Initialize low CRC byte
unsigned int uIndex; // Index in CRC loop
while (usDataLen--) { // CRC lookup table function
uIndex = uchCRCLo ^ *pushMsg++; // Calculate CRC
uchCRCLo = auchCRCHi[uIndex];
uchCRCHi = auchCRCLo[uIndex];
}
*pushMsg++ = uchCRCHi; // Store high CRC byte at the end
*pushMsg = uchCRCLo; // Store low CRC byte at the end
}
Other Useful Products:
MQ-3 (Alcohol ethanol Gas Sensor)
Figaro TGS 822 Ethanol Gas Sensor Module
MQ-5 (LPG or Natural Gas Sensor module)
MQ-7 (Carbon Monoxide Gas Sensor)
MICS-6814 – Air Quality Sensor (NH3 Nitrogen Oxide Gas Sensor)
MQ-135 (Air Quality Control Gas Sensor)
MiCS-5524 Alcohol or VOCs Gas Sensor
ESP8266 DHT11CH340 Development Board with built-in DHT-11 Sensor
ESP8266 ESP-01S WIFI Transceiver Module
ESP8266 ESP-12S WIFI Transceiver Module
Arduino UNO R3 Development Board
Arduino Nano Development Board
Arduino Mega Development Board
Reviews
Clear filtersThere are no reviews yet.