ASAIR AF5485 User manual

Temperature & Humidity Transmitter
AF5485 User Manual

AF5485 User Manual
- 1 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
1 Product Overview
The AF5485 is a high performance industrial
network-based temperature and humidity transmitter.
It measures the temperature and humidity
environment in the form of digital display on the local
display. When the measured data exceeds the limitation, the output control signal generate
a sound alarm signal, at the same time the response is sent by the host command, to upload
the data to the host through the RS485 bus in the data packets.
The AW3485A has the characteristics of small volume, light weight, wide range, high
precision, fast response speed and good long-term stability, etc, therefore it can be widely
used in building automation, HVAC and climate signal collection, museum and hotel weather
station, logistics and medical industry, room temperature monitoring and any other field that
needs of the air temperature and humidity measurement and control.
2 Sensor Performance
2.1 Relative Humidity (%RH)
Parameter
Condition
Min
Typ.
Max
Units
Resolution
0.1
%RH
Measuring range
0
±3
99.9
%RH
Drift
Typical
0.1
%RH/yr
Sampling period
2.5
s
2.2 Temperature( ℃)
Parameter
Condition
Min
Typ.
Max
Units
Resolution
0.1
℃
operating
range(inner)
-40
±0.5
80
℃
Drift
Typical
0.1
℃/yr
Sampling period
2.5
s

AF5485 User Manual
- 2 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
Figure 1 Relative Humidity error Figure 2 Relative Temperature error
The measured value of the product may be subject to the following factors:
1).The temperature error
◎Placed in a test environment in settling time is too short.
◎Near sources of heat, cold source, or directly at the sun.
2).The humidity error
◎Placed in a test environment in settling time is too short.
◎Prohibited for a long time in the steam, spray, curtain or condensing environments.
3).Pollution
◎In dust or other environmental pollution, the product must be cleaned regularly.
2.3 Other specifications
1) Current consumption: ≤15mA
2) Supply voltage: 9~36VDC
3) Output signal: RS485
4) Communication protocol: Standard MODBUS RTU protocol

AF5485 User Manual
- 3 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
3 Dimensions
Figure 3 Dimension (Units: mm)
4RS485 typical applications
The external communication specification is shown in table 1.
Table 1: Wiring interface specification
No.
Pin Mark
Wiring Color
Function Description
1
B-
white
RS485B-
2
GND
black
GND
3
V+
red
VDD
4
A+
yellow
RS485A+
Figure 4Terminal son diagram

AF5485 User Manual
- 4 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
Figure 5 RS485 typical applications
5 Slave address
Based on ModBus RTU protocol -, device address is the only, according to the PCB board
after eight dial the code switch (Figure 6) to set selection need to address, eight allows a maximum
of 255 devices (address received from 1 ~ 255) in the system.
Figure 6
Calculation method: dial the code A - H respectively corresponding to the number 128, 64,
32, 16, 8, 4, 2, 1 (figure 6). Put A - H address code dialing to NO part code corresponding to the
value add up, and is the address code values. Address code examples as shown in figure 6, 7, 8.
Figure 6 Figure 7 Figure 8
Figure 6: address = 1 H to ON, H 1, namely the address code is 1
Figure 7: address = 2 G to ON, G is 2, namely the address code of 2
Figure 8: address = 13 E, F, H and ON, the address is: 8 + 4 + 1 = 13 namely address code is 13
Note: when choosing measuring range jumper before operation, please close the transmitter power.

AF5485 User Manual
- 5 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
6 RS485 protocol
6.1、Internal register mapping address
Registers
Addre
ss
Registers
Addre
ss
Registers
Addre
ss
Registers
Addre
ss
Humidity
0x000
0
Device Type
0x000
8
Humidity upper limit
alarm value
0x001
0
Reserved
0x001
8
Temperature
0x000
1
Version(Low 8 Byte)
0x000
9
Enabled humidity
upper limit alarm
0x001
1
Reserved
0x001
9
Reserved
0x000
2
Device ID High 16
Bit
0x000
A
Humidity lower limit
alarm value
0x001
2
Reserved
0x001
A
Reserved
0x000
3
Device ID Low 16
Bit
0x000
B
Enabled humidity
lower limit alarm
0x001
3
Reserved
0x001
B
Reserved
0x000
4
Temperature upper
limit alarm value
0x000
C
Reserved
0x001
4
Reserved
0x001
C
Reserved
0x000
5
Enabled
temperature upper
limit alarm
0x000
D
Reserved
0x001
5
Temperature
correction
update
0x001
D
Reserved
0x000
6
Temperature lower
limit alarm value
0x000
E
Reserved
0x001
6
Humidity
correction
update
0x001
E
Reserved
0x000
7
Enabled
temperature lower
limit alarm
0x000
F
Reserved
0x001
7
Reserved
0x001
F
6.2 Supported function code
0x03 multiplexer register read
0x10 multiplexer register write
@ Read instruction:
The host frame format
transmitter address+ 0x03 + register start address(2 bytes) + register number(2
bytes) +CRC low byte +CRC high byte
Transmitter return format
transmitter address + 0x03 + returns the number of bytes(1 byte) + data 0+..+ data n
+ CRC low byte + CRC high byte
@Write instruction
The host frame format

AF5485 User Manual
- 6 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
transmitter address+ 0x10 + register start address(2 bytes) + register number(2
bytes) +sc-bytes(1 byte) + data 0+..+ data n + CRC low byte +CRC high byte
Transmitter return format
transmitter address + 0x10 + register start address(2 bytes) + register number(2
bytes) + CRC low byte + CRC high byte
Write function code specific instructions:
1). In the internal register address, only the address 0x000C-0x001E can be written, and
others are prohibited.
2). In address 0x000C-0x001B, if the host data writing is out of the range or not in
accordance with the control logic, the transmitter register will not update the values, but
preserved.
3) 0x001C, 0x001d, 0x001E, the three registers, will be limited to the boundary value, if they
exceed the range.
4) The host should send the actual value magnified 10 times to change decimal into integer.
6.3 Error code display
0x81 illegal function code (not supported function code)
0x82 read illegal address
0x83 write illegal data (written to a not writable register address or transmitter)
6.4 Examples for communication read instructions
The host send message format: 01 03 00 00 00 02 C4 0B. The description of the function
code is shown as below:
Send by Host
Byte
number
Message
Remarks
Slave Address
1
01
Slave that send to address 01
Function Code
1
03
Read the register
Start Address
2
0000
Start address of 0000
Register Read
Number
2
0002
Read 2 registers, 4 bytes in total
CRC Code
2
C40B
The CRC calculated by the host, the low byte first(C4)
and high byte behind(0B)
The message format returned by the sensor respond: 01 03 04 Humidity (16 bytes)
Temperature (16 bytes) CRC check code

AF5485 User Manual
- 7 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
The following table is an example of returning a set of temperature and humidity data: 01 03
04 01 D7 00 D6 CA 69
Slave response
Byte
number
Message
Remarks
Slave Address
1
01
Slave that send to address 01
Function Code
1
03
Read the register
Return Byte Number
1
04
Returned 4 registers, total 4 bytes
Register 0 High Byte
1
01
Contents of address 0x00 (humidity high byte)
Register 0 Low Byte
1
D7
Contents of address 0x00 (humidity low byte)
Register 1 High Byte
1
00
Contents of address 0x00 (temperature high byte)
Register 1 Low Byte
1
D6
Contents of address 0x00 (temperature low byte)
CRC Code
2
CA69
The returned CRC calculated by the slave, the low
byte first(CA)
@Temperature and humidity output format and calculation
Examples for temperature and humidity output format and calculation:
The temperature and humidity resolution are 16-bit. The temperature and humidity are
printed in the actual positive or negative format, and the numerical value is 10 times the
actual temperature and humidity value.
Humidity: 01D7 = 1x256+13x16+4 =471 = > Humidity = 471÷10=47.1%RH
Temperature: 00D6 = 13x16+6 = 214 = > Temperature = 214÷10 = 21.4℃
◎Calculation of CRC Codes
1. Preset 1 16-bit register is hexadecimal FFFF (all 1); this register is called the CRC
register;
2.The first 8-bit binary data (the first byte of the communication information frame) is
different from the lower 8 bits of the 16-bit CRC register, and the result is placed in the CRC
register;
3.Move the contents of the CRC register one bit to the right (towards the low) to fill the most
significant bit with 0 and check the shifted bit;
4.If the shift bit is 0: repeat step 3 ( right shift one bit again); if the shift bit is 1: The CRC
register is xor with the polynomial A001 (1010 0000 0000 0001) ;
5.Repeat steps 3 and 4 until you move 8 times, so that the entire 8-bit data is processed;

AF5485 User Manual
- 8 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
6.Repeat step 2 to step 5 to perform the next byte processing of the communication
information frame;
7.After all the bytes of the communication information frame are calculated as described
above, the high and low bytes of the resulting 16-bit CRC register are exchanged;
8.The final result of the CRC register is:CRC Code.
◎C language calculation code of CRC Code
Note : This procedure calculates the CRC code(the start address of the bytes is ptr and the length is len)
unsigned short crc16(unsigned char *ptr, unsigned char len)
{
unsigned short crc=0xFFFF;
unsigned char i;
while(len--)
{
crc ^=*ptr++;
for(i=0;i<8;i++)
{
if(crc & 0x01)
{
crc>>=1;
crc^=0xA001;
}else
{
crc>>=1;
}
}
}
return crc;
}

AF5485 User Manual
- 9 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
7 License Agreement
1) Without the written permission of the company, it shall not copy or disseminate the
content of this specification in any form, nor shall it be disclosed to a third party.
2) The company and the third party have the ownership of the software, and the user can
only use it after signing the contract or obtaining the software license.
3) The contents of this instruction manual are subject to change without prior notice.
7 Warning and Personal Injury
Do not apply this product to safety protection devices or emergency shutdown devices,
and any other applications that may cause personal injury due to the malfunction of the
product, unless otherwise authorized. Please refer to the product data sheet and Application
guide before installation, processing, use, or maintenance of the product. Failure to comply
with the recommendations may result in death and serious bodily harm. The company will
not be liable for all damages resulting in personal injury or death, and avoid the company
managers and employees, agents, distributors and other subsidiary may have any claim,
including all the costs and compensation costs, legal fees etc.
8 Quality Assurance
The company provides quality assurance for 12 months for the original purchaser of
the products (calculated from the date of shipment), in accordance with the technical
specifications of the data book of the product published by the company. If the product is
proved to have its own quality problems during the warranty period, the company will provide
free maintenance or replacement. The user must meet the following conditions:
1) The purchaser must notify the company of the defect in writing within 14 days of
discovery.
2) The purchaser shall pay the shipping charges for product mailed back to company.
3) The product should be within the warranty period.
The company is solely responsible for products that are defective in situations where the

AF5485 User Manual
- 10 -
TEL:020-89851175 / 89850036 www.aosong.com v1.0-20170726
technical conditions of the product are met. The company applies its products to those
special applications without any warranties or statements, as well as any commitment to the
reliability of the products applied to products or projects.
Table of contents
Other ASAIR Measuring Instrument manuals