In compliance with high industry standards

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

Odoo image and text block

INTRODUCTION


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.


Related links

How to connect Raspberry PLC to Wi-Fi


Read >>

Basics about Raspberry Pi PLC analog outputs


Read >>

How to program Raspberry PLC interrupt inputs with Python


Read >>

Raspberry PLC
family products


Read >>

CONNECTIONS

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:

Odoo image and text block

Now, you are ready to read the temperature with your Dallas DS18B20 temperature sensor from your Raspberry PLC!

 See more: How to get the temperature with a Dallas sensor from your Raspberry PLC




Looking for your ideal PLC?

Take a look at this product comparison with other industrial controllers Arduino.

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC controller comparison >>

Do you want more information?

Just fill the form!

Tell me more!