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.
● 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
The libraries I’ve used are:
- DS18b20 library: Download here
- OneWire library: Download here
- LCD i²c library: Download here
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.
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.
Yassine View All
Automation and Electrical Engineer, Electronics amateur trying to share my little projects.
One thought on “Interfacing DS18b20 with Arduino + LCD to measure temperature in Celsius and Fahrenheit” Leave a comment ›