Professional Documents
Culture Documents
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
(Internet of Things)
Submitted by
RAVURI.TEJASRI 22BQ1A4940
Nambur (V), Pedakakani (M), Guntur (Dt.), Andhra Pradesh – 522 508
CERTIFICATE
The results embodied in this project have not been submitted to any other
university or institute for the award of any degree or diploma.
DECLARATION
CONTENTS
Page No
LIST OF TABLES viii
LIST OF FIGURES viii
CHAPTER-1: INTRODUCTION
1.1 OVERVIEW 01
1.2 LITERATURE REVIEW 01
1.3 OBJECTIVES 02
1.4 APPLICATIONS 02
CHAPTER-2: PROJECT DESCRIPTION
2.1 INTRODUCTION ABOUT DS18B20 TEMPERATURE SENSOR 03
2.2 COMPONENTS USED 03
2.3 CIRCUIT DIAGRAM 07
2.3.1CONNECTIONS 07
CHAPTER-3: ARDUINO PROGRAM
3.1 INSTALLING LIBRARY FOR DS18B20 08
3.2 CODE EXPLANATION 08
3.3 ARDUINO UNO PROGRAM 09
CHAPTER-4: RESULTS AND DEMONSTRATION
4.1 OUTPUT 11
4.2 COMPARATIVE 13
4.3 SUMMARY OF THE PROJECT 13
REFERENCES 14
LIST OF TABLES
Table. No Description Page No
1.1 COMPONENTS REQUIRED 03
2.1.1 SPECIFICATOINS IN DS18B20 04
LIST OF FIGURES
Fig. No Description Page No
2.2.1 DS18B20 TEMPERATURE SENSOR 05
2.2.2 ARDUINO UNO 06
2.2.3 BREADBOARD 07
2.2.4 RESISTOR 07
2.2.5 JUMPER WIRES 08
2.3.1 CIRCUIT DIAGRAM 09
4.1 ARDUINO UNO SERIAL MONITOR CONSOLE 11
4.1.1 RESULTANT OUTPUT 12
4.1.2 TOP OF THE PROTOTYPE 12
CHAPTER-1
INTRODUCTION
1.1 OVERVIEW
In this project , measure human body temperature second to second. This is a
simple example. For a more precise and medical-grade body temperature measurement, we
need a more accurate sensor and may need to follow specific regulations and calibration
process. Ensure that have the necessary libraries installed in our Arduino IDE for this code
to work.
In this project, we will learn how to design Digital Thermometer Using Arduino &
DS18B20 Temperature Sensor. Simply we will interface Arduino with DS18B20 Digital
Waterproof Temperature Sensor and display the temperature values in degree Celsius.
A usable health-monitoring system is required for prolonged monitoring of the
patient with reduced cost. This paper describes a working prototype system for real-time
health-monitoring system using DS18B20 temperature sensor.
1.2 LITERATURE REVIEW
Due to the successful emergence of Internet of Things, sensor-based real-time
health monitoring is getting popularized. A usable health-monitoring system is required
for prolonged monitoring of the patient with reduced cost. This paper describes a working
prototype system for real-time health-monitoring system using DS18B20 temperature
sensor, Arduino UNO with micro-controller ATmega328 where Zigbee module is used
for wireless communication. In this prototype sensor data gets acquired and analyzed to
give proper feedback to the patient with or without mobility support at indoor. The sensor
vitals are collected and sent to the computing device using shielded cable and ZigBee, i.e.,
through wired and wireless communication, respectively. Analysis of patient vitals based
on medical definitions gives patient’s real-time health condition so that if condition is not
normal, then timely preventive measures can be taken to avoid further complication. Per
user data can be saved in the system database for further reference.
By Muhammad Dawood Husain and Shaneal Naqvi, University of Manchester and
NED University of Engineering and Technology; Ozgur Atalay, Istanbul Technical
University and Harvard University; Syed Talha Ali Hamdani, University of Manchester
and National Textile University; and Richard Kennon, University of Manchester
1.3 OBJECTIVES
To measure the temperature second to second.
To develop further projects by using ds18b20 temperature sensor.
1
Development of Temperature Measurement System using DS18B20
2
Development of Temperature Measurement System using DS18B20
CHAPTER-2
PROJECT DESCRIPTION
2.1 INTRODUCTION ABOUT DS18B20 TEMPERATURE SENSOR
The DS18B20 is a digital temperature sensor manufactured by (formerly Dallas
Semiconductor). It is one of the most popular temperature sensors on the market and
provides fairly high accuracy (±0.5 °C) over a large temperature range (-55 °C to + 125
°C). Because the operating voltage of the sensor is 3.0 to 5.5 V, you can use it with both
the Arduino (which operates at 5 V), as well as with devices like the ESP32 and Raspberry
Pi which have 3.3 V GPIO pins.
The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature
measurements and has an alarm function with nonvolatile user-programmable upper and
lower trigger points. The DS18B20 communicates over a 1-Wire bus that by definition
requires only one data line (and ground) for communication with a central microprocessor.
In addition, the DS18B20 can derive power directly from the data line (“parasite power”),
eliminating the need for an external power supply. Each DS18B20 has a unique 64-bit
serial code, which allows multiple DS18B20s to function on the same 1-Wire bus. Thus, it
is simple to use one microprocessor to control many DS18B20s distributed over a large
area. Applications that can benefit from this feature include HVAC environmental
controls, temperature monitoring systems inside buildings, equipment, or machinery, and
process monitoring and control systems.
2.1.1 SPECIFICATOINS IN DS18B20
Power Supply 3V to 5.5V
Current Consumption 1Ma
Temperature Range -55 to 125°C
Accuracy ±0.5°C
Resolution 9 to 12 bit (selectable)
Conversion Time < 750ms
3
Development of Temperature Measurement System using DS18B20
5v and 3v3-They provide regulated 5 and 3.3v to power external components according to
manufacturer specifications.
The Arduino Uno has 6 analog pins, which utilize ADC (Analog to Digital converter).
These pins serve as analog inputs but can also function as digital inputs or digital outputs.
Reset Pin: Making this pin LOW, resets the microcontroller
5
Development of Temperature Measurement System using DS18B20
The 4.7k ohm (4700 ohm) resistor is one of the most common resistors in
electronics. The four band 4.7k resistor is easy to recognize with its’ distinctive pattern of
yellow, violet, and red color bands. The 5 and 6 band versions have a pattern of yellow,
violet, black, brown, followed by the tolerance band and temperature coefficient band on
the 6 band version.
6
Development of Temperature Measurement System using DS18B20
7
Development of Temperature Measurement System using DS18B20
CHAPTER-3
ARDUINO PROGRAMING
3.1 INSTALLING LIBARIARY FOR DS18B20
The 1-Wire protocol is a bit complicated, and it takes a lot of code to make it work.
DallasTemperature.h was written to abstract away this unnecessary complexity, allowing
us to issue simple commands to obtain temperature readings from the sensor.
To install the library, navigate to Sketch > Include Library > Manage
Libraries… Wait for the Library Manager to download the library index and update the
list of installed libraries.
Filter we search by entering ‘ds18b20’. There should be a couple of entries. Look
for DallasTemperature by Miles Burton. Click on that entry and then choose Install.
Dallas Temperature is a hardware-specific library that handles lower-level
functions. It must be paired with the One Wire Library in order to communicate with any
one-wire device, not just the DS18B20. Install this library as well.
3.2 CODE EXPLANATION
The sketch begins by including the OneWire.h and DallasTemperature.h libraries
and declaring the Arduino pin to which the sensor’s signal pin is connected.
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 4
To communicate with the DS18B20 sensor, we do two things. First, we create a
one-wire object and pass the sensor’s signal pin as a parameter. Second, we create a
DallasTemperature library object and pass the reference of the one-wire object (that we just
created) as a parameter.
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
In the setup section, we establish serial communication with the PC and call the
begin() function. The begin() function scans the bus for connected DS18B20 sensors and
sets the bit resolution (12 bits) for each one.
void setup(void) {
sensors.begin(); // Start up the library
Serial.begin(9600);
}
8
Development of Temperature Measurement System using DS18B20
In the loop section, we call the request Temperatures() function, which instructs all
sensors on the bus to perform a temperature conversion.
Then we call the getTempCByIndex(deviceIndex) function, where deviceIndex is
the location of the sensor on the bus. This function reads the temperature reading from the
corresponding sensor and returns it.
If you only have one DS18B20 on the bus, set deviceIndex to 0.
void loop(void) {
sensors.requestTemperatures();
Serial.print("Celsius temperature: ");
Serial.print(sensors.getTempCByIndex(0));
Serial.print(- Fahrenheit temperature:);
Serial.print((sensors.getTempCByIndex(0) );
delay(1000);
}
9
Development of Temperature Measurement System using DS18B20
sensors.requestTemperatures();
Serial.print("Celsius temperature: ");
// Why "byIndex"? You can have more than one IC on the same bus. 0 refers to the first
IC on the wire
Serial.print(sensors.getTempCByIndex(0));
Serial.print(" - Fahrenheit temperature: ");
Serial.println(sensors.getTempFByIndex(0));
delay(1000);
}
10
Development of Temperature Measurement System using DS18B20
CHAPTER-4
RESULTS AND DEMONSTRATION
4.1 OUTPUT
The output of the developed prototype model can be verified on the serial monitor
of the Arduino IDE. The fig shown in Fig.4.1, displays the temperature measured by the
sensor in both degC and F. The continuous monitoring of the temperature values for all
time instants is displayed.
11
Development of Temperature Measurement System using DS18B20
In the 4.1.1, figure to develop front of the prototype and display resultant output.
12
Development of Temperature Measurement System using DS18B20
13
Development of Temperature Measurement System using DS18B20
REFERENCES
Online resources followed
https://moz.com/domain-analysis/www.google.com
Tinkercad
Project hub
Arduino project hub
Tutorials point
Makerguides
W3Schools
https://moz.com/domain-analysis/youtube.com
https://youtu.be/Y1__vmkr8-g?si=PvNHTholvqYQx2bL
https://youtu.be/Y1__vmkr8-g?si=V2gLU-jaDCgHsoHA
https://youtu.be/hIkUQZuaTE4?si=QhLnxhy-q5gh3VC4
https://youtu.be/0HL-ugIC5eQ?si=HSi6oBx9z-KL2S6n
https://youtu.be/SHOO7wIRVCs?si=OkzeN0FO_wfhpx3w
https://youtu.be/bbLbbWi55pI?si=clDTTVWavVPgJ-E9
References
[1].Zhou Y, Sun C. DS18B20 Hardware connection and software programming. Doctoral
dissertation, 2001.
[2].Deshmukh AD, Shinde UB. A low cost environment monitoring system using
raspberry Pi and arduino with Zigbee. In: 2016 International Conference on Inventive
Computation Technologies (ICICT) (Vol. 3). IEEE, pp. 1–6, 2016.
[3].Arduino SA. Arduino. Arduino LLC, 2015.
[4]. Ipswich D. Setting up a WAMP server on your windows desktop. Technology Now at
Smashwords, 2011.
[5].Kommey B, Kotey SD, Opoku D. Patient medical emergency alert system 2018.
14