User Guide Soil Moisture & Temperature & EC Sensor User Manual Product Model: S-Temp&VWC&EC-02 Version: V1.0 1 / 23 ©2008-2020 Seeed Technology Co., Ltd. All rights reserved. solution.seeedstudio.
User Guide Contents 1 2 3 4 5 Introduction ........................................................................................................................................... 3 Specifications ........................................................................................................................................ 4 Wiring ....................................................................................................................................................
User Guide 1 Introduction This S-Temp&VWC&EC-02 soil moisture & EC & temperature sensor is provided with high accurate and high sensitive. It is an important tool to observe and study the occurrence, evolution, improvement and the dynamics water of saline soil. By measuring the dielectric constant of the reaction of soil, soil direct stable real moisture content. This S-Temp&VWC&EC-02 sensor can measure the volume of soil moisture.
User Guide 2 Specifications Soil Temperature Range -40 ℃ to +80 ℃ Accuracy ±0.5℃ Resolution 0.1 ℃ Soil Moisture Range From completely dry to fully saturated (from 0% to 100% of saturation) Accuracy ±2% (0~50%); ±3% (50~100%) Resolution 0.
User Guide 3 Wiring Yellow RS485+/A/T+ White RS485-/B/T- Red VCC+, power supply Black VCC-, power ground Green SET, V+ (power) when boot module into the "setting mode". Not connected or connected with the GND when boot into "mode of operation". Module configuration parameters such as Modbus address, baud rate, parity, communication protocol is composed of module inside the EEPROM (power down storage device stores).
User Guide 4 Installation Because of the direct determination of the soluble salt ions in the soil, the water content of the soil can be higher than about 20%, and the soluble ions in the soil can correctly reflect the electrical conductivity of the soil. In the long-term observation, after irrigation or rainfall measured values are close to the true level. If the velocity measurement, first in the tested soil watering, to be full of water permeability were measured.
User Guide 5 Modbus Communication Protocol 5.1 Serial communication parameters Modbus is a serial communication protocol, Modicon programmable logic controller (PLC) for the use of published. It has become the industry standard communication protocols, and is now quite common connection between industrial electronic equipment. Modbus has ex-tensive application in the industrial field. Modbus protocol is a master / slave framework agreement.
User Guide 5.2 Modbus Register Parameter name Register address Parameter type (HEX / DEC) TEMPRATURE 0x0000 /0 Modbus function Parameter range and description number INT16, read 3/4 -4000-8000 corresponds to -40.00 ~ 80.00℃.
User Guide 5:38400bps PROTOCOL 0x0202 /514 UINT16, read-write 3/6/16 0~1 0: Modbus RTU 1: Modbus ASCII PARITY 0x0203 /515 UINT16, read-write 3/6/16 0-2 0: No parity bit 1: even parity check 2: Odd Parity bit DATABITS 0x0204 /516 UINT16, read-write 3/6/16 1 1:8 data bits STOPBITS 0x0205 /517 UINT16, read-write 3/6/16 0-1 0:1 Stop bit 1:2 Stop bit RESPONSE 0x0206 /518 UINT16, read-write 3/6/16 DELAY 0-255 corresponds to the 0-2550 milliseconds sensor to receive the host request for a
User Guide 5.3 Detail of Modbus Register TEMPERATURE Parameter range -4000-8000 corresponds to -40.00~80.00℃ Parameter storage none Default: none Meaning: the measured value of the temperature, negative for complement representation. For example: if the return value is 0702H (of 16 hexadecimal, source code), the first byte is 07, the second byte and the low byte is 02h, then the temperature for the measured value (07H*256 02h) /100=17.94℃.
User Guide SALINITY Parameter range 0-20000 corresponds to 0-20000mg/L Parameter storage None Default: none Significance: Salinity Measurement. For example: if the value returned is 071DH (16 Decimal), the first byte of the high byte is 07H, the second byte low byte is 1DH, then the salinity measurement value (1DH 07H*256) /10000= (7*256 29) =1821.
User Guide EC TEMP COFF Parameter range 0-100 corresponds to 0.0%-10.0% Parameter storage None Default: 20(2%) Significance: the temperature compensation coefficient of electrical conductivity SALINITY COFF Parameter range 0-100 corresponds to 0.00-1.00 Parameter storage None Default: 55(0.55) Significance: Salinity / conductivity compensation coefficient TDS COFF Parameter range 0-100 corresponds to 0.00-1.00 Parameter storage None Default: 50(0.
User Guide 4:19200bps 5:38400bps Parameter storage Immediate storage PROTOCOL --- Serial communication Protocol Parameter range 0~1 Default:0 0:Modbus RTU 1:Modbus ASCII Parameter storage Immediate storage PARITY --- Serial communication Check bit Parameter range 0-2 Default:0 0:none 1: even parity check 2: Odd parity check Parameter storage Immediate storage DATA BITS Parameter range 1 Default:1,Only 1:8 data bits supports 8 data bits, the other is invalid Parameter storage Immediate sto
User Guide RESPONSE DELAY Parameter range 0-255 Parameter storage Immediate storage Default:0 Serial communication delay response used in the following circumstances: when the host sends a request command, delay module (RESPONSEDELAY*10 milliseconds), then the response data is returned to the host. For example, to set up RESPONSEDELAY=5, so delay module 5*10=50 millisecond response requesting host. Set to 0 for no delay an immediate response.
User Guide 5.4 Communication Sample In the following instructions, the data at the beginning of the 0x or the ending of the H is a 16 - band data. Modbus protocol with two common types of registers: (1) To maintain the register, storage data is not lost, it is read and write. Usually with function number 3 (0x03) read, use function number 6 (0x06) or 16 (0x10) write.
User Guide Register number 2byte 0x0002 Check 2byte 0xC5B3 Respond:01 03 04 00 01 00 03 EB F2 Address 1byte 0x01 Function number 1byte 0x03 Effective byte 1byte 0x04 2byte 0x00 (From machine address high byte) number Slave address register value The baud rate 0x01 (From machine address low byte) 2byte register value Check 0x00 (High baud rate byte) 0x03 (low baud rate byte) 2byte 0xEBF2 5.4.
User Guide For example: to read the register 0x0000-0x0003, that reads the temperature, water content, electrical conductivity value Ask:01 04 0000 0003 B00B Address 1byte 0x01 Function number 1byte 0x04 Start register 2byte 0x0000 Register number 2byte 0x0003 Check 2byte 0xB00B address Respond:01 04 06 08 90 0E 93 02 4E D2 57 Address 1byte 0x01 Function number 1byte 0x04 Effective byte 1byte 0x06 2byte 0x08 number Temperature register value Volume water 0x90 2byte content regi
User Guide CCCC 2byte CRC CHECK Common request format:AA 06 RRRR VVVV CCCC AA 1byte Address, 0-255 06 1byte Function number6 RRRR 2byte Register address, high byte in front VVVV 2byte To write the value of the register, the high byte is in the front CCCC 2byte CRC CHECK For example: to write register 0x0021, namely the temperature unit for Fahrenheit cases Ask:01 06 0021 0001 1800 Address 1byte 0x01 Function number 1byte 0x06 Start register 2byte 0x0021 Register number 2byte 0x
User Guide RRRR 2byte Start register address, High byte in front NNNN 2byte To read the number N Register, high byte in the front MM 1byte The number of byte to write the value of the register VVVV1 2byte To write the value of the first register, the high byte is in the front. VVVV2 2byte To write the value of the second register, the high byte is in the front. … … To write the value of the “N” register, the high byte is in the front.
User Guide value is 4 0xBACC 2byte CRC CHECK Respond:01 10 0200 0002 4070 0x01 1byte Address 0x10 (HEX) 1byte Function number16 (DEC) 0x0200 2byte Start register address, high byte in the front 0x0002 2byte To read the number N Register, high byte in the front 0x4070 2byte CRC CHECK 20 / 23 ©2008-2020 Seeed Technology Co., Ltd. All rights reserved. solution.seeedstudio.
User Guide 5.
User Guide For example: to read the register 0x0000-0x0002, that reads the temperature, water content, electrical conductivity value Host Ask:01 0400000003 B00B (8 byte) Address 1byte 0x01 Function number 1byte 0x04 Start register address 2byte 0x0000 Register number 2byte 0x0003 Check 2byte 0xB00B When the host needs to send data to the sensor, it will need to send Check data stored in the snd array.
User Guide When the host receives the 11 byte data returned by the sensor, the following CRC calculation is performed, where num=11 Pseudo code as follows: unsigned char response[11]={ 01 04 06 08 90 0E 93 02 4E D2 57};// The last two byte are the CHECK CRC that the sensor returns unsigned char num=11;// Calculate the entire return of the 11 CRC CHECK byte unsigned int crc16=0; crc16= calc_crc16 (response, num); if(crc16==0) { // Check CRC correctly, you can use the returned data } else { // Check CRC err