高精度光照度传感器

High-Precision Illuminance Sensor User Manual
型号 / Model: YTL-83000-WM | 版本 / Ver: 2.0

📘 产品简介

本传感器采用高灵敏度光电二极管配合滤光矫正技术,光谱响应接近人眼函数(CIE V(λ))。测量范围覆盖0.01Lux至83,000Lux,可满足从暗室微弱光到强烈日光的全场景测量需求。响应时间小于15秒,内置Modbus RTU协议WiFi无线传输,适用于智慧农业、楼宇自动化、博物馆照明监测、光伏电站环境监控等领域。

📘 Product Introduction

This sensor uses a high-sensitivity photodiode with optical filtering correction, providing a spectral response close to the human eye function (CIE V(λ)). The measuring range covers 0.01 Lux to 83,000 Lux, meeting full-scene requirements from faint light in dark rooms to intense sunlight. With a response time of less than 15 seconds, it integrates Modbus RTU protocol and WiFi wireless transmission, ideal for smart agriculture, building automation, museum lighting monitoring, and photovoltaic power plant environmental monitoring.

⚙️ 技术参数 / Technical Specifications
参数 / Parameter规格 / Specification
工作原理 / Principle高精度光电二极管 + 余弦校正 / High-precision photodiode with cosine correction
测量范围 / Measuring Range0.01 ~ 83,000 Lux (自动量程切换 / Auto-ranging)
分辨率 / Resolution0.01 Lux (0.01~999Lux), 1 Lux (≥1000Lux)
响应时间 (T90) / Response Time< 15 seconds
测量精度 / Accuracy±3% 读数 (典型) / ±3% of reading (typical)
重复性 / Repeatability±1%
光谱范围 / Spectral Range400~700nm (匹配CIE V(λ)曲线)
输出频率 / Output Rate1 Hz (可配置 / configurable)
工作电压 / Operating VoltageDC 5V ±0.2V 或 12-24V (宽压可选)
工作电流 / Operating Current≤ 80mA @5V (WiFi关闭), ≤ 150mA (WiFi开启)
工作温度 / Operating Temp.-20℃ ~ +60℃
工作湿度 / Operating Humidity0~95% RH (非冷凝 / non-condensing)
通信接口 / CommunicationUART (TTL) / RS485 (Modbus) + WiFi 2.4GHz
通信协议 / ProtocolModbus RTU / 主动上报 JSON
外形尺寸 / Dimensions70 × 40 × 22 mm
防护等级 / Ingress ProtectionIP50 (室内使用)

🔬 工作原理

传感器内置高稳定性硅光电二极管,表面覆盖经过精确匹配的视觉函数滤光片,使其光谱响应与人眼明视觉函数高度一致。当光线入射时,二极管产生微电流,该电流经高精度I/V转换、增益放大和模数转换后,由微处理器进行线性化校正和温度补偿,最终输出以Lux为单位的光照度值。传感器配备余弦校正器,可减少斜射光角度误差。

🔬 Working Principle

The sensor integrates a high-stability silicon photodiode with a precisely matched visual function filter, making its spectral response highly consistent with the human eye's photopic response. When light strikes the diode, it generates a microcurrent which is converted, amplified, and digitized. The microprocessor applies linearization correction and temperature compensation, outputting illuminance in Lux. A cosine corrector minimizes angular error from oblique incident light.

🔌 引脚接线图 / Pinout & Wiring
引脚 / Pin名称 / Name说明 / Description
1VCC电源正极 (5V 或 12-24V) / Power +
2GND电源地 / Ground
3TX/ARS485 A 或 UART_TXD (Modbus RTU)
4RX/BRS485 B 或 UART_RXD (Modbus RTU)
5WiFi_RSTWiFi 复位 / 恢复出厂设置 / WiFi reset
6SET配置模式使能 (低电平进入配置)

※ 默认Modbus RTU模式,波特率9600,8数据位,1停止位,无校验。

📡 通信协议 / Communication Protocol

Modbus RTU (RS485 / TTL UART)

参数 / Parameter值 / Value
波特率 / Baud Rate9600 / 19200 / 38400 (默认 9600)
数据位 / Data Bits8
停止位 / Stop Bits1
校验位 / Parity无 / None
从机地址 / Slave Address1~247 (默认 0x01)

📦 Modbus 寄存器表 / Register Map

寄存器地址 (Hex)参数 / Parameter数据类型单位 / Unit说明
0x0000光照度 / Illuminanceuint32 (2寄存器) 或 uint16Lux实际值×10 (例: 1250 = 125.0 Lux)
0x0002光照度(高量程) / High-range Luxuint32Lux适用于>20000 Lux场景
0x0010设备状态 / Statusuint16-Bit0:传感器正常/Bit1:WiFi状态
0x0020Modbus 从机地址uint16-1~247 (可写)
0x0021波特率代码uint16-0=9600,1=19200,2=38400

读数示例 / Read Example:
发送 / Send: 01 03 00 00 00 01 84 0A (读取单个寄存器 uint16)
返回 / Response: 01 03 02 03 E8 B8 FA → 0x03E8 = 1000 → 100.0 Lux
读取32位精度: 01 03 00 00 00 02 C4 0B → 4字节数据组合成uint32。

📤 主动上报模式 (UART 字符串)

传感器可配置为主动上报模式,每秒输出一次JSON格式数据。
示例 / Example: {"Lux":1234.5,"Temp":25.3,"WiFi":-45}

📶 WiFi 无线传输 / WiFi Wireless Transmission

WiFi 功能特性:

  • IEEE 802.11 b/g/n 2.4GHz
  • STA / AP 双模式
  • 支持 MQTT (MQTT 3.1.1) 上传数据
  • 支持 HTTP POST / GET API 读取实时光照度
  • 内置 Web Server 用于参数配置 (端口80)
  • 支持 OTA 远程固件升级
  • 数据可推送至阿里云IoT、腾讯云、Home Assistant

WiFi 快速配网 (SmartConfig / AP模式):

  1. 上电后若未配网,指示灯慢闪;长按SET键5秒进入AP模式(快闪)
  2. 手机连接热点“LUX_Sensor_XXXX”,密码:12345678
  3. 浏览器访问 192.168.4.1,选择家庭WiFi并输入密码
  4. 传感器自动连接路由器,指示灯常亮表示WiFi正常
  5. 默认MQTT服务器地址: mqtt.iotplatform.com,端口1883

WiFi Features:

  • IEEE 802.11 b/g/n 2.4GHz
  • STA / AP dual mode
  • MQTT (3.1.1) data upload
  • HTTP POST / GET API for real-time illuminance
  • Built-in Web Server for configuration (port 80)
  • OTA firmware upgrade support
  • Compatible with Alibaba Cloud IoT, Tencent Cloud, Home Assistant

Quick WiFi Setup (SmartConfig / AP Mode):

  1. LED slow flash when not configured; press SET button for 5 seconds to enter AP mode (fast flash)
  2. Connect phone to hotspot "LUX_Sensor_XXXX", password: 12345678
  3. Visit 192.168.4.1, select home WiFi and enter password
  4. Sensor connects to router, LED stays solid when WiFi is ready
  5. Default MQTT broker: mqtt.iotplatform.com, port 1883
☀️ 光照度参考 / Illuminance Reference
场景 / Scene典型照度 / Typical Lux (Lux)
无月黑夜 / Moonless night0.001 ~ 0.02
满月夜空 / Full moon night0.1 ~ 0.3
昏暗走廊 / Dim corridor5 ~ 20
办公室照明 / Office lighting300 ~ 500
阴天室外 / Overcast outdoor1,000 ~ 5,000
晴天室外 / Sunny outdoor10,000 ~ 80,000
直射日光 / Direct sunlight80,000 ~ 120,000
⚠️ 使用注意事项 / Precautions
❓ 常见问题 / FAQ
Q1: 在完全黑暗环境下读数不为0?
A: 传感器可能存在微小暗电流噪声(通常<0.05Lux)。可通过Modbus命令执行零点校准。
In total darkness, reading may show small noise. Perform zero calibration via Modbus command.
Q2: WiFi 连接后数据不上传?
A: 检查MQTT broker地址/端口是否正确,以及路由器防火墙是否屏蔽1883端口。
Check MQTT broker address/port; ensure router firewall does not block port 1883.
Q3: Modbus 读取始终为最大值?
A: 可能量程配置错误或传感器处于强光饱和区,83,000Lux以上会溢出。请降低光源强度或更换量程模式。
If reading saturated, reduce light intensity or change range mode via register.
Q4: 响应时间超过15秒?
A: 检查软件滤波参数设置是否过大,恢复默认设置可恢复快速响应。
Check if software filter is set too high; restore default settings for fast response.