Skip to main content

Environment X6 Sensor

esp3s3_Matrix_MAIN

SKUProduct
34169Environment X6 Sensor

Features​

The Environment X6 Sensor is built on EC Sense's (Germany) solid-state polymer electrochemical technology. It uses a multi-electrode integrated structure with a solid-state electrolyte system, generating current signals through electrochemical reactions of gases on the working electrode surface to achieve high-sensitivity detection of target gas concentrations. Compared to conventional gas sensors, the solid-state polymer design offers advantages such as no electrolyte leakage, no poisoning, virtually zero drift, and extended service life.

Application Scenarios​

  • Smart home
  • Ambient air quality monitoring
  • In-vehicle air purifiers
  • Handheld air quality detectors
  • Factory ventilation systems

Working Principle​

The solid-state polymer electrochemical sensor uses a classic three-electrode system (Working Electrode WE, Reference Electrode RE, Counter Electrode CE) with multi-layer printing technology. Through a single-electrode multi-layer catalytic active site design, diffusion control layer structure, and intelligent signal decoupling algorithms, it enables parallel detection and identification of multiple gases.

Specifications​

Environment X6 Sensor
Supply Voltage5VLogic Voltage3.3V
Communication InterfaceUARTBaud Rate9600 bps
Measurement Range
  • HCHO: 0-1 ppm
  • TVOC: 0-5 ppm
  • CO: 0-100 ppm
Resolution
  • HCHO: 0.001 ppm (Limit of Detection: 0.015 ppm)
  • TVOC: 0.001 ppm (Limit of Detection: 0.050 ppm)
  • CO: 0.001 ppm (Limit of Detection: <8 ppm)
Accuracy
  • HCHO: 0-0.15 ppm (±0.02 ppm); 0.16 ppm+ (< ±2% FS)
  • TVOC: 0-0.2 ppm (±0.05 ppm); 0.2 ppm+ (< ±2% FS)
  • CO: 0-8 ppm (±2.5 ppm); 8 ppm+ (< ±1% FS)
Response Time
  • HCHO: T10 <5 s; T90 <90 s
  • TVOC: T10 <3 s; T90 <120 s
  • CO: T10 <3 s; T90 <15 s
Dimensions23 × 25.5 × 9.5 mmMounting Hole Diameter2.0 mm
Operating Current6.5 mAOperating Temperature-40 ℃ ~ +55 ℃
Operating Humidity>15%RHService Life10 years
warning

The sensor operates at 3.3V logic levels. If using 5V logic, a level shifter is required; otherwise the sensor may be damaged.

Pin Description​

PinLabelDescription
1VCC5V Power Supply
2GNDGround
3RXDUART Input
4TXDUART Output

Protocol Details​

Click to expand

UART Communication Flow​

  • Default serial configuration: 8 data bits, 1 stop bit, no parity, no flow control, default baud rate 9600
  • The protocol consists of a command header, data field, and 0-add8 checksum
  • Note: Protocol packets follow big-endian byte order (most significant byte first)

Command Reference​

General Notes​

  • Checksum algorithm: 0-add8 (sum all bytes in the packet, take the lower 8 bits, bitwise invert, then add 1)
  • Byte order: Big-endian (most significant byte first)

Reference Information​

Gas Concentration Unit Table

CodeUnitDescription
0x00IAQIndoor Air Quality Index
0x02ppmParts per million

IAQ Level Descriptions (based on EPA standards):

RangeLevel
0–50Good
51–100Moderate
101–150Unhealthy for Sensitive Groups
151–200Unhealthy
201–300Very Unhealthy
301–500Hazardous

Sensor Type Code Table

Gas TypeCode
IAQ0x33
TVOC0x18
HCHO0x17
CO0x19

Query Current Concentration (0x70)​

Reads the real-time concentration of all gases, along with temperature and humidity.

Send (Tx)

HeaderChecksum
Byte0Byte1
700-add8

Response (Rx)

HeaderIAQ DataTVOC DataHCHO DataCO DataTemperature DataHumidity DataChecksum
Byte0Byte1-Byte4Byte5-Byte8Byte9-Byte12Byte13-Byte16Byte17-Byte18Byte19-Byte20Byte21
7042 30 00 003D 35 64 F03D 53 D2 5B3D 08 19 550A C827 0FE0

Example Breakdown

Send: 0x70 0x90
│ └── Checksum
└── Header

Response: 0x70 0x42300000 0x3D3564F0 0x3D53D25B 0x3D081955 0x0AC8 0x270F 0xE0
│ │ │ │ │ │ │ └── Checksum
│ │ │ │ │ │ └── Humidity: 0x270F = 9999 → 99.99% RH (2 decimal places)
│ │ │ │ │ └── Temperature: 0x0AC8 = 2760 → 27.60 ℃ (2 decimal places)
│ │ │ │ └── CO: IEEE 754 float → 0.033 ppm
│ │ │ └── HCHO: IEEE 754 float → 0.052 ppm
│ │ └── TVOC: IEEE 754 float → 0.044 ppm
│ └── IAQ: IEEE 754 float → 44.000
└── Header

Read Sensor Parameters (0x72)​

Queries the detection range and concentration unit of a specified gas channel.

Send (Tx)

HeaderGas IndexChecksum
Byte0Byte1Byte2
72000-add8

Gas index mapping: 0x00 = IAQ, 0x01 = TVOC, 0x02 = HCHO, 0x03 = CO

Response (Rx)

HeaderGas IndexGas NameRangeUnitChecksum
Byte0Byte1Byte2Byte3-Byte4Byte5Byte6
72001903 E80287

Example Breakdown

Send: 0x72 0x00 0x8D
│ │ └── Checksum
│ └── Gas index: IAQ
└── Header

Response: 0x72 0x00 0x19 0x03E8 0x02 0x87
│ │ │ │ │ └── Checksum
│ │ │ │ └── Concentration unit: 0x02 = ppm (see Gas Concentration Unit Table)
│ │ │ └── Range: 0x03E8 = 500
│ │ └── Gas name: 0x19 = CO (see Sensor Type Code Table)
│ └── Gas index: IAQ
└── Header

Read LED Status (0x74)​

Queries the current state of the status indicator LED.

Send (Tx)

HeaderChecksum
Byte0Byte1
740-add8

Response (Rx)

HeaderLED StatusChecksum
Byte0Byte1Byte2
74018B

Example Breakdown

Send: 0x74 0x8C
│ └── Checksum
└── Header

Response: 0x74 0x01 0x8B
│ │ └── Checksum
│ └── LED status: 0x01 = Blinking (0x00 = Off, any other value = Blinking)
└── Header

Set LED Status (0x56)​

Controls the on/off state of the status indicator LED.

Send (Tx)

HeaderLED ControlChecksum
Byte0Byte1Byte2
56000-add8

LED control values: 0x00 = Off, 0x01 = On

Response (Rx)

HeaderReservedReturn ValueChecksum
Byte0Byte1Byte2-Byte3Byte4
56004F 4B10

Example Breakdown

Send: 0x56 0x00 0xAA
│ │ └── Checksum
│ └── LED control: Turn off the LED
└── Header

Response: 0x56 0x00 0x4F4B 0x10
│ │ │ └── Checksum
│ │ └── Return value: "OK" (setting successful)
│ └── Reserved
└── Header

Enter Sleep Mode (0x54)​

Puts the sensor into low-power sleep mode.

Send (Tx)

HeaderSleep CommandChecksum
Byte0Byte1-Byte5Byte6
5473 6C 65 65 70 (ASCII: sleep)0-add8

Response (Rx)

HeaderReservedReturn ValueChecksum
Byte0Byte1Byte2-Byte3Byte4
54004F 4B12

Example Breakdown

Send: 0x54 0x73 0x6C 0x65 0x65 0x70 0x93
│ │ └── Checksum
│ └── ASCII: "sleep"
└── Header

Response: 0x54 0x00 0x4F4B 0x12
│ │ │ └── Checksum
│ │ └── Return value: "OK" (command executed successfully)
│ └── Reserved
└── Header

Exit Sleep Mode (0x55)​

Wakes the sensor and resumes normal operation.

Send (Tx)

HeaderWake CommandChecksum
Byte0Byte1-Byte5Byte6
5561 77 61 6B 65 (ASCII: awake)0-add8

Response (Rx)

HeaderReservedReturn ValueChecksum
Byte0Byte1Byte2-Byte3Byte4
55004F 4B11

Example Breakdown

Send: 0x55 0x61 0x77 0x61 0x6B 0x65 0xA2
│ │ └── Checksum
│ └── ASCII: "awake"
└── Header

Response: 0x55 0x00 0x4F4B 0x11
│ │ │ └── Checksum
│ │ └── Return value: "OK" (command executed successfully)
│ └── Reserved
└── Header

Get Sensor Serial Number (0x71)​

Reads the sensor's 6-byte unique serial number.

Send (Tx)

HeaderChecksum
Byte0Byte1
710-add8

Response (Rx)

HeaderSensor SNChecksum
Byte0Byte1-Byte6Byte7
7112 34 56 78 91 23C7

Example Breakdown

Send: 0x71 0x8F
│ └── Checksum
└── Header

Response: 0x71 0x12 0x34 0x56 0x78 0x91 0x23 0xC7
│ │ └── Checksum
│ └── Sensor serial number: 123456789123
└── Header

Get Firmware Version (0x73)​

Reads the sensor's firmware version information.

Send (Tx)

HeaderChecksum
Byte0Byte1
730-add8

Response (Rx)

HeaderFirmware VersionChecksum
Byte0Byte1-Byte19Byte20
7369 4E 6F 73 65 58 36 32 30 32 35 31 31 31 32 31 34 33 39A2

Example Breakdown

Send: 0x73 0x8D
│ └── Checksum
└── Header

Response: 0x73 0x694E6F736558363230323531313132313433390 0xA2
│ │ └── Checksum
│ └── ASCII: "iNoseX6202511121439" (firmware version)
└── Header

API Overview​

Click to expand
  • environment_x6_init(): Initializes the Environment X6 Sensor
  • environment_x6_get_concentration(): Retrieves real-time concentration values
  • environment_x6_get_sensor_param(): Retrieves sensor parameters, including detection range and units
  • environment_x6_get_led(): Gets the current LED status (on or off)
  • environment_x6_set_led(): Sets the LED status
  • environment_x6_sleep(): Puts the sensor into sleep mode
  • environment_x6_wakeup(): Wakes the sensor from sleep mode
  • environment_x6_get_serial(): Retrieves the serial number
  • environment_x6_get_version(): Retrieves the firmware version

Quick Test​

  • Testing software: Serial Debugging Assistant paired with a USB-to-TTL adapter for quick verification

  • Test preparation

    • Windows PC
    • USB TO TTL (B) × 1
    • Environment X6 Sensor × 1
    • Connection cables
  • Hardware connection

    • Connect the components as shown below

      USB TO TTL (B)
  • Testing procedure

    • Connect the USB-to-TTL adapter to a USB port on your PC
      • Open the Serial Debugging Assistant (SSCOM), select the correct COM port, set the baud rate to 9600, open the port, and set the checksum mode to 0-add8
      • Send the command in hexadecimal: 70, and the sensor data will be returned:
  • ① Send the query command

  • ② Receive real-time data

    USB TO TTL (B)