0% found this document useful (0 votes)
115 views73 pages

Engineering Students' Infusion Pump Project

Uploaded by

DS OOP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views73 pages

Engineering Students' Infusion Pump Project

Uploaded by

DS OOP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

LOW COST SMART INFUSION PUMP

A MINI PROJECT REPORT

Submitted by

(21MDR009) DIWAKAR.S
(21MDR030) SAM INFANT JOE.A
(21MDR044) UDHAYA.S

in partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING

in

MEDICAL ELECTRONICS

VELALAR COLLEGE OF ENGINEERING AND TECHNOLOGY


(An Autonomous Institution Affiliated to Anna University, Chennai)
ERODE – 638012
MAY 2024
ii

VELALAR COLLEGE OF ENGINEERING AND TECHNOLOGY


(An Autonomous Institution Affiliated to Anna University, Chennai)
THINDAL, ERODE - 638012.

BONAFIDE CERTIFICATE

Certified that this project report “LOW COST SMART INFUSION PUMP”
is the bonafide work of DIWAKAR S (21MDR009), SAM INFANT JOE A
(21MDR030) and UDHAYA S (21MDR044) who carried out the project work
under my supervision. Certified further that to the best of my knowledge the
work reported herein does not form part of any other thesis or dissertation on
the basis of which a degree or award was conferred on an earlier occasion on
this or any other candidate.

Dr.V.CHANDRASEKARAN, B.E., M.Tech,.Ph.D., Dr.V.CHANDRASEKARAN, B.E., M.Tech.,Ph.D.,


SUPERVISOR HEAD OF THE DEPARTMENT
Professor Professor
Department of MDE Department of MDE
Velalar College of Engineering and Technology Velalar College of Engineering and Technology
Thindal, Erode-12. Thindal, Erode-12.

Submitted for Semester Mini Project viva-voce examination held on _________

INTERNAL EXAMINER EXTERNAL EXAMINER


iii
iii

ACKNOWLEDGEMENT

We are greatly indebted to many people who have contributed to the


progress of our project and have encouraged us right from the start to make our
ideas a reality.

We would be privileged to express our heartfelt thanks to our honorable


Secretary and Correspondent Thiru. S. D. Chandrasekar, B.A., who provided
all the facilities to build our project.

We express our deep sense of gratitude and sincere thanks to our Principal
Dr. M. Jayaraman, B.E, M.E., Ph.D., for permitting us to undertake this
project.

We are indebted to our Dean Prof. P. Jayachandar, M.E., for giving us


the opportunity and continuous inspiration to carry out this project.

We express our profound gratitude to our Controller of Examinations


Prof. Dr. K. R. Valluvan, B.Sc., B.Tech., DIISc., M.E., Ph.D., FIE, and our
Head of the Department for his valuable comments.

We express our sincere thanks to our Head of the Department and


Supervisor Dr. V. Chandrasekaran, B.E., M.Tech., Ph.D., for his valuable
guidance and spirited encouragement throughout the project work.

We express our sincere thanks to our Project Coordinator


Dr. M. Pravin Kumar, M.E., Ph.D., Professor for his suggestions to do our
project successfully.

DIWAKAR S SAM INFANT JOE A UDHAYA S


iv

ABSTRACT

An infusion pump is a medical device that is used to deliver drugs with


moderate precision. Intravenous medication administration by infusion is
particularly trying for basic applications since stable infusion flow rates are
necessary because any dose errors or delayed alarms may prompt adverse
clinical events. The fundamental drawback of an infusion pump is that detailed
by the Food and Drug Administration (FDA). Incorporate programming issues,
battery failures, and some are designed generally for immobile use at a patient’s
bedside.

One of the most commonly indicated problems is mechanical


compliance, which causes variability in flow rate and delayed occlusion alarm.
Additionally, the market cost was costly to be generally accessible in the
developing nations.

Subsequently, contingent upon detailed problems, the work thought of a


ground breaking think that utilization strain gauge transducer mechanism for
the infusion measurement and the flow controlled naturally by the gravity.

The designed project does not depend on the pump mechanism, to avoid
compressibility, and occlusion alarm is detected in software by measuring the
arithmetic mean of infusion readings. The project is designed with simplified
electronic circuits and remotely controlled via a wireless Bluetooth module.
v

Offering significant advantages over either manual or automated


administration of fluids, including the ability to deliver fluids in small volumes,
at precisely modified rates, including a speech audible and visual alerting, low
cost, and compact when compared to the familiar infusion pumps.
vi

TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE NO.


ABSTRACT iv
LIST OF TABLES ix
LIST OF FIGURES x
LIST OF ABBREVIATIONS xi

1 INTRODUCTION 1

2 LITERATURE REVIEW 3

3 EXISTING AND PROPOSED SYSTEM 6


3.1 EXISTING SYSTEM 6
3.2 PROPOSED SYSTEM 7

4 HARDWARE AND SOFTWARE 8


SPECIFICATIONS
4.1 HARDWARE SPECIFICATIONS 8
4.1.1 Arduino UNO Microcontroller 8
4.1.1.1 Concept of Arduino 10
4.1.1.2 Software 11
4.1.1.3 Hardware 13
4.1.2 Bluetooth Module 14
4.1.2.1 Working principle 16
4.1.2.2 HC-05 module pin 17
Configuration

4.1.2.3 HC-05 module information 18


4.1.2.4 Specifications 18
vii

4.1.2.5 Communication with devices 19


4.1.3 Buzzer 20
4.1.3.1 Working principle 22
4.1.4 LCD Display 22
4.1.4.1 Construction of a dynamic 22
scattering liquid crystal cell
4.1.4.2 Working principle 24
4.1.4.3 Pin description of LCD 27
4.1.5 Power Supply 29
4.2 SOFTWARE SPECIFICATIONS 32
4.2.1 Arduino IDE 32
4.2.2 Embedded C 46
4.2.2.1 Peripherals 47
4.2.2.2 Advantages 47

5 PROJECT DESCRIPTION 48
5.1 PROPOSED SYSTEM 48
5.2 WORKING DESCRIPTION OF THE 48
PROPOSED SYSTEM
5.3 BLOCK DIAGRAM 49
5.4 CIRCUIT CONNECTION FOR 50
PROPOSED SYSTEM
5.4 ADVANTAGES 50
5.6 APPLICATIONS 50

6 RESULT AND DISCUSSION 51


6.1 HARDWARE MODULE 51

7 CONCLUSION AND SCOPE FOR 53


FUTURE WORK
viii

7.1 CONCLUSION 53
7.2 SCOPE FOR FUTURE WORK 53
APPENDIX PROGRAM CODE 55
REFERENCES 58
ix

LIST OF TABLES

TABLE NO. TITLE PAGE NO.

4.1 Pin Description of LCD 27


x

LIST OF FIGURES

FIGURE NO. TITLE PAGE NO.

4.1 Arduino Microcontroller 9

4.2 Bluetooth Module 15

4.3 Bluetooth Module Pin 17

4.4 Buzzer 21

4.5 LCD Display 26

4.6 LCD Interfacing with Microcontroller 29

4.7 Power Supply 30

4.8 Block Diagram of Regulated Power Supply 31

4.9 Language Support 45

5.1 Block of a Proposed System 49

5.2 Circuit of the Proposed System 50

6.1 Hardware Module 51


xi

LIST OF ABBREVIATIONS

A2DP - Advanced Audio Distribution Profile


AC - Alternating Current
ADC - Analog-Digital Convertor
API - Arduino Programmable Interface
APL - Arduino Programmable Language
AVR - Automatic Voltage Regulator
CNS - Central Nervous System
CPU - Central Processing Unit
CSTU - Color Super Twisted nematic
DAC - Digital-Analog Convertor
DC - Direct Current
DNN - Deep Neural Network
DSP - Digital Signal Processor
DSTN - Double layer Super Twisted Nematic
EDR - Enhanced Data Rate
ESSI - Enhanced Synchronous Serial Interface
FDA - Food Drug Administration
FHSS - Frequency Hopping Spread Spectrum
FTDI - Future Technology Devices International Limited
GFSK - Gaussian Frequency Shift Keying
GHz - Gigahertz
GND - Ground
GNU - GNU’s not Unix
HID - Human Interface Device
HFP - Hands-Free Profile
HTML - Hypertext Markup Language
IC - Integrated Chip
xii

IDE - International Drive Electronics


IO - Input Output
IOT - Internet of Things
ISP - In System Program
IV - Intravenous
LCD - Liquid Crystal Display
LED - Light Emitting Diode
MHZ - Megahertz
NFC - Near Field Communication
PC - Personal Computer
PSU - Power supply Unit
PWS - Pressure Waveform Sensors
RF - Radio Frequency
RPM - Rotation Per Minute
SPP - Serial Port Profile
SSTN - Single layer Super Twisted Nematic
STN - Super Twisted Nematic
TDE - Transparent Data Encryption
TFT - Thin Film Transistors
UART - Universal Asynchronous Receiver/Transmitter
USART - Universal Synchronous Asynchronous Receiver
Transmitter
USB - Universal Serial Bus
VL - Voltage
VTBI - Volume To Be Infused
Wi-Fi - Wireless Fidelity
1

CHAPTER 1

INTRODUCTION

An infusion pump is some sort of medical device that provides fluids,


such as nutrition and medications, into the patient's body. Infusion pumps are
usually in widespread use throughout clinical settings such as nursing facilities.
consequently, there are several sorts of infusion pumps recognized by being
either, manual, or semiautomatic, or automatic, Such as Novel Portable Micro-
pump and Infusion System fixed-displacement micro-pump for controlling
dosing and timing, miniature, and encourages the design of low cost and simple
device.

The flow control might be volumetric or non-volumetric. A volumetric


flow regulates the volume per time (ml/h) along with the infusing velocity no
matter the kind of liquid. Within a non-volumetric control typically, the pump
controls the number of drops per time, along with the infusion velocity.
Typically, the physical properties linked to the flow of liquids through
cylindrical tubes give the foundation for being familiar with the flow by way
of a catheter directly into the vasculature. “Hagen-Poiseuille's formula for the
laminar flow associated with a Newtonian fluid through the rigid tube states in
the below equation,

Q = n. rA4. ((P1 - P2)) / (8 • n • L) (1)

Where Q is the flow; P1 and P2 are the pressures at the inlet and outlet
of the tube, respectively; L and r are the length and internal radius of the tube,
respectively; and n is fluid viscosity”, Although some drug delivery systems
usually do not strictly meet the flow conditions for the precise program of the
laminar flow equation, it can do provide an understanding into the relationship
2

in between flow and pressure inside a catheter. The health practitioner identifies
the rate of flow in milliliters per minute, drops per minute, or amount of drug
(as milligrams per hour). In the Manual method Regulated Flow Rates depend
on the drop factor, the following equation (2) is used for determining the flow
rates in (drops per minute), volumes in milliliters, and infusion times in
minutes,

(Volume* drop factor) /Time=flow rate (2)

The hourly rate of infusion can be calculated simply by dividing the total
infusion volume by the total infusion time in hours. Typically, the drops per
minute have to be regulated to ensure of which the prescribed amounts
associated with a solution will infuse. However, the utilization of infusion
pumps is associated with a high frequency of adverse events. Since it Includes
software problems, such as false occlusion alert due to the sensor may not work
probably. Additionally, the mechanical compliance caused by the pump may
prompt variations in flow rate, and delayed occlusion alarm which may prompt
adverse clinical impacts. The other common problem is the market price was
expensive to be generally accessible in developing countries. Therefore,
depending on the reported problems, the work came up with a novel thought
that uses a strain gauge transducer mechanism which might be the solution.
3

CHAPTER 2
LITERATURE REVIEW

Mohamed Eltahir Mansour (September 2021) introduces a low-cost smart


infusion pump featuring simplified electronic circuits and Bluetooth-enabled
remote control. The design addresses affordability and accessibility in medical
device technology, offering a viable solution for resource-constrained healthcare
settings. By leveraging Bluetooth connectivity, the pump enables remote
monitoring and control, enhancing patient safety and healthcare delivery
efficiency. This innovative approach integrates smart technology into infusion
therapy, promising to streamline medication administration while minimizing
costs and technical complexity.

Deny's (December 2019) paper introduces a novel approach to medication


delivery with a low-cost, smart infusion pump. By integrating virtual input data
processing, the pump achieves precise drug infusion at regular intervals,
enhancing patient care and medication adherence. The system's ability to calculate
motor RPM based on processed data signifies a technologically advanced yet cost-
effective solution for healthcare facilities. This innovation holds promise for
improving treatment outcomes and reducing manual intervention in medication
administration processes, contributing to the evolution of efficient and accessible
healthcare delivery systems.

Mohamad Irfan Ali's (August 2020) paper outlines a simple and cost-
effective design of an infusion device analyser utilizing Arduino technology. By
focusing on calibration methods, the study evaluates the viability of infusion and
syringe pumps. Employing a flow rate formula within a water level system, the
research achieves calibration outcomes crucial for device functionality
4

assessment. This approach offers a practical means of ensuring accuracy and


reliability in medication delivery systems, particularly in resource-limited
healthcare settings. The utilization of Arduino technology underscores the
potential for accessible and customizable solutions in medical device
development, facilitating enhanced patient care and treatment precision.

Shengwen Bao's (2023) paper introduces an innovative occlusion detection


system for intravenous infusion, employing pressure waveform sensors (PWS)
and a waveform-based recognition method. Tested in commercial infusion pumps,
the system demonstrates efficacy in detecting IV line occlusions without false
alarms, thus bolstering patient safety during medical treatment. By leveraging
advanced sensor technology and algorithmic analysis, this approach offers a
reliable solution to address critical issues associated with infusion therapy,
potentially minimizing adverse events and optimizing healthcare delivery. The
study highlights significant advancements in medical device technology aimed at
enhancing patient care and treatment outcomes in clinical settings.
M.A.Marques (February 2015) paper focuses on the development of a syringe
infusion pump control system utilizing Arduino microcontroller boards. By
leveraging Arduino technology, the study achieves a robust and adaptable control
mechanism for precise medication delivery. The integration of an accessible
application facilitates user-friendly system control, enhancing usability and
versatility in healthcare settings. Marques work signifies a significant
advancement in infusion pump technology, offering a cost-effective and
customizable solution for medical practitioners. This research lays a foundation
for future innovations in medication administration systems, promising improved
patient care and operational efficiency.
5

CHAPTER 3

EXISTING AND PROPOSED SYSTEM

3.1 EXISTING SYSTEM

Wireless connectivity revolutionizes how devices communicate,


liberating them from cumbersome cables. Employing technologies like Wi-Fi,
Bluetooth, and NFC, it enables seamless data exchange over short or long
distances. Wi-Fi facilitates high-speed internet access, essential for homes,
offices, and public spaces. Bluetooth connects devices in close proximity,
facilitating file sharing and peripheral connections. NFC enables contactless
transactions, simplifying payments and access control. These technologies
empower diverse applications, from smart homes and wearable devices to
industrial automation and transportation systems. With the ever-expanding reach
of wireless networks, connectivity becomes ubiquitous, driving innovation and
transforming how we interact with the digital world.

Ultrasonic air bubble detection is a non-invasive method crucial in medical


equipment, particularly in dialysis machines and infusion pumps, to ensure
patient safety. It operates by emitting high-frequency sound waves into the fluid
system, detecting reflections caused by air bubbles. These waves penetrate the
fluid, reflecting off any bubbles present, which are then analysed for size and
quantity. By monitoring these reflections, the system can promptly identify and
alert operators to the presence of potentially harmful air bubbles, mitigating the
risk of air embolisms. This technique enhances the reliability and safety of
medical procedures, safeguarding patients from potentially life-threatening
complications.
6

MIT App Inventor revolutionizes Android app development by providing


a user-friendly platform for creating apps without extensive coding expertise.
With its intuitive drag-and-drop interface, developers can quickly prototype and
deploy applications for various purposes, from educational tools to productivity
aids. The visual programming environment simplifies the process, allowing users
to focus on functionality rather than syntax. MIT App Inventor also offers a wide
range of components and features, including sensor integration, multimedia
support, and cloud connectivity, enabling developers to build robust and versatile
apps with ease. Overall, it democratizes app development, empowering
individuals to bring their ideas to life on the Android platform.
7

3.2 PROPOSED SYSTEM

In this project introduces a novel approach to medical drug or


nutrient delivery with a strain gauge-based infusion pump. Unlike traditional
methods, this system leverages strain gauge technology to precisely regulate the
flow of medications or nutrients to patients. By measuring subtle changes in
pressure or tension, the pump ensures accurate dosage administration, enhancing
patient safety and treatment effectiveness. The integration of strain gauge
technology allows for real-time monitoring and adjustment, minimizing the risk
of dosage errors or fluctuations. Additionally, the infusion pump offers versatility
in accommodating various medication delivery requirements, making it a
valuable asset in healthcare settings. Overall, this innovative solution promises to
streamline and optimize medical treatment delivery, benefiting both patients and
healthcare providers.

The proposed system integrates ultrasonic sensor technology to enhance


fluid management by detecting air bubbles in real-time. When the sensor
identifies air bubbles within fluid flow, it triggers alerts, notifying users of
potential issues such as air in the line and occlusion. This proactive approach
helps prevent complications in various applications, particularly critical in
medical settings like dialysis machines and infusion pumps. By promptly
signaling anomalies, the system ensures timely intervention, minimizing risks
and improving operational efficiency. It promises to enhance safety and reliability
in fluid systems, offering peace of mind to users across diverse industries. The
detailed description of the proposed system is given in Chapter 5.
8

CHAPTER 4

HARDWARE AND SOFTWARE SPECIFICATIONS

4.1 HARDWARE SPECIFICATIONS

• Arduino Microcontroller
• Bluetooth Module
• Buzzer
• LCD Display
• Power Supply

4.1.1 Arduino Microcontroller

The Arduino microcontroller shown in Figure 4.1 is an open source


electronics platform accompanied with a hardware and software to design,
develop and test complex electronics prototypes and products. The hardware
consists of a microcontroller with other electronic components which can be
programmed using the software to do almost any task. The simplicity of the
Arduino language makes it very easy for almost everyone who has an interest in
electronics to write programs without the understanding of complex algorithms
or codes.
9

Figure 4.1 Arduino Microcontroller

Arduino is intended for an artist, tinker, designer or anyone, interested in


playing with electronics without the knowhow of complex electronics and
programming skills. Arduino is an excellent designed open-source platform. It
has specially designed boards which can be programmed using the Arduino
Programming Language (APL).

The presence of Arduino is not only spreading between hobbyists, but it


has also expanded its roots in industries and used by experts for making
prototypes of commercial products. Arduino takes off the efforts required in
complex coding and designing hardware.

The open-source nature of Arduino has been the main reason for its rapid
horizontal growth. Since it is an Open Source project, all the files related to
hardware and software is available for personal or commercial use. The
development cost of the hardware is very small as against the costly similar
10

proprietary products by the industrial giants. The open-source nature doesn’t


require any licenses to develop, use, redistribute or even sell the product. But the
Arduino name is trade mark protected (Arduino™) i.e., you are free to sell the
Arduino board under any other name however in order to sell it under the name
“Arduino” you need to take permission from the founders and follow their
quality terms.

The Software files which include the entire source code library are also
open sourced. A user can modify them to make the project more versatile and
improve its capabilities. This provides a strong online community support.

4.1.1.1 Concept of Arduino

The root of Arduino goes deep down to the development of Processing


Language by MIT researchers. Processing language is an open source language
designed to introduce the software development environment for the artistic
people without the need of deep knowledge of programming of algorithms.
Processing is based on java.

In early year of 21st century, designing an electronics gadget was nearly


impossible for a common man. The requirement of specific skill set and hefty
prices of software and hardware created a full stop in the path of their creativity.
In year 2003 Hernando Barragan, a programmer developed an open-source
electronics development platform with software IDE, where anyone with a small
knowledge in electronics and programming could use his project to give wings to
their creativity. His focus was to reduce the burden of complexity in designing
electronics hardware and software. The project was named as Wiring. The
11

software IDE of the Wiring used processing language to write the codes. As the
program written in C\C++ is named as Project, in the same way the code written
in Wiring (even in Processing and Arduino) is termed as Sketch. The name
sketch gives a familiar look for an artist.

The principle idea behind Wiring is that one can make the sketch of their
idea on wiring software and implement it using specially designed Wiring board.
You need to write a few lines of codes on the software IDE and then download
the program to the onboard microcontroller to see the output.

Wiring has predefined libraries to make the programming language easy.


Arduino uses these libraries. The predefined libraries are written in C and C++.
One can even write his software in C\C++ and use them on wiring boards. The
difference between writing a program in C/C++ and Wiring is that the Wiring
Application Programmable Interface (API) has simplified programming style
and the user doesn’t require detailed knowledge of the concepts like classes,
objects, pointers, etc. While sketching hardware you need to call the predefined
functions and rest will be handled by the Wiring software.

The basic difference between the Processing and the Wiring is that the
Processing is use to write the program which can be used on other computers
while Wiring program is used on microcontrollers.

4.1.1.2 Software

The Arduino hardware uses a microcontroller IC which needs to be


programmed to perform any desired task. This program is written in the Arduino
12

software using the Arduino Programming Language (APL). After compiling the
program, it is loaded into the memory of the microcontroller on the board using a
serial or USB connection. The program can be downloaded to the memory of the
microcontroller using the Arduino Software itself, thereby avoiding the need of
any other external programmer. Writing codes for non-professionals is a difficult
task. This was the key goal of the Arduino to reduce the complexity in writing
codes and allow non-professionals and creative people to foster their thinking
with the help of Arduino.

The Arduino IDE provides an editor to prepare the sketch of hardware.


The Arduino IDE code editor was very skillfully designed. It gives a very
distinguished view (in color and fonts) to the variables, constants, function, etc.
of the source code. It includes features like syntax highlighting, brace matching
and automatic code indentation. There is no need to manipulate the make file or
go on command line to dump the code into the hardware. The APL itself has a
facility to burn the controller in a single click.

Sketch written in Arduino Programming Language (APL) goes under


minor changes (the automatic generation of function prototype), when you press
the compile button. Firstly main () function is added to the sketch and the
Arduino environment transforms the sketch into C or C++ code. The Arduino
IDE uses GNU toolchain and AVR lib to compile the programs. Then it passes
to the AVR-GCC compiler, which translate/ converts those C instructions into
equivalent machine understandable instructions and creates an object file. The
object file is combined with standard Arduino Libraries which provides the
definitions of the inbuilt Arduino functions. The result of this is a single hex
13

(Intel hex/. hex) file. This hex file is transferred to the microcontroller. The
Arduino IDE uses a vrdude to transfer the hex file on the Arduino board either
by using USB or serial port of PC.

4.1.1.3 Hardware

The Arduino hardware was very skillfully designed to reduce the


complexities arising in the circuitry. It has an In System Programmer (ISP),
which allows users to transfer the software inside the microcontroller without
removing it from the circuit. The basic model of an Arduino board consists of an
8-bit AVR microcontroller along with some other necessary components like a
5-volt linear regulator IC, a 16 MHZ crystal, ceramic resonator, output
connectors, direct adaptor input, etc.

The IO ports on boards are positioned in a way that it can be easily


attached with the interchangeable add-on modules, known as shields. Shields are
daughter boards that can be externally attached/ plugged with the Arduino boards
to extent the board’s capabilities. For example, an Xbee shield can be attached
with the Arduino board to establish a wireless communication. A motor control
shield can be attached on the top of Arduino board to run the motors or to
provide an ease to control the speed of motors. The Arduino Board can easily
interface with external sensors, circuits or other peripherals.

Arduino hardware is available in various designs and configurations


depending on the use. The different configurations use different AVR chips,
Atmega 8/168/328/1280/2560. Each board has its own additional feature, like
Arduino UNO consists of ATmega328 which communicates to PC via USB
14

using FTDI chip. very comfortable for attaching shields. On the other Arduino
NANO uses Atmega168/328 which also uses FTDI chip but is much comfortable
to use it on breadboard.

Some non-AT mega Arduino boards are also available. These boards don’t
contain Atmel’s AT mega controller but are compatible with Arduino shield.
These microcontrollers cannot be programmed by the standard Arduino IDE but
manufacturers do provide some other versions of Arduino IDE which includes
the necessary libraries related to the controller. For example, Leaf labs Maple
based on 32bit arm processor or chip KIT UNO32 based on PIC micro
controllers.

The earlier version of the Arduino board had controller with bootloader
which communicated with the Arduino IDE mostly via a Serial port. Later a
FTDI chip was introduced on the Arduino board which is a USB to serial
converter to allow the communication with the USB port. And today the Arduino
boards are available with Atmel’s microcontroller which have inbuilt capacity to
communicate with the USB port.

4.1.2 Bluetooth Module


Common applications of Bluetooth include connecting devices such as
smartphones, tablets, laptops, headphones, speakers, smartwatches, and IoT
devices. It facilitates various tasks like data transfer, audio streaming, and remote
control functionalities. Bluetooth technology has evolved over the years, with
each version offering improvements in terms of speed, range, and power
consumption.
15

Figure 4.2 Bluetooth Module

To establish a connection between two Bluetooth-enabled devices, they


must first be paired. This involves a one-time process where the devices
exchange encryption keys to ensure secure communication. Bluetooth devices
use profiles to define the type of communication they support. Examples include
the Advanced Audio Distribution Profile (A2DP) for streaming audio and the
Hands-Free Profile (HFP) for hands-free calling.

Bluetooth technology is designed to be energy-efficient, making it suitable


for use in battery-powered devices. The power consumption depends on factors
such as the version of Bluetooth being used and the specific application.
Bluetooth connections can be secured using encryption and authentication
mechanisms to protect against unauthorized access and data interception.
16

Bluetooth operates in the 2.4 GHz frequency band, which is shared with
other wireless technologies such as Wi-Fi and microwave ovens. This can
sometimes lead to interference, affecting the reliability of Bluetooth connections
in crowded environments. Overall, Bluetooth technology provides a convenient
and reliable way for devices to communicate with each other without the need
for cables or wires.

4.1.2.1 Working principle


Bluetooth operates through radio frequency (RF) communication,
utilizing the 2.4 GHz ISM frequency band globally available for unlicensed use.
Devices communicate wirelessly within short ranges using radio waves. Pairing
is essential for establishing connections between Bluetooth devices. During
pairing, devices exchange security keys, ensuring secure communication. Once
paired, devices can communicate without repeated pairing.

Bluetooth devices typically function within a master-slave architecture.


The master initiates and controls communication, while the slave responds to
commands. This architecture enables multiple devices to communicate
simultaneously in a piconet.A piconet consists of one master device and up to
seven active slave devices. The master device controls timing and frequency
hopping, allowing for dynamic role switching between devices. Frequency
hopping spread spectrum (FHSS) minimizes interference and enhances security.
It involves rapid frequency switching within the 2.4 GHz band in a predefined
sequence, mitigating interference from other devices.
17

Bluetooth communication is packet-based, with data transmitted in fixed-


length packets. Each packet includes header information, payload data, and
error-checking codes, ensuring reliable data transmission.Security measures like
encryption, authentication, and authorization protect Bluetooth communication
from unauthorized access and data interception, ensuring secure data exchange
between devices.

4.1.2.2 HC-05 Module Pin Configuration

Figure 4.3 Bluetooth module pin

It has 6 pins,
1. Key/EN: It is used to bring Bluetooth module in AT commands mode. If
Key/EN pin is set to high, then this module will work in command mode.
Otherwise by default it is in data mode. The default baud rate of HC-05 in
command mode is 38400bps and 9600 in data mode.
2. VCC: Connect 5 V or 3.3 V to this Pin.
3. GND: Ground Pin of module.
4. TXD: Transmit Serial data (wirelessly received data by Bluetooth module
transmitted out serially on TXD pin)
5. RXD: Receive data serially (received data will be transmitted wirelessly
by Bluetooth module).
18

6. State: It tells whether module is connected or not.


HC-05 module has two modes,
• Data mode: Exchange of data between devices.
• Command mode: It uses AT commands which are used to change setting
of HC-05. To send these commands to module serial (USART) port is
used.

4.1.2.3 HC-05 module Information


• HC-05 has red LED which indicates connection status, whether the
Bluetooth is connected or not. Before connecting to HC-05 module this
red LED blinks continuously in a periodic manner. When it gets connected
to any other Bluetooth device, its blinking slows down to two seconds.
• This module works on 3.3V. We can connect 5V supply voltage as well
since the module has on board 5 to 3.3 V regulator.
• As HC-05 Bluetooth module has 3.3V level for RX/TX and
microcontroller can detect 3.3 V level, so, no need to shift transmit level
of HC-05 module. But we need to shift the transmit voltage level from
microcontroller to RX of HC-05 module.
• The data transfer rate of HC-05 module can vary up to 1Mbps is in the
range of 10 meters.

4.1.2.4 Specifications
• Bluetooth version: 2.0 + EDR (Enhanced Data Rate)
• Frequency: 2.4 GHz ISM band
• Modulation: GFSK (Gaussian Frequency Shift Keying)
• Sensitivity: -80 dBm typical
19

• Range: approximately 10 meters (or 33 feet) in open air


• Profiles supported: SPP (Serial Port Profile), HID (Human Interface
Device) and others
• Operating voltage: 3.3V to 5V DC
• Operating current: less than 50mA
• Standby current: less than 2.5mA
• Sleep current: less than 1mA
• Interface: UART (Universal Asynchronous Receiver/Transmitter)
• Baud rates: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200,
230400, and 460800
• Operating temperature: -20°C to 75°C (-4°F to 167°F)

4.1.2.5 Communication with Devices


Bluetooth technology revolutionized the way devices communicate
wirelessly over short distances, typically within a range of about 10 meters. This
technology facilitates the exchange of data between various devices, including
smartphones, tablets, laptops, headphones, speakers, smartwatches, and more. At
its core, Bluetooth communication relies on radio waves operating in the 2.4 to
2.485 GHz frequency range. Devices equipped with Bluetooth transmitters and
receivers establish connections by using a technique called frequency hopping
spread spectrum (FHSS). This method allows devices to rapidly switch between
different frequencies within the designated range, minimizing interference and
ensuring reliable communication.

The Bluetooth protocol stack consists of several layers, each responsible


for different aspects of communication. These layers include the physical layer,
20

which handles the transmission and reception of data over the air; the link layer,
which manages device discovery, connection establishment, and data transfer;
and the higher layers, which define various profiles and services for specific use
cases, such as audio streaming, file transfer, and device control. Bluetooth
devices typically operate in one of two modes: the traditional Bluetooth Classic
mode or the newer Bluetooth Low Energy (BLE) mode. Classic Bluetooth is
ideal for applications requiring continuous data streaming, such as audio
streaming between a smartphone and wireless headphones. In contrast, BLE is
optimized for low-power applications, making it suitable for devices like fitness
trackers, smart sensors, and wearable gadgets that require intermittent
communication while conserving battery life.

Overall, Bluetooth technology continues to evolve, with each new version


introducing improvements in speed, range, security, and power efficiency. As a
result, Bluetooth has become an integral part of the modern connected
ecosystem, enabling seamless communication and interaction between a wide
range of devices.

4.1.3 BUZZER

A buzzer or beeper is an audio signaling device, which may be


mechanical, electromechanical, or piezoelectric (piezo for short). Typical uses of
buzzers and beepers include alarm devices, timers, and confirmation of user
input such as a mouse click or keystroke. When current is applied to the buzzer it
causes the ceramic disk to contract or expand. Changing the This then causes the
surrounding disc to vibrate. That's the sound that you hear. By changing the
21

frequency of the buzzer, the speed of the vibration’s changes, which changes the
pitch of the resulting sound.

Figure 4.4 Buzzer

There are many ways to communicate between the user and a product.
One of the best ways is audio communication using a buzzer IC. So, during the
design process, understanding some technologies with configurations is very
helpful. So, this article discusses an overview of an audio signaling device like a
beeper or a buzzer. An audio signaling device like a beeper or buzzer may be
electromechanical or piezoelectric or mechanical type.

The main function of this is to convert the signal from audio to sound.
Generally, it is powered through DC voltage and used in timers, alarm devices,
printers, alarms, computers, etc. Based on the various designs, it can generate
different sounds like alarm, music, bell & siren. The pin configuration of the
buzzer is shown below. It includes two pins namely positive and negative. The
positive terminal of this is represented with the ‘+’ symbol or a longer terminal.
This terminal is powered through 6Volts whereas the negative terminal is
22

represented with the ‘- ‘symbol or short terminal and it is connected to the GND
terminal.

4.1.3.1 Working principle

The working principle of a buzzer depends on the theory that, once the
voltage is given across a piezoelectric material, then a pressure difference is
produced. A piezo type includes piezo crystals among two conductors. Once a
potential disparity is given across these crystals, then they thrust one conductor
& drag the additional conductor through their internal property. So, this
continuous action will produce a sharp sound signal.

4.1.4 LCD Display

Liquid crystal cell displays (LCDs) are used in similar applications where
LEDs are used. These applications are display of display of numeric and
alphanumeric characters in dot matrix and segmental displays.

LCDs are of two types:


• Dynamic scattering type
• Field effect type

4.1.4.1 Construction of dynamic scattering liquid crystal cell

The liquid crystal material may be one of the several components, which
exhibit optical properties of a crystal though they remain in liquid form. Liquid
crystal is layered between glass sheets with transparent electrodes deposited on
the inside faces.
23

When a potential is applied across the cell, charge carriers flowing through
the liquid disrupt the molecular alignment and produce turbulence. When the
liquid is not activated, it is transparent. When the liquid is activated the
molecular turbulence causes light to be scattered in all directions and the cell
appear to be bright. This phenomenon is called dynamic scattering.

The construction of a field effect liquid crystal display is similar to that of


the dynamic scattering type, with the exception that two thin polarizing optical
filters are placed at the inside of each glass sheet. The liquid crystal material in
the field effect cell is also of different type from employed in the dynamic
scattering cell. The material used is twisted numeric type and actually twists the
light passing through the cell when the latter is not energized.

A liquid crystal display (LCD) is an electronically-modulated optical


device shaped into a thin, flat panel made up of any number of color or
monochrome pixels filled with liquid crystals and arrayed in front of a light
source (backlight) or reflector. It is often utilized in battery-powered electronic
devices because it uses very small amounts of electric power. LCD has material,
which continues the properties of both liquids and crystals. Rather than having a
melting point, they have a temperature range within which the molecules are
almost as mobile as they would be in a liquid, but are grouped together in an
ordered from similar to a crystal.

LCD consists of two glass panels, with the liquid crystal materials
sandwiched in between them. The inner surface of the glass plates is coated with
24

transparent electrodes which define in between the electrodes and the crystal,
which makes the liquid crystal molecules to maintain a defined orientation angle.
When a potential is applied across the cell, charge carriers flowing through the
liquid will disrupt the molecular alignment and produce turbulence.

When the liquid is not activated, it is transparent. When the liquid is


activated, the molecular turbulence causes light to be scattered in all directions
and the cell appears to be bright. Thus, the required message is displayed. When
the LCD is in the off state, the two polarizers and the liquid crystal rotate the
light rays, such that they come out of the LCD without any orientation, and
hence the LCD appears transparent.

4.1.4.2 Working principle

When sufficient voltage is applied to the electrodes the liquid crystal


molecules would be aligned in a specific direction. The light rays passing
through the LCD would be rotated by the polarizer, which would result in
activating/highlighting the desired characters. The power supply should be of
+5v, with maximum allowable transients of 10mv. To achieve a better/suitable
contrast for the display the voltage (VL) at pin 3 should be adjusted properly. A
module should not be removed from a live circuit.

The ground terminal of the power supply must be isolated properly so that
voltage is induced in it. The module should be isolated properly so that stray
voltages are not induced, which could cause a flicking display. LCD is
lightweight with only a few, millimeters thickness since the LCD consumes less
power, they are compatible with low power electronic circuits, and can be
25

powered for long durations. LCD does not generate light and so light is needed
to read the display. By using backlighting, reading is possible in the dark. LCDs
have long life and a wide operating temperature range. Before LCD is used for
displaying proper initialization should be done.

LCDs with a small number of segments, such as those used in digital


watches and pocket calculators, have individual electrical contacts for each
segment. An external dedicated circuit supplies an electric charge to control each
segment. This display structure is unwieldy for more than a few display
elements. Small monochrome displays such as those found in personal
organizers, or older laptop screens have a passive-matrix structure employing
super-twisted nematic (STN) or double-layer STN (DSTN) technology, the latter
of which addresses a color-shifting problem with the former and color-STN
(CSTN), wherein color is added by using an internal filter. Each row or column
of the display has a single electrical circuit.

The pixels are addressed one at a time by row and column addresses. This
type of display is called passive-matrix addressed because the pixel must retain
its state between refreshes without the benefit of a steady electrical charge. As
the number of pixels (and, correspondingly, columns and rows) increases, this
type of display becomes less feasible.

Very slow response times and poor contrast are typical of passive matrix
addressed LCDs. High-resolution color displays such as modern LCD computer
monitors and televisions use an active-matrix structure. A matrix of thin-film
26

transistors (TFTs) is added to the polarizing and color filters. Each pixel has its
own dedicated transistor, allowing each column line to access one pixel. When a
row line is activated, all of the column lines are connected to a row of pixels and
the correct voltage is driven onto all of the column lines.

The row line is then deactivated and the next row line is activated. All of
the row lines are activated in sequence during a refresh operation. Active-matrix
addressed displays look "brighter" and "sharper" than passive-matrix addressed
displays of the same size, and generally have quicker response times, producing
much better images. A general-purpose alphanumeric LCD with two lines of 16
characters is shown in Figure 4.5. So, the type of LCD used in this project is16
characters * 2 lines with 5*7 dots with cursor, built in controller, +5v power
supply, 1/16 duty cycle.

Figure 4.5 LCD Display


27

4.1.4.3 Pin description of LCD

The pin description of LCD is shown in Table 4.1.


Table 4.1 Pin Description of LCD
PIN NO. SYMBOL FUNCTION
1 Vss Ground terminal of Module
2 Vdd Supply terminal of Module, +5v
3 Vo Power supply for liquid crystal drive
Register select
4 RS RS=0…Instruction register
RS=1…Data register
Read/Write
5 R/W R/W=1…Read
R/W=0…Write
6 EN Enable
Bi-directional Data Bus.
Data Transfer is performed once, thru
DB0-DB7,in case of interface data length is
7-14 DB0-DB7
8-bits; and twice, thru DB4-DB7 in the case
of interface data length is 4-bits.Upper four
bits first then lower four bits
15 LAMP-(L-) LED or EL lamp power supply terminals
16 LAMP+(L+) (E2) Enable

LCD Pin Functions

The function of each pin of LCD is described below VCC, VSS and VEE
while VCC and VSS provide +5v and ground, respectively, VEE is used for
controlling LCD contrast.
28

Register Select (RS)

There are two very important registers inside the LCD. The RS pin is used
for their selection as follows. If RS=0, the instruction code register is selected,
allowing the user to send a command such as clear display, cursor at home, etc.
If RS=1 the data register is selected, allowing the user to send data to be
displayed on the LCD.

Read/Write (R/W)

R/W input allows the user to write information to the LCD or read
information from it. R/W=1 when reading; R/W=0 when writing.

Enable (E)

The enable pin is used by the LCD to latch information presented on its
data pins. When data is supplied to data pins, a high to low pulse must be applied
to this pin in order for the LCD to latch in the data present at the data pins.

D0 - D7

The 8-bit data pins, D0 – D7, are used to send information to the LCD or
read contents of the LCD’S internal registers. There are also instruction codes
that can be sent to the LCD to clear the display or force the cursor to the home
position or blink the cursor. RS=0 is used to check the busy flag bit to see if the
LCD is ready to receive information. The busy flag is D7 and can be read when
R/W=1 and RS=0, as follows: if R/W=1, RS=0.when D7=1, the LCD is busy
taking care of internal operation and will not accept any new information, when
D7=0, the LCD is ready to receive new information.
29

LCD Interfacing with Microcontroller

Figure 4.6 LCD Interfacing with Microcontroller

The LCD interfacing with microcontroller is shown in Figure 4.6


1. Since not generating its own light and makes use of external light for
display, contrast is poor.
2. Cannot be used under wide range of temperature.

4.1.5 Power Supply

The power supply shown in Figure 4.7 is a reference to a source of


electrical power. A device or system that supplies electrical or other types of
energy to an output load or group of loads is called a power supply unit or PSU.
The term is most commonly applied to electrical energy supplies, less often to
mechanical ones, and rarely to others.

Power supplies for electronic devices can be broadly divided into linear
and switching power supplies. The linear supply is a relatively simple design that
becomes increasingly bulky and heavy for high current devices; voltage
regulation in a linear supply can result in low efficiency. A switched-mode
30

supply of the same rating as a linear supply will be smaller, is usually more
efficient, but will be more complex.

As illustrated in figure 4.8, the first section is the transformer

The transformer steps up or steps down the input line voltage and isolates
the power supply from the power line.

Figure 4.7 Power Supply

The rectifier section converts the alternating current input signal to a


pulsating direct current. However, as you proceed in this chapter you will learn
that pulsating dc is not desirable. For this reason, a filter section is used to
convert pulsating dc to a purer, more desirable form of dc voltage.

Linear Power Supply

An AC powered linear power supply usually uses a transformer to convert


the voltage from the wall outlet (mains) to a different, usually a lower voltage. If
it is used to produce DC, a rectifier is used. A capacitor is used to smooth the
pulsating current from the rectifier. Some small periodic deviations from smooth
direct current will remain, which is known as ripple. These pulsations occur at a
31

frequency related to the AC power frequency (for example, a multiple of 50 or


60 Hz).

The voltage produced by an unregulated power supply will vary


depending on the load and on variations in the AC supply voltage. For critical
electronics applications a linear regulator will be used to stabilize and adjust the
voltage. This regulator will also greatly reduce the ripple and noise in the output
direct current. Linear regulators often provide current limiting, protecting the
power supply and attached circuit from over current. Adjustable linear power
supplies are common laboratory and service shop test equipment, allowing the
output voltage to be set over a wide range. For example, a bench power supply
used by circuit designers may be adjustable up to 30 volts and up to 5 amperes
output. Some can be driven by an external signal, for example, for applications
requiring a pulsed output. The block diagram of regulated power supply is
shown in Figure 4.8.

Figure 4.8 Block Diagram of Regulated Power Supply


32

4.2 SOFTWARE SPECIFICATIONS

4.2.1 ARDUINO IDE

The Arduino Integrated Development Environment or Arduino


Software (IDE) - contains a text editor for writing code, a message area, a
text console, a toolbar with buttons for common functions and a series of
menus. It connects to the Arduino and Genuino hardware to upload programs
and communicate with them.

Writing Sketches

Programs written using Arduino Software (IDE) are called sketches.


These sketches are written in the text editor and are saved with the file
extension .ino. The editor has features for cutting/pasting and for
searching/replacing text. The message area gives feedback while saving and
exporting and also displays errors. The console displays text output by the
Arduino Software (IDE), including complete error messages and other
information. The bottom righthand corner of the window displays the
configured board and serial port. The toolbar buttons allow you to verify and
upload programs, create, open, and save sketches, and open the serial
monitor.

NB: Versions of the Arduino Software (IDE) prior to 1.0 saved


sketches with the extension. pde. It is possible to open these files with
version 1.0, you will be prompted to save the sketch with the .ino extension
on save.
33

Verify
Checks your code for errors compiling it.
Upload
Compiles your code and uploads it to the configured board.
See uploading below for details.
Note: If you are using an external programmer with your board, you
can hold down the "shift" key on your computer when using this
icon. The text will change to "Upload using Programmer"
New
Creates a new sketch.
Open
Presents a menu of all the sketches in your sketchbook. Clicking
one will open it within the current window overwriting its content.
Note: due to a bug in Java, this menu doesn't scroll; if you need to
open a sketch late in the list, use the File | Sketchbook menu instead.
Save
Saves your sketch.
Serial
Monitor
Opens the serial monitor.

Additional commands are found within the five


menus: File, Edit, Sketch, Tools, and Help. The menus are context sensitive,
which means only those items relevant to the work currently being carried
out are available.
34

File
• New
Creates a new instance of the editor with the bare minimum structure
of a sketch which is already in place.

• Open
Allows loading a sketch file browsing through the computer drives and
folders.

• Open
Provides a short list of the most recent sketches, ready to be opened.

• Sketchbook
Shows the current sketches within the sketchbook folder structure;
clicking on any name opens the corresponding sketch in a new editor
instance

Examples
Any example provided by the Arduino Software (IDE) or library
shows up in this menu item. All the examples are structured in a tree that
allows easy access by topic or library.

• Close
Closes the instance of the Arduino Software from which it is clicked.
35

• Save
Saves the sketch with the current name. If the file hasn't been named
before, a name will be provided in a "Save as." window.

• Save
Allows to save the current sketch with a different name.

• Page Setup
It shows the Page Setup window for printing.

• Print
Sends the current sketch to the printer according to the settings defined
in Page Setup.

• Preferences
Opens the Preferences window where some settings of the IDE may be
customized, as the language of the IDE interface.

• Quit
Closes all IDE windows. The same sketches open when quit was
chosen will be automatically reopened the next time you start the IDE.
36

Edit

• Undo/Redo
Goes back of one or more steps you did while editing; when you go
back, you may go forward with Redo.

• Cut
Removes the selected text from the editor and places it into the clipboard.

• Copy
Duplicates the selected text in the editor and places it into the clipboard.

• Copy for Forum


Copies the code of users sketch to the clipboard in a form suitable for
posting to the forum, and complete with syntax coloring.

• Copy as HTML
Copies the code of your sketch to the clipboard as HTML, that is
suitable for embedding in web pages.

• Paste
Puts the contents of the clipboard at the cursor position, in the editor.

• Select All
Selects and highlights the whole content of the editor.
37

• Comment/Uncomment
Puts or removes the // comment marker at the beginning of each
selected line.

• Increase/Decrease Indent
Adds or subtracts a space at the beginning of each selected line,
moving the text one space on the right or eliminating a space at the
beginning.

• Find
Opens the Find and Replace window where you can specify text to
search inside the current sketch according to several options.

• Find Next
Highlights the next occurrence - if any - of the string specified as the
search item in the Find window, relative to the cursor position.

• Find Previous
Highlights the previous occurrence - if any - of the string specified as
the search item in the Find window relative to the cursor position.

Sketch

• Verify/Compile
Checks your sketch for errors compiling it; it will report memory
usage for code and variables in the console area.
38

• Upload
Compiles and loads the binary file onto the configured board through
the configured Port.

• Upload Using Programmer

This will overwrite the bootloader on the board; you will need to use
Tools > Burn Bootloader to restore it and be able to Upload to USB serial
port again. However, it allows you to use the full capacity of the Flash
memory for your sketch. Please note that this command will NOT burn
the fuses. To do so a Tools -> Burn Bootloader command must be
executed.

• Export Compiled Binary


Saves a .hex file that may be kept as archive or sent to the board using
other tools.

• Show Sketch Folder


Opens the current sketch folder.

• Include Library
Adds a library to your sketch by inserting #include statements at the
start of your code. For more details, see libraries below. Additionally,
from this menu item you can access the Library Manager and import new
libraries from .zip files.
39

• Add File...
Adds a source file to the sketch (it will be copied from its current
location). The new file appears in a new tab in the sketch window. Files
can be removed from the sketch using the tab menu accessible clicking
on the small triangle icon below the serial monitor one on the right side
the toolbar.

Tools
• Auto Format
This formats your code nicely: i.e., indents it so that opening and
closing curly braces line up, and that the statements inside curly braces
are indented more.

• Archive Sketch
Archives a copy of the current sketch in .zip format. The archive is
placed in the same directory as the sketch.

• Fix Encoding & Reload


Fixes possible discrepancies between the editor char map encoding
and other operating systems char maps.

• Serial Monitor
Opens the serial monitor window and initiates the exchange of data
with any connected board on the currently selected Port. This usually
resets the board, if the board supports Reset over serial port opening.
40

• Board
Select the board that you're using. See below for descriptions of the
various boards.

• Port
This menu contains all the serial devices (real or virtual) on your
machine. It should automatically refresh every time you open the top-
level tools menu.

• Programmer
For selecting a hardware programmer when programming a board or
chip and not using the onboard USB-serial connection. Normally you
won't need this, but if you're burning a bootloader to a new
microcontroller, you will use this.

• Burn Bootloader
The items in this menu allow you to burn a bootloader onto the
microcontroller on an Arduino board. This is not required for normal use
of an Arduino or Genuino board but is useful if you purchase a new AT
mega microcontroller (which normally come without a bootloader).
Ensure that you've selected the correct board from the Boards menu
before burning the bootloader on the target board. This command also set
the right fuses.
41

• Help
Here you find easy access to a number of documents that come with
the Arduino Software (IDE). You have access to Getting Started,
Reference, this guide to the IDE and other documents locally, without an
internet connection. The documents are a local copy of the online ones
and may link back to our online website.

• Find in Reference
This is the only interactive function of the Help menu: it directly
selects the relevant page in the local copy of the Reference for the
function or command under the cursor Sketchbook

The Arduino Software (IDE) uses the concept of a sketchbook: a


standard place to store your programs (or sketches). The sketches in your
sketchbook can be opened from the File > Sketchbook menu or from
the Open button on the toolbar. The first time you run the Arduino
software, it will automatically create a directory for your sketchbook.
You can view or change the location of the sketchbook location from
with the Preferences dialog. Beginning with version 1.0, files are saved
with a .ino file extension. Previous versions use the. pde extension. You
may still open. pde named files in version 1.0 and later, the software will
automatically rename the extension to. ino. Tabs, Multiple Files, and
Compilation. Allows you to manage sketches with more than one file
(each of which appears in its own tab). These can be normal Arduino
code files (no visible extension), C files (.c extension), C++ files (.cpp),
or header files (.h).
42

Uploading

Before uploading your sketch, you need to select the correct items
from the Tools > Board and Tools > Port menus. The boards are described
below. On the Mac, the serial port is probably something like /dev/tty.
usbmodem241 (for an Uno or Mega2560 or Leonardo) or /dev/tty.usbserial-
1B1 (for a Duemilanove or earlier USB board), or/dev/tty.
USA19QW1b1P1.1 (for a serial board connected with a Keyspan USB-to-
Serial adapter). On Windows, it's probably COM1 or COM2 (for a serial
board) or COM4, COM5, COM7, or higher (for a USB board) - to find out,
you look for USB serial device in the port section of the Windows Device
Manager. On Linux, it should be /dev/ttyACMx, /dev/ttyUSBx or similar.
Once you've selected the correct serial port and board, press the upload
button in the toolbar or select the Upload item from the File menu. Current
Arduino boards will reset automatically and begin the upload. With older
boards (pre-Diecimila) that lack auto-reset, you'll need to press the reset
button on the board just before starting the upload. On most boards, you'll
see the RX and TX LEDs blink as the sketch is uploaded.

The Arduino Software (IDE) will display a message when the upload
is complete, or show an error. When you upload a sketch, you're using the
Arduino bootloader, a small program that has been loaded on to the
microcontroller on your board. It allows you to upload code without using
any additional hardware. The bootloader is active for a few seconds when the
board resets; then it starts whichever sketch was most recently uploaded to
the microcontroller. The bootloader will blink the on-board (pin 13) LED
when it starts (i.e., when the board resets).
43

Libraries

Libraries provide extra functionality for use in sketches, e.g., working


with hardware or manipulating data. To use a library in a sketch, select it
from the Sketch > Import Library menu. This will insert one or
more #include statements at the top of the sketch and compile the library
with your sketch. Because libraries are uploaded to the board with your
sketch, they increase the amount of space it takes up. If a sketch no longer
needs a library, simply delete its #includestatements from the top of your
code. There is a list of libraries in the reference. Some libraries are included
with the Arduino software. Others can be downloaded from a variety of
sources or through the Library Manager. Starting with version 1.0.5 of the
IDE, you do can import a library from a zip file and use it in an open sketch.
See these instructions for installing a third-party library.

Third-Party Hardware

Support for third-party hardware can be added to


the hardware directory of your sketchbook directory. Platforms installed
there may include board definitions (which appear in the board menu), core
libraries, bootloaders, and programmer definitions. To install, create
the hardware directory, then unzip the third-party platform into its own sub-
directory. (Don't use "Arduino" as the sub-directory name or you'll override
the built-in Arduino platform.) To uninstall, simply delete its directory.
44

Serial Monitor

Displays serial data being sent from the Arduino or Genuino board
(USB or serial board). To send data to the board, enter text and click on the
"send" button or press enter. Choose the baud rate from the drop-down that
matches the rate passed to Serial. Begin in your sketch. Note that on
Windows, Mac or Linux, the Arduino or Genuino board will reset (rerun
your sketch execution to the beginning) when you connect with the serial
monitor.

Preferences

Some preferences can be set in the preferences dialog (found under


the Arduino menu on the Mac, or File on Windows and Linux). The rest can
be found in the preferences file, whose location is shown in the preference
dialog.

Language Support

In Figure 4.10 the Arduino Software (IDE) has been translated into
30+ different languages. By default, the IDE loads in the language selected
by your operating system. (Note: on Windows and possibly Linux, this is
determined by the locale setting which controls currency and date formats,
not by the language the operating system is displayed in.). If you would like
to change the language manually, start the Arduino Software (IDE) and open
the Preferences window. Next to the Editor Language there is a dropdown
menu of currently supported languages. Select your preferred language from
the menu, and restart the software to use the selected language. If your
45

operating system language is not supported, the Arduino Software (IDE) will
default to English.

Figure 4.9 Language Support

The software can be return to its default setting of selecting its


language based on your operating system by selecting System Default from
the Editor Language drop-down. This setting will take effect when you
restart the Arduino Software (IDE). Similarly, after changing your operating
system's settings, you must restart the Arduino Software (IDE) to update it to
the new default language.
46

Boards

The board selection has two effects: it sets the parameters (e.g. CPU
speed and baud rate) used when compiling and uploading sketches; and sets
and the file and fuse settings used by the burn bootloader command. Some of
the board definitions differ only in the latter, so even if you've been
uploading successfully with a particular selection, you'll want to check it
before burning the bootloader. You can find a comparison table between the
various boards here. Arduino Software (IDE) includes the built-in support for
the boards in the following list, all based on the AVR Core. The Boards
Manager included in the standard installation allows to add support for the
growing number of new boards based on different cores like Arduino Due,
Arduino Zero, Edison, Galileo and so on.

4.2.2 EMBEDDED C
An embedded system is a computer system designed to perform one or
a few dedicated functions often with real-time computing constraints. It is
embedded as part of a complete device often including hardware and
mechanical parts. By contrast, a general-purpose computer, such as a
personal computer (PC), is designed to be flexible and to meet a wide range
of end-user needs. Embedded systems control many devices in common use
today.

Embedded systems are controlled by one or more main processing


cores that are typically either microcontrollers or digital signal processors
(DSP).The key characteristic, however, is being dedicated to handle a
particular task, which may require very powerful processors Since the
47

embedded system is dedicated to specific tasks, design engineers can


optimize it to reduce the size and cost of the product and increase the
reliability and performance. Some embedded systems are mass-produced,
benefiting from economies of scale.

4.2.2.1 Peripherals

Embedded Systems talk with the outside world via peripherals such as:
• Serial Communication Interfaces (SCI): RS-232, RS-422, RS-485 etc.
• Synchronous Serial Communication Interface: I2C, SPI, SSC and ESSI
(Enhanced Synchronous Serial Interface)
• Universal Serial Bus (USB)
• Analog to Digital/Digital to Analog (ADC/DAC)

4.2.2.2 Advantages
• Reliability
• Simple control loop
• Interrupt controlled system
48

CHAPTER 5

PROJECT DESCRIPTION

5.1 PROPOSED SYSTEM

This project proposed a strain gauge based infusion pump to deliver medical
drugs or nutrients to patient .The software programmed in Arduino IDE, therefore
the Android App by MIT-App inventor and the hardware parts was completely
designed .The strain gauge sensor and gravity pressure helps the infusion pump to
infuse the fluids into the body without the help of motor pump .Once the ultrasonic
sensor detects air bubble in the flow of fluids it will show alerts like air in line and
other alerts like occlusion. A small LCD or OLED screen for displaying infusion
parameters, simple button controls, and sensors to monitor flow, pressure, and air
in the line. A rechargeable lithium-ion battery ensures portability, and an
auditory/visual alarm system enhances safety. A peristaltic pump is employed
because it provides accurate and contamination-free fluid delivery. The pump
consists of a low-cost DC motor, which drives the pump mechanism by
compressing flexible medical-grade silicone tubing. All components are housed in
a durable plastic casing. The casing is designed to be compact, lightweight, and
resistant to damage, ensuring the pump can be easily transported and used in
various environments.

5.2 WORKING DESCRIPTION OF THE PROPOSED SYSTEM

Once Power supply is ON the 230v AC is converted to 5V DC which is


connected to Arduino, Bluetooth module, LCD display, Motor pump. The mobile
phone connected to the circuit through Bluetooth will provide the rate of Volume
49

To Be Infused (VTBI) to the patient, and the input is processed in the Arduino
UNO and direct the amount of volume of the drug to be infused to the Motor pump,
then the motor pump will release the amount of drug into patient’s Central
Nervous System (CNS).

5.3 BLOCK DIAGRAM

IV Bag Power supply Smart phone

Motor pump Control unit


Bluetooth module
(Arduino uno)

Alarm unit
Patient
(Bubble detector)

Figure 5.1 Block Diagram of the Proposed System


50

5.4 CIRCUIT CONNECTION OF THE PROPOSED SYSTEM

The circuit connection of the proposed system is shown in Figure 5.1.

Figure 5.2 Circuit Diagram of the Proposed System

5.5 ADVANTAGES

• It has ability to deliver fluids in small volumes, at precisely modified rates.


• Low cost and compact when compared to familiar infusion pumps.

5.6 APPLICATIONS

• Used to deliver fluids, including medications and nutrients, into a patient's


body in a controlled manner.
• Supporting patients in intensive care units with precise delivery of
medications and fluids.
51

CHAPTER 6

RESULT AND DISCUSSION

6.1 HARDWARE MODULE

Figure 6.1 Hardware Module

The Figure 6.1 shows the hardware module of the proposed system. The
hardware module is a low cost smart infusion pump. It consists of Arduino board,
buzzer, Bluetooth module, step down transformer, and LCD display, rectifier
circuit, motor pump, battery. Once Power supply is ON the mobile phone
connected to the circuit through Bluetooth will provide the rate of Volume To Be
52

Infused (VTBI) to the patient, and the input is processed in the Arduino UNO and
direct the amount of volume of the drug to be infused to the Motor pump, then the
motor pump will release the amount of drug into patient’s Central Nervous System
(CNS).

The complete module works under the program that is feeded into the
Arduino. The LCD display shows the volume of drug is to be infused into the
patient’s body.
53

CHAPTER 7

CONCLUSION AND SCOPE FOR FUTURE WORK

7.1 CONCLUSION
An automated infusion pump depends upon a motor pump, which consumes
power, cause mechanical compliance, and may stall suddenly, which could affect
the software, causing advert events as reported through the Food and Drug
Administration(FDA). The previous researches also used a motor pump in
Different sizes and some of them used a load cell for measuring procedures.

This project was undertaken to design low cost, remotely controlled,


gravity, and strain gauge based infusion pump. The software programmed in
Arduino IDE, therefore the Android App by MIT-App inventor and the hardware
parts was completely designed. Moreover, all safety alerts triggered well during
an infusion works. Overall, this work has nice volumetric accuracy readings that
strengthen the idea of using the strain gauge sensor mechanism and gravity
pressure for implementing low-cost infusion systems without motor pumps and
remotely controlled which highlight the importance of wireless technology in
medical equipment for better patient monitoring and health care.

7.2 SCOPE FOR FUTURE WORK


In the future, smart infusion pumps controlled by mobile phones will
revolutionize healthcare delivery. These pumps will seamlessly integrate with
mobile devices, offering precise dosage control and real-time monitoring
capabilities. Patients and healthcare providers will have remote access to infusion
54

data, enabling proactive intervention and personalized treatment adjustments.


Advanced features such as automated alerts for medication errors and predictive
maintenance will enhance patient safety and streamline clinical workflows.
Interoperability with electronic health records and telemedicine platforms will
promote collaborative care and data-driven decision-making. Overall, this
technology promises to enhance medication delivery efficiency, improve patient
outcomes, and reduce healthcare costs.
55

APPENDIX

PROGRAM CODE

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 16, 2);
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);
int pump = 4;
int buzzer = A0;
char data = 0;
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
pinMode(pump, OUTPUT);
pinMode(buzzer, OUTPUT);
digitalWrite(pump, LOW);
digitalWrite(buzzer, LOW);
lcd.init();
lcd.clear();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Waiting for the ");
lcd.setCursor(0, 1);
lcd.print(" Data ");
56

}
void loop()
{
if (Serial.available())
{
mySerial.write(Serial.read());
}
if (mySerial.available())
{
data = mySerial.read();
Serial.write(data);
}
if (data == '1')
{
lcd.setCursor(0, 0);
lcd.print(" 5 ml ");
lcd.setCursor(0, 1);
lcd.print(" ");
}
if (data == '2') {
lcd.setCursor(0, 0);
lcd.print(" 10 ml ");
lcd.setCursor(0, 1);
lcd.print(" ");
}
if (data == '3')
57

{
lcd.setCursor(0, 0);
lcd.print(" 15 ml ");
lcd.setCursor(0, 1);
lcd.print(" ");
}
if (data) {
digitalWrite(pump, HIGH);
digitalWrite(buzzer, HIGH);
if (data == '1') delay(500);
if (data == '2') delay(1000);
if (data == '3') delay(1500);
digitalWrite(pump, LOW);

digitalWrite(buzzer, LOW);
data = 0;
}
}
58

REFERENCES

1. Annemoon D. Timmerman, Maurits K. Konings, Peter Lucas, Roland A.


Snijder and Toine C. Egberts (2020), "Flow variability and its physical
causes in infusion technology: a systematic review of in vitro," De Gruyter,
Vol. 60, No.4, pp .277-300.

2. Chalermsuk .C , Otanasap .N and Kanchanawongkul .V (2022),"Design and


development of saline infusion administration system using IOT", ASEAN
journal of scientific and technological reports, Vol. 25, No. 1, pp. 41-49.

3. Connor S.B, Quill .T.J, Jacobs .J.R(1998), "Accuracy of drug infusion


pumps under computer control", IEEE Transactions on Biomedical
Engineering ,Vol. 39, No. 9, pp. 980-982.

4. Denny. J, Rameeze Raja Mahaif (2019),"Design and development of low


cost infusion pump to deliver medication for patient using labview interface
and arduino", International journal of engineering and advanced
technology, Vol. 9, No. 4, pp. 753-758.

5. Erin Quattromani, Margaret Hassler, Nikki Rogers, Jennifer Fitzgerald and


Paula Buchanan” Smart Pump App for Infusion Pump Training”,Clinical
Simulation in Nursing, Volume 17, pp 28-37.

6. Hani'ah Mahmudah, Moch. Zen Samsono Hadi and Livya Thani (2021),
"Design of monitoring system for infused liquid volume based wireless
communication", preceding International Conference on Computer Science
and Engineering (ICCSE), Vol. 1, pp. 1-6.

7. Mohamed Eltahir Mansour (2021),"Design of low cost smart infusion


pump"International Conference on Computer, Control, Electrical, and
Electronics Engineering (ICCCEEE).
59

8. Muhammad Irfan Ali (2019), "Designing a Low-Cost and Portable Infusion


Pump," Emerging Trends in Engineering Sciences and Technology
(ICEEST) 4th International Conference, pp. 1-4.

9. Pankhurst .P , Abdollahi .Z.M (2016), "Evaluation of a novel portable


micro-pump and infusion system for drug delivery," 38th Annual
International Conference of the IEEE Engineering in Medicine and Biology
Society, pp. 465-468.

10. Ruge .R ,Assunjäo .R, Barbosa .P, Guimaraesm .P.S, Alves .J, Silva .I,
Marquesl .M.A, "Developing the control system of a syringe infusion pump,"
in 2014 11th International Conference on Remote Engineering and Virtual
Instrumentation (REV), Feb. 2014, pp. 254-255.

11. Sergio Barrachina Mir ,German Fabregat Llueca (2020), "Introdution to


programming using mobile phones and MIT app inventor", IEEE revista
iberoamericana de tecnologias del aprendizaje , Vol. 15, No. 3, pp. 192-201.

12. Shengwen Bao, Qinlan Li, Liyang Wang, Mengjie Wang, Longfei Li, Bo
Ding and Lianqiao Zhou (2023),"An occlusion detection system for
intravenous infusion" IEEE sensor journal, Vol. 23, No. 21, pp. 25779-
25788.

13. Syed Waqad Ali ,Muhammad Rehan ,Hira Zahid (2020), "Working
principle and intelligence of smart infusion pump", International journal of
science , Vol. 75, No. 1, pp. 117-124.

14. Xiali Hei, Xiaojiang Du, Shan Lin, Insup Lee, Oleg Sokolsky (2015),
"Patient Infusion Pattern based Access Control Schemes for Wireless
Insulin Pump System", IEEE Transactions on Parallel and Distributed
Systems, Vol. 26, No. 11, pp. 3108-3121.
60

15. Yaqin Li, Mark H. Myers, Francine Kivlehan, Erno Lindner(2016), "A
Feedback Control Approach to Organic Drug Infusions Using
Electrochemical Measurement", IEEE Transactions on Biomedical
Engineering, Vol. 63, No. 3, pp. 506-511.

16. Yenas .N, Setiawan .A.W, Welsan .D (2018), "Design and Realization of
Low-Cost Wireless Remote Infusion Monitoring System", International
Seminar on Application for Technology of Information and
Communication, pp. 151-154.

You might also like