You are on page 1of 58

ALNEELAIN UNIVERCITY FACULTY OF

ELECTRONIC ENGINEERING M.SC. OF


EMBEDDED SYSTEMS

Design and Implementation of an Infant Monitoring


and Control System

Thesis submitted in partial fulfillment of requirement for


M.Sc. degree in embedded systems

By:
Asmaa Gasiem Elseed Balla Ibrahem

Supervisor:

Prof. Sharief Fadul Babikir


December 2020
‫‪:‬‬ ‫قال تعالي‬

‫ض َمثَ ُل نُوِرِه َك ِم ْش َك ٍاة فِ َيها‬ ‫ات َواأل َْر ِ‬ ‫اَّلل نُور ال هسماو ِ‬
‫" هُ ُ َ َ‬
‫ب ُد ِر ٌّ‬
‫ي‬ ‫ك‬‫َ‬‫و‬ ‫ك‬
‫َ‬ ‫ا‬‫َ‬ ‫ه‬
‫َّن‬‫أ‬ ‫ك‬
‫َ‬ ‫ة‬
‫ُ‬ ‫ج‬ ‫ا‬‫ج‬ ‫الز‬ ‫ِمصباح الْ ِمصباح ِِف زجاج ٍ‬
‫ة‬
‫ْ ٌ‬ ‫َْ ٌ َْ ُ ُ َ َ َ َ‬
‫ٍ‬ ‫ٍِ‬ ‫ٍ‬ ‫ٍ‬ ‫ِ‬
‫يُوقَ ُد من َش َجَرٍة مبَ َارَكة َزيْتُونَة ل َش ْرقيهة َول َغ ْربِيهة يَ َك ُ‬
‫اد‬
‫ور َعلَى نُوٍر يَ ْه ِدي ُه‬
‫اَّلل‬ ‫ن‬ ‫ر‬ ‫ن‬‫َ‬ ‫ه‬ ‫س‬ ‫س‬
‫ْ َ ُ ُ َ ْ ْ َ ُْ ٌ ٌ‬‫َت‬
‫َْ‬ ‫َل‬
‫َ‬ ‫و‬ ‫ل‬
‫َ‬‫و‬ ‫يء‬ ‫َزي تُها ي ِ‬
‫ض‬
‫اَّللُ بِ ُك ِل‬
‫اس َو ه‬ ‫اَّللُ األَ ْمثَا َل لِلنه ِ‬
‫ب ه‬ ‫ِ‬
‫ر‬ ‫ض‬
‫ْ‬
‫َ َ ََ ُ‬ ‫ي‬‫و‬ ‫اء‬ ‫ش‬
‫َ‬ ‫ي‬ ‫ن‬ ‫م‬ ‫ِ‬
‫ه‬‫ر‬‫ِ‬‫و‬ ‫ن‬
‫ُ‬
‫لِ‬
‫َش ْي ٍء َعلِ ٌيم "‬

‫(سورة النور اآلية ‪(35‬‬

‫‪I‬‬
Acknowledgement

Firstly we thank “Allah”, for letting us through all the difficulties. We


have

I will keep on trusting you for .experienced your guidance day by day
my future.

We would like to send our sincere gratitude to our supervisor

Prof. Sharief Fadul Babikir

For comments that greatly improved the manuscript and for sharing his
pearls of wisdom, patience, motivations, enthusiasm and immense
knowledge, his guidance helped me in all the time of this research, I am very
grateful for your efforts.

And also special thanks for my families, friends for their encouragement and
supporting me all the time during this research.

Last but not the least; I would like to thank my parents for giving birth to me
at the first place and supporting me spiritually through this research.

II
Abstract

An incubator is an infant-stimulating system used for intensive care of the


newborn, premature or sick baby. It provides a safe and clean environment,
which has fresh air, clean and sterile ambient conditions for the babies. In
addition to these, the incubator environment provides a homogeneous and
stable temperature, a relative humidity (RH) level and oxygen gas
concentration that is needed especially for intensive care of the premature
baby.

The main aim of this project is to design an infant incubator to measure the
weight, heart rate and Temperature and humidity of baby.

In this thesis, an embedded system which is closely monitored and


controlled based on sensors was presented. The designed system comprises
beside the sensors from Arduino (microcontroller and communication unit),
monitor, and actuators such as fan, speaker and stepper motor. The system
also had an application part to communicate with users directly, it contains
of GUI unit which connected with database that recorded the environment
parameters values. This a low cost and flexible system can be empowered by
a reliable management scenario in order to measure a vical signs of the baby.

The measurement results which are the pulse rate, temperature and humidity
level, weight and sound have been sent to the PC via Arduino
microcontroller. The advantage of this system will be that in the future, it
may also enable doctors to closely monitor the infant condition and also it’s
provide a database for mothers and send them messages at the time of
feeding. This work is aimed as an example of an application that contributes
towards remote tele-health monitoring system.

The demonstrated system shows the importance of using sensors with


database in such applications of incubator. The obtained results show a good
performance and response to vical signs of the baby.

III
‫المستخلص‬

‫الحاضنة هي نظام محفز للرضع يستخدم للعناية المركزة لحديثي الوالدة أو الخدج أو المريض‪.‬‬
‫يوفر بيئة آمنة ونظيفة ‪ ،‬بهواء نقي وظروف محيطة نظيفة ومعقمة لألطفال‪ .‬باإلضافة إلى ذلك ‪،‬‬
‫توفر بيئة الحاضنة درجة حرارة متجانسة ومستقرة ‪ ،‬ومستوى رطوبة نسبية (‪ )RH‬وتركيز غاز‬
‫األكسجين الالزم بشكل خاص للعناية المركزة للطفل الخديج‪ .‬الهدف الرئيسي من هذا المشروع‬
‫هو تصميم حاضنة للرضع لقياس الوزن ومعدل ضربات القلب ودرجة الحرارة والرطوبة للطفل‪.‬‬

‫في هذه األطروحة ‪ ،‬تم تقديم نظام مدمج يتم مراقبته عن كثب والتحكم فيه بنا ًء على أجهزة‬
‫االستشعار‪ .‬يشتمل النظام المصمم على أجهزة استشعار من )‪ Arduino‬وحدة تحكم دقيقة ووحدة‬
‫ضا على‬
‫اتصال) وشاشة ومشغالت مثل المروحة ومكبر الصوت ومحرك السائر‪ ,‬يحتوي النظام أي ً‬
‫جزء تطبيق للتواصل مع المستخدمين بشكل مباشر ‪ ،‬ويحتوي على وحدة واجهة المستخدم‬
‫الرسومية المرتبطة بقاعدة البيانات التي سجلت قيم معلمات البيئة‪ .‬يمكن تمكين هذا النظام منخفض‬
‫التكلفة والمرن من خالل سيناريو إدارة موثوق به من أجل قياس العالمات الحيوية للطفل‪.‬‬

‫تم إرسال نتائج القياس وهي معدل النبض ودرجة الحرارة ومستوى الرطوبة والوزن والصوت‬
‫إلى جهاز الكمبيوتر عبر متحكم‪ Arduino.‬وتتمثل ميزة هذا النظام في أنه في المستقبل ‪ ،‬قد يم ّكن‬
‫ضا من مراقبة حالة الرضيع عن كثب ‪ ،‬كما أنه يوفر قاعدة بيانات لألمهات ويرسل لهم‬
‫األطباء أي ً‬
‫رسائل في وقت الرضاعة‪ .‬يهدف هذا العمل كمثال لتطبيق يساهم في نظام مراقبة الصحة عن بعد‬
‫عن بُعد‪ .‬يوضح النظام الموضح أهمية استخدام أجهزة االستشعار مع قاعدة البيانات في مثل هذه‬
‫التطبيقات من الحاضنة‪ .‬تظهر النتائج التي تم الحصول عليها أدا ًء جيدًا واستجابة للعالمات الحيوية‬
‫للطفل‪.‬‬

‫‪IV‬‬
Table of contents

Subject Page NO
‫اآلية‬ I
Acknowledgement II
Abstract III
‫المستخلص‬ IV
Contents V
List Of Figures VIII
List Of Abbreviations IX
Chapter One: Introduction
1
1.1 Introduction
2
1.2 Problem Statement
3
1.3 Aims and Objectives
3
1.4 Methodology
3
1.5 Project Outline
Chapter Two: Theoretical overview and related works
4
2.1 Introduction
2.1.1 Premature Infants 5

2.1.2 Thermal Protection in New Born 6

2.1.3 Remote monitoring of a premature infants 8

incubator
8
2.2 Related Works
2.3 Design parameters 10

2.3.1 Simulation 11

2.3.1.1 Arduino IDE 11

2.3.1.2 Proteus 11

V
2.3.2 Application tools 12

2.3.2.1 SQL server 12

2.3.2.2 Microsoft Visual studio 12

2.3.3 Hardware tools 13

2.3.3.1 Microcontroller 13

2.3.3.2Liquid Crystal Display )LCD( 14

2.3.3.3 DHT sensor 15

2.3.3.4 Potentiometer 17

2.3.3.5 Sound sensor 18

2.3.3.6 Heartbeat sensor 19

Chapter Three: Methodology


3.1 Introduction 21
3.2 System Operation Flow Chart 21

3.3 Simulation of the design 22

3.4 Hardware design 24

3.5 Application 26

Chapter Four: Results and Discussion


4.1 Introduction 27

4.2 Simulation Results 27

4.3 Hardware Results 28

4.3.1Temperature and humidity Sensor Experiment Result 28

4.3.2 Pulse Rate Sensor Experiment Result 28

4.3.3 Weight Sensor Experiment Result 29

VI
4.3.4 Sound Sensor Experiment Result 29

4.3.5 Application Experiment Result 29

4.3.5.1 The connection steps 29

Execute System Steps4.3.5.2 30

4.4 Discussion 33

Chapter Five: Conclusion and Recommendation


5.1 Conclusion 34
5.2 Recommendation 35
References 36
Appendixes 39

VII
List of Figures

Figure Title Page


.NO
2.1 System block diagram 10
2.2 Arduino kit 14
2.3 The LCD interface with Arduino 15
2.4 The DHT11Sensor 17
2.5 The Potentiometer 18
2.6 The sound sensor 19
2.7 The heartbeat sensor 20
3.1 System operation Flowchart 22
3.2 Design simulation Circuit 23
3.3 Final circuit design 25
4.1 Final Simulation Design Results 27

4.2 Software displaying the pulse rate of an 29


infant
4.3 Setting The Baud Rate and The Com Port 30

4.4 Control interface window between user 31


and system

4.5 Send Message 32

4.6 Mother Information Window 32

4.7 Incubator report window 33

VIII
List of Abbreviations

NO Abbreviations Denotation
A RPM Remote patient monitoring
B RH relative humidity
C NICU Neonatal intensive care unit
D ICN intensive care unit
E IoT internet of things
F Wi-Fi Wireless Fidelity
G I2C Inter-Integrated Circuit
H IDE Integrated Development Environment
I GUI Graphic User Interface
J LCD Liquid Crystal Display
K IASCI American Standard Code For
Information Interchange

L bpm beats per minute


M VSM Value Stream Mapping
N HEX Hexadecimal
O SQL Structured Query Language
P MHz Mega Hertz
Q PWM Pulse Width Modulation
R IXUSB Universal serial bus
S LCD Liquid Crystal Display
T NTC Negative Temperature Coefficient
U RDBMS Relational Database Managements
Systems

IX
Chapter One
Introduction

1.1 Introduction
Health monitoring systems become a hot topic and important
research field today. Electronic Patient Records and sensor
networks for the patient monitoring are at the current forefront of
new technologies. Remote patient monitoring (RPM) is a
technology which is used to monitoring of the patient from the
remote place or outside the patient’s room or conventional clinical
setup. Advantages of remote patient monitoring are:

 Increase access to care


 Monitoring many patients at a time.
 Decrease health delivery costs etc.

An incubator and warmer machine is a very useful medical device


which is used to maintain and regulate an appropriate

Environment for the newborns. To maintain and control the


temperatures and humidity level in the newborns, baby incubator
and warmer is required.

An incubator is an infant-stimulating system used for intensive care


of the newborn, premature or sick baby. It provides a safe and
clean environment, which has fresh air, clean and sterile ambient
conditions for the babies. In addition to these, the incubator
environment provides a homogeneous and stable temperature, a
relative humidity (RH) level and oxygen gas concentration that is
needed especially for intensive care of the premature baby [1]. It is
a normally in the form of a trolley with a small mattress on the top

1
covered by a rigid clear cover (usually made of plastic, fiber, or
glass).

1.2 Problem Statement


Temperature and humidity are two of the most important aspects
that need to be monitored to provide healthy environment for the
infants, for instance, hyperthermia in neonates can lead to increase
in the oxygen requirements, dehydration and apnea. According to
that, the temperature and humidity should be monitored
continuously in infants' incubator to provide suitable environment
and to maintain stable core temperature of the baby at 37 ºC.
Premature infants are usually born less than normal weight (often
less than 2.5 kg), and sometimes severe weight loss (less than 1 kg)
may by causes the baby to die, so it is necessary to follow the
changes in the child's weight by measuring his weight between the
period and another.

1.3 Aims and Objectives


The main aim of this project is to design an infant incubator, to
measure the weight, heart rate and Temperature and humidity of
baby internally for that it proposed an automated system for
monitoring and controlling this environment (temperature) and

Design a monitoring system by use an application.

1.4 Methodology
To achieve the main aims of this thesis, the methodology divided
into three parts. Firstly, simulation part to get the proper circuit that
may provide the project by the ideal circuit design with the suitable
components in order to use the in practical design. Secondly, the
hardware designs part. In this section the conclude results from the
simulation part must be designed practically and made the final
2
circuit design experimentally tests. And finally the application part,
it’s a part that connected the designed system with users (Nurses
and mothers) to monitor and extract the health reports about the
babies.

1.5 Project Outlines


This project consists of five chapters. Chapter one gives brief
introduction about the project, chapter two includes theoretical
overview and related works, chapter three is the design and
implementation of simulation, chapter four discusses the
simulation and hardware result, chapter five includes conclusion
and recommendation finally the reference and appendices.

3
Chapter Two
Theoretical Overview and Related Works

2.1 Introduction
Preterm infants are not capable of maintaining their body temperature
because they have immature thermal regulation systems. This means that
their mechanisms for heat production are under developed and they have
insufficient energy reserves. Therefore, some form of external
thermoregulatory support is vital.

The problem premature and congenitally ill infants is not a new owned.
Stephane Tarnier is generally considered to be the father of the incubator, in
the mid-nineteenth century the infant incubator was first developed based on
the incubators used for chicken eggs. The first use of incubators for the care
of premature infants was in 1722. Trainer (Parisian obstetrician) [2], since
that time the incubator industry witnessed a great development and by 1896
the basic configuration of incubator design was completed and still forms the
basis of today’s incubators. Radiant warmers however are quite new, and
have been only used for nursing ill infants with very low birth weight since
1969 [3].

A neonatal intensive care unit, usually shortened NICU and also called a
Special Care Nursery, newborn intensive care unit, intensive care nursery
(ICN), and special care baby unit, is a unit of a hospital specializing in the
care of ill or premature newborn infants.A NICU is typically directed by one
or more neonatologists and staffed by nurses, nurse practitioners,
pharmacists, physician assistants, resident physicians, and respiratory

4
therapists. Many other ancillary disciplines and specialists are available at
larger units [4].

2.1.1 Premature Infants

Premature infants are babies born prior to the normal 36 or 37 weeks of


gestation within the womb. As a result, their physiological systems are
underdeveloped making the infant vulnerable to a number of health
complications. Some common problems include jaundice caused by an
immature liver, respiratory complications caused by fragile, underdeveloped
lungs, and hypoglycemia, hypoxia and even death caused by an immature
response of the nervous system to cold stress. These inadequate
thermoregulations, wherein their physiology is not able to compensate for
the heat they lose from the body are by far the leading causes of death in
premature infants. Heat is lost via evaporative, conductive, convective and
radiated means. Premature infants lack muscle mass, which allows adults to
shiver and produce heat when necessary, as well as heat generating brown
fat, which makes up about 5% of the body weight in preterm infants. This
heat loss is enhanced by their large surface area to volume ratio (about 4
times the adult ratio). Furthermore, their immature skin allows for excessive
water loss from the body causing a considerable evaporative heat loss and a
potentially fatal imbalance of salts and acids in the infant’s system. In
evaporative heat loss, moisture from the body first diffuses across the
epidermis (general outer layer of skin). Then it evaporates off from the
skin’s surface cooling the infant. Premature infants have a thin,
underdeveloped stratum corneum, or the rough, outer layer of the epidermis
which protects the skin from external agents, that enables excess of water to

5
diffuse out. Evaporative heat losses make up a significant fraction of the
total heat loss of a premature infant [5]. The infants have to be kept in the
Intensive Care Unit, when it is suffering from the problems as given in [6].
If the delivery was very difficult, and requires the close observations. In case
of premature/preterm infant (i.e. within7), in which the baby has low birth
weight (less than 1000- 2000 grams, or it is very small in size. If it is
suffering from diseases like Jaundice, Dehydration, or Infections. If the baby
is getting recovered from any critical surgery, or the mother is having a
major disease such as diabetes.

2.1.2 Thermal Protection in New Born


Thermal protection of the newborn is the series of measures taken at birth
and in the first days of life to ensure that the newborn does not become
either cold or overheated and a normal body temperature of 36.5-37.5°C
(97.7-99.5°F). Since the consequences of an environment that is too cold or
too warm are serious, it is important to know what is the optimal. This is the
range of thermal conditions under which a new born baby can maintain
normal body temperature. The range is narrow, especially in low birth
weight or sick babies. Basically speaking, the smaller and more premature
the new born is, the less it tolerates cold and heat. Thus there is no single
environmental temperature that is appropriate for all sizes, gestational ages
and conditions of new born babies. What is appropriate for a healthy baby is
too cold for a preterm baby, and what is appropriate for the preterm baby is
too hot for the preterm infant. The newborn cannot regulate its temperature
as well as an adult. It therefore cools down or heats up much faster and is
able to tolerate only a limited range of environmental temperatures. The
smaller the new born, the greater the risk. Thermal stability improves

6
gradually as the baby increases in weight. The temperature inside the
mother's womb is 38°C (100.4°F). Leaving the warmth of the womb at birth,
the wet new born finds itself in a much colder environment and immediately
starts losing heat thus the thermal protection of newborns is very important
but not difficult. The basic principles are the same whether the baby is born
at home or in an institution. As most cooling of the newborn occurs during
the first minutes after birth, it is important to act quickly to prevent heat loss.
The new born baby loses heat in four different ways. Heat loss is mainly due
to evaporation of amniotic fluid from the baby's body. But loss of body heat
also occurs by conduction if the baby is placed naked on a cold surface (e.g.
a table, weighing scale or cold mattress); by convection if the naked new
born is exposed to cooler surrounding air; and by radiation from the baby to
cooler objects in the vicinity (e.g. a cold wall or a window) even if the baby
is not actually touching them.

Heat loss increases with air movement, and a baby risks getting cold even at
a room temperature of 30°C (86°F) if there is a draught. Most cooling of the
new born occurs during the first minutes after birth. In the first 10-20
minutes, the new born who is not thermally protected may lose enough heat
for the body temperature to fall by 2-4°C (3.6- 7.2°F), with even greater falls
in the following hours if proper care is not given. If heat loss is not
prevented and is allowed to continue, the baby will develop hypothermia, i.e.
a body temperature below normal. A hypothermic baby, especially if it is
small or sick, is at increased risk of developing health problems and of
dying. However, if heat loss is prevented, the new born will stay warm and
will have a much better chance of remaining healthy, or of surviving if it is
already sick. In trying to keep babies warm, it is important to make sure they

7
do not become overheated. The mechanisms described above may act in
reverse and cause hyperthermia, i.e. a body temperature above normal.
Although less common, hyperthermia is as dangerous as hypothermia [7].

2.1.3Remote monitoring of a premature infants incubator


In this paper, the air temperature and humidity levels in the infant' incubator
are monitored remotely by means of Arduino microcontroller with different
sensors and an open source internet of things (IoT) applications. The system
is connected to a network via a wireless fidelity (Wi-Fi) connection to be
linked to an application on the smart phone or to the computer. The system
is designed using Arduino microcontroller, DHT11/DHT22 sensor for
measuring the body parameters, such as the temperature and the humidity,
LCD monitor, ESP8266 Wi-Fi modules, and NodeMCU-v3. The results
have shown that real time updated medical records can be transferred to the
medical staff utilizing Thing Speak IoT applications. [8]

2.2 Related Works


The papers on the subject have been reviewed over the last few years in
order to know the work done by many researchers. SuswethaParisineti and
Eswaran.P in (2011) design and implementation of real time monitoring of
an infant incubator, based on sensor fault tolerant control system, using a
PIC microcontroller, purpose of a (FTCS) scheme is to ensure that faults do
not result in malfunctioning and system failure and to achieve the best
performance even with minimum number of sensors working, the (FTCS)
have ability to detect sensor fault automatically and to isolate faulty sensor
which leads to system failure.[9]A Wongkamhang et al in (2013) designed
and an infant incubator by increasing a number of an air flow slot for air-
8
inlet and air-outlet inside a double wall infant incubator, compared between
multi-airflows lot and single airflow slot in double wall infant incubator
[10].

P. Jagadeesh .et al in (2014), designed an infant incubator is used for better


temperature measurement , and to prevent hypothermia By using a servo
control system including the number of temperature sensors, PIC
microcontroller is used to read and write temperature from sensor using I2C
protocol, also make interface Programmable ADT7410 DTS to PIC18F8720
Microcontroller to monitor the infants body temperature, the result of this
work is measured temperature with accuracy, and high resolution. [11].N.S.
SALAHUDDIN.et al in (2014), designed system would stabilize the
temperature and relative humidity when the value is not in accordance with
predetermined value and immediately sends a warning message to the
destination mobile number [12].Hitu Mittal .et alin (2015( designed and
implement a closed loop control system to regulate the temperature,
humidity, light intensity and the proper amount of oxygen level inside the
incubator, Microcontroller and sensors will be used for implementing the
hardware, All this to provide a stable thermal environment inside the
incubator, provide optimum automatic control of temperature and the heater
of water reservoir according to relative humidity in the infant chamber .[13]

M.Suruthi1, S. Suma, in (2015) designed a project decreasing the cost of an


infant incubator which are using todays, also This project provides a
monitoring pressure system, using many components with microcontroller to
control all the operations, to obtain a simple project and efficient in
maintaining the temperature of the chamber irrespective of the outside
temperature and is designed at a low cost. [14]
9
2.3 Design parameters
This section of thesis speaks about the tools that used to achieve the design
and figure it out, it contents the simulation part, hardware part and also
programming the application part. The Fig 2.3 block diagram describes it.

Fig: 2.1 system block diagram

To achieve the main purpose of this project several kind of programs were
used for each part of design, software and hardware even in the application
those will describe them below.

10
2.3.1 Simulation
To write the program and make a simulation for the electrical circuit two
software applications, Arduino Integrated Development Environment (IDE)
and Proteus software were used.
2.3.1.1 Arduino IDE
The Arduino IDE is a cross-platform application written in Java, and derives
from the IDE for the Processing programming language and the Wiring
projects. It is designed to introduce programming to artists andother
newcomers unfamiliar with software development. It includes a code editor
with features such as syntax highlighting, brace matching, and automatic
indentation, and is also capable of compiling and uploading programs to the
board with a single click. A program or code written for Arduino is called a
“sketch”. Arduino programs are written in C language. The Arduino IDE
comes with a software library called “Wiring” from the original Wiring
project, which makes many common input/output operations much easier.
[15]

2.3.1.2 Proteus
Proteus software contains everything you need to develop, test and virtually
prototype your embedded system designs based around the Microchip
Technologies of microcontrollers. The unique nature of schematic based
microcontroller simulation with Proteus facilitates rapid, flexible and
parallel development of both the system hardware and the system firmware.
This design synergy allows engineers to evolve their projects more quickly,
empowering them with the flexibility to make

11
Hardware or firmware changes at will and reducing the time to market.
Proteus VSM models will fundamentally work with the exact same HEX
file, as you would program the physical device with, binary files produced
by any assembler or compiler. We will use ISIS for simulating Arduino
response, it has many variety modeling libraries, and its powerful
concentrates in microcontroller units and microprocessor units modeling.
[16]

2.3.2 Application tools


There are many programs can provide the required application. Therefore,
the proposed programs described here.

2.3.2.1 SQL server


RDBMSs have been a common choice for the storage of information in
databases used for financial records, manufacturing and logistical
information, personnel data, and other applications. [17]

2.3.2.2 Microsoft Visual studio


Microsoft Visual Studio is an integrated development environment (IDE)
from Microsoft. It can be used to develop console and graphical user
interface applications along with Windows Forms applications, web sites,
web applications, and web services in both native code together with
managed code for all platforms supported by Microsoft Windows, Windows
Phone, Windows CE, .NET Framework, .NET Compact Framework and
Microsoft Silverlight. [18]

12
2.3.3 Hardware tools
In this section of thesis, the hardware components that were used will be
described briefly and there functions.

2.3.3.1 Microcontroller
Mainly in such system (Sign Language Detection System ) based on
Microcontroller .In this system Arduino is a simple microcontroller board
and provides an environment for open source development, that will allow
you to make computers that drive both functional and creative projects alike.
This microcontroller merges the values from all the flex sensors and
provides this input data to server .The Arduino Uno is an open-source
microcontroller board based on the Microchip ATmega328P microcontroller
and developed by Arduino.cc [19].
The board is equipped with sets of digital and analog input/output (I/O) pins
that may be interfaced to various expansion boards (shields) and other
circuits. The board has 14 digital I/O pins (six capable of PWM output), 6
analog I/O pins, and is programmable with the Arduino IDE (Integrated
Development Environment), via a type B USB cable. It can be powered by
the USB cable or by an external 9-volt battery, though it accepts voltages
between 7 and 20 volts Figure 2.2 shows Arduino UNO ports

13
andcomponents.

Fig2.2Arduino kit

2.3.3.2 Liquid Crystal Display (LCD)


The LCD is now a very common choice for graphical and alphanumeric
displays .This range from small, 7-segment monochrome numerical types
such as those used in digital millimeters (typically 3 ½ digits, maximum
reading 1.999) to large, full color, high-resolution screens which can display
full video. Here we shall concentrate on the small monochrome,
alphanumeric type which displays alphabetical, numerical and symbolic
characters from the standard ASCII character set.
Out of all available LCD modules in market, the most commonly used one is
16×2 LCD Module which can display 32 ASCII characters in 2 lines (16
characters in 1 line). Other commonly used LCD displays are 20×4
Character LCD, Nokia 5110 LCD module, 128×64 Graphical LCD Display
and 2.4 inch TFT Touch screen LCD display. Figure 2.3 shows the LCD
interface with Arduino. [20].

14
Fig. 2.3The LCD interface with Arduino.

2.3.3.3 DHT sensor


The DHT11 is a commonly used Temperature and humidity sensor. The
sensor comes with a dedicated NTC to measure temperature and an 8-bit
microcontroller to output the values of temperature and humidity as serial
data. The sensor is also factory calibrated and hence easy to interface with
other microcontrollers.

15
This module includes stickiness and temperature complex with an aligned
computerized sign yield implies DHT11 sensor module is a joined module
for detecting mugginess and temperature which gives an adjusted advanced
yield signal. DHT11 gives exact estimation of moistness and temperature
and guarantees high unwavering quality and long-haul soundness. This
sensor has a resistive sort mugginess estimation segment and NTC type
temperature estimation segment with an 8-piece microcontroller inbuilt
which has a quick reaction and practical and accessible in 4-stick single line
package. DHT11 module deals with sequential correspondence for example
single wire correspondence. This module sends information in type of
heartbeat train of explicit time span. Before sending information to Arduino
it needs some introduce order with a period delay. Furthermore, the entire
procedure time is about 4ms. The single-wire sequential interface makes
framework joining speedy and simple. Its little size, low power usage and
up-to-20-meter signal transmission choosing it the best choice for various
applications, including those most mentioning ones. The segment is 4-stick
single line stick bundle. It is advantageous to interface and uncommon
bundles can be given by clients' solicitation.
DHT11 Specifications:

 Operating Voltage: 3.5V to 5.5V

 Operating current: 0.3mA (measuring) 60uA (standby)

 Output: Serial data

 Temperature Range: 0°C to 50°C

 Humidity Range: 20% to 90%

16
 Resolution: Temperature and Humidity both are 16-bit

 Accuracy: ±1°C and ±1%

The sensor can measure temperature from 0°C to 50°C and humidity from
20% to 90% with an accuracy of ±1°C and ±1%. That’s why it was a good
choice for this design. [21]

Fig 2.4the DHT11 Sensor

2.3.3.4 Potentiometer

Regarding the information for preparation of incubators, for infants less than
37 weeks gestational age and/or less than 2 kg body weight must be placed
in the incubator.

17
Potentiometer can be defined as a three-terminal resistor with a variable or
moving contact that divides a voltage into two parts in this thesis
Potentiometer used instead of weight sensor. Figure 2.5 shows the
Potentiometer.

Fig 2.5the Potentiometer

2.3.3.5 Sound sensor

The microphone sound sensor, as the name says, detects sound. It gives a
measurement of how loud a sound is, it have a built-in potentiometer to

18
adjust the sensitivity of the digital output pin. Figure 2.6 shows the sound
sensor. [22]

Fig 2.6 the sound sensor

2.3.3.6 Heartbeat sensor

Is an electronic device that is used to measure the heart rate i.e. speed of the
heartbeat. Monitoring body temperature, heart rate and blood pressure are
the basic things that we do in order to keep us healthy. In order to measure
the body temperature, we use thermometers and a sphygmomanometer to
monitor the Arterial Pressure or Blood Pressure. Heart Rate can be
monitored in two ways: one way is to manually check the pulse either at
wrists or neck and the other way is to use a Heartbeat Sensor. Pulse oximetry
is used in this project to detect the heartbeat using fingers. When the heart

19
expands (diastole) the volume of blood inside the fingertip increases and
when the heart contracts (systole) the volume of blood inside the fingertip
decreases. The resultant pulsing of blood volume inside the fingertip is
directly proportional to the heart rate and if you could somehow count the
number of pulses in one minute, that's the heart rate in beats per minute
(bpm). Figure 2.7 shows the heartbeat sensor. [23]

Fig 2.7 the heartbeat sensor

20
Chapter Three
Methodology
3.1 Introduction
The methodology had been departed into three mainly parts, the Simulation
part to expire the circuit that had been depend on in the design and be sure it
can provide us by the demanded of monitoring and controlling. The second
part is related by the hardware and design the circuit and test it
experimentally. And finally the third parts is contents the Application side
and connect it with the design and record the temperature, humidity, sound
and weight values in database. Heartbeats values displayed as a graph in the
application.

3.2 System operation flow chart

The system is clarified using the flowchart; it is illustrate comparing the set
values with the acquiring values as shown in Fig 3.1.Firstly get the values of
the incubator storage parameters from the sensor and upload these values
into database unit to comparing with acquiring values. If the temperature
greater than the acquired temperature the Arduino send signal to run the fan.
If the baby cries the Arduino send signal to run the stepper motor to swing
the incubator. If the infant’s heart pulse is normal the Arduino send signal to
run the speaker.

21
Fig 3.1 system operation Flowchart

3.3 Simulation of the design


Firstly, the simulation was made to the main circuit by using Proteus
simulator. Used DHT11 Sensor because it is the most suitable type and gives
us the values of temperature and humidity together, push button to simulate

22
sound sensor, a pulse sensor to monitor infant’s heart pulse and pressure
sensor (MPX4115) to measure the baby's weight. An Arduino UNO used to
connect these sensors and communicate between them. In addition, we have
some actuators like fan to control the temperature value around a specific
value (desired value). Also a stepper motor to swing the incubator and
speaker to alarm. These values must send as a frame to save it in a database
in order to use it in the application progress, so that I use a virtual terminal.
Finally I have a display unit to display the temperature and humidity, sound
and weight values, heartbeats values displayed as a graph. We connected all
of these parts by an Arduino kit and wrote all of the above scenarios in code.
And here the designed circuit displayed by details in Fig3.2.

Fig 3.2design simulation Circuit.

23
3.4 Hardware design
The Proposed Infant Incubator System In this work, an Arduino Uno
microcontroller was used to process the data from sensors. This work also
utilizes a unit of pulse rate sensor. It is a plug-and-play heart sensor that
can detect the pulse per minute for premature babies continuously.
The proposed incubator utilizes a humidity and temperature sensor to
detect humidity and temperature in the incubator to keep the values in
the normal range, then if the temperature moved over 30 the fan will work
to keep it in the desired range and also for humidity, also utilizes sound
sensor when the baby cries the stepper motor will work to swing the
incubator and Variable resistance is used as the weight sensor to measure
the baby's weight. The proposed incubator is also equipped with an LCD
display to show the temperature and humidity inside the incubator,
heartbeats, sound and weight for the baby’s. Furthermore, temperature,
humidity, heartbeats, sound and weight data are processed by the Arduino
and sent to the PC for continuous monitoring. Figure 3.4: shows final
circuit design .And it contains the main components:

1. ARDUINO kit
2. LCD
3. Relay
4. DHT sensor
5. FAN
6. Sound sensor
7. Heartbeats sensor
8. Potentiometer

24
9. ULN 2003 Motor Driver

10. Speaker

11. Resistors and wires.

Fig 3.3final circuit design.

25
3.5 Application

Figure 3.4 shows the user interface of the application which used to connect
with arduino to reads the data from arduino and saves it in the
database.From the Application, we can learn all the information about the
baby and extract a report explaining the health status.

The advantage of this system will be that in the future, it may also enable
doctors to closely monitor the infant condition and also it provides a
database for mothers and sends them messages at the time of feeding.

26
Chapter Four
Results and discussion

4.1 Introduction
This chapter presents and discusses the results obtained from simulation
program, Sensors (hardware design) and the application design.

4.2 Simulation Results


The following Figure illustrates the result of the simulation design
circuit; it’s obvious that the fan will be run in case of increasing
temperature values from the specific value, the stepper motor run will
be run in case of increasing of the sound values from the set required
value and heartbeats values displayed as a graph.

Fig 4.1 Final Simulation Design Results

27
4.3 Hardware Results

The monitoring and controlling part, sensing and response part based on
sensors and microcontroller can be there got different result based on
effective environment.

4.3.1Temperature and humidity Sensor Experiment Result:

DHT11 sensor is used in this project. The sensor has a fast response time
and low power consumption which is suitable for medical applications.
When the sensor is placed inside the incubator, it will detect the
temperature and humidity around it. The data is transferred to the Arduino
and then processed to be sent to a PC for further analysis. An LCD also will
show the current temperature and humidity inside the incubator. The sensor
will work to ensure that the temperatures of the incubators are always in the
range of 20% ~ 32%. If the reading exceeds the upper limit of this range, a
fan will turn ON.

4.3.2 Pulse Rate Sensor Experiment Result:

Firstly, sensing the heartbeat of a baby’s a little bit different compared to


adult. Based on the work done by Kattwinkel et al. [24], finally a pulse rate
sensor is attached on the right hand or wrist of an infant to obtain heart rate
measurement. The sensor must then be left for a minute to get a proper
reading. The sensor shows results within the range of the benchmark results
as a graph. These results demonstrate the usefulness of the chosen pulse rate
sensor for the proposed infant monitoring system. Figure 4.1shows the pulse
rate of an infant shown in real-time developed using Processing software.

28
Fig 4.2 Software displaying the pulse rate of an infant.

4.3.3 Weight Sensor Experiment Result:

It was necessary to have a sensor to measure the weight of the child from
one period to another; Variable resistance is used as the weight sensor to
measure the baby's weight.

4.3.4 Sound Sensor Experiment Result:

Each time the baby cries louder, the sensor sends a signal to move the
stepper motor to rotate the incubator to calm his.

4.3.5 Application Experiment Result:

The application starts with following steps.

4.3.5.1 The connection steps:


The first step: system beginning to adjust the baud rate (9600) and com port
are setting.

The Second step: connection established is important step to ensure the


communication between the application and the hardware.

29
The third step: start the sensors (DHT, pressure, heartbeats, sound and
weight) send values to Arduino.

The fourth step: Arduino board read the sensors values.

The fifth step: the sensors values display on the monitoring screen.

4.3.5.2 :Execute System Steps

When the designed program is executed, Main Form is displayed to perform


the following:

Setting the baud rate and the com of infant incubator that connect with the
central computer to open the connection as shown in Figure 4.3

Fig4.3 Setting The Baud Rate and The Com Port.

After the Connection established, the second interface window is control


window to interface between the hardware and database. From this window,
it would be able to deal with the stored database information and it shows
the values of temperature and humidity, pressure, heartbeats, sound and
weight.

30
Fig 4.4control interface window between user and system

When the child time of feeds, the program sends a message to the child's
mother as shown in Figure 4.5

Fig4.5Send Message.

From window 4.4 If the Mothers button checked, the next window Fig4.6
will be shown, from this window, it’s able to add Mothers or remove it, and

31
for addition process, it must enter the Mothers information that contains the
Mother name, phone number, the ID, and phone number.

Fig4.6Mother Information Window.

At the end of the system, also can make a report that shows the values of
temperature and humidity pressure, heartbeats, sound and weight from the
day that was stored until this time. Therefore, according to this values can
assist to keep the baby healthy, by using the button report in the Fig 4.7 that
was shown.

32
Fig 4.7incubator report window.

4.4 Discussion
The simulation results are more accurate because it depends only on
changing in value of resistor or sensors to display the output ,as well as in
hard ware the same values had been taken but instead of presented the value
of variable resistor it will present the real value of sense at this moment.

33
Chapter Five
Conclusions and Recommendations

5.1 Conclusion

The proposed system monitors heartbeat of the infant and temperature


and humidity of the surrounding. Temperature monitoring is done in
order to keep the environment suitable for the neonate .Temperature
monitoring of the infant’s body will help to detect many other internal
diseases like infections, common cold, and pneumonia have a common
symptom of fever as the body temperature goes high. Humidity measure
values also help in detecting of having internal problems like cold,
dehydration. Continuous heart beat monitoring helps to detect any kind of
cardiovascular disorder in the infant. It also helps to detect arrhythmia or
irregular heartbeats. But the temperature inside the incubator loose due
to atmosphere or any other problems, the heating pad will turn on
automatically.

The demonstrated system implemented an effective low-cost infant


incubator controlling and monitoring by some sensors and actuators these
values sent to an application and saved in a database to extract the required
reports when needed. According to that, the change in the temperature and
humidity of infant incubator is possible to be observed through the some
actuators like fan to control the temperature value around a specific value by
Arduino using a serial communication. The purpose of this study was to
design an infant incubator for improved usability. The objectives were

34
achieved and the system functions as desired in the specifications. The
system provides continuous monitoring of temperature and humidity in the
environment, heartbeats, sound and weight for the baby’s and records this
information’s in database.

5.2 Recommendations

Future development of the system can lead to a more robust system and
more features to be provided for the doctors. The main development can be
mentioned briefly as:

• There are many environments and health parameter can effect on the
health of the baby in the incubator, therefore it’s highly recommended to
include it in the design and study its influence.

• This system were designed for only one incubator, its highly
recommended to involve a different required ranges through a different
nodes with a different values in several incubators to satisfy all incubator
types according to their environmental circumstances and monitored via a
camera then connect all of nodes to make a network using powered
technologies as internet of things (IOT) and control them remotely it would
become more useful.

35
References
1- Journal of Medical Engineering & Technology, Volume 26, Number 2.
March/April 2002.
2- Michael. H. LeBlanc, Thermoregulation: Incubators, radiant warmers,
hoods. ClinPerinatol, 1991. 18: p. 403-422.
3- Gerald B. Merenstein, D.F.K., George L. Brown, Leonard E. Weisman,
Radiant warmers vs incubators for neonatal care. Am J Dis Child, 1979.133:
p. 857- 858.
4- Neonatal intensive care unit. Available from:
http://en.wikipedia.org/wiki/Neonatal_intensive_care_unitthis page was last
edited on 24 February 2021.
5- Prasanga D., H.L., Yael Maguire, Aileen Wu, Design of a Passive
Incubator for Premature Infants in the Developing World. 2002,
Massachusetts Institute Of
Technology, Cambridge, U.S.A
6- (n.d.) Special care: ill or premature babies
Available from:
http://www.nhs.uk/Conditions/pregnancy-andbaby/pages/baby-special-
intensivecare.aspx#close
7- Thermal Protection of newborn: a practical guide, World Health
Organization, Maternal or newborn health/ Safe motherhood unit, Division
of reproductive health (Technical Support) Geneva,
(WHO/RHT/MSM/1997, 2nd Edition).

8- Shabeeb, Ali & Al-Askery, Ali &Nahi, Zainab. (2020). Remote


monitoring of a premature infants incubator. TELKOMNIKA Indonesian
Journal of Electrical Engineering. 17. 1232-1238.
10.11591/ijeecs.v17.i3.pp1232-1238.

9- SuswethaParisineti, and Eswaran.P , ‘Design and Development of Fault


Tolerent Control system for an Infant Incubator’, International Journal of
Scientific & Engineering Research, Vol. 2, Issue 5, May-2011 .

10- A. Wongkamhang1, P. Phasukkit1,C. Pintuviroj1, S.


Prasantamrongsiri1, A. Sanpanich3 and N. Thongpance2, ‘ Design and

36
simulation of air flow inside double wall infant incubator by using 3D FEM
’ ,978-1-4799-1467-8/13/$31.00 ©2013 IEEE.

11- P. Jagadeesh, G. Karthick Kumar Reddy , S. VenKatramana Reddy,


‘Design and Development of an Inexpensive Temperature Controller for an
Infant Incubator’,Department of Physics, Sri Venkateswara University ,
India , Vol. 3, Issue 6 , June-2014 .

12- N.S. Salahuddin, R. H. Handoko, S. Poernomo Sari, M. Hermita, A. B.


Mutiara, ‘Premature Infant Incubator Alert System Viasms ’Journal of
Theoretical and Applied Information Technology31st August 2014. Vol. 66
No.3

13- Hitu Mittal , Lini Mathew and Ashish Gupta, ‘Design and
Development of an Infant Incubator for Controlling Multiple Parameters’ ,
International Journal of Emerging Trends in Electronics ( IJETEE-
ISSN:2320-9569) , Vol. 11, Issue. 5, Sep-2015.

14- M.Suruthi and S.Suma, ‘Microcontroller Based Baby Incubator


Using Sensors’, Vol. 4, Issue 12, December 2015.
15- Zlatanov, Nikola. (2015). Arduino and Open Source Computer
Hardware and Software. 10.13140/RG.2.1.1071.7849.
16- http://ingcybe.com/proteus.html Ingenious Cyberonics.
17- David T. Bourgeois, “Information Systems for Business and beyond”,
Saylor Foundation's Open Textbook Challenge by Saylor academy, February
2014.
18- https://www.arduino.cc/en/Main/ArduinoBoardUnoSMD.
19- Mr. VaibhavMalav, Mr. Raushan Kumar Bhagat, Mr. Rahul Saini ,
“Research paper on Bluetooth based Home Automation using Arduino”
Journal of Advancements in Robotics, 2019; 6(2): 9–14p.
20- Ling, T.H.Y., Wong, L.J., Tan, J.E.H. and Lee, C.K., 2015, February.
XBee wireless blood pressure monitoring system with Microsoft visual
studio computer interfacing. In 2015 6th International Conference on
Intelligent Systems, Modelling and Simulation (pp. 5-9). IEEE.
21- Ms.Sujeetha. R/AP, K Reddy Deeraj, B BhaskarYeseswi, Lenin Sade,
December, 2019, Humidity and Temperature Monitoring System using IoT.

37
International Journal of Engineering and Advanced Technology (IJEAT)
ISSN: 2249 – 8958, Volume-9 Issue-2.
22- Rajagukguk, Juniastel& Sari, Nurdieni. (2018). Detection System of
Sound Noise Level (SNL) Based on Condenser Microphone Sensor. Journal
of Physics: Conference Series. 970. 012025. 10.1088/1742-
6596/970/1/012025.
23-Prakash, Ved&pandey, manoj. (2018). HEART RATE MONITORING
SYSTEM.
24- Kattwinkel, J., et al. (2010). Part 15: neonatal resuscitation. 2010
American Heart Association Guide-linesfor Cardiopulmonary Resuscitation
and Emergency Cardiovascular Care. 122: 909-919

38
Appendixes
#include <dht.h>
#include <LiquidCrystal.h>
#define USE_ARDUINO_INTERRUPTS true // Set-up low-level
interrupts for most accurate BPM math.
#include <PulseSensorPlayground.h>
//////////////////////////////////////////////////////////////
dht DHT;
floathh;
floattt;
const int fan =9;
const int sou =8;
int sou_val;
int myBPM;
int bed_st,fan_st;
#define DHT11_PIN 7
const int spe =A2;
const int PulseWire = A3;
int Threshold = 550;
LiquidCrystallcd(6, 5, 4, 3, 2, A1);
PulseSensorPlaygroundpulseSensor;
//////////////////////////////////////////////////////////////////
int sensor = A0; // value read from the pot
floatsensorValue;
/////////////////////////////////////////////////////////

39
int motorPin1 = 13;
int motorPin2 = 12;
int motorPin3 = 11;
int motorPin4 = 10;
intdelayTime = 2; // min = 2;
int const steps = 180; // steps ~ 255;
float x;
intvaloareIluminare,dd; // ilumination value
intpas,maxim=0,initializare=1;; // initialization.
//////////// DHT ////////////////////////////////////////////
voiddht_read(){
intchk = DHT.read11(DHT11_PIN);
hh=DHT.humidity;
tt= DHT.temperature;
if(tt<=30){
digitalWrite(fan,LOW);fan_st=0;
}
if(tt>=31){
digitalWrite(fan,HIGH);fan_st=1;
}
}
///////////// voice_sensor//////////////////////////////////////
voidvoice_sensor(){
sou_val = digitalRead(sou);
if (sou_val==HIGH){

40
inita(); bed_st=1;
delay (100);
x=0;
while(x < pas)
{
rotate_clock();
x++;
}}
if (sou_val==LOW){
bed_st=0;
}
}
///////////////////////////weight_sensor//////////////////////
voidweight_sensor(){
sensorValue=analogRead(sensor);
sensorValue = map(sensorValue, 0, 1023, 0, 5);
}
////////////////////PULSE/////////////////////////////////////
Voidpulse () {
MyBPM = pulseSensor.getBeatsPerMinute(); // Calls function on our pulse
Sensor object that returns BPM as an "int". // "myBPM" hold this BPM
value now.
if (pulseSensor.sawStartOfBeat()) { // Constantly test to see if "a beat
happened".
// Serial.println("♥ A HeartBeat Happened ! "); // If test is "true", print a
message "a heartbeat happened".

41
// Serial.print("BPM: "); // Print phrase "BPM: "
//Serial.println(myBPM); // Print the value inside of myBPM.
} // Assign this value to the "Signal" variable.

if(myBPM < Threshold){ // If the signal is above "550", then


"turn-on" Arduino's on-Board LED.
digitalWrite(spe,HIGH);
} else {
digitalWrite(spe,LOW); // Else, the sigal must be below "550", so
"turn-off" this LED.
}
}
///////////////////////Display data////////////////////////////////////////////////
VoidLCD () {
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("T=");
lcd.print(DHT.temperature);
lcd.setCursor(8, 0);
lcd.print("H=");
lcd.print(DHT.humidity);
lcd.setCursor(0, 1);
lcd.print("W=");
lcd.print(sensorValue);
lcd.setCursor(8, 1);

42
lcd.print("ECG=");
lcd.print(myBPM);
}
///////////////send data////////////////////////////////////
void Send(){
Serial.print ("*");
Serial.print (",");
Serial.print ("1");
Serial.print (",");
Serial.print (tt);
Serial.print (",");
Serial.print (hh);
Serial.print (",");
Serial.print (sensorValue);
Serial.print (",");
Serial.print (sou_val);
Serial.print (",");
Serial.print (myBPM);
Serial.print (",");
Serial.print (fan_st);
Serial.print (",");
Serial.print (bed_st);
Serial.print (",");
Serial.println ("#");
}

43
///////////////////////////////////////////////////////////
voidrotate_clock() //it rotates ~255 steps (180 grades); [x - number steps]
{clockwise}
{
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delayTime);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delayTime);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(delayTime);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(delayTime);
}

44
/////////////////////////////////////////////////////////////
voidrotate_couterclock() // 260 steps ~
{
digitalWrite(motorPin4, HIGH);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin1, LOW);
delay(delayTime);
digitalWrite(motorPin4, LOW);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin1, LOW);
delay(delayTime);
digitalWrite(motorPin4, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin1, LOW);
delay(delayTime);
digitalWrite(motorPin4, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin1, HIGH);
delay(delayTime);

45
/////////////////////////////////////////////////////////
voidinita()
{
//if(dd== HIGH){
// initializare=0;
x = steps;
// delayTime = 5; // slowing speed at startup;
while(x > 0)
{
rotate_clock();
delay(2);
if(valoareIluminare> maxim)
{
maxim = valoareIluminare;
pas = x; // saves in 'pas' the step where the max light is;
}
x--;
}
delay(100);
// delayTime = 2; // at return we grow the speed to the maxim, becouse the
sensor will read values only on initialization & not on return to position 0.
while(x < steps) // comes back in position 0;
{
rotate_couterclock();
x++;

46
}
}}
//////////////////////////////////////////////////////////////
Voidsetup ()
{
lcd.begin(16, 2);
Serial.begin(9600);
pinMode(fan,OUTPUT);
pinMode(sou,INPUT);
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
pinMode(motorPin3, OUTPUT);
pinMode(motorPin4, OUTPUT);
//digitalWrite(fan,HIGH);
pulseSensor.analogInput(PulseWire);
//pulseSensor.blinkOnPulse(LED13); //auto-magically blink Arduino's
LED with heartbeat.
pulseSensor.setThreshold(Threshold);
if (pulseSensor.begin()) {
//Serial.println("We created a pulseSensor Object !"); //This prints one
time at Arduino power-up, or on Arduino reset.
}
pinMode(spe, OUTPUT);
}
///////////////////////////////////////////////////////////////

47
Voidloop()
{
LCD();
dht_read();
voice_sensor();
weight_sensor();
pulse();
delay(1000);
Send();
}

48

You might also like