Link: How to use the DS18S20 and DS18B20 temperature sensors with Arduino or Raspberry Pi

Did you know that you can measure temperature, from one or more locations, with a Raspberry Pi or Arduino? And that you can do it with as few as two wires (or even just a single wire with ground return, though three wires are preferred if available) connecting to as many temperature sensors as you want to use? Here are a few articles that explain how to do this:

Arduino and DS18B20 – 1-wire digital thermometer (Ogalik OÜ) (Read this one first to see the wiring options)
How to use the DS18S20 and DS18B20 temperature sensors with Arduino (Dedication to DIY and programming)
Working with Dallas DS18S20 and DS18B20 temperature sensors (Tutorialpedia)
Raspberry Pi 1- Wire Digital Thermometer Sensor (Raspberry Pi Spy)
RaspberryPI DS1820 (Webshed)
Raspberry Pi + DS18B20 Temperature Sensor + RRDtool (Tony Tosi)
DS18B20 Temperature Sensor with Raspberry Pi (Chris Swan’s Weblog)
Raspberry Pi – Python & Temp Sensor DS18B20 (Stuff about code)
WebUI for a Raspberry Pi thermometer (github.com)
Monitor your home temperature using your Raspberry Pi (PrivateEyePi Project)

A note on that last link, only “Step 1” is needed to get the temperature sensor working on a Raspberry Pi. All the steps after that are just to install and use their software, which you might not wish to do if you don’t plan on completing their Home Alarm System project.

Note that the DS18B20 temperature sensors are available for only a few dollars at eBay, Amazon, and other places. You can even buy them in the form of a waterproof probe, which would be preferred for outside temperature readings.

By the way, there are more types of 1-Wire Devices than just temperature sensors available. One that seems like it might be useful in Raspberry Pi projects is the DS2413 1-Wire Dual Channel Addressable Switch, though I don’t think many people have explored that option yet. But if I understand it correctly (and I might not, so don’t take my word for it), you could use one or more of those to emulate GPIO pins (sort of) but without any real limitation on the number, and also they could all be placed on the same wire(s) and controlled from the same GPIO pin on the Raspberry Pi or Arduino (maybe even on the same wires that the temperature sensors are on, if you’re also using those?). And there are many other 1-Wire Devices available.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.