One Wire Digital Temperature. DS18B20 + Arduino

I know… you are probably thinking “Another Thermometer! How many do you need to cover?” – Well… All of them. But really, they all have something different to offer. For instance this guy, the DS18B20, has a unique serial-number sent with it’s data, so if you needed to have 50 of these on one bus, you could and still know exactly where the reading came from. And… It’s digital serial bus it uses to transmit the date is just one wire.One Wire Digital Temperature. DS18B20 + Arduino

For this tutorial we will be using just one of them, and our code will only support the one. So if you need to read from a few or a lot of these, contact us in the forum and we can help you out. There is also a good amount of code out there for using a bunch of these at once, but no examples of just the one.

Hooking it up

This is by far one of the more simple digital sensors to hookup. Aside from power and ground, it has a single digital signal pin that we will be connecting to digital pin 2 on our arduino. It also requires a 4.7k pull-up resistor between the signal and power pin as shown in the illustration. (I tried the internal pull-ups on the arduino but it did not work)

There is a way this sensor can be hooked up with just 2 wires (no power), but it slows the code down, so I decided not to go that way.

Schematic One Wire Digital Temperature. DS18B20 + Arduino

For more detail: One Wire Digital Temperature. DS18B20 + Arduino


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top