RS485 Sensor Selection and Initial Checking Using Software application
RS485 with Modbus in Industry
In this article, I will be discussing the factors you need to consider before buying a RS485 sensor, reading the datasheet, and initial checking.
Selecting the suitable sensor
You can select the suitable RS485 output sensor according to your application. The factors you need to consider when selecting a suitable sensor are,
- Relevance for your application.
- Operating Voltage.
- Power.
- Dimensions.
- Levels of protection.
Buying RS485 Sensors
According to the application you can select the suitable RS485 sensor. Some of the sensors I used in my project are given below.
Wind direction and wind speed sensors
Reading the Datasheet
I will refer to the datasheet of the Wind speed sensor in discussing the topics below.
Slave ID/ Address code/ Device Address
In most of the RS485 sensors, the slave ID is 0x01. You can change that to any value in the range of 1 to 147. The maximum number of sensors that can be connected is 31. The reason for the limitation is that the strength of the electrical signal will not be enough when the number of sensors is more than 31.
Function code
It sends the addressed slave device what kind of function needs to be done.
Register Address
It is the address of the register that needs to be read. You can obtain that from the datasheet. Here is an example,
To read the wind speed the hex value of the address of the register is 0x0016.
Register count
It is the number of registers you require in the response.
Testing the sensors using a software
You can use the serial port assistance software given below to send the inquiry code and get the response in testing the sensor.
If your sensor specifications are,
- Data bits: 8 bit
- Parity: No
- Stop bit: 1
- Error checking: CRC
- Baud rate: 9600
Set the settings as below.
Inquiry Frame
The inquiry frame is 010300160001. Type the inquiry frame on the first white box and click the button which is in line with that box. (Button starting with (s))
Let’s assume you obtain the response as
01 03 02 01 1C B8 1D
The output reading lies on “01 1C”
When you convert 01 1C to decimal, the value is 284.
In this article, I have explained the procedure for selecting the suitable RS485 sensor, reading the datasheet, and testing the sensor to obtain the output.
In the next article, I will be discussing the way to change the slave ID of the sensors in order to connect to the Modbus.
Contact us for any consultations or projects related to IoT.
Protonest for more details.
Protonest specializes in transforming IoT ideas into reality. We offer prototyping services from concept to completion. Our commitment ensures that your visionary IoT concepts become tangible, innovative, and advanced prototypes.
Our Website: https://www.protonest.co/
Email: udara@protonest.co
If you enjoyed this article and would like to show some support, consider buying me a coffee on Ko-Fi.
Your support not only helps me keep creating content like this but also fuels me! ☕️📚
Thank you for being an amazing reader!
Here’s my Ko-Fi link: https://ko-fi.com/udarakumarasena
Cheers!