Seeed Studio S-Light-02 Industrial Light Intensity Sensor User Guide

June 10, 2024
seeed studio

Seeed Studio S-Light-02 Industrial Light Intensity Sensor User Guide
Seeed Studio S-Light-02 Industrial Light Intensity
Sensor

Product Introduction

S-Light-01 ambient light sensor, or illuminance sensor, measures the ambient illuminance. Eachsensoriscalibrated and offers excellent accuracy and consistency. The sensor is applicable for scienceresearch,solar power , greenhouse, weather station etc.

  • Measurement range to 200000lux
  • Output interface with RS485, Voltage
  • Level indicator and spring loaded for installation
  • Water proof to IP66 can be used outdoor directly
  • High accuracy and consistency with excellent stability
  • Reverse power protection and Built-in TVS/ESD protection

Specifications

Output Interface| Analog Voltage 0-2V (Output resistance ~0ohm)| RS485 Modbus-RTU
Power Supply| 3.9-30V/DC| 3.9-30V/DC
Power Consumption| 7mA@24V DC| 7mA@24V DC
Illuminance Range| Range:0~200000 Lux, Accuracy:±6% , Resolution:1lux
Direction Error| 30°±3%,60°±6%,80°±24%(Cosine Characteristics)
IP Ratings| IP66
Operating Temperature| -40~85°C
Installation| Screw hole 3
Cable Length| 2 meters
Dimension| 75
55*58mm

Wiring

Type Wiring diagram
Analog Voltage Output Red (V+): Power Supply + Black (G): Power Supply

– Blue (O1): Analog Output

Wiring diagram

RS485 Modbus| Red (V+): Power Supply + Black (G): Power Supply – Yellow (T+): RS485+/A/T+ White (T-): RS485-/B/T- **
Wiring diagram
**All RS485 communication parameters (Modbus Slave Address, baud rate, parity, data bits, stopbits) are set in internal register and can be saved when power down, the factory setting is ADDRESS=1, BAUDRATE=9600bps,PARITY=NONE, DATABITS=8bits, STOPBITS=1bit;Sometimes you may FORGET the communication settings, In this case, you can open the shield module and press the SET button for more than 3 seconds, then all thecommunication parameters are reset to factory setting, then communicating with the sensor

Dimension

Dimension

Safety, Care and Installation

Care and Safety
Keep the white optical lens on the top of the sensor clean and wiping lens by soft rag. Alwayscheckingthe horizontal bubble to keep the sensor horizontally placed. 4.2

Installation
Adjusting the screw and checking the horizontal bubble to make the sensor horizontally installed.

Output Signal Conversion

Output Interface Parameters Range Conversion Formula
Analog Voltage Output 0-2V ILLU: 0-200000 lux ILLU=RANGE*

VLOTAGE/2.00.When RANGE=2000 lux and VOLTEGE=1.0V,then ILLU =2000*1.00/2.00=1000lux
RS485 Modbus-RTU| ILLU: 0-200000 lux| ILLU =(32-Bits REGISTER VALUE).When REGISTERVALUE=1000,then ILLU= 1000 lux

RS485 Modbus Protocol

Modbus Protocol
Modbus Protocol is widely used to establish master-slave communication between intelligent devicesorsensors. A MODBUS message sent from a master to a slave contains the address of theslave, thefunction code (e.g. ‘read register’ or ‘write register’), the data, and a check sum (LRC or CRC). The sensor is RS485 interface with Modbus protocol. The default serial communication settingsisslaveaddress 1, Modbus RTU, 9600bps, 8 data bits and 1 stop bit. All communication settings can bechangedwith Modbus command, and take effective after re-power up the sensor.

Following Modbus function code are supported by sensor.
Modbus Function Code 0x03 : used for reading holding register.
Modbus Function Code 0x04 : used for reading input register.
Modbus Function Code 0x06 : used for writing single holding register.
Modbus Function Code 0x10: used for writing multiple holding register.

Modbus Register

Parameters| Register Addr. (HEX/DEC)| Data Type| Modbus Function Code(DEC )| Range and Comments| Default Value
---|---|---|---|---|---
ILLUMINANCEHIGH 16 Bits| 0x0000 /0| UINT16RO| 3/4| 0-200000 for0-200000lux| N/A
ILLUMINANCELOW 16 Bits| 0x0001 /1| UINT16RO| 3/4
STATUS| 0x0002 /2| UINT16 RO| 3/4| BIT15-BIT2: Reserved BIT1: Sensor ErrorBIT0: Over Range| N/A
RESERVED| 0x0003 /3| UINT16RO| 3/4| 0| 0
RESERVED| 0x0004 /4| UINT16RO| 3/4| 0| 0
RESERVED| 0x0004 /5| UINT16RO| 3/4| 0| 0
| | | | |
SLAVEADDRESS| 0x0200 /512| UINT16R/W| 3/6/16| 0-255| 1
BAUDRATE| 0x0201 /513| UINT16R/W| 3/6/16| 0-60:1200bps 1:2400bps 2:4800bps 3:9600bps 4:19200bps 5:38400bps| 3:9600bps
PROTOCOL| 0x0202 /514| UINT16R/W| 3/6/16| 00:Modbus RTU| 0:Modbus RTU
PARITY| 0x0203 /515| UINT16R/W| 3/6/16| 0-20:None 1:Even 2:Odd| 0:None Parity
DATABITS| 0x0204 /516| UINT16R/W| 3/6/16| 11:8 databits| 1:8databits
STOPBITS| 0x0205 /517| UINT16| 3/6/16| 0-1| 0:1 stopbit

NOTE: UINT16:16 bit unsigned integer, INT16:16bit signed integer
NOTE: RO: Register is Read Only, R/W: Register is Read/Write
NOTE: HEX is Hexadecimal (data with 0x/0X prefix), DEC is Decimal

Modbus Register Detail Description

ILLUMINANCE – HIGH 16 BitsILLUMINANCE – LOW 16 Bits

Data Range| 0-200000 for 0-200000 lux| Default: N/A
Power DownSave| N/A|

Example: When REGISTER(HIGH 16 Bits) = 0x0003 (HEX format) and REGISTER(HIGH16Bits)=0x0D40 (HEX format), then VALUE=(0x0003 *65536+0x0D40) = 200000lux

STATUS

Data Range| BIT15-BIT2: Reserved, always 0 BIT1: Bit set when sensor errorBIT0: Bit set when overrange| Default: N/A
Power DownSave| N/A|

Note: Sensor status

SLAVEADDRESS — Modbus Slave Address

Data Range| 0-255| Default: 1 or 13
Power DownSave| YES|

Note: Please re-power on the sensor to take effective after set. The default slave address for sensorswitha waterproof aviation connector is 13. The default slave address for sensors with hookup wires is1.

BAUDRATE — Serial Comm Baudrate

Data Range| 0-5 0: 1200bps 1: 2400bps 2: 4800bps 3: 9600bps 4: 19200bps| Default: 3
| 5:38400bps|
Power DownSave| YES|

Note: Please re-power on the sensor to take effective after set

PROTOCOL — Serial Comm Protocol

Data Range| 00:Modbus RTU| Default: 0
Power DownSave| YES|

Note: Please re-power on the sensor to take effective after set.

ACTIVEOUTPUTINTERVAL — Serial Comm Active Output Interval time

Data Range| 0-255 for 0-255 seconds, 0 for disabled| Default: 0
Power DownSave| YES|

Note: Please re-power on the sensor to take effective after set.
Note: Sensor will output the data actively without any master request command.
Note: Only ONE sensor should be on RS485 network, or there will be data collision and corrupt thedataon line.
Note: Refer to SET button to exit the Active Output Mode.

Example: When set to 5 then sensor will output the data every 5 seconds without any master requestcommand.

Modbus Function Code
For description below, data started with 0X/0x means that it’s in HEX format.

Function Code 3 Protocol Example

Master Request: AA 03 RRRR NNNN CCCC

AA 1 byte Slave Address,0-255
0x03 1 byte Function Code 3
RRRR 2 byte Starting Register Addr
NNNN 2 byte Quantity of Register to read
CCCC 2 byte CRC CHECKSUM

Slave Response: AA 03 MM VV0 VV1 VV2 VV3… CCCC

AA 1 byte Slave Address,0-255
0x03 1 byte Function Code 3
MM 1 byte Register Data Byte Count
VV0,VV1 2 byte Register Value (High8bits first)
VV2,VV3 2 byte Register Value (High8bits first)
Register Value (High8bits first)
CCCC 2 byte CRC CHECKSUM

Example: Read register 0x0200-0x0201,that is slave address and baud rate. Master Request:01 03 0200 0002 C5B3

Master Request:01 03 0200 0002 C5B3

Slave Addr. 1 byte 0x01
Function Code 1 byte 0x03
Starting RegisterAddr. 2 byte 0x0200
Quantity ofRegister to read 2 byte 0x0002
Checksum 2 byte 0xC5B3

Function Code 4 Protocol Example

Master Request: AA 04 RRRR NNNN CCCC

AA 1 byte Slave Address,0-255
0x04 1 byte Function Code 4
RRRR 2 byte Starting Register Addr
NNNN 2 byte Quantity of Register to read
CCCC 2 byte CRC CHECKSUM

Slave Response: AA 04 MM VV0 VV1 VV2 VV3… CCCC

AA 1 byte Slave Address,0-255
0x04 1 byte Function Code 4
MM 1 byte Register Data Byte Count
VV0,VV1 2 byte Register Value (High8bits first)
VV2,VV3 2 byte Register Value (High8bits first)
Register Value (High8bits first)
CCCC 2 byte CRC CHECKSUM

Master Request: 01 04 00 00 00 02 71 CB

Slave Addr. 1 byte 0x01
Function Code 1 byte 0x04
Starting Register 2 byte 0x0000

Slave Response: 01 04 04 0000 004D 3BB1

Slave Addr. 1 byte 0x01
Function Code 1 byte 0x04
Register Data ByteCount 1 byte 0x04
Register Value:Illuminance high 16 bits 2 byte 0x00(HIGH 8 Bits)

0x00(LOW8 Bits)
Register Value:Illuminance low 16 bits| 2 byte| 0x00(HIGH 8 Bits)
0x4D(LOW8 Bits)
Checksum| 2 byte| 0x3BB1

Function Code 6 Protocol Example

Master Request: AA 06 RRRR VVVV CCCC

AA 1 byte Slave Address,0-255
0x06 1 byte Function Code 6
RRRR 2 byte Register Addr (High8bits first)
VVVV 2 byte Register Value (High8bits first)
CCCC 2 byte CRC CHECKSUM

Slave Response: AA 06 RRRR VVVV CCCC

AA 1 byte Slave Address,0-255
0x06 1 byte Function Code 6
RRRR 2 byte Register Addr (High8bits first)
VVVV 2 byte Register Value (High8bits first)
CCCC 2 byte CRC CHECKSUM

Function Code 16 Protocol Example

Master Request: AA 10 RRRR NNNN MM VVVV1 VVVV2 …CCCC

AA 1 byte Slave Address,0-255
0x10 1 byte Function Code 0x10
RRRR 2 byte Starting Register Addr
NNNN 2 byte Quantity of Register to write
MM 1 byte Register Data Byte Count
VVVV1 2 byte Register Value(High8bits first)
VVVV2 2 byte Register Value(High8bits first)
Register Value(High8bits first)
CCCC 2 byte CRC CHECKSUM

Slave Response: AA 10 RRRR NNNN CCCC

AA 1 byte Slave Address,0-255
0x10 1 byte Function Code 0x10
RRRR 2 byte Starting Register Addr
NNNN 2 byte Quantity of Register to write
CCCC 2 byte CRC CHECKSUM

Software Configuration Utility

Configuration

You can use software listed below to try reading/writing the register of sensor, https://github.com/ed-chemnitz/qmodbus/releases

Document version

Version Date Description Editor
V1.0 First Version
V1.1 5/15/2023 Delete 5 ranges Yvonne.Meng

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

seeed studio User Manuals

Related Manuals