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.

  • 77,839 views
  • 13 comments
  • 23 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

  • 13,398 views
  • 6 comments
  • 18 respects

DHT11 Temperature/Humidity Sensor

Project tutorial by Zachary Haslam

  • 42,067 views
  • 5 comments
  • 52 respects

Arduino Based Digital Temperature Sensor

Project showcase by Abishek Bhalaaji

  • 15,756 views
  • 1 comment
  • 14 respects

Fan Controlled By DS18B20 Temperature Sensor With 20x4 LCD

Project in progress by makeeuropeanu

  • 12,086 views
  • 2 comments
  • 17 respects

Water Quality Monitoring and Notification System

Project showcase by emmanuel ani

  • 70,574 views
  • 50 comments
  • 162 respects
Add projectSign up / Login