Project showcase
How To Use DS18B20 Water Proof Temperature Sensor

How To Use DS18B20 Water Proof Temperature Sensor

We are showing how to use DS18B20 one wire water proof temperature sensor using Arduino.

  • 52,042 views
  • 12 comments
  • 18 respects

Components and supplies

Apps and online services

About this project

We are showing how to use DS18B20 one wire water proof temperature sensor. With the help of DS18B20 one wire temperature sensor we can measure the temperature from -55℃ To 125℃ with accuracy of ±5 .

Additional Library:

Installation instructions available

Detail description available on www.iotboys.com (IoTBoys)

Visit www.iotboys.com for more projects.

Code

Source Code C/C++
Source code to use water proof temperature sensor.
#include <OneWire.h>
#include <DallasTemperature.h>

#define ONE_WIRE_BUS 5

OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature sensors(&oneWire);

 float Celcius=0;
 float Fahrenheit=0;
void setup(void)
{
  
  Serial.begin(9600);
  sensors.begin();
}

void loop(void)
{ 
  sensors.requestTemperatures(); 
  Celcius=sensors.getTempCByIndex(0);
  Fahrenheit=sensors.toFahrenheit(Celcius);
  Serial.print(" C  ");
  Serial.print(Celcius);
  Serial.print(" F  ");
  Serial.println(Fahrenheit);
  delay(1000);
}

Schematics

Circuit Design
Follow the design for connection.
Ds18b20 temparature sensor www iotboys com  1024x542 lqdcdeudhb

Comments

Similar projects you might like

Arduino Temperature - Humidity - Rain Sensor

Project showcase by Rick_Findus

  • 9,625 views
  • 6 comments
  • 17 respects

Ultrasonic Sensor with Alarm, LCD and Temperature

Project tutorial by MichDragstar

  • 6,125 views
  • 7 comments
  • 21 respects

Room temperature sensor with display on Mobile

Project showcase by Kaustubh Agarwal

  • 23,948 views
  • 8 comments
  • 54 respects

Arduino Based Digital Temperature Sensor

Project showcase by Abishek Bhalaaji

  • 10,103 views
  • 0 comments
  • 11 respects

DHT11 /DHT22 Temperature Sensor

Project tutorial by Daniel Porrey

  • 82,653 views
  • 106 comments
  • 133 respects
Add projectSign up / Login