DS18B20 Arduino Temperature Sensor - How to Tutorial

  Рет қаралды 53,400

Gadget Reboot

Gadget Reboot

Күн бұрын

Пікірлер: 82
@malapropism9036
@malapropism9036 5 жыл бұрын
It's naturally slower than the thermocouple, because the sensor's heat transfer function is a function of specific heat, mass of the sensor, surface area of the heat sensing element, i.e., the time constant (time it takes to reach 63% of equilibrium condition).
@a1nelson
@a1nelson 3 жыл бұрын
Yeah, those are important. The thermal mass of the sensor and its metal can are likely much larger than the little thermocouple - even with their wires (which are probably of similar gauge). I would have preferred to have seen both fully submerged, as the heat transfer would have been faster, reaching equilibrium sooner, and the readings a touch more accurate, as the Dallas sensor wouldn’t have been influenced by the ambient air and/or ice (if the ice and water hadn’t yet agreed on 0C). Of course, doing so might have shorted the sensor, given it’s iffy seal - a situation unlikely to yield good results.
@ryanrinn4041
@ryanrinn4041 Жыл бұрын
Thank you for explaining that in such detail. I found your video useful
@AlexEden-ey5bp
@AlexEden-ey5bp 22 күн бұрын
Would you be able to make a cable map thingy for the same thing just with 3 seperate thermometers attached?
@elson2k
@elson2k 6 жыл бұрын
Nice. Always glad to see a new video on your channel.
@yasmineyachmina8898
@yasmineyachmina8898 4 жыл бұрын
hello sir, I have a problem that my Ds18b20 sensor always displays on the serial monitor -127.00 and I don't know where the fault is
@zacgalibov3349
@zacgalibov3349 4 жыл бұрын
I had this, I think flipping the SDA and SCL into the board fixed this for me.
@vic-san12
@vic-san12 4 жыл бұрын
same here. i tried this today at december 7, 2020. got this problem too.
@yasmineyachmina8898
@yasmineyachmina8898 4 жыл бұрын
@@vic-san12 send me ur email i will send uo a program
@vic-san12
@vic-san12 4 жыл бұрын
@@yasmineyachmina8898 fixed my problem. I just need to install the library. thank you for taking the time to reply tho. really appreciated
@geraldojim7356
@geraldojim7356 3 жыл бұрын
@@vic-san12 which library did you install ?
@arunpatil7936
@arunpatil7936 3 жыл бұрын
hiee bro i need your help. I am using this sensor, for the first time it worked perfectly but after that, I had cut the wire to solder jumper wires but after soldering it is showing -126 degree celcius only. How to resolve this??
@davidwalker575
@davidwalker575 5 ай бұрын
I have the same problem
@liuzzivfx9413
@liuzzivfx9413 3 жыл бұрын
What kind of pullups? I didn't hear any numbers nor see any on the datasheet
@GadgetReboot
@GadgetReboot 3 жыл бұрын
On the project schematic it shows 4.7K raw.githubusercontent.com/GadgetReboot/Arduino/master/Uno/DS18B20_Temp_Sensor/DS18B20_Schematic.jpg and the datasheet says on page 10 the pull up is around 5K datasheets.maximintegrated.com/en/ds/DS18B20.pdf
@francismartin7143
@francismartin7143 4 жыл бұрын
Hi! Is it possible to use this device on other controler like stm32f446RE with the same library as you used? I'm quite unfamilliar with I2C comunication and your library look user friendly. Thank you in advance!
@rezaainur3299
@rezaainur3299 5 жыл бұрын
Thanks for your demo video for DS18B20 sensor, Sir. I want to ask, can the DS18B20 sensor measure the temperature for soil ? Thank you...
@GadgetReboot
@GadgetReboot 5 жыл бұрын
I don’t know if the metal cover would corrode in the soil and I also wouldn’t trust the existing black sleeve to be completely waterproof where it ends, so I would probably coat the exposed metal With either epoxy or silicone sealant to cover the metal and go partway on the sleeve to seal that area. Then I would also coat the other end of the black sleeve where it meets with the rest of the cable so the metal is now covered and what looks like black heat shrink tubing on my probe at least, is sealed on both ends of it.
@rezaainur3299
@rezaainur3299 5 жыл бұрын
​@@GadgetReboot Ohhh, I see, i didn't think about the corrosion before, thanks for your suggestion. One more question Sir, will the silicone reduce capability of the sensor ?
@GadgetReboot
@GadgetReboot 5 жыл бұрын
I’m not sure to what extent the sensor will change its profile such as becoming slower to respond to changes or being less able to discern between steps in temperature changes but for measuring a slow environment like soil temperature it probably doesn’t need to be so accurate or fast responding so if I were doing it I would apply just a thin coat to provide some protection with minimal obstruction and then test it out and re-characterize it and go with that.
@rezaainur3299
@rezaainur3299 5 жыл бұрын
@@GadgetReboot Ohh I understand, thanks a lot Sir for your explanation ! I will try to implement your suggestion with DS18B20 sensor.
@a1nelson
@a1nelson 3 жыл бұрын
@@GadgetReboot Totally agree. The thermal mass of the soil is huge compared with the sensor. So, the signal output will change _very slowly - just like the soil.
@hootis8
@hootis8 4 жыл бұрын
Brilliant video
@michaelgaul2244
@michaelgaul2244 4 жыл бұрын
i want to add a relay to this to turn on a pump when the water teemp drops below a set point. is it possible?
@GadgetReboot
@GadgetReboot 4 жыл бұрын
If the relay can handle switching the pump and it just needs the coil actuated, then if there is a transistor driver circuit to handle that and allow logic level on/ off control, then the Arduino can turn the relay on and off anytime it wants and that can occur when the temperature is below a certain level. There are some Arduino compatible relay boards out there that might be suitable for switching AC loads.
@michaelgaul2244
@michaelgaul2244 4 жыл бұрын
@@GadgetReboot thanks. its just a 12v dc pump.
@a1nelson
@a1nelson 3 жыл бұрын
@@michaelgaul2244 sorry if this sounds too pedantic, but don’t forget the flyback diode on the control circuit/s. Both the pump and the relay primary can create a large spikes when they’re turned Off - leading to premature death of your relay (secondary, due to bounce pitting) and/or Arduino. A zener & switching diode combo is also popular. Watch the voltage ratings for the diode/s.
@aderamadan8869
@aderamadan8869 5 жыл бұрын
hello sir.. i don't have OLED display, please give me code temperature sensor (ds18b200) without OLED display but i can see temperature in serial monitor. thank you
@GadgetReboot
@GadgetReboot 5 жыл бұрын
I just edited the OLED sketch and made it serial monitor only and uploaded that new sketch. Try that. github.com/GadgetReboot/Arduino/tree/master/Uno/DS18B20_Temp_Sensor
@aderamadan8869
@aderamadan8869 5 жыл бұрын
@@GadgetReboot it's work well, thank you very much sir
@hansdegroot652
@hansdegroot652 4 жыл бұрын
I really like to know how to use the parasitemode. Coz I you read about this mode every where so asumed it was a working mode. I allready have the 2 wire connectors in place and I do not have 3 wire connectors or cables. You hinted that you need 2 arduino pins to control the pull up and thats fine. Any suggestions whee I can find arduino examples that work in parasite mode?
@GadgetReboot
@GadgetReboot 4 жыл бұрын
I looked at parasite mode here kzbin.info/www/bejne/Z2WYnp9qns5kl9E
@tugasakhirhendro9965
@tugasakhirhendro9965 4 жыл бұрын
what is the difference between sensor DS18B20, DS18S20, DS1822, DS1820?
@omyfreakingawd789
@omyfreakingawd789 5 жыл бұрын
Are you able to "extend" probes to put them in different corners of a room (for instance)?
@a1nelson
@a1nelson 3 жыл бұрын
Yes, but if you may need one or more transceiver to buffer (boost and sharpen) the data signal. Also, the greater the distance, the more susceptible the data signal may be to interference. So, I’d recommend the 4-wire version mentioned in the video, with the shield grounded. This is pure speculation, but the voltage drop associated with long, thin wires may result in inaccurate readings. This could largely be resolved by running sufficiently larger gauge wire (e.g. 18ga). Keep in mind that you can use this wire to power the transceivers. Powering the sensor with the highest voltage your MCU/Arduino supports would mitigate the potential issue with voltage drop.
@electronic7979
@electronic7979 6 жыл бұрын
Useful video 👍 Excellent 👍
@pattanitnomthongthai4831
@pattanitnomthongthai4831 5 жыл бұрын
Thank you very much for your sharing. But I have a problem when I verify the code that " no matching function for call to 'Adafruit_SSD1306::Adafruit_SSD1306(int)' ". Could you please help me to solve this problem? Thank you for your support
@zeemixvideos6485
@zeemixvideos6485 6 жыл бұрын
sir i have arduino mega and temperature sensor (ds18b20) and a lcd 1602A sir please tell me how to connect all these which shows temperature on lcd please sir help or give me a link
@GadgetReboot
@GadgetReboot 6 жыл бұрын
I think I will actually try to quickly put together a video to do that because I’ve worked on the temperature sensor in one project before and used that LCD in a different project so I will see if I can put something together and do a video in the next couple of days. Does the 1602 LCD you have use a serial interface or does it just have all those 16 or so pins only?
@GadgetReboot
@GadgetReboot 6 жыл бұрын
I put together a demo kzbin.info/www/bejne/oqOUqWxsqJiHgbs
@raniaboukhchim1689
@raniaboukhchim1689 5 жыл бұрын
i have a project " contoling system of climatisation with arduino uno and ds18 and wifi card " i have some difficult can u help me pliz ?
@GadgetReboot
@GadgetReboot 5 жыл бұрын
I don’t know how much help I can give, what is the Wi-Fi card? I have only used Wi-Fi with ESP 8266. What does the project need to accomplish?
@raniaboukhchim1689
@raniaboukhchim1689 5 жыл бұрын
@@GadgetReboot i have a problem with the creaction of application on Android to remote the system .. thnx so much
@ydsiadavila939
@ydsiadavila939 4 жыл бұрын
where did you simulate the circuit?
@hafiznaim3521
@hafiznaim3521 4 жыл бұрын
Can we use modbus protocol for ds18b20 with arduino?
@a1nelson
@a1nelson 3 жыл бұрын
If you’re talking about the Modbus serial protocol, then the Arduino should have no problem with that at all. If you’re interfacing with other devices, such as a PC or PLC, you’ll almost certainly need an RS232 or RS422 driver on the Arduino serial lines to boost the signal and make the signal differential. Take a look at the MAX232 series. They’re easy to use and, last time I looked, they were still available in DIP packages. Pro tip: add a TVS diode array or low capacitance, high-voltage capacitors on the signal lines (on the 232/422 side). This will reduce sadness caused by the discharge of static electricity, nearby motor coils, long wires and the like. If you’re talking about Modbus TCP, then you’ll need a serial-to-Ethernet module. They’re also readily available and straightforward to use. For those, take a look at ones based on the WizNet 5500.
@priyanujborthakur5519
@priyanujborthakur5519 5 жыл бұрын
Can this sensor be used to measure the human body temperature accurately?
@GadgetReboot
@GadgetReboot 5 жыл бұрын
This sensor can have an accuracy up to +/ -0.5°C and to properly measure the temperature of something, I would think the entire sensor should be immersed in the environment being measured so that other ambient temperatures don’t interfere, so it depends how the sensor is going to be measuring the temperature. If it is just being pressed against something then it’s partly measuring the room and partly measuring what it’s pressed against.
@a1nelson
@a1nelson 3 жыл бұрын
I’m tempted to make a joke, but seriously, it depends on where is the probe is placed. This would be no different from a typical thermometer place under the tongue, in the armpit or inserted rectally.
@a1nelson
@a1nelson 3 жыл бұрын
The resolution is adjustable. According to the data sheet, it can be operated with a resolution from 0.5 C to 0.0625 C by changing the requested bit depth, from 9-bit through 12-bit, as shown. Presumably, the speed (sampling rate) and repeatability (noise) are influenced by the resolution setting. As with nearly _all temperature sensors, accuracy beyond ~0.5 C requires calibration. The method shown in the video, using ice water (at equilibrium) and boiling water (actually boiling) is a very common technique used for this purpose. Then, using the initial measurements obtained, output from the sensor can then be scaled (aka interpolated) to obtain the actual, real-world temperature.
@a1nelson
@a1nelson 3 жыл бұрын
@@GadgetReboot Totally agree. Respectfully, I wonder if the response time and accuracy of the Dallas probe in the video was influenced by the probe not being fully submerged (and completely below the ice) like the thermocouple. Edit: to be effective, the sensor not only needs to be fully immersed, but it also needs to be given time to reach a point of stability/equilibrium. Given the probe’s relatively large thermal mass, this will take longer than a small thermocouple or a drugstore thermometer.
@ngaji_it
@ngaji_it 4 жыл бұрын
Plz help sir, i have some problem here. why my measurement result is -127?
@adisurya6408
@adisurya6408 4 жыл бұрын
have you resolve it? i have same problem
@yasmineyachmina8898
@yasmineyachmina8898 4 жыл бұрын
@@adisurya6408 me too i have the same probleme
@peterensinger1770
@peterensinger1770 4 жыл бұрын
Make sure the temp sensor is connected and has power as i had this problem and found my sensor had no power dur to a bad crimp in one of the dupont connectors i have used after replacing the connector it worked ok after.
@lysomnang7309
@lysomnang7309 4 жыл бұрын
why it don't know the address when i open serial monitor
@GadgetReboot
@GadgetReboot 4 жыл бұрын
Is there a pull up resistor on the data line?
@ridhaturki1907
@ridhaturki1907 5 жыл бұрын
thank you very much
@Jamesb1735
@Jamesb1735 3 жыл бұрын
Can this be done with 14 thermometers?
@hirdeshbajwa8906
@hirdeshbajwa8906 3 жыл бұрын
www.instructables.com/Multiple-Fermenter-Temperature-Control-With-Arduin/ Yes i think that is possible becuase that link suggests that they want to control temperatures of multiple fermenters
@a1nelson
@a1nelson 3 жыл бұрын
Beware: of the most common libraries has an arbitrary limit of eight sensors. However, the protocol from the data sheet appears capable of having an absurdly large number of sensors - like trillions (only on paper, of course). 14 seems totally reasonable, once the driver code is tweaked from 8 to, say, 16.
@tablatronix
@tablatronix 6 жыл бұрын
There is a library that support parasitic with 1 gpio, and another that supports parasitic without a resistor milesburton/Arduino-Temperature-Control-Library , bigjosh/OneWireNoResistor, I had moderate success with them. But I know there is 2 versions of these s model maybe
@GadgetReboot
@GadgetReboot 6 жыл бұрын
I guess there’s a way to make use of the single GPIO to do the parasitic feature if it’s sitting idle anyway during that time. I’ll check it out at some point. It would be fun to get it working that way and to possibly use the knowledge to be creative with GPIO pins in other projects too. Thanks.
@roshanchandana8058
@roshanchandana8058 4 жыл бұрын
Sir , may i get code for this project
@GadgetReboot
@GadgetReboot 4 жыл бұрын
The link to the sketch is in the description
@carljavier5248
@carljavier5248 4 жыл бұрын
what resistor i need
@GadgetReboot
@GadgetReboot 4 жыл бұрын
4.7K worked for me
@carljavier5248
@carljavier5248 4 жыл бұрын
Oled display Temp: -127.0 c only.
@carljavier5248
@carljavier5248 4 жыл бұрын
help
@carljavier5248
@carljavier5248 4 жыл бұрын
im using arduino arduino uno r3 atmega 328, OLED Display Module 128X64 I2C SSD1306 12864 LCD Screen Board GND VDD SCK SDA for Arduino
@GadgetReboot
@GadgetReboot 4 жыл бұрын
@@carljavier5248 It sounds like the data isn't being read so it's the default reading. Do you have an extra sensor? It could be bad. It would also help to see some sort of wiring diagram - what GPIO pin is the sensor on? Do you have an oscilloscope to look at the data signal to see if it's communicating?
@عليعادل-ر5ف7ر
@عليعادل-ر5ف7ر 4 жыл бұрын
I need a code. Who knows let him write a code
@lysomnang7309
@lysomnang7309 4 жыл бұрын
please help me brother
@MuhammadAkbar-ij4lm
@MuhammadAkbar-ij4lm 4 жыл бұрын
I have some problems when i get data from sensor. It always show -127 celcius can you give me the solution??
@yasmineyachmina8898
@yasmineyachmina8898 4 жыл бұрын
me too the same probleme
@cdavid0624
@cdavid0624 3 жыл бұрын
Same problem. Were you able to figure out what’s wrong!
@MuhammadAkbar-ij4lm
@MuhammadAkbar-ij4lm 3 жыл бұрын
@@cdavid0624 i already solve this issue. You need to put resistor 5k on 5v connection on ds18b20 and Arduino
How to use DS18B20 Temperature sensor with arduino
8:37
miliohm
Рет қаралды 132 М.
5 temperature sensors for arduino projects
16:34
pileofstuff
Рет қаралды 13 М.
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 4,7 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 27 МЛН
Don't underestimate anyone
00:47
奇軒Tricking
Рет қаралды 27 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 12 МЛН
Smart Boat 13: Engine Temp Monitor using ESP32 and DS18B20
14:54
Smart Boat Innovations
Рет қаралды 11 М.
Arduino Temperature Gauge
34:43
upir
Рет қаралды 65 М.
Arduino, DS18B20/DS18S20 Temperature Sensor and 1-Wire Bus - The Details
41:15
Robert's Smorgasbord
Рет қаралды 10 М.
1 Wire DS18B20 Temperature Sensor - Arduino / Node Red
6:49
Tech Minds
Рет қаралды 9 М.
Measuring Temperature with Arduino - 5 Sensors
29:55
DroneBot Workshop
Рет қаралды 145 М.
Temperature Sensors Explained
10:16
The Engineering Mindset
Рет қаралды 494 М.
Pressure Sensor - Arduino
17:52
Ovens Garage
Рет қаралды 202 М.
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 4,7 МЛН