WSTP11A
| ||
Industrial Unibody Temperature Transmitter, High Accuracy, Stainless Steel Probe, Water-Proof & Dust-Proof, RS485 Bus
Features
- Digital output, via RS485 (standard Modbus-RTU protocol).
- Wide range input voltage, non-linear correction, high accuracy.
- Small size, lightweight, easy installation.
- Lightning-proof, cut-off frequency interference design, strong anti-interference capability.
- Reverse proof, over-voltage protection, and current limited protection.
- Measurement accuracy up to 0.5% FS.
Specification
- Measured Medium: Liquid, gas
- Accuracy: 0.5%FS
- Full weight: 180g
- Stability: ±0.1% FS/year
- Measurement range: -50~100℃
- Protection rating: IP65
- Power supply: 12~36V DC
- Ambient temperature: -40~85℃
- Output signal: RS485 (standard Modbus-RTU protocol)
- Ambient humidity:0%~95% RH(non-condensing, non-frosting)
- Material:
- Probe: 304 stainless steel (contacted)
- Intermediate junction: 304 stainless steel (contacted)
- Shell: 304 stainless steel
- Hirschmann connector: ABS engineering plastics
Interface
Hesman interface | |
1 | V+(12V~36V) |
2 | A |
3 | V-(GND) |
4() | B |
Communication Protocol
Modbus protocol is a universal language used in industrial electronic controllers. Modbus supports communication to and from multiple devices connected to the same cable or Ethernet network, it has become a standard communication protocol. With the Modbus, control equipment produced by different manufacturers can be connected to the same industrial network for centralized monitoring. The protocol defines a message structure, which can be recognized and used by the controller through any network. It describes the process of a controller requesting access to other devices, how to respond to requests from other devices, and how to detect and record errors. It has formulated a common format for the structure and content of the message domain.
Advantages of Modbus:
(1)It is a standard protocol, open-source, and free to use.
(2)Modbus protocol support RS-232, RS-485 bus, and so on.
(3)The format of Modbus is simple and easy to use.
Modbus parameters of WSSP08A (the device address is default 01)
This sensor is compatible with Modbus RTU. The RS485 port is half-duplex.
a) Output signal: RS485 (Communication distance is up to 1000m. Support multi-connect 32 devices)
b) Standard Modbus-RTU protocol (03: Read data; 06: Write setting data)<br /?
c) Data format: 9600, N, 8, 1
d) Measure range: 0-X(MPa, kPa...)
e) Accuracy: 0.05%
f) Output data: 0...2000(range is customizable)
g) Response frequency: ≤5Hz
h) Response speed: ≥10ms
0x03: Read data (HEX)
- Examples 1
- Read sensor
The device address of 0-1.6Mpa sensor is 0x01, that is [Address]=01 (The Address range 01-254)
CRC0=84 and CRC1=0a, then the commands will be:
Command: 01 03 00 00 00 01 84 0A
Response: 01 03 02 02 AC B9 59
Convert 02AC to DEC, you will get the data 684;
Because the data range is 0-2000, related to the pressure range 0-1.6Mpa, the pressure read is P = 1.6*684/2000=0.5472MPa
The formula: (The maximum range - the minimum range) /2000 * Current data + minim range = current pressure.
- Examples 2
- Read device address (This command only works for a single sensor)
Command: FF 03 00 0F 00 01 A1 D7
Response: FF 03 02 00 01 50 50
That is: The device address is 01
0x06: Write data (HEX)
- Examples
- Modify the device address from 01 to 09
Command: 01 06 00 0F 00 09 79 CF
Response: 01 06 00 0F 00 09 79 CD
The modification will be valid without a restart.
Connection
Pull out the terminal block which is inside the casing of the plug to connect the wire, wiring steps areas shown in the following figure.
Wiring diagram
We use 2-CH RS485 HAT(should purchase separately) and Raspberry Pi for testing. For more information about how to use the 2-CH RS485 HAT, you can refer to 2-CH RS485 HAT
Hardware connection
Hesman Connector | |
1 | V+(12V~36V) |
2 | A(Change 2) |
3 | V-(GND) |
4() | B(Change 2) |
PIN | Raspberry Pi(BCM) | Description |
VCC | 5V | 3.3V/5V |
GND | GND | GND |
SCLK | P21(SPI1 SCLK) | SPI clock input |
MOSI | P20(SPI1 MOSI) | SPI Data input |
MISO | P19(SPI1 MISO) | SPI Data Output |
CS | P18(SPI1 CS) | SPI chip selection |
IRQ | P24 | Inttrupt pin |
EN1 | P27 | Channel 1(Channel 1) enable pin: High: Send enable; Low: Receive enable |
EN2 | P22 | Channel 2(Channel 2) enable pin: High: Send enable; Low: Receive enable |
Install Driver
- Open a terminal and run the commands:
sudo nano /boot/config.txt #Add the following lines to the file. Note that the ini_pin should be the same as the actual definition. dtoverlay=sc16is752-spi1,int_pin=24 #Reboot sudo reboot
After reboot, The SC16IS752 drive is installed in the kernel, you can check the device by command ls /dev:
If the kernel version is 5.4 or above, the gpiochip3 is recognized as gpiochip2
Install Libraries
- Install wiringPi
sudo apt-get install wiringpi cd /tmp wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v # Check if it is 2.52 version
- Install python2 libraries
sudo apt-get update sudo apt-get install python-pip sudo pip install RPi.GPIO sudo apt-get install python-serial sudo apt-get install python-crcmod
- Install python3 libraries
sudo apt-get update sudo apt-get install python3-pip sudo pip3 install RPi.GPIO sudo apt-get install python3-serial sudo apt-get install python3-crcmod
Testing
- Download and run the demo codes
sudo apt-get install p7zip-full sudo wget https://files.waveshare.com/upload/1/14/WSTP11A_Code.7z sudo 7z x WSTP11A_Code.7z sudo chmod 777 -R WSTP11A_Code cd WSTP11A_Code/
- C example
cd c make clean make sudo ./main
- python example
#python2 cd python cd examples sudo python main.py #python3 cd python cd examples sudo python3 main.py
About the Codes
- The demo codes are made for a situation that only one sensor is connected, it will read data according to the device address and it can be used to modify the device address.
- C codes
#Read the device address (only one device is connected to RS485 bus) uint8_t WSTP11A_get_addr(void) #Modify the address of target device uint8_t WSTP11A_set_addr(uint8_t o_addr, uint8_t n_addr) #Read the data from target device float WSTP11A_get_temp(uint8_t addr)
- python codes
#Get 16CRC result def crc16Add(self,read): #Read the device address (only one device is connected to RS485 bus) def get_addr(self): #Read the data from target device def get_temp(self,addr): #Modify the address of target device def set_addr(self,o_addr,s_addr):
Resource
FAQ
- Reasons:
- You don't power the sensor
- The connection is wrong
- Solution:
- Correct6 the connection and check the power.
- Reasons:
- A transmitter is not powered.
- Field RF interference is strong.
- Not using shielded cables.
- Solution:
- Use shielded cable and shielding layer grounding.
- Transmitter and earth reliable connection.
{{{5}}}
- Reasons:
- Incorrect supply voltage.
- Solution:
- Whether it meets the power supply range.
{{{5}}}
Support
Technical Support
If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)