No video

Temperature Sensor (DS18B20) Raspberry Pi

  Рет қаралды 123,220

PiddlerInTheRoot

PiddlerInTheRoot

7 жыл бұрын

Basic tutorial of how to setup a DS18b20 temp sensor with the raspberry pi.
Official Website: www.piddlerinth...
Required Parts:
RPI 3 - amzn.to/2VA9pQY
4 Amp Power Adapter - amzn.to/2CTptWu
16GB micro SD - amzn.to/2SFMwd3
120 pcs jumper cable: ebay.to/2VAb9cY
ds18b20 sensor - amzn.to/2M5yHSN
Music:
"Too Cool" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
creativecommons...
Direct to Video by Chris Zabriskie is licensed under a Creative Commons Attribution license (creativecommon...)
Source: chriszabriskie....
Artist: chriszabriskie....
Support the channel with Bitcoin!
blockchain.inf...

Пікірлер: 91
@PapiJack
@PapiJack 5 жыл бұрын
I have an issue. After a few hours of running the script it stops and throws this error: IOError: [Errno 2] No such file or directory: '/sys/bus/w1/devices/28-0216924510f2/w1_slave' It's like the folder suddenly disappears. If I reboot the Rpi the problem persist. I have to shut it down then it works for another few hours. It works for what I'm doing but it's inconvenient for long term monitoring. Any ideas?
@cathamburger3161
@cathamburger3161 5 жыл бұрын
ok so for some reason the sensor i put on my pi does this too, and the sensor seems to like to randomly reset itself for no reason. the way i fixed it is by disconnecting and reconnecting the resistor.
@PapiJack
@PapiJack 5 жыл бұрын
@@cathamburger3161 I used the code in this tutorial and now it doe snot fail. www.circuitbasics.com/raspberry-pi-ds18b20-temperature-sensor-tutorial/
@user-rc1kp9cz8y
@user-rc1kp9cz8y 3 ай бұрын
F
@krillenummer1
@krillenummer1 6 жыл бұрын
For all of you who is using a sensor like this with Raspberry Pi, that does not have the breakout board. You put a 4.7k resistor connecting the red and yellow wire together before connecting it to the raspberry pi. You know that you have to do this when you get 00-8xxxxxxxx instead of the 28-xxxxxxxx number and it varies.
@superfounder9918
@superfounder9918 6 жыл бұрын
Hello , can you help me finding out what's the problem of my Raspberry Pi ? I mean , sensor . I try to connect the sensor (same as in the video) to the breakout board 0.8000000000 , used flooder to stick the resistor to the red and yellow and still 0.8000000 , i don't understand what to do , i am browsing for 6 hours and still nothing.
@SweetyHeaven
@SweetyHeaven 6 жыл бұрын
Since I did not have a resistor I've tried running in parasite mode but it did not help... when I got resistor it worked but it's kinda weird you need an extra resistor to make it work.
@edw4699
@edw4699 6 жыл бұрын
from a technical point of view it is explainable as it has an open collector. As for the ' why'? Well you could connect a whole bunch of these sensors to one pin,so if you would have an inbuilt 4k7 resistor and you would connect 10 sensors.... tghe combined pullup would be 470 ohm and that is just a little bit over the top
@edw4699
@edw4699 6 жыл бұрын
just a word of warning..... apparently NOT all breakoutboards have a pull up resistor attached. Although you could use the internal pull up of the raspberry pin, I found it more reliable to have a seperate 4k7-10k resistor for pull up
@teroojala5436
@teroojala5436 5 жыл бұрын
In this video there is Pluggable Terminal that (usually) comes with DS18b20 sensor. It has 4.7k resistor attached and wired correctly. So you can attach multiple sensors with single terminal (just by jamming more sensors to connector). If in doubt, just check if your terminal has tiny resistor that has numbers "472" on it.
@JimmiJaz
@JimmiJaz 5 жыл бұрын
Your videos helped with almost every step of my projects. Thanks a tonne for taking the time to create
@wvpolekat
@wvpolekat 7 жыл бұрын
It can go in boiling water no problem. Boiling water is 212 F Usable temperature range: -55 to 125°C (-67°F to +257°F)
@baconfly11
@baconfly11 3 жыл бұрын
this is my first raspberry pi project (I'll be saving the temp data to a T-SQL database in addition) thanks for a great video!
@adheeshk93
@adheeshk93 5 жыл бұрын
I try to follow the tutorial and do the exactly same thing, but I don't get 28-xxxxxxxx, instead I get something as 00-xxxxxxxx. I use just one set of jumper cables i.e. connect the temperature adapter to the pi without using another set of cables (as I have jumper cables without the clips on one side) Is there something I am doing wrong?
@virgilcalinescu4938
@virgilcalinescu4938 3 жыл бұрын
very nice! I am new in this field, for 1 sensor I understood how to do it but I want to measure in 20 points so with 20 ds18b20 sensors. can you help me by showing how the respective code changes? Thank you very much!
@alamagoseniora8128
@alamagoseniora8128 6 жыл бұрын
you have the most clear explanation. step by step. all components listed. thanks!
@zhlchlv
@zhlchlv 3 жыл бұрын
ништяк, барток. все работает. спасибо за туториал.
@AtlantaTerry
@AtlantaTerry 6 жыл бұрын
It is not good practice to change the colors of the wires. Try to maintain the wire colors all the way. Why? Well, IF you need to troubleshoot, it will keep you sane. Just look at how many times during the video you had to refer back to the sensor board to make sure your changed colors were connected to the correct pins.
@PiddlerInTheRoot
@PiddlerInTheRoot 6 жыл бұрын
I absolutely agree that you shouldn't change the wire colors whenever possible... but sometimes in life you experience a shortage of jumper cables and have to make due. :)
@jayamohank
@jayamohank 2 жыл бұрын
is there a link to the code used in the video
@simayaaaliyah3615
@simayaaaliyah3615 6 жыл бұрын
Thanks very much sir. This video is very usefull to me. Now i'm trying to set multiple Temp Sensor and increase temp accurate
@user-zs3wj9me8o
@user-zs3wj9me8o 3 жыл бұрын
Hi and congrats for your video. Well, im encountering a problem, I did exactly what you say and when I hit the ls command, I get nothing
@parastoupoursoltan5527
@parastoupoursoltan5527 3 жыл бұрын
Thank you so much. It was very helpful.
@infoinfo7015
@infoinfo7015 3 жыл бұрын
Is there a way to get this output to display on a Raspberry Pi display connected via DSI cable?
@bensavage6389
@bensavage6389 6 жыл бұрын
hey just wanted to let you know this was very helpful. i have a gas water heater that sometimes doesn't kick on and needs to be turned on again. will use the temp sensor taped to the hot water heater tank with hvac tape to make sure the water is heating up and if it doesn't it will turn the water heater on again with the relay switch. anyway.. happy that I won't have to use a ugly breadboard
@HiralPatel007
@HiralPatel007 3 жыл бұрын
I need to to do the same thing, but I want it so when temp of pipe drops below a certain temp I get an email notification, My system has recirculating pump and sometimes it does not activate
@ericjohn3817
@ericjohn3817 5 жыл бұрын
Fantastic job! Thank you so much for sharing. Have you done anything with the salinity sensor connecting to rpi?
@barraca87
@barraca87 4 жыл бұрын
Thanks for your video! A question, how many sensors of this kind can you put in a Raspberry 3? I would like do something like yours but I need 4 Temp sensors and 1 extra sensor that just make contact when the water touch it
@SXRSkibum
@SXRSkibum Жыл бұрын
Can you hook up 2 of theses to 1 pi?
@pistifesus1785
@pistifesus1785 5 жыл бұрын
Thanks for this tutorial! Any info on how to manage multiple sensors. I have to add around 6 DS18B20 so I need to chain them somehow. Thanks in advance.
@PiddlerInTheRoot
@PiddlerInTheRoot 5 жыл бұрын
I think it's possible, follow this forum: www.raspberrypi.org/forums/viewtopic.php?f=29&t=167896
@Iq-gondal
@Iq-gondal 4 жыл бұрын
i have an issue in command prompt ls command doesnt work ,as shown in your video plz help if u can
@muhammadsyafiq7760
@muhammadsyafiq7760 4 жыл бұрын
If I want to display the output on the lcd monitor connected to pi, is it same or I need different coding.
@simayaaaliyah3615
@simayaaaliyah3615 6 жыл бұрын
Thanks very much sir. This video is very usefull to me. Thanks ones again
@maxbaszkiewicz3199
@maxbaszkiewicz3199 4 жыл бұрын
i can conect more than 1 temperature sensors to rassbery pi? pls i need help
@txsatelectronics6156
@txsatelectronics6156 6 жыл бұрын
I have my sensor working just fine but was wondering if there is a way that I can run a script from my homepage by just clicking on an icon ? Thanks !!
@txsatelectronics6156
@txsatelectronics6156 6 жыл бұрын
Does anyone have a wiring diagram and script that would allow us to control a fan once the Pi reaches a certain temperature?....that way your fan is not running all the time especially in cooler weather if your pi will be used in an outside enclosure as we are going to be doing for certain applications. Thanks for any help!
@jonassal6937
@jonassal6937 5 жыл бұрын
Can I use this with my own temperature sensor to get my EGTs(exhaust gas temperature ) on my truck?
@hamnetsouthafrica5787
@hamnetsouthafrica5787 4 жыл бұрын
Probably not as the sensor only goes to 85 deg C. EGT is much higher than that.
@olafgunther9401
@olafgunther9401 3 жыл бұрын
thank you so much this as amazing!!
@edw4699
@edw4699 6 жыл бұрын
ofcourse we all fiddle with cable colors but for an instructional video it might not be the best. A female to female cable in the right colors would have helped a lot. It might be a good idea to check the datasheet for simple facts such as the temperature range. Where you type in code it is in fact unreadable It is a pity (but not your fault) that the DS18B20 values apparently have to be put in a file first
@PiddlerInTheRoot
@PiddlerInTheRoot 6 жыл бұрын
Right, thanks for the feedback. Definitely trying to address some of those quality issues in future videos.
@edw4699
@edw4699 6 жыл бұрын
such a reply deserves respect
@Mthmgful
@Mthmgful 3 жыл бұрын
`what is your IDE for python please ?
@legohistory
@legohistory 3 ай бұрын
This did not work for me.
@yarabanda9639
@yarabanda9639 3 жыл бұрын
can i use this sensor to measure skin temperature?
@baconfly11
@baconfly11 3 жыл бұрын
sure
@meerrayyanali9
@meerrayyanali9 6 жыл бұрын
I want to measure body temperature of an infant , please suggest me a good body temperature sensor which could be interfaced with raspberry p....it would be a great help
@edw4699
@edw4699 6 жыл бұрын
ds18b20 will do that, but for a child it seems easier to just buy a digital thermometer
@raymondchiu7582
@raymondchiu7582 6 жыл бұрын
As a biomedical engineer, please consider the electrical safety (IEC60601) for your infant
@stefanzenz4775
@stefanzenz4775 4 жыл бұрын
good video
@miladavaz
@miladavaz 6 жыл бұрын
Thanks for the vid. Where did you find the sensor with the breakout board? I can't seem to find it anywhere.
@PiddlerInTheRoot
@PiddlerInTheRoot 6 жыл бұрын
Check the description
@kenstovall7216
@kenstovall7216 6 жыл бұрын
Does anyone know of an app that can run on an Apple phone that will allow you to log in to a Raspberry to get the temp reading or program to run on the Pi?...Thanks!
@OriginalAJX
@OriginalAJX 5 жыл бұрын
I use Termux (For Android) to SSH into my Raspberries when I need to. I think Apples's equivalent to this app is Blink, and according to google it can be used for SSH connections.
@jocadasneves
@jocadasneves 3 жыл бұрын
what is the name of the conector were you connect the thermal wires ?
@legohistory
@legohistory 3 ай бұрын
"Plugable Terminal" says mine
@fabietto80
@fabietto80 5 жыл бұрын
Could you please provide a link to the breakout board? Thanks
@PiddlerInTheRoot
@PiddlerInTheRoot 5 жыл бұрын
Link in the description, the sensor and board usually come bundled together.
@mihail-viorelpaun5536
@mihail-viorelpaun5536 6 жыл бұрын
hello! i have a problem. when i try to run the code it says UnboundLocalError: local variable 'ds18b20' referenced before assignment.
@mihail-viorelpaun5536
@mihail-viorelpaun5536 6 жыл бұрын
i tried to put nonlocal before ds18b20 but it says syntax error and if i put global, it says that it is undefined :(
@SaifUllah-zs6vo
@SaifUllah-zs6vo 5 жыл бұрын
sir! wich breakout board did you use? i mean is there is some special module?
@PiddlerInTheRoot
@PiddlerInTheRoot 5 жыл бұрын
It usually comes with the sensor. You can find them on ebay.
@davidbeiler6364
@davidbeiler6364 5 жыл бұрын
what about humidity levels?
@PiddlerInTheRoot
@PiddlerInTheRoot 5 жыл бұрын
The DS18B20 sensor does not measure humidity.
@farhanahnabilah8308
@farhanahnabilah8308 5 жыл бұрын
Hi.. I have followed this tutorial but I can not get the serial number.Is there something I am doing wrong?Please help me..
@hariseldon2577
@hariseldon2577 5 жыл бұрын
To explain the 4.7k resistor wiring kzfaq.info/get/bejne/g8WAbNaq07a6k4U.html
@KT-ut9zg
@KT-ut9zg 6 жыл бұрын
I had thought that the Pi only did digital pins and that you would get either low or high from a pin. How is this receiving data in what seems to be an analogue form? Be interested to know as a Pi noob :) For instance I have a project for which I'll be using a sound sensor. The sensor has both analogue and digital out and I though I'd only be able to use digital. This video seems to suggest otherwise.
@PiddlerInTheRoot
@PiddlerInTheRoot 6 жыл бұрын
www.maximintegrated.com/en/app-notes/index.mvp/id/4377
@KT-ut9zg
@KT-ut9zg 6 жыл бұрын
Thanks for taking the time to shove a link in there. I appreciate the lack of verbosity of the reply but unfortunately it doesn't help with my question much. I can see how the sensors work but not how the data is represented at pin level. Like I said in my question, I thought the Pi had just on/off for each pin, not a voltage level. Anyway, not to worry, I can look elsewhere for the answer.
@PiddlerInTheRoot
@PiddlerInTheRoot 6 жыл бұрын
I'm not entirely sure how the sensor works at the pin level... but this article seems to imply that the output pin communicates via serial to the raspberry pi. learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/ds18b20
@KT-ut9zg
@KT-ut9zg 6 жыл бұрын
Ok. Now I get it. So, I guess what I'm interested in is reading the pin data directly with Python. You are opening the file on the Raspi and parsing that data. From your second link I'm seeing that with a serial library I can actually pick the serial data up directly from the pin and the temperature probe itself is communicating directly in serial. That is VERY interesting - I didn't know I could do that with the Pi, so in effect I'm getting a type of analogue readout through a digital pin. Thanks for the info. I happen to have one of those probes from another project using a BlueTooth device to transmit the temp data but I'd like to try and use it now to read the serial data directly.
@edw4699
@edw4699 6 жыл бұрын
well the DS18B20 measures an analog value, but sends it in a digital format Whereever one sees the ds18b20 on a raspberry explained, it is the same old 'write to a file' which is a pity. The DHTxx series for instance can be read directly into a variable without the help of a file. Somehow should be possible with the DS18B20 as well. It is possible on a PIC or Atmel chip
@kathiac3299
@kathiac3299 5 жыл бұрын
Would this work with BeagleBone Black?
@PiddlerInTheRoot
@PiddlerInTheRoot 5 жыл бұрын
Different setup and code, but yes the sensor should be compatible. www.bonebrews.com/temperature-monitoring-with-the-ds18b20-on-a-beaglebone-black/
@DH-ik1vf
@DH-ik1vf 4 жыл бұрын
How do I get the python script to run in the background permanently and to write the data to a log? I'm using a pi3 and running it headless to track the temperature and defrost cycle in my fridge
@nickolasormond6637
@nickolasormond6637 5 жыл бұрын
Can you post the model number for the breakout board?
@PiddlerInTheRoot
@PiddlerInTheRoot 5 жыл бұрын
Hey Nickolas, the boards are unlabled. However, if you search "Ds18b20 Adapter Module" in ebay you should see them.
@nickolasormond6637
@nickolasormond6637 5 жыл бұрын
@@PiddlerInTheRoot Thanks bud
@cvtierney
@cvtierney 5 жыл бұрын
@@PiddlerInTheRoot Thank you!! i could not find just the board anywhere.
@tugratr8267
@tugratr8267 7 жыл бұрын
Motor driver L298N Stepper motor driving please
@superfounder9918
@superfounder9918 6 жыл бұрын
Hello , I did as shown in the video (i put the resistor) and when i put the codes it shows me that way w1_bus_master1 with no number , and if i take out the resistor i get 00.8xxxxxxxxx , some hel pplease?
@PiddlerInTheRoot
@PiddlerInTheRoot 6 жыл бұрын
What is your resistor value? Check out this thread www.raspberrypi.org/forums/viewtopic.php?f=28&t=155941
@superfounder9918
@superfounder9918 6 жыл бұрын
It's 4.6ohms
@edw4699
@edw4699 6 жыл бұрын
that's a tadd low.pick 4.7 kiloohms
@nvhustle190
@nvhustle190 6 жыл бұрын
Hello, first off you are awesome been looking at your tutorials they are very helpful. I will like to know if you will be willing to help me out in a project Im currently working on. If you have an email or somewhere I can send you details that will be great. Is mainly on the programming the rasp and coding side. Hope to hear from you.
@georgezviadgoglodze7810
@georgezviadgoglodze7810 5 жыл бұрын
Good JOB!
@RightToSelfDefense
@RightToSelfDefense 6 жыл бұрын
Can't see your screen.
@simayaaaliyah3615
@simayaaaliyah3615 6 жыл бұрын
set full screen and set quality to 1080p. Then you can read :)
@hariseldon2577
@hariseldon2577 5 жыл бұрын
To explain the 4.7k resistor wiring kzfaq.info/get/bejne/g8WAbNaq07a6k4U.html
the Raspberry Pi 5
17:57
NetworkChuck
Рет қаралды 1,1 МЛН
Measure Temperature Accurately with your PICO and the LM35 Temp Sensor
11:15
Making Stuff with Chris DeHut
Рет қаралды 4,2 М.
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 42 МЛН
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 10 МЛН
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 10 МЛН
Smart Boat 13: Engine Temp Monitor using ESP32 and DS18B20
14:54
Smart Boat Innovations
Рет қаралды 9 М.
Raspberry Pi DS18B20 Temperature Sensor Tutorial
13:46
Circuit Basics
Рет қаралды 367 М.
Your USB-C Cable probably SUCKS! Sooo is that Bad?
10:54
GreatScott!
Рет қаралды 707 М.
A Simple Guide to Get the DS18B20 Running on Your Pi
9:59
Maker Jake
Рет қаралды 20 М.
Raspberry Pi 5: EVERYTHING you need to know
20:32
Jeff Geerling
Рет қаралды 1,1 МЛН
DIY Smart Thermostat For Under $40 Using Raspberry Pi Pico W
6:05
Smarter Circuits
Рет қаралды 8 М.
MLX90614 Thermal Sensor Raspberry Pi Tutorial
5:26
Danny Murray
Рет қаралды 18 М.
Raspberry Pi Weather Station
21:42
ExplainingComputers
Рет қаралды 291 М.
🥧Raspberry Pi Multiple DS18B20 Temperature Sensors (2019) 🥧
12:13
Canispater Christmas
Рет қаралды 21 М.
I tried finding Hidden Gems on AliExpress AGAIN! (Part 5)
14:11
GreatScott!
Рет қаралды 1,1 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 42 МЛН