How to use DS18B20 Temperature sensor with arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.พ. 2021
  • DS18B20 is one of the popular temperature sensors because it is cheap, easy to use, and also waterproof. It is a very cheap waterproof temperature sensor we can get from the market.
    In this video, we will learn how to use it with Arduino.
    You can support us and unlock premium projects code by joining our membership by clicking the link below:
    / @miliohm
    Download sketch and wiring diagram :
    miliohm.com/how-to-simply-use...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 81

  • @maxwellvinimax68
    @maxwellvinimax68 2 ปีที่แล้ว +2

    what all u said worked out perfect.first i thought my display had prob then changed contast and wroked perfect. never thought i will be able to something llike this for my school project. thanks man

  • @Alshafi
    @Alshafi ปีที่แล้ว

    Thanks for the vid. i would only recommend installing the OneWire library since it is actually required in the example.

  • @chandra7734
    @chandra7734 3 ปีที่แล้ว

    is it accurate to measure a room temperature below -10 to -25 degrees Celcius?

  • @bb4853
    @bb4853 2 ปีที่แล้ว +6

    I've check the code you gave that is so detailed, to be a primer I learned a lot from it, I'll be guilty if I dont hit a like on this video.

    • @miliohm
      @miliohm  2 ปีที่แล้ว +1

      Thanks!

    • @shogunvanrepi3555
      @shogunvanrepi3555 ปีที่แล้ว

      ​@@miliohm what happens if no resistor is added to the circuit?

  • @BerndJTHIEL
    @BerndJTHIEL ปีที่แล้ว

    how much of this sensors you can use parallel on a androinu? i need a system with 8-16

  • @ajith6840
    @ajith6840 ปีที่แล้ว +2

    Thank you so much for this video👍
    Is it possible to add an battery voltage sensor along with the temperature sensor in the same Arduino , How can we combine the both programs

  • @josielsoaresfarias1760
    @josielsoaresfarias1760 8 หลายเดือนก่อน

    Valeu amigo. Ótimo vídeo
    Único vídeo que encontrei na internet que realmente explica como faz. Parabéns e Obrigado. Ganhou meu like 👏

  • @Earthstoriesbydev
    @Earthstoriesbydev 7 หลายเดือนก่อน

    have u done this with a battery? What battery it might need do u know?

  • @sheenamarietongol4367
    @sheenamarietongol4367 ปีที่แล้ว

    what type of jumoer wire sis you use?

  • @FraLin
    @FraLin 8 หลายเดือนก่อน

    I was looking for polarity and colours, can it die if I confuse yellow and red?

  • @hondat7435
    @hondat7435 2 ปีที่แล้ว

    Hello, can you do one with the VISA LabVIEW?

  • @mikevez6639
    @mikevez6639 ปีที่แล้ว

    If people are getting strange results disconnect the power line to the sensor if using parasitic power from the arduino. just run 5v thro the resistor to the signal wire in yellow. This is what the datasheet says

  • @jyaniharshil5585
    @jyaniharshil5585 2 ปีที่แล้ว

    Hey brother can you tell me the code for my project . ds18b20 temperature sensor , LCD 16×2 , arduino UNO & fan , all connected .
    As the temperature rises , fan goes fast or Start rotating and if temperature goes low , fan slows or stops down...

  • @tosc4goro711
    @tosc4goro711 4 หลายเดือนก่อน

    thanks a lot for the tutorial sir, could u also make the one wire version tutorial of this sensor? thanks!

  • @rafaellouish.odrada4183
    @rafaellouish.odrada4183 2 ปีที่แล้ว

    good day would like to ask why my serial monitor shows the device cannot be found that show error results

  • @syukorburger9699
    @syukorburger9699 2 ปีที่แล้ว

    hey, why my (tempC != DEVICE_DISCONNECTED_C) at line 56 is error, it said "'DEVICE_DISCONNECTED_C' was not declared in this scope" i hope u can help me with that

  • @arthurmarcolan9722
    @arthurmarcolan9722 ปีที่แล้ว

    thank you so much for the help, you saved me

  • @shogunvanrepi3555
    @shogunvanrepi3555 ปีที่แล้ว

    what happens if no resistor is added to the circuit?

  • @gasko2762
    @gasko2762 2 ปีที่แล้ว +2

    Thank you for the wonderful programs for Arduino for beginners.

  • @battlecampkhimmay2981
    @battlecampkhimmay2981 2 ปีที่แล้ว

    Do you guys have same method on raspberry pi pls

  • @Bianchi77
    @Bianchi77 ปีที่แล้ว

    Nice video, thanks :)

  • @spakxd9834
    @spakxd9834 2 ปีที่แล้ว

    why on my PC not showing the COM2 window?

  • @TopOneTime
    @TopOneTime 3 ปีที่แล้ว

    Can you type the name of the display screen please?

  • @gernandoregobionejunior3794
    @gernandoregobionejunior3794 2 ปีที่แล้ว

    Hi, i'm having some problems with this sensor when i try to heat the water until it evaporates, my sensor can't read a temperature above 100°C or equal. My programation sketch is similar

  • @TheWareek
    @TheWareek 2 ปีที่แล้ว

    The first sketch worked on my set up but in the serial monitor I got the temperature about every 1/10 of a second. any ideas.

    • @mikevez6639
      @mikevez6639 ปีที่แล้ว

      add delay(1000); to the loop

  • @shijumax1
    @shijumax1 8 หลายเดือนก่อน

    Hi , I am your new subscriber, can u make a video or explain to build a SMD reflow with Nextion display?

  • @mend17
    @mend17 2 ปีที่แล้ว

    i have an adruino mega were do i place the SDA & de SCL of ic2? couze the A4 & a5 dont work

    • @miliohm
      @miliohm  2 ปีที่แล้ว

      SDA - 20
      SCL - 21

  • @christophercabanbanalvarad2241
    @christophercabanbanalvarad2241 2 ปีที่แล้ว

    i followed your diagram and download the code you have posted but still my lcd 168b20 doesn't display anything except for block bars. pls help.....

    • @chrisheaps9893
      @chrisheaps9893 2 ปีที่แล้ว +2

      You may need to adjust the contrast on the back of the display.

  • @raajnivas2550
    @raajnivas2550 ปีที่แล้ว

    Thank you.

  • @chojix6394
    @chojix6394 8 หลายเดือนก่อน

    What to do if temperature data cannot be read?

  • @chris9yearsago698
    @chris9yearsago698 2 ปีที่แล้ว

    Can you use it for water temperature? Like dip the sensor in it?

    • @miliohm
      @miliohm  2 ปีที่แล้ว +2

      You should watch at 5:29

    • @chris9yearsago698
      @chris9yearsago698 2 ปีที่แล้ว

      @@miliohm thanks man I didn''t actually watch it all

  • @SekolahCemerlang
    @SekolahCemerlang 3 ปีที่แล้ว

    Looks like better than lm35

  • @GaneshPawar-gs6ee
    @GaneshPawar-gs6ee ปีที่แล้ว

    can we add more than one DS18B20 sensor wire on same bus/pin

  • @gouthamas7265
    @gouthamas7265 ปีที่แล้ว

    Hey. I tried the code ,it is working on serial monitor, but when I copy pasted your other coder for LCD ,lcd Is on but not showing anything, need help !!!!

    • @AnimeTv-us8gk
      @AnimeTv-us8gk ปีที่แล้ว

      Where did you ordered the tools bro?

  • @chickenz4604
    @chickenz4604 2 ปีที่แล้ว

    is the temperature sensor robust for 1 year usage?

  • @AneeshPradeep
    @AneeshPradeep 2 ปีที่แล้ว

    What is the purpose of the register
    Can the sensor be connected directly to the board ?

    • @miliohm
      @miliohm  2 ปีที่แล้ว

      What register?
      The breadboard just help us to put the resistor

    • @AneeshPradeep
      @AneeshPradeep 2 ปีที่แล้ว

      @@miliohm Sorry . i meant resistor

    • @miliohm
      @miliohm  2 ปีที่แล้ว

      @@AneeshPradeep it's pull up resistor. It's from datasheet.

  • @raphaelnazareth486
    @raphaelnazareth486 ปีที่แล้ว

    nice video

  • @pew1472
    @pew1472 2 ปีที่แล้ว

    im new to to arduino project. why dos it have an error LiquidCrystal_I2C.h: No such file or directory
    . pls help :)

    • @miliohm
      @miliohm  2 ปีที่แล้ว

      You need to download the library first, watch again carefully

  • @wisnuindrawan6496
    @wisnuindrawan6496 3 ปีที่แล้ว

    how about accuracy is better than themocouple ?

    • @miliohm
      @miliohm  3 ปีที่แล้ว

      Make thermocouple accurate is sometimes complex since it has so small signal. So I think this sensor can be more accurate but, thermocouple has wider range. It can measure up to thousands degrees of celcius.

    • @wisnuindrawan6496
      @wisnuindrawan6496 3 ปีที่แล้ว

      @@miliohm thank you for the answer

  • @pearlydanahambayen3939
    @pearlydanahambayen3939 ปีที่แล้ว

    My ds18b20 is not giving me results it only shows -127.00c and -196.6f it is not changing even if I put it on hot water can you please help me?

  • @Imapussy806
    @Imapussy806 2 ปีที่แล้ว

    can i use a 4.7k resistor also i am getting -127° reading what can be my solution

    • @miliohm
      @miliohm  2 ปีที่แล้ว

      It should works, check your wiring again.

    • @axel_72
      @axel_72 ปีที่แล้ว

      i have same -127°... but ho to resolved it ?

    • @Imapussy806
      @Imapussy806 ปีที่แล้ว

      @@axel_72 Check your wiring and make sure that it’s getting proper power supply
      When I connect this to my esp32 it was not working properly for me but Aurdino uno board gave me proper output

  • @bradley9856
    @bradley9856 11 หลายเดือนก่อน

    good video, but all i get is this in the serial monitor:
    Locating devices...Found 0 devices.
    Parasite power is: OFF
    Unable to find address for Device 0
    Device 0 Address: 0000000000000000
    Device 0 Resolution: 0
    Requesting temperatures...DONE
    Error: Could not read temperature data

  • @Myb.pranoto
    @Myb.pranoto 2 ปีที่แล้ว

    What is the type of the lcd?

    • @miliohm
      @miliohm  2 ปีที่แล้ว

      it's 20x4 LCD

  • @xarek24g
    @xarek24g 2 ปีที่แล้ว

    Why u use this resistor with the temp. Sensor i need this one?

    • @miliohm
      @miliohm  2 ปีที่แล้ว +1

      It's for pull up

    • @Saini_Ayush07
      @Saini_Ayush07 2 ปีที่แล้ว +1

      It is a 4.7k ohm resistor

  • @musicalmusician8019
    @musicalmusician8019 ปีที่แล้ว

    Is it possible to do this without a breadboard?

    • @miliohm
      @miliohm  ปีที่แล้ว

      Sure

    • @musicalmusician8019
      @musicalmusician8019 ปีที่แล้ว

      @@miliohm Does it require calibration?

    • @miliohm
      @miliohm  ปีที่แล้ว

      @@musicalmusician8019 it is factory calibrared. But if you still need adjusment you can also calibrate it.

  • @williampowell7518
    @williampowell7518 2 ปีที่แล้ว

    the temperature values that I am getting is not accurate. my room is abou5 celcius but I am seeing 85 degrees Celsius

    • @miliohm
      @miliohm  2 ปีที่แล้ว

      Did it change?

  • @noraimanazmi1190
    @noraimanazmi1190 2 ปีที่แล้ว

    im sorry,can i get code for lcd1602 :(

    • @miliohm
      @miliohm  2 ปีที่แล้ว

      You should read the description

  • @tanjimulislamdip2338
    @tanjimulislamdip2338 3 ปีที่แล้ว

    Can you give me the code of it??plz I need urgent.

    • @miliohm
      @miliohm  3 ปีที่แล้ว

      You should read the description

    • @tanjimulislamdip2338
      @tanjimulislamdip2338 3 ปีที่แล้ว

      The link is not working there,please give me the code of it,i need it very urgently,i must submit my portable refrigerator project 🙏

    • @miliohm
      @miliohm  3 ปีที่แล้ว +2

      @@tanjimulislamdip2338 maybe you click the wrong link. The second one. Still work here miliohm.com/how-to-simply-use-ds18b20-temperature-sensor-with-arduino/

  • @jyaniharshil5585
    @jyaniharshil5585 2 ปีที่แล้ว

    Hey brother can you tell me the code for my project . ds18b20 temperature sensor , LCD 16×2 , arduino UNO & fan , all connected .
    As the temperature rises , fan goes fast or Start rotating and if temperature goes low , fan slows or stops down...