DS18B20 Temperature Sensor with ESP32: Wiring & Basic Code Tutorial — Transcript
Full transcript
- 0:00[Music]
- 0:08hi guys welcome to Robo craze today we
- 0:13are going to be talking about the ds1 8b
- 0:16to zero temperature sensor and how to
- 0:18integrate it using an ESP 32 this is the
- 0:23data sheet for the ds1 8b to 0
- 0:26temperature sensor it is made by Dallas
- 0:29semiconductor and here you can find the
- 0:31pin assignment and the unique features
- 0:33that this temperature sensor offers as
- 0:36you can see it is a digital thermometer
- 0:39which provides 9 to 12 bit temperature
- 0:42readings also it can be interfaced using
- 0:45only a single wire this means that the
- 0:49power for reading writing and performing
- 0:52temperature conversions
- 0:53can be derived from the data line itself
- 0:55without the need for an external power
- 0:57source as part of this blog we will also
- 1:00be learning about things peak which is
- 1:02an IOT platform service that allows you
- 1:05to analyze live data streams on the
- 1:08cloud we start off by signing up for a
- 1:12things peak account fill in your email
- 1:14address and fill in the other details
- 1:16that have been asked once you press
- 1:22continue a verification mail will be
- 1:26sent to your registered email ID
- 1:29[Music]
- 1:50[Music]
- 1:55open the email thread sent by things
- 1:58peek and in the bottom you can see that
- 2:00they're asking you to log in to your
- 2:02things speak account using the email
- 2:05address associated with your MathWorks
- 2:07account if you don't have a Matt works
- 2:10account don't worry we'll cover that
- 2:13also as part of the tutorial head over
- 2:16to iNDOT MathWorks calm and click on
- 2:19sign in at this stage if you don't have
- 2:23a MathWorks account it is necessary to
- 2:25create one simply fill in the required
- 2:29details and you're good to go make sure
- 2:35that you're giving the same email
- 2:37address for both the things speak
- 2:39account and the MathWorks account
- 2:40otherwise the two will not be linked
- 2:43together
- 2:45log in to your mathworks account and in
- 2:48a different tab log in to your things
- 2:50peak account
- 2:54[Music]
- 3:04at the home screen click on new channel
- 3:07for our application a channel is nothing
- 3:12but a place where all the temperature
- 3:14values from the sensor will be stored on
- 3:17the cloud fill in the name of the
- 3:20channel according to your need and the
- 3:23description for our application we are
- 3:27going to be monitoring temperature so
- 3:29our field one will be renamed to
- 3:31temperature hit on save channel at the
- 3:35bottom of the page and in the home page
- 3:38you can see that a new channel has been
- 3:39created next we are going to be looking
- 3:43at the hardware connections between the
- 3:45ds1 8b to 0 temperature sensor and an
- 3:49ESP 32 this is the temperature sensor
- 3:53probe and at the other end of it you
- 3:56have three wires coming out of the
- 3:58sensor red is VCC black is ground and
- 4:05yellow is signal we are also using a 10k
- 4:09resistor for this application connect
- 4:13the signal line at one end of the
- 4:15resistor
- 4:16[Music]
- 4:20VCC for the sensor is rated at 3.3 volts
- 4:24and connect ground on a different rail
- 4:28of the breadboard
- 4:30[Music]
- 4:35from the ESP 30 to development module we
- 4:38are using three pins ground GPIO 23 and
- 4:433.3 volts Connect 3.3 volts to the VCC
- 4:48of the sensor connect common ground and
- 4:56GPIO 23 to the other end of the resistor
- 4:59which is connected to the signal pin of
- 5:01the sensor the other end of the resistor
- 5:07needs to be pulled up high to 5 volts
- 5:10and for this we are using an Arduino
- 5:15connect the 5 volt pin to the other end
- 5:18of the resistor and common ground the
- 5:20circuit
- 5:21[Music]
- 5:25now we'll be looking at the cold part
- 5:30[Music]
- 5:36in the code we are first including all
- 5:39the header files that we require at the
- 5:42top
- 5:44[Music]
- 5:47we are also defining the SSID and
- 5:51password of our Wi-Fi network and the
- 5:54pin 23 which is connected to the signal
- 5:57pin of the sensor the channel ID and
- 6:03right API key are two other parameters
- 6:06which are important in this application
- 6:09we will discuss where to find these two
- 6:12parameters in the later section the
- 6:15setup function is pretty straightforward
- 6:17in which we initialize a serial
- 6:20connection between our laptop and the
- 6:23ESP board we also start Wi-Fi on the ESP
- 6:29board and initialized the thin speak
- 6:31section in the loop function we try to
- 6:35connect the ESP board to our Wi-Fi
- 6:38network using the SSID and password
- 6:40credentials provided we also try to
- 6:45receive the temperature sensor values
- 6:48continuously and publish them to think
- 6:51speak at an interval of two seconds now
- 6:53let's go ahead and approve the program
- 6:56into the ESP
- 6:57[Music]
- 7:09[Music]
- 7:13to find the channel ID and write API
- 7:16keys click on the channel that you
- 7:19recently created on top you can find the
- 7:22channel ID and in the API key section
- 7:25you can find the right API key
- 7:35as you can see I am continuously writing
- 7:38the temperature sensor value on the
- 7:42serial monitor and every time I press
- 7:45hard on the sensor the temperature gets
- 7:47warmer and the sensor readings go up if
- 8:01you open the graph on the things peak
- 8:03channel that you have created you can
- 8:05see that the temperature gets updated
- 8:08there periodically in this example we
- 8:11are dipping the temperature sensor probe
- 8:13into hot water and you can see the jump
- 8:16in temperature readings
- 8:21[Music]
- 8:27in this tutorial we will also be
- 8:30learning about pocket IOD which is an
- 8:33android application with the help of
- 8:36pocket iot we can remotely monitor the
- 8:40temperature readings have been stored in
- 8:43cloud it's installation is pretty
- 8:47straightforward head over to Play Store
- 8:49and install the pocket IOT app once
- 8:53installed enter the channel credentials
- 8:56and you're done
- 8:59well guys that was all about the ds1 8b
- 9:032:01 by a temperature sensor and
- 9:07uploading its temperature readings to
- 9:10the cloud using things peak we also saw
- 9:14how using an android phone we can
- 9:18monitor these temperature readings using
- 9:20the pocket iot app for further
- 9:24documentation please visit our blog link
- 9:27is in the description thank you for
- 9:29watching and stay tuned
- 9:40[Music]
About this transcript
This page contains the full transcript of DS18B20 Temperature Sensor with ESP32: Wiring & Basic Code Tutorial by Robocraze, generated from the public captions YouTube serves with the video. The transcript has 1,028 words across 162 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.