무제 문서

 


RS485 온습도 센서 -SHT20

(Modbus RS485 Temperature Humidity Sensor -SHT20 )

 

개요

  • 본 제품은 RS485 온습도 센서 -SHT20 입니다.
  • SHT20 기반의 온습도 센서로 산업용 Modbus RS485 인터페이스를 가지고 있는 제품입니다.
  • -20도에서 60도까지 온도를 측정하며, 0-100% RH 습도를 측정합니다.
  • 4-30VDC로 동작합니다.

특징

  • Working voltage:DC4-30 v(the highest do not exceed33 v)

    The most powerful:0.2 W.

    Working temperature:The temperature- 20℃+ 60℃Humidity,0% RH to 100% RH

    Accuracy:The temperature+ / - 0.3℃(25℃)Humidity,(25 + / - 3% RH℃)

    Output interface:RS485Communication (standardMODBUSProtocol and custom ordinary), as shown in the agreement

    Device address:Can be set up1-247.By default,1

    Baud rate:The default9600(the user can set),8Bits of data,1A stop, without checking

    Size:60 * 30 * 18

문서

  • MODBUS Protocol

    Function code used for the product:

    0 x03:Reading a keep register

    0 x04: Read input register

    0 x06:Write a single register

    0 x10:Write more keep registers

    Register type

    Register address

    The data content

    The number of bytes

     

    The input registers

    0x0001

    Temperature value

    2

    0 x0002

    Humidity value

    2

     

     

    Keep a register

    0 x0101

    Device address

    (1-247)

    2

    0 x0102

    Baud rate

    0:9 600

    And 400

    200:

    2

    0 x0103

    The temperature at(/ 10)

    10.0 ~ 10.0

    2

    0 x0104

    Humidity is revised(/ 10)

    10.0 ~ 10.0

    2

     

     

    Modbus The communication format:

    The host to send data frames:

    From the machine address

    Function code

    Register address

    High byte

    Register address

    The low byte

    Register number

    High byte

    Register number

    The low byte

    CRC

    High byte

    CRC

    The low byte

     

     

     

     

     

     

     

     

    The response data from the machine frame:

    From the machine address

    The response function code

    The number of bytes

    register1data

    High byte

    register1data

    The low byte

    registerNdata

    High byte

    registerNdata

    The low byte

    CRC

    High byte

    CRC

    The low byte

     

     

     

     

     

     

     

     

     

     MODBUSThe command frame

    Host read temperature command frame(0 x04):

    From the machine address

    Function code

    Register address

    High byte

    Register address

    The low byte

    Register number

    High byte

    Register number

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x04

    0x00

    0 x01

    0x00

    0 x01

    0 x60

    0 x0a

    The response data from the machine frame:

    From the machine address

    Function code

    The number of bytes

    The temperature

    High byte

    The temperature

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x04

    0 x02

    0 x01

    0 x31

    0 x79

    0 x74

     

    Temperature value= 0 x131,Converted to a decimal305, the actual temperature = 305/10 = 30.5℃

    Note: the temperature is a symbol16Hexadecimal number, temperature= 0 xff33,Converted to a decimal - 205., the actual temperature= 20.5℃;

     

    Host read humidity command frame(0 x04):

    From the machine address

    Function code

    Register address

    High byte

    Register address

    The low byte

    Register number

    High byte

    Register number

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x04

    0x00

    0 x02

    0x00

    0 x01

    0 xc1

    0 xca

    The response data from the machine frame:

    From the machine address

    Function code

    The number of bytes

    humidity

    High byte

    humidity

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x04

    0 x02

    0 x02

    0 x22

    0 xd1

    0 xba

    Humidity value= 0 x222,Converted to a decimal546, the moisture content of the actual value= 546/10 = 54.6%;

     

    Continuous read temperature and humidity command frame(0 x04):

    From the machine address

    Function code

    Register address

    High byte

    Register address

    The low byte

    Register number

    High byte

    Register number

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x04

    0x00

    0 x01

    0x00

    0 x02

    0 x20

    0 x0b

    The response data from the machine frame:

    From the machine address

    Function code

    The number of bytes

    The temperature

    High byte

    The temperature

    The low byte

    humidity

    High byte

    humidity

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x04

    0 x04

    0 x01

    0 x31

    0 x02

    0 x22

    0 x2a

    0 xce

     

    Read the contents of the registers(0 x03):

    Take the case of reading from the machine address:

    From the machine address

    Function code

    Register address

    High byte

    Register address

    The low byte

    Register number

    High byte

    Register number

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x03

    0 x01

    0 x01

    0x00

    0 x01

    0 xd4

    0 x0f

    Response from the machine frame:

    From the machine address

    Function code

    The number of bytes

    From the machine address

    High byte

    From the machine address

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x03

    0 x02

    0x00

    0 x01

    0 x30

    0 x18

     

    Modify the contents of the registers(0 x06):

    To modify the machine address, for example:

    From the machine address

    Function code

    Register address

    High byte

    Register address

    The low byte

    Register values

    High byte

    Register values

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x06

    0 x01

    0 x01

    0x00

    0 x08

    0 xd4

    0 x0f

    Modify the machine address: 0 x08 = 8

     

    The response from the machine frame(And send the same):

    From the machine address

    Function code

    Register address

    High byte

    Register address

    The low byte

    Register values

    High byte

    Register values

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x06

    0 x01

    0 x01

    0x00

    0 x08

    0 xd4

    0 x0f

     

    Continuously change keep registers(0 x10):

    From the machine address

    Function code

    The starting address

    High byte

    The starting address

    The low byte

    Register number

    High byte

    Register number

    The low byte

    The number of bytes

    register1High byte

    register1The low byte

    register2High byte

    register2The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x06

    0 x01

    0 x01

    0x00

    0 x02

    0 x04

    0x00

    0 x20

    0 x25

    0 x80

    0 x25

    0 x09

    Modify the machine address: 0 x20 = 32

    Baud rate: 0 x2580 = 9600

    Response from the machine frame:

    From the machine address

    Function code

    Register address

    High byte

    Register address

    The low byte

    Register number

    High byte

    Register number

    The low byte

    CRC

    High byte

    CRC

    The low byte

    0 x01

    0 x06

    0x00

    0x11

    0x00

    0 x04

    0 xd4

    0 x0f

     

     

                       Ordinary version of the agreement

    The default baud rates,9600(the user can set),8Bits of data,1A stop, without checking

    RS485 communication

     

    A serial port command

    instructions

    READ

    Report triggered a temperature and humidity

    (27.4℃67.7%, The temperature27.4℃ humidity67.7%)

    AUTO

    Start the temperature and humidity automatically report function

    (Same as above)

    STOP

    Stop the temperature and humidity automatically report function

    BR: XXXX

    Set the baud rate

    9600 ~ 19200

    (BR: 9600 Baud rate for9600).

    TC: XX. X

    Set the temperature calibration

    (10.0 ~ 10.0)

    (TC: 02.0Revised for temperature2.0℃)

    HC: XX. X

    Set the humidity calibration

    (10.0 ~ 10.0)

    (HC: 05.1 Humidity is revised- 5.1%)

    HZ: XXX

    Set the temperature and humidity reporting rate

    (0.5, 1,2,5,10)

    (HZ: 2 Automatically report rate 2 hz)

    PARAM

    Read the system current Settings

     

     

    PARAMinstruction:

    TC: 0.0, HC: 0.0, BR: 9600 HZ: 1- >The temperature at0.0Humidity is revised0.0Baud rate9600Report the rate 1 hz

    SLAVE_ADD: 1. - >MODBUSFrom the machine address 0 x01

연관제품