十合一空気質センサー説明书

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

十合一空気質センサー説明书
十合一空気質センサー説明书イラスト

一、通信プロトコル概述

1. デフォルト通信パラメータ

  • Baud rate9600
  • data bit8
  • check digit:无
  • stop bit1(即 9600/8/N/1
  • デフォルトデバイスアドレス0x01
  • 応答時間:< 100ms

2. CRC verification

  • 算法:CRC-16/Modbus(多項式 0x8005
  • チェックコード格式:2 bytes,高位前に(如 CRC_H CRC_L)。
  • 計算工具:参照 CRCTool 或规格书第 IX 章代码。

二、协议功能详解

1. 読み取りデバイスアドレス和固件版本

Function:取得当前デバイスアドレス和固件版本号。

リクエスト格式(マスター→Sensors)
バイト位置data説明
00xFE放送アドレス(全装備。レスポンス)
10x11function code(読み取りアドレス)
2-50x00固定填充
6-7CRCCRC verification码

サンプル命令

FE 11 00 00 00 01 28 06
応答の形式(Sensors→マスター)
バイト位置data説明
00x01Device address
10x11function code
20x02データ長さ(2 bytes)
30x12固件版本(如 0x12=V1.2
40x01当前アドレス
5-6CRCCRC verification码

サンプルレスポンス

01 11 02 12 01 70 5C


Parse

  • 固件版本:V1.2
  • Device address:0x01

2. 修改デバイスアドレス

Function:更改デバイス Modbus address(範囲 1~247)。

リクエスト格式(マスター→Sensors)
バイト位置data説明
0当前アドレス原アドレス(如 0x01
10x06function code(修改アドレス)
2-40x00固定填充
5新アドレス目标アドレス(如 0x02
6-7CRCCRC verification码

サンプル命令(修改アドレス为 0x02):

01 06 00 00 00 02 08 0B
応答の形式(Sensors→マスター)

与リクエスト格式一致,戻る修改后的アドレス確認。

サンプルレスポンス

01 06 00 00 00 02 08 0B


説明:応答データリクエストと同じ。表示修改成功。

3. 読み取りセンサーはデータ

Function:読み取り指定レジスタ的センサーはデータ(サポート单次読み取り多个センサーは)。

リクエスト格式(マスター→Sensors)
バイト位置data説明
0Device address0x01
10x03function code(Read switch status)
2-3starting addressレジスタ開始アドレス(高位前に)
4-5number of registers需読み取り的レジスタの数
6-7CRCCRC verification码

サンプル命令(読み取りすべて 11 个センサーはデータ):

01 03 00 00 00 0B C5 CD
応答の形式(Sensors→マスター)
バイト位置data説明
0Device address0x01
10x03function code
2データ長さbyte count(number of registers × 2)
3~Nセンサーはデータすべてのレジスタ。 2 bytes(高位前に)
N+1~N+2CRCCRC verification码

サンプルレスポンス(部分データ):

01 03 16 00 96 00 64 00 32 00 30 00 28 00 1E 01 2C 00 0A 00 14 70 5C


Parse

  • 00 96 → eCO₂ = 150 ppm
  • 00 64 → TVOC = 100 ppb
  • 00 32 → CH₂O = 50 μg/m³
  • 温湿度データ
  • 湿度:0x012C → 300 → 300/100 = 30.0%RH
  • temperature:0x000A → 10 → 10/100 = 0.10℃

4. 系统参数設定(エキスパート功能)

4.1 read/設定ボーレート

register address0x0103(ボーレート代码见附录表)。

読み取りボーレートリクエスト

01 03 01 03 00 01 CRC


設定ボーレートリクエスト(设为 115200):

01 06 01 03 00 07 CRC
4.2 校准センサーはデータ

register address

  • 温度校准:0x011D
  • 湿度校准:0x011C

サンプル命令(温度校准 +2.5℃):

01 06 01 1D 00 FA 98 73


説明

  • 00 FA → 250(即 250/100 = 2.5℃)
  • 负值需转换为补码(如 0xFF9C → -100 → -1.00℃)。

三、データの解析方法

1. 計算公式

センサーはタイプ公式example
eCO₂CO₂ = (CO₂_H << 8) + CO₂_L0x0096 → 150 ppm
temperaturetemperature = 記号付き。值 / 1000xFF9C → -100 → -1.00℃
IlluminanceLux = (Lux_H << 8) + Lux_L0x01F4 → 500 Lux

2. 記号付き。数処理

  • 方法 1:直接转为記号付き。整数(如 0xFF9C → -100)。
  • 方法 2:若值 > 32767,则 真实值 = (元の值 - 65536) / 100

四、Precautions

  1. 预热时间:VOC モジュール需预热 ≥3 分,其他センサーは上电即用。
  2. Installation requirements
  • インストール高度 ≥15cm,避免地面尘埃污染。
  • 避免高粉尘(>300 μg/m³)、油烟或高湿度环境。
  1. 校准警告
  • エキスパート功能需谨慎操作,误修改可能导致データ異常。
  • 校准值需按实际环境调整,建议记录出厂デフォルト値。
  1. CRC verification:すべての命令必须包含正确 CRC,否则デバイスが応答しません。

五、附录

1. センサーはレジスター·アドレス表

register addressセンサーはタイプdata format
0x0000eCO₂2 bytes符号なし。整数(ppm)
0x0001TVOC2 bytes符号なし。整数(ppb)
0x0002CH₂O2 bytes符号なし。整数(μg/m³)
0x0003PM2.52 bytes符号なし。整数(μg/m³)
0x0004湿度2 bytes(真实值 × 100)
0x0005temperature2 bytes(真实值 × 100)
0x0006PM102 bytes符号なし。整数(μg/m³)
0x0007PM1.02 bytes符号なし。整数(μg/m³)
0x0008Illuminance2 bytes符号なし。整数(Lux)
0x0009MCU temperature2 bytes(真实值 × 100)
0x000ANoise2 bytes符号なし。整数(dB)

2. ボーレート代码表

代码Baud rate
01200
12400
24800
39600
419200
538400
657600
7115200

3. CRC calculation代码(C 语言サンプル)

uint16_t CRC16_Check(const uint8_t *pushMsg, uint8_t usDataLen) {
    uint8_t uchCRCHi = 0xFF, uchCRCLo = 0xFF;
    uint8_t uIndex;
    while (usDataLen--) {
        uIndex = uchCRCLo ^ *pushMsg++;
        uchCRCLo = uchCRCHi ^ auchCRCHi[uIndex];
        uchCRCHi = auchCRCLo[uIndex];
    }
    return (uint16_t)(uchCRCHi << 8 | uchCRCLo);
}

产品购买:https://item.taobao.com/item.htm?ft=t&id=675637355531

Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.