Final Year Project Report
Final Year Project Report
A project report submitted to the Department of Electrical and Electronic Engineering in partial
fulfillment of the requirements for the award of the degree of Bachelor of Science in Biomedical
Engineering.
Jul, 2018
Declaration
This project report is my original work, to the best of my knowledge it has never been submitted
to Kenyatta University or any other institution for the award of degree or diploma
SUPERVISOR CONFIRMATION:
This project report has been submitted to the Department of Electrical and Electronic
ii
Abstract
Premature or ill Infants may seem complex that their mothers may not be able to tell when
they have fever, which is usually a sign that their bodies are waging war against infections. In a
developing country like Kenya, continuous monitoring of an infant can only be done in an
incubator. It costs up to KSH 1, 500 per day to incubate a baby in Kenya [1]. Moreover, it is only
in some few specific hospitals that these incubators are found since incubators are expensive to
purchase. Most of the infant temperature monitoring devices found today in hospital, an example
an incubator, is heavy and non-portable hence a baby has to be in hospital in the incubator for the
temperature monitoring. Incubator is still not fully automated for real time monitoring of its
Temperature monitoring using mercury thermometers requires a user to manually measure the
parameter every time hence it is laborious and tiresome. Leaving the mercury thermometer at
any point on the child's body to measure temperature is also inconvenience since it will not alarm
Infant Contact Thermometer is a system equipped to monitor the newborn’s body temperature
serving as a perfect means for exposure of possibly fatal infections causing diseases hence is a
very useful product for quick medical attention. The main objective of this project was to design
a low power system that at all times monitors the body temperature of the newborn and alerts the
user during fever attack by means of LEDs lights and buzzer sounds. This has resulted in a low
cost effective system. This device collects the data from the temperature sensor in contact with
the wrist of the baby, codes the data into a format that can be understood by the controlling
section of the system and display the body temperature readings on the LCD.
iii
Table of Contents
Declaration......................................................................................................................................ii
Abstract..........................................................................................................................................iii
Acronyms.....................................................................................................................................viii
List of Figures.................................................................................................................................ix
List of tables....................................................................................................................................x
1.2 OBJECJECTIVES.................................................................................................................2
Main objective..........................................................................................................................2
Specific objectives....................................................................................................................3
1.3 JUSTIFICATION...................................................................................................................3
2.1 Overview................................................................................................................................4
Analysis of LM35.....................................................................................................................5
iv
CHAPTER 3: REQUIREMENT ANALYSIS.................................................................................9
WHY ARDUINO...................................................................................................................10
3.4 LED......................................................................................................................................12
3.5 Buzzer..................................................................................................................................13
CHAPTER 4: METHODOLOGY.................................................................................................14
4.1 Introduction..........................................................................................................................14
CHAPTER 6: IMPLEMENTATION............................................................................................18
6.2.1 Flowchart.......................................................................................................................21
v
CHAPTER 7: SYSTEM TESTING...............................................................................................26
7.3.1 Inputs.............................................................................................................................27
CHAPTER 8: RESULTS...............................................................................................................29
CHAPTER 9: CONCLUSION......................................................................................................33
9.1 Advantages......................................................................................................................33
9.2 Disadvantages.................................................................................................................33
REFERENCES..............................................................................................................................35
APPENDIX....................................................................................................................................36
Appendix A: Code.....................................................................................................................36
Appendix B: Budget...................................................................................................................40
vi
Appendix E: Picture of Project Prototype Working Within Set Temperature Values...............43
vii
Acronyms
ECG : Electrocardiography
PC : Personal Computer
viii
List of Figures
ix
List of tables
x
CHAPTER ONE: INTRODUCTION
very expensive since it is provided only in some hospitals and in specific clinics under
incubators. Due to the fact that the existing devices are neither fully automated nor portable, this
new device has solved this problem. The newborn and parentsare notrestricted by the area of the
device and thus their daily life is not be affected or changed. Thus this device is important and
critical. This is an efficient way of home infant management system wherein a parent is pre-
warned of fever conditions of the infant which could be an indication of an infection causing
disease. This monitoring system is also an alternative for monitoring temperature by kissing or
touching on the baby's forehead hence reducing the risks of late treatment of infections causing
diseases.
The design and implementation provides portability, flexibility and low power
consuming system hence less costly. It is the most reliable and cost effective to use and
Infant’s temperature abnormalities causes the activation of the buzzer and LEDs. To do
this, LEDs, Buzzer, LCD and LM35 sensor were interfaced with the microcontroller. The
analogue quantities of Temperature are taken from the wrist of the baby using a temperature
sensor and converted into corresponding digital values using an Arduino inbuilt single channel
ADC. This converted digital value is sent to the microcontroller for temporary storage. The
parent views the readings of the infant temperature on the LCD at any time.
1
Proteus Simulator was used to design and simulate electronic circuit. Arduino Software (IDE)
compiler was used to edit, test, simulate and dump the code into the microprocessor. The
performance was verified both in software simulator and hardware design. The total circuit was
As we know
i. Existing systems require someone to watch the baby at all times. This is very expensive
and takes a lot of manpower which are valuable resources that can be used elsewhere.
This system solves this problem of having someone to watch the baby at all times since it
is real time.
ii. The current systems for this monitoring are prohibitively expensive since they are found
iii. Systems used in hospitals are also complex that only certain people can understand them.
The new system provides an easy to use user interface with easy to understand the
readings.
1.2 OBJECJECTIVES
Main objective
To develop a cheap prototype of a system that was to monitor the infant body temperature in
2
Specific objectives
body temperature signal and then convert the temperature analogue signal into binary
information using the Arduino inbuilt ADC for processing using the Arduino micro
controller.
ii. To compute the temperature signal then display the readings on the LCD.
iii. To design an automatic temperature alarm system using LEDs and Buzzer to indicate
1.3 JUSTIFICATION
This project is made of cheap materials. A complete system that measures temperature is so far
expensive. This system is fully automated and does not require any human control.
Automatic alert system enabled by Arduino gives intimacy to the user. The system determines
the temperature readings of the baby and displays it on the LCD. If there are abnormalities in the
readings, the system alerts through LEDs indications and buzzer sounds for an immediate
attention. It is also cost effective due to low power consumption and portability. It is easy to
handle and efficient. It is not as complex as the current systems since it provide an easy to
3
CHAPTER 2: LITERATURE REVIEW
2.1 Overview
Not so much has been done in this field. Among the researches and proposals in this area include
the following.
Purnima, PuneetSingh [2], uses both Zigbee and GSM to transmit the data obtained from a
patient. GSM is used for purpose of mobile phones while zigbee is for PCs where the transmitted
Shrenik Suresh Sarade [3] proposed a project having a simple, microcontroller based heart beat
rate & body temperature measuring device with display the information on LCD display. The
device alarms when the heart beat & the body temperature exceed the provided threshold value.
microcontroller. The threshold value is as 20 to 120 pulses per minute for heart beat indication &
4
Wan Seribahiyah [4] does a project where he uses Zigbee, Arduino Uno, and ECG circuit and
temperature sensor. He uses Lab View to process the signals. The problem is complex and
expensive.
This information transmitted wirelessly to the doctor which is not in the vicinity of the patient
through GSM technique. The problem with the use of infrared Device is that the LED light must
Analysis of LM35
Source: circuitwiring.com
The circuit diagram is shown above. There are two transistors in the centre of this circuit. One
has ten times the emitter area of the other. This means it has one tenth of the current density,
since the same current is going through both transistors. This causes a voltage across the resistor
5
R1 that is proportional to the absolute temperature, and is almost linear across the range we care
about. A special circuit straightens out the slightly curved graph of voltage versus temperature.
The amplifier at the top ensures that the voltage at the base of the left transistor (Q1) is
proportional to absolute temperature (PTAT) by comparing the output of the two transistors.
The amplifier at the right converts absolute temperature (measured in Kelvin) into Celsius. The
The two resistors are calibrated in the factory to produce a highly accurate temperature sensor.
The integrated circuit has many transistors in it -- two in the middle, some in each amplifier,
some in the constant current source, and some in the curvature compensation circuit. All of that
Many existing system for temperature monitoring and controlling generally uses micro-controller
ATMEL 89C51 (μc 8051). It does the same job by using additional devices. The
microcontroller-controlled system contains essentially four parts, i.e., the process, the analog to
digital converter, the control algorithm, and the clock. The times when the measured signals are
converted to digital form are called the sampling instants; the time between successive samplings
is called the sampling period and is denoted by h. The output from the process is a continuous
time signal. The output is converted into digital form by the A – D converter. The conversion is
6
2.3 Problem Associated With Existing System
Many existing system for temperature monitoring and controlling generally uses micro-controller
ATMEL 89C51 (μc 8051). Due to using micro controller 8051 the process of making whole
device becomes not only very complex but also difficult and tedious. For operation it requires A-
Existing system uses ATMEL 89C51 has many disadvantages as seen above in the section 2.3
above; to overcome these problems I used another advanced microcontroller called Arduino
Mega (ATmega2560). It has in built with many components like analog to digital converter,
7
In this system I used temperature sensor LM35 to detect temperature into appropriate voltage.
This voltage is given to Arduino. According to program, it process the analog signal into digital
16x2 LCD is used to display the output temperature of LM35 in degree centigrade units.
At the same time it also sends the data to LEDs and Buzzer, if the temperature becomes higher
from set point Buzzer and Red LED become activate while the other LEDs are deactivated. If the
temperature becomes lower from set point Buzzer and Green LED become activate while the
other LEDs are deactivated. If the temperature is within the set points Blue LED become activate
while the other LEDs and Buzzer are deactivated. In this manner it monitors and controls the
8
Fig 2.2 Block Diagram of the system
9
CHAPTER 3: REQUIREMENT ANALYSIS
The LM35 series are precision integrated-circuit temperature devices with an output voltage
linearly-proportional to the Centigrade temperature. The LM35 device has an advantage over
linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large
constant voltage from the output to obtain convenient Centigrade scaling. The LM35 device does
not require any external calibration or trimming to provide typical accuracies of ±¼°C at room
temperature and ±¾°C over a full −55°C to 150°C temperature range. Lower cost is assured by
trimming and calibration at the wafer level. The low-output impedance, linear output and precise
inherent calibration of the LM35 device makes interfacing to readout or control circuitry
especially easy. The device is used with single power supplies, or with plus and minus supplies.
As the LM35 device draws only 60 µA from the supply, it has very low self-heating of less than
0.1°C in still air. The LM35 device is rated to operate over a −55°C to 150°C temperature range,
while the LM35C device is rated for a −40°C to 110°C range (−10° with improved accuracy).
The LM35-series devices are available packaged in hermetic TO transistor packages, while the
LM35C, LM35CA, and LM35D devices are available in the plastic TO-92 transistor package.
The LM35D device is available in an 8-lead surface-mount small-outline package and a plastic
TO-220 package.
10
Fig 3.1 LM35
Source: http://www.ti.com/product/LM35
The Mega is a microcontroller board based on the ATmega2560. It has 54 digital input/output
pins (of which 14 can be used as PWM outputs), 16 analog inputs, a 16 MHz quartz crystal
oscillator, a USB connection, a power jack, an ICSP header and a reset button. It contains
everything needed to support the microcontroller. It is simply connected to the computer using a
USB cable or powered with an AC-to-DC adapter or battery to get it started. Never fear for
accidental electric discharge, either since the Mega also includes a plastic base plate to protect it.
The Mega 2560 R3 also adds SDA and SCL pins next to the AREF. In addition, there are two
pins placed near the RESET pin. One is the IOREF that allow the shield to adapt to the voltage
provided from the board. The other is not connected and is reserved for future purposes. The
Mega 2560 R3 works with all existing shield but can help adapt to new shields which use these
additional pins.
WHY ARDUINO
Cheap - Arduino boards are inexpensive when compared to other microcontroller platforms.
11
Cross-platform - The Arduino Software runs on Windows, Macintosh OSX, and Linux
Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for
beginners, yet flexible enough for advanced users to take advantage of as well.
Open source and extensible software - The Arduino software is published as open source tools,
available for extension by experienced programmers. The language can be expanded through C+
+ libraries.
Open source and extensible hardware - The plans of the Arduino boards are published under a
Creative Commons license, so experienced circuit designers can make their own version of the
module, extending it and improving it. Even relatively inexperienced users can build the
breadboard version of the module in order to understand how it works and save money.
Microcontroller ATmega2560
Operating Voltage 5V
12
Analog Input Pins 16
SRAM 8 KB (ATmega2560)
EEPROM 4 KB (ATmega2560)
Length 101.52mm
Width 53.3 mm
Weight 37 g
The ATmega2560 on the Mega comes preprogrammed with a boot loader that allows one to
upload new code to it without the use of an external hardware programmer. The Mega can be
13
Fig 3.2 LCD display
Source: https://www.arduino.cc/en/Tutorial/HelloWorld
3.4 LED
diode that emits light when activated. When a suitable voltage is applied to the leads, electrons
are able to recombine with electron holes within the device, releasing energy in the form of
photons. This effect is called electroluminescence, and the color of the light (corresponding to
the energy of the photon) is determined by the energy band gap of the semiconductor. LEDs are
typically small (less than 1 mm2) and integrated optical components may be used to shape the
radiation pattern.
14
Fig 3.3 LED
Source: https://en.wikipedia.org
3.5 Buzzer
15
CHAPTER 4: METHODOLOGY
4.1 Introduction
This chapter describes the method which will be used to implement this project. This project is
divided into two main parts which are hardware design and software design. For the hardware
design, it is focus on the main controller hardware, Arduino Mega board which connects to the
temperature sensor (LM 35). Meanwhile, for the software design, Arduino and Proteus are used.
Arduino Mega board is the main function system in this project because it reads and interprets
the data from the heart rate and the temperature sensor outputs. Arduino software is downloaded
directly through the internet from the Arduino main page in order to build a specific
programmed. Arduino needs a USB cable to power up the board in 5V. Excess power will cause
Body temperature circuit is to measure the body temperature of patient. The normal temperature
for human is 37.0 degree Celsius. Temperature sensor contains three pins that are connected
directly to the Arduino Mega board. They are 5V, GND and analog output pins. Other common
16
sensors used for temperature measuring are thermistors, thermocouples and resistance
thermometers but LM35 is used because it can measure temperature more accurately than the
others and generates a higher output voltage than thermocouples. LM35 sensor may not require
that the output voltage be amplified. The LM35 is an integrated circuit sensor. Its electrical
Proteus Simulator is used to design and simulate electronic circuit. Arduino Software (IDE)
compiler is used to edit, test, simulate and dump the code into the microprocessor.
17
18
CHAPTER 5: DESIGN AND PLANNING
In this section, I designed the structure of the system before implementation of circuit. I used
advanced microcontroller called Arduino Mega(2560). It has in built with many components like
In this system I used temperature sensor IC LM35, to use to convert temperature into appropriate
voltage. This voltage is given to Arduino. According to program it processes the analog signal
into digital and forms a particular voltage level for a particular temperature. 16x2 LCD is used to
display the output in degree centigrade units. At the same time it also sends the data to LEDs and
buzzer, if the temperature becomes higher or lower from set point the Buzzer becomes activated
and it alarms and at the same time the LEDs Red lights for higher temperatures and Green for
19
5.2 FLOW CHART OF THE SYSTEM
20
CHAPTER 6: IMPLEMENTATION
In this section, I designed my project temperature monitoring and controlling system. I used
temperature sensor IC LM35. LM35 generates a small voltage corresponds to the temperature
This voltage is fed to the controller unit. Here I use Arduino Mega (2560) as a controller. This
voltage is given to the Analog port 0 (A0) of the Arduino Mega. Arduino
Mega reads analog input and converts this analog voltage into digital bits form using inbuilt A to
D converter. It converts analog voltage level in any number between 0 to 1023. It uses 10 bits for
processing. This is given to the microcontroller, it multiplies the digital data with coefficient
0.488 and converts this voltage in particular value. This value is nothing but the temperature in
degree centigrade. This data is sent out to digital ports (8, 9, 10, and 13). Consequently, Arduino
21
A 16X2 LCD is connected with microcontroller as shown in circuit diagram (fig.6.1). Pin 1 is
connected to ground and pin 2 is connected to VCC through Arduino for activating or switching
ON the LCD. On pin 3 a 10k ohms for adjusting the brightness of LCD screen. RS and Enable
pin is connected to pin 12 and 11 respectively for communication with Arduino. LCD displays
temperature in both units degree Celsius. At the same time Arduino sends control bit 0 or 1 on
the digital ports 8,9,10 and 13. This bit is used for controlling part. For bit 0 Arduino sends 0V
and for bit 1 it sends 5V at the output. LED is connected to digital port 8. If the temperature is
less than desired or set temperature Arduino gives logic high level to the pin 8 and 10. But when
current temperature goes just or more above the set level it sends logic high level to the digital
pin 10 and 13. If the temperature value is within the set values Arduino sends logic high level to
According to the logic level of digital pin 8, 10 and 13 LED and Buzzer circuit gets input hence
switching them ON/OFF. Once, temperature goes below or above the set point, Buzzer and
LEDs are activated. Thus temperature of the infant gets monitored and controlled by this project.
22
Fig. 6.1 Circuit Diagram
For software implementation, software Arduino IDE was used. This software enables us to load
Proteus Simulator was used to design and simulate electronic circuit. Arduino Software (IDE)
compiler was used to edit, test, simulate and dump the code into the microprocessor.
23
6.2.1 Flowchart
24
6.2.2 Source Code
#include <LiquidCrystal.h>
// declare variables
void setup()
lcd.begin(16, 2);
pinMode(13, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
25
// Print a message to the LCD.
lcd.print("Infant Temp!");
delay (2000);
void loop() {
lcd.setCursor(0, 1);
lcd.print("Temp:");
lcd.setCursor(6, 1);
lcd.print(Celsius);
lcd.setCursor(12, 1);
26
// set the cursor to column 12, line 1
lcd.print("C");
delay(200);
lcd.clear ();
lcd.print("Low Temp!");
lcd.clear ();
27
digitalWrite (13, LOW);
lcd.print("Normal Temp!");
else
lcd.clear ();
digitalWrite(13, LOW);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
lcd.print("High Temp!");
28
CHAPTER 7: SYSTEM TESTING
The project “Infant Contact Thermometer” is made as explained in the above chapters. It is
necessary to check that the system is working properly or not. It can be tested in two methods.
The system should display the current temperature and if it goes above or below set point it
alarm to notify the mother or the nurse of the abnormalities. It should operate properly in the
given operating range. If the system does not work properly then it is necessary to troubleshoot
For testing the project two parts are made. First part is used to check the program, in this step I
checked if the program was working properly or not. I did this by using Arduino IDE.
Second part was used to check hardware component like LCD and Buzzer.
After building the whole circuit I tested it, testing procedure is given in section 7.3.3.
29
d) Buzzer should be ON below or above set points and it should be OFF when it is within
e) System should be stable and work proper in the given range of temperature.
For testing of the project I required some tools, like to test Arduino program I required software
called Arduino IDE, using this I could check whether the program was working properly or not.
For hardware checking I required power supply and proper range of temperature. Testing
environment for project was an important criterion as the project was based on the baby body
temperature. The infant temperature was to be in the range of 36.5 to 37.5 degrees Celsius. While
In this section I discussed about the inputs, expected output, and the testing procedure.
7.3.1 Inputs
a) Power supply :-
30
Power supply is the basic need of any electronic circuit. Here I used 5v dc battery to give power
Arduino and sometimes I could give the power directly from the computer or mobile phone
using.
b) Temperature :-
As we know that the project is mainly based on the temperature. It uses body temperature as
After building the whole circuit we test it, testing procedure is given in section 7.3.3.
This project should give some desired outputs. Expected outputs are as follows:-
31
7.3.3 Testing Procedure
For testing, the circuit was connected as shown in fig. 6.1, the power supply was given to the
Arduino using computer. In this way the whole testing circuit is built. Now I gave the inputs to
Change in temperature was shown on the 16x2 LCD screen. System worked according to
32
CHAPTER 8: RESULTS
As project names Infant Contact Thermometer, the project gives five outputs. One is displaying
temperature on LCD screen, second is turning ON and OFF the Buzzer, and the rest turning ON
a) When temperature was below the set point (i.e. 36.5 degree Celsius) the Buzzer and the
Green LED are ON. Consequently, other LEDs were turned OFF.
33
Fig 8.1 Temperature below set point
b) When temperature was within set points (i.e. 36.5<Temp<37.5) the Blue LED was ON.
34
c) When temperature was above the set point (i.e.37.5 degree Celsius) the Buzzer and the Red
35
Table 8.1 Results
Buzzer OFF
Below 36.5 Low Blue LED FF
Green LED ON
Buzzer ON
Above 37.5 High Blue LED OFF
Red LED ON
Buzzer ON
36
CHAPTER 9: CONCLUSION
Infant Contact Thermometer is an excellent choice for blooming babies in developing courtiers
like Kenya because it is cost effective due to low power consumption. It is of greater efficiency
since it provides a friendly user interface that is easy to read the temperature readings and
understand. The system also act as a watch dog in case of high or low temperature it alarms
Arduino board. Output was verified by setting the temperature at different levels and it was
found that the LEDs and Buzzer turn on and off when the device crosses the set value. There is
still much room for future development that would enhance the system and increase its business
value.
9.1 Advantages
This project is used in Hospital as well as in Home, in and out of the Incubator.
To monitor the baby that is not comfortable, or not possible for humans to monitor,
37
9.2 Disadvantages
Comparatively it is costly.
1. Pressure
2. Humidity
3. Heart Beat
Use of wireless (GSM Technology) to transmit the output of the system to the user’s mobile
phone.
38
REFERENCES
[1] https://www.standardmedia.co.ke/business/article/1144007581/hospitals-face-acute-shortage-
of-incubators
[2] Purnima, PuneetSingh “Zigbee and GSM Based Patient Health Monitoring System” 2014
[3] Shrenik Suresh Sarade et. al “ patient monitoring and alerting system by using gsm”
[4] Wan Seri BahiyahBinti w SudinPatient monitoring system using wireless sensor network
39
APPENDIX
Appendix A: Code
#include <LiquidCrystal.h>
// declare variables
void setup()
40
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
pinMode(13, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
lcd.print("Infant Temp!");
delay (2000);
void loop() {
41
Celsius = (sensorValue * 5000 / 1024) / 10;
lcd.setCursor(0, 1);
lcd.print("Temp:");
lcd.setCursor(6, 1);
lcd.print(Celsius);
lcd.setCursor(12, 1);
lcd.print("C");
delay(200);
lcd.clear ();
42
digitalWrite (10, HIGH);
lcd.print("Low Temp!");
lcd.clear ();
lcd.print("Normal Temp!");
else
43
{
lcd.clear ();
digitalWrite(13, LOW);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
lcd.print("High Temp!");
Appendix B: Budget
(ATmega2560 R3)
16×2 LCD Module for 1 Ksh250
Arduino
Temperature sensor(LM35) 1
Ksh150
Piezo Buzzer 1
Ksh25
Breadboard 2 Ksh 300
Jumper Wires 65 pcs Ksh 100
(male to male)
44
L.E.Ds Ksh 15
3
Resistors: 220 Ω Ksh 100
PROJECT SCHEDULE
SEMESTER 1 SEMESTER 2
Project
Project Proposal
Background Research
Proposal Preparation
Final Proposal
presentation
Implementation
Design
Selection and ordering
components
Coding
Simulation and
Hardware
implementation
45
Write up
Submit Project
Presentation
46
47
Appendix E: Picture of Project Prototype Working Within Set Temperature Values
48
Appendix F: Picture of Project Prototype Working Below Set Temperature Values
49
Appendix G: Picture of Project Prototype Working Above Set Temperature Values
50
51