Raspberry Pi Temperature Sensor: Build a DS18B20 Circuit @Pimylifeup
Raspberry Pi Temperature Sensor: Build a DS18B20 Circuit  @Pimylifeup
Uploaded March 2016 | Updated September 2026, 1 week ago
In this video, I setup a Raspberry Pi temperature sensor circuit and some code. This is a pretty easy tutorial and is a great way to introduce yourself to sensors.
Full Tutorial: pimylifeup.com/raspberry-pi-temperature-sensor

In this tutorial I will be using the waterproof version of the ds18B20 sensor. This cool sensor can provide super accurate temperatures and can withstand heat up to about 120°C (250°F). The sensor also is digital so we’re able to easily hook it up to the Raspberry Pi and get the required data. If you get a plain version of the ds18B20 it will look just like a transistor unlike the version that I am using.

If you have trouble getting the circuit together then you can find a circuit diagram that shows you exactly where to put all the parts over at pimylifeup.com

The code for this tutorial is probably the most complex part. This is because we need to process the data that comes from the sensor and in its raw form isn’t very user friendly. I can understand the code maybe being a little too hard to understand for anyone new to coding so I briefly explain the basics there is to know.

As you can imagine this Raspberry Pi temperature sensor tutorial can be extended quite a bit. For example, instead of discarding the data after every time we check we can instead store it in a text file or even a database. We can then use this data to plot nice looking graphs so you can see temperature changes over the course of a day, week, month or even a year.

If you’re wondering what equipment you will need for this tutorial, then you can find the full list over at the website linked above.
I hope you are able to get this Raspberry Pi temperature sensor circuit and code working correctly. If you do come across any problems, please be sure to leave a comment below or over at pimylifeup.com
Raspberry Pi Temperature Sensor: Build a DS18B20 CircuitRaspberry Pi TorrentBox: Build an Always-On Torrent MachineArduino Humidity Sensor using the DHT22Program your Arduino from a Raspberry Pi using the IDEArduino Accelerometer using the ADXL345Raspberry Pi SSH: How to SSH into Raspberry PiThe Pironman Case for the Raspberry 4! #raspberrypi #technologyAn Easy Raspberry Pi Music Player Tutorial [Archived]How to Install the Latest Version of Docker on a Raspberry PiBuild your own Media Server with Plex and a Raspberry PiPlay Retro Games with Raspberry Pi RetroPieTrack Aircraft with Raspberry Pi and Flightradar24
Pi My Life Up |

Raspberry Pi Temperature Sensor: Build a DS18B20 Circuit

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER