KM31B05 RS485 Soil Conductivity Sensor
User Manual
File Version: V21.2.15
Website: http://www.klha.com/
Introduction
The KM31B05 sensor is designed for easy integration with PLC, DCS, and other instruments or systems for monitoring soil conductivity. It features a high-precision sensing core for reliability and long-term stability. Various output methods are available, including RS232, RS485, CAN, 4-20mA, DC0-5V/10V, ZIGBEE, Lora, WIFI, and GPRS.
Technical Parameters
Technical Parameter | Parameter Value |
---|---|
Interface | RS485/4-20mA/DC0-5V/DC0-10V |
Power | DC12~24V 1A |
Running Temperature | -40~80°C |
Working Humidity | 5%RH~90%RH |
Product Selection
The product is divided into the following models based on the output method:
Product Model | Output Method |
---|---|
KM31B05B | RS485 |
KM31B05M | 4-20mA |
KM31B05V5 | DC0-5V |
KM31B05V10 | DC0-10V |
Product Size
The sensor has the following dimensions: Height: 122mm, Width: 48mm, Depth of sensor head: 39mm, Width of sensor head: 19mm, Cable connector height: 14mm.
Features
Waterproof Wiring
The cable is sealed to be anti-pull and anti-water.
Graphite Electrode
Features quick response and can be measured when buried in soil.
Wiring
RS485 Wiring
- RD: PWR+
- GN: PWR-
- YE: RS485 A+
- BU: RS485 B-
mA/V Wiring
- RD: PWR+
- BK: PWR-
- BU: mA\V Out
RS485 Wiring Diagram Description
Connects a computer port via an RS485 converter to the Soil EC Sensor.
mA/V Wiring Diagram Description
Connects a Current/Voltage Meter to the Soil EC Sensor using PWR+ (RD), PWR- (BK), and mA/V Out (BU).
Application Solution
This sensor is suitable for various applications, including greenhouses, industrial control systems, and water management systems.
Communication Protocol
The product uses the RS485 MODBUS-RTU standard protocol format for all operations and replies.
Default settings: Device Address: 1, Baud Rate: 9600, Data Bits: 8, Parity: None, Stop Bits: 1.
Command Interface and Data Handling
1. Read Data (Function ID 0x03)
To query device data, send an inquiry frame. Example: Querying data for device 1.
Device ID | Function ID | Start Address | Data Length | CRC16 |
---|---|---|---|---|
01 | 03 | 00 00 | 00 01 | 84 0A |
Example response data: 01 03 02 00 79 79 A6.
Device ID | Function ID | Data Length | Data 1 | Check Code |
---|---|---|---|---|
01 | 03 | 02 | 00 79 | 79 A6 |
Data Description: Data is in hexadecimal. For example, 00 79 (hex) is 121 (decimal). With a magnification of 100, the actual value is 1.21.
2. Data Address Table
Address | Start Address | Description | Data Type | Value Range |
---|---|---|---|---|
40001 | 00 01 | Soil conductivity | read | 0~65535 |
40101 | 00 64 | Model Code | read/write | 0~65535 |
40102 | 00 65 | Total Points | read/write | 1~20 |
40103 | 00 66 | Device ID | read/write | 1~249 |
40104 | 00 67 | Baud Rate | read/write | 0~6 |
40105 | 00 68 | Mode | read/write | 1~4 |
40106 | 00 69 | Protocol | read/write | 1~10 |
3. Read and Modify Device Address
(1) Read or Query Device Address
Use command FA 03 00 64 00 02 90 5F to query the device address if unknown (FA is general address 250).
Device ID | Function ID | Start Address | Data Length | CRC16 |
---|---|---|---|---|
FA | 03 | 00 64 | 00 02 | 90 5F |
Example response data: 01 03 02 07 12 3A 79.
Device ID | Function ID | Start Address | Model Code | CRC16 |
---|---|---|---|---|
01 | 03 | 02 | 55 3C 00 01 | 3A 79 |
Response data interpretation: First byte (01) is the real address. 55 3C (hex) is 20182 (decimal) for the main model. 00 01 indicates status quantity.
(2) Change Device Address
Example: Change address from 1 to 02 using command: 01 06 00 66 00 02 E8 14.
Device ID | Function ID | Start Address | Destination | CRC16 |
---|---|---|---|---|
01 | 06 | 00 66 | 00 02 | E8 14 |
Successful change response: 02 06 00 66 00 02 E8 27. The new address takes effect immediately.
4. Read and Modify Baud Rate
(1) Read Baud Rate
Default baud rate is 9600. To read the current baud rate, use command: 01 03 00 67 00 01 35 D5.
Device ID | Function ID | Start Address | Data Length | CRC16 |
---|---|---|---|---|
01 | 03 | 00 67 | 00 01 | 35 D5 |
Baud rate encoding: 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=115200.
Example response data: 01 03 02 00 03 F8 45.
Device ID | Function ID | Data Length | Rate ID | CRC16 |
---|---|---|---|---|
01 | 03 | 02 | 00 03 | F8 45 |
Rate ID 03 indicates a baud rate of 9600.
(2) Change Baud Rate
Example: Change baud rate from 9600 (code 3) to 38400 (code 5) using command: 01 06 00 67 00 05 F8 16.
Device ID | Function ID | Start Address | Target Baud Rate | CRC16 |
---|---|---|---|---|
01 | 06 | 00 67 | 00 05 | F8 16 |
The new baud rate takes effect immediately. The device may lose response until the query command is updated.
5. Read Correction Value
(1) Read Correction Value
Correction values adjust display errors. Range: +/- 1000 (0-1000 or 64535-65535). To add 100, use command: 01 03 00 6B 00 01 F5 D6.
Device ID | Function ID | Start Address | Data Length | CRC16 |
---|---|---|---|---|
01 | 03 | 00 6B | 00 01 | F5 D6 |
Example response data: 01 03 02 00 64 B9 AF.
Device ID | Function ID | Data Length | Data Value | CRC16 |
---|---|---|---|---|
01 | 03 | 02 | 00 64 | B9 AF |
The first byte (01) is the device address. 00 6B is the first state quantity correction value register. Other parameters operate similarly.
(2) Change Correction Value
Example: To add 1 to the true value (equivalent to adding 100 correction): 01 06 00 6B 00 64 F9 FD.
Device ID | Function ID | Start Address | Destination | CRC16 |
---|---|---|---|---|
01 | 06 | 00 6B | 00 64 | F9 FD |
The parameters take effect immediately after successful change.
Analog Output Calculation Examples
4-20mA Output (Range 0~2000)
Formula: C = (A2-A1) * (X-B1) / (B2-B1) + A1
Where: A2=Range Upper Limit (2000), A1=Range Lower Limit (0), B2=Current Output Range Upper Limit (20mA), B1=Current Output Range Lower Limit (4mA), X=Currently Read Value, C=Calculated Current Value.
Current (mA) | Value () | Calculation Process |
---|---|---|
4 | 0.0 | (2000-0)*(4-4)/(20-4)+0 |
5 | 125.0 | (2000-0)*(5-4)/(20-4)+0 |
6 | 250.0 | (2000-0)*(6-4)/(20-4)+0 |
7 | 375.0 | (2000-0)*(7-4)/(20-4)+0 |
8 | 500.0 | (2000-0)*(8-4)/(20-4)+0 |
9 | 625.0 | (2000-0)*(9-4)/(20-4)+0 |
10 | 750.0 | (2000-0)*(10-4)/(20-4)+0 |
11 | 875.0 | (2000-0)*(11-4)/(20-4)+0 |
12 | 1000.0 | (2000-0)*(12-4)/(20-4)+0 |
13 | 1125.0 | (2000-0)*(13-4)/(20-4)+0 |
14 | 1250.0 | (2000-0)*(14-4)/(20-4)+0 |
15 | 1375.0 | (2000-0)*(15-4)/(20-4)+0 |
16 | 1500.0 | (2000-0)*(16-4)/(20-4)+0 |
17 | 1625.0 | (2000-0)*(17-4)/(20-4)+0 |
18 | 1750.0 | (2000-0)*(18-4)/(20-4)+0 |
19 | 1875.0 | (2000-0)*(19-4)/(20-4)+0 |
20 | 2000.0 | (2000-0)*(20-4)/(20-4)+0 |
Example: When measuring 8mA, the current value is 500.0.
0-5V Voltage Output (Range 0~2000)
Formula: C = (A2-A1) * (X-B1) / (B2-B1) + A1
Where: A2=Range Upper Limit (2000), A1=Range Lower Limit (0), B2=Voltage Output Range Upper Limit (5V), B1=Voltage Output Range Lower Limit (0V), X=Currently Read Value, C=Calculated Voltage Value.
Voltage (V) | Value () | Calculation Process |
---|---|---|
0 | 0.0 | (2000-0)*(0-0)/(5-0)+0 |
1 | 400.0 | (2000-0)*(1-0)/(5-0)+0 |
2 | 800.0 | (2000-0)*(2-0)/(5-0)+0 |
3 | 1200.0 | (2000-0)*(3-0)/(5-0)+0 |
4 | 1600.0 | (2000-0)*(4-0)/(5-0)+0 |
5 | 2000.0 | (2000-0)*(5-0)/(5-0)+0 |
Example: When measuring 2.5V, the current voltage is 1000.0.
0-10V Voltage Output (Range 0~2000)
Formula: C = (A2-A1) * (X-B1) / (B2-B1) + A1
Where: A2=Range Upper Limit (2000), A1=Range Lower Limit (0), B2=Voltage Output Range Upper Limit (10V), B1=Voltage Output Range Lower Limit (0V), X=Currently Read Value, C=Calculated Voltage Value.
Voltage (V) | Value () | Calculation Process |
---|---|---|
0 | 0.0 | (2000-0)*(0-0)/(10-0)+0 |
1 | 200.0 | (2000-0)*(1-0)/(10-0)+0 |
2 | 400.0 | (2000-0)*(2-0)/(10-0)+0 |
3 | 600.0 | (2000-0)*(3-0)/(10-0)+0 |
4 | 800.0 | (2000-0)*(4-0)/(10-0)+0 |
5 | 1000.0 | (2000-0)*(5-0)/(10-0)+0 |
6 | 1200.0 | (2000-0)*(6-0)/(10-0)+0 |
7 | 1400.0 | (2000-0)*(7-0)/(10-0)+0 |
8 | 1600.0 | (2000-0)*(8-0)/(10-0)+0 |
9 | 1800.0 | (2000-0)*(9-0)/(10-0)+0 |
10 | 2000.0 | (2000-0)*(10-0)/(10-0)+0 |
Example: When measuring 5V, the current voltage is 1000.0.
Disclaimer
This document provides information about the product. Shanghai Sonbest Industrial Co., Ltd. makes no warranties and assumes no liability regarding the sale and use of this product. Specifications may change without notice.
Contact Us
Company: Shanghai Sonbest Industrial Co., Ltd KLHA Brand Division
Address: Building 8, No. 215 North East Road, Baoshan District, Shanghai, China
Web: http://www.klha.com/
SKYPE: soobuu
Email: sale@sonbest.com
Tel: 86-021-51083595 / 66862055 / 66862075 / 66861077