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

Scroll to Top
Scroll to Top