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).
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.
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??
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!
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.
@@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 ?
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.
@@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.
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
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
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
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 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.
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
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?
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.
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
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.
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.
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.
@@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.
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?
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.
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.
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
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.
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
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.
@@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?
Thank you for explaining that in such detail. I found your video useful
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).
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.
Nice. Always glad to see a new video on your channel.
Would you be able to make a cable map thingy for the same thing just with 3 seperate thermometers attached?
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??
I have the same problem
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
I had this, I think flipping the SDA and SCL into the board fixed this for me.
same here. i tried this today at december 7, 2020. got this problem too.
@@vic-san12 send me ur email i will send uo a program
@@yasmineyachmina8898 fixed my problem. I just need to install the library. thank you for taking the time to reply tho. really appreciated
@@vic-san12 which library did you install ?
what is the difference between sensor DS18B20, DS18S20, DS1822, DS1820?
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!
Thanks for your demo video for DS18B20 sensor, Sir. I want to ask, can the DS18B20 sensor measure the temperature for soil ?
Thank you...
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.
@@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 ?
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.
@@GadgetReboot Ohh I understand, thanks a lot Sir for your explanation ! I will try to implement your suggestion with DS18B20 sensor.
@@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.
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
Brilliant video
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
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
@@GadgetReboot it's work well, thank you very much sir
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?
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.
@@GadgetReboot thanks. its just a 12v dc pump.
@@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.
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
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?
I put together a demo
ua-cam.com/video/lr1x96s3TKY/v-deo.html
where did you simulate the circuit?
Useful video 👍 Excellent 👍
Are you able to "extend" probes to put them in different corners of a room (for instance)?
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.
What kind of pullups? I didn't hear any numbers nor see any on the datasheet
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
Can this sensor be used to measure the human body temperature accurately?
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.
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.
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.
@@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.
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?
I looked at parasite mode here ua-cam.com/video/145ml4ii1ao/v-deo.html
Can we use modbus protocol for ds18b20 with arduino?
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.
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 ?
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?
@@GadgetReboot i have a problem with the creaction of application on Android to remote the system .. thnx so much
Plz help sir, i have some problem here. why my measurement result is -127?
have you resolve it? i have same problem
@@adisurya6408 me too i have the same probleme
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.
why it don't know the address when i open serial monitor
Is there a pull up resistor on the data line?
thank you very
much
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
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.
Can this be done with 14 thermometers?
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
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.
Sir , may i get code for this project
The link to the sketch is in the description
what resistor i need
4.7K worked for me
Oled display Temp: -127.0 c only.
help
im using arduino arduino uno r3 atmega 328, OLED Display Module 128X64 I2C SSD1306 12864 LCD Screen Board GND VDD SCK SDA for Arduino
@@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?
I need a code.
Who knows let him write a code
please help me brother
I have some problems when i get data from sensor. It always show -127 celcius can you give me the solution??
me too the same probleme
Same problem. Were you able to figure out what’s wrong!
@@cdavid0624 i already solve this issue. You need to put resistor 5k on 5v connection on ds18b20 and Arduino