Introduction
Modbus is a communications protocol located at levels 1, 2 and 7 of the OSI Model, based on the master/slave or client/server architecture.
The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points.
In this post, you will learn how to create a Node-RED UI Dashboard in order to get the temperature from Dallas DS18B20 sensor by using Modbus protocol and a programmable logic controller, for industrial automation.
Related Links of Dallas DS18B20
Connections for Dallas DS18B20 temperature sensor and Arduino PLC
Dallas DS18B20 Sensor
The DS18B20 sensor is made up of a processor with multiple modules, which are in charge of controlling communication and measuring the alarm system.
One of the main advantages of DS18B20 is its 1-Wire communication bus that allows you to transmit using only one data cable. For this, 1-Wire is based on a complex signal timing system, between the emitting device and the receiver
The 1-Wire device allows all devices connected to the bus to be powered through the data line. To do this, they have a capacitor that stores energy while the data line is in HIGH. This mode is called parasitic mode. In case of not using the parasitic mode, the devices must be powered at a voltage between 3V and 5.5V.
Connections to Ardbox Analog HF+
In the picture below, you will see how to connect the temperature sensor to the open source Ardbox PLC. We just have to connect the yellow wire to the PIN2 as it is a pin that goes to the industrial Arduino board pin directly, and the black and red cables are as follows:
See more
How to get the temperature with a Dallas sensor from your Arduino-based PLC using Modbus!
How to connect Dallas DS18B20 temperature sensor to Arduino PLC