Accéder au contenu principal
Publicités

Interfacing DS18b20 with Arduino + LCD to measure temperature in Celsius and Fahrenheit

 

      Hello, and welcome to this quick tutorial, where I use the digital temperature sensor, DS18B20 with Arduino Board, I’m using UNO, the DS18b20 can deliver the temperature in 9 bit up to 12 bit signal, the DS18B20 communicates over a 1-Wire bus and has a unique 64bits serial code, you can use a lot to make a network using the same wire.

    Features (Datasheet):

● Unique 1-Wire® Interface Requires Only One Port Pin for Communication

● Reduce Component Count with Integrated Temperature Sensor and EEPROM

• Measures Temperatures from -55°C to +125°C (-67°F to +257°F)
• ±0.5°C Accuracy from -10°C to +85°C
• Programmable Resolution from 9 Bits to 12 Bits
• No External Components Required

● Parasitic Power Mode Requires Only 2 Pins for  Operation (DQ and GND)

● Simplifies Distributed Temperature-Sensing Applications with Multidrop Capability
• Each Device Has a Unique 64-Bit Serial Code Stored in On-Board ROM

● Flexible User-Definable Nonvolatile (NV) Alarm Settings with Alarm Search Command Identifies Devices with Temperatures Outside Programmed Limits

Wiring:

DS18b20_bb.png
The wiring is pretty simple Vdd/Gnd with 3.3V/Gnd (you can use 5v) and then one wire, Lcd uses the i²c bus

Libraries:

The libraries I’ve used are:

Codes:

The codes I’ve used are 3, the one is just a simple test to show the temperature in Celsius or Fahrenheit on the Serial monitor, the second one shows the temperature on the serial monitor but this time using different sensor format 9-12 bits and the last one concerns the LCD i²c screen, and here you have your thermometer easy peasy as always.

Download codes here.

I hope you like it, if you have any problem leave a comment or contact me, don’t forget a subscribe to support the channel.

Publicités

Yassine Tout afficher

Electronics, Automation engineering student... I try to share my little experience with other electronics amateur.

One thought on “Interfacing DS18b20 with Arduino + LCD to measure temperature in Celsius and Fahrenheit Laisser un commentaire

Répondre

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google

Vous commentez à l'aide de votre compte Google. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s

%d blogueurs aiment cette page :