Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria
How to connect temperature sensor to Raspberry PLC
DS18B20 Dallas Sensor & Raspberry PLC connections
The DS18B20 is a digital temperature sensor that uses the 1-Wire protocol to communicate, this protocol needs only one data pin to communicate and allows more than one sensor to be connected on the same bus.
In this blog, we are going to connect our Dallas temperature sensor with a Raspberry PLC.
Dallas DS18B20 Sensor
The DS18B20 sensor it is made up of a processor with multiple modules, which are in charge of controlling communication, measuring the alarm system.
One of the main advantatges 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 3.0V and 5.5V.
Connection to Raspberry PLC
In the picture below, you will see how to connect the temperature sensor to the Raspberry PLC. We can only connect the yellow cable to the GPIO 25 because it is a direct pin which goes to the GPIO directly. See how: