DS18B20 Temperature sensor- One Wire – Ardbox – MDuino

DS18B20 Temperature sensor- One Wire – Ardbox – MDuino

This post describes how to use the DS18B20 digital temperature sensor with  Ardbox and MDuino PLCs.

DS18B20 sensor implements the one wire protocol and it works at 5V.  In the Ardbox and Mduino, this transducer can not be directly connected to the standard inputs Ix.x of the PLCs. 

Working at 5V and through the One wire protocol it must be directly connected to Arduino Pins. To do so, Industrial Shields PLCs hold some pins available.

Ardbox: DE-D7  // RE-D4 // SDA-PIN2  // SCL-PIN3

MDuino: SCL // SDA // RX0 // TX0 // RX1 // TX1 // Pin3 // Pin2

OneWireconnection

For using DS18B20 in the listed pins, its switch configuration  must be set to communication mode, as if we SDA/SCL or DE/RE wanted to be used (see Communications section in User Guides). Once the  switch is configured in this manner, the DS18B20 sensor  is programmed in the same way as for an Arduino. Several sensors can be connected and read at the same pin if wanted. DS18B20 tutorial

 

Download the example:

ds18b20

 

 

 

 

Comments are closed.