Professional Documents
Culture Documents
REMINDER SYSTEM
B.Tech. MINI Project Report
AMRITHA P.SHYAM
GUJJULA KAVYA REDDY
MONICA MADDUKURI
Certificate
This is to certify that this project report entitled MICROCONTROLLER BASED PATIENT
MEDICINE REMINDER SYSTEM by AMRITHA P.SHYAM(Roll No. 07241A1102)GUJJULA
KAVYA REDDY(Roll No. 07241A1114),MONICA MADDUKURI(Roll No. 07241A1118) submitted
in partial fulfillment of the requirements for the degree of Bachelor of Technology in BioMedical
Engineering of the Jawaharlal Nehru Technological University, Hyderabad, during the academic year
2010, is a bonafide record of work carried out under our guidance and supervision.
The results embodied in this report have not been submitted to any other University or Institution
for the award of any degree or diploma.
T.Padma T.Padma
Associate Professor
.
ACKNOWLEDGEMENTS
Last but not least we express our gratitude and indebtness to our
classmates and to all the faculty members of Biomedical Engineering
Department at GRIET, Bachupally,Hyderabad for their constant support
throughout this entire period.
CONTENTS
ABSTRACT
1. INTRODUCTION
2. CIRCUIT DIAGRAM
3. BLOCK DIAGRAM
4. TOOLS USED
5. DECRIPTION OF COMPONENTS
6. IMPLEMENTATION
6.1 WORKING
6.2 PROGRAM
7. APPLICATIONS
8. CONCLUSION
9. REFERENCE
ABSTRACT
In general, most of the patients forget to take the appropriate prescribed medication at the
required time. There are occasions when patients remember to take medicines at the stipulated time
but forget which pill has to be taken at that particular time. This poses a big problem as it affects the
dosage quantum required for the patient that results in not yielding the right recovery result. It is
difficult for doctors/paramedics/attenders to monitor patients round the clock. In order to avoid these
problems, we have implemented this patient medicine reminder system.
The system allows the user to enter the prescribed timings, at which the patient has to take
the medication.This is done using a few switches and the list of medicines to be administered is
entered through the PC. This data will be stored in the EEPROM by the microcontroller. The
microcontroller continuously reads the time from the RTC .When the timings read from the RTC
equals the timings stored in the EEPROM, the system alerts the buzzer and displays the list of
medicines to be taken at that particular prescribed time on the LCD. Thus, the patient can listen to
the audio indication and see the name of the medicines on the LCD and take them on time.
CHAPTER-1
INTRODUCTION
Patient monitoring and management in critical care environments such as the ICU’s , SICU’s
and ANCU’s involve estimating the status of the patient and reacting to events that may be life
threatening. It is impossible to keep a tab on every patient throughout the day. New solutions are
needed in this field to help the doctors and the nursing staff to monitor the patients.
A critical element of this is the medicine administration and monitoring. This has been
achieved by the patient medicine reminder system. This system consists of an 8-bit microcontroller
with an in-built EEPROM and a real time circuit. This system is driven by an embedded program
that inputs predefined parameters which is processed based on the input variables entered via a user
interface device such as the PC. All the entries made by on the PC is concurrently and
simultaneously displayed on the LCD panel of the device. The logic for the processing is built into
the embedded program to initiate the alert through an audio alarm. Not only does it have an alarm
system, but also an LCD display which displays which medicine is to be taken at the reminder time.
CHAPTER-2
CIRCUIT DIAGRAM
CHAPTER-3
BLOCK DIAGRAM
Block diagram
CHAPTER-4
TOOLS USED
4.1 Software Tools:
1. Keil compiler
2. Orcad.
1. Microcontroller AT89S52.
2. DS1307 RTC.
3. 24C04 SQUARE EEPROM(memory IC)
4. PC.
5. Buzzer
6. MAX232(RS 232)
7. LCD
8. 11.0592 Oscillator Crystal
12. Regulator
DESCRIPTION
OF COMPONENTS
5.1 Keil compiler
Keil development tools for the 8051 Microcontroller Architecture support every level of
software developer from the professional applications engineer to the student just learning about
embedded software development.
8-bit Microcontroller with 8K Bytes In-System Programmable Flash The AT89S52 is a low-
power, high-performance CMOS 8-bit Microcontroller with 8K bytes of in-system programmable
Flash memory. The device is manufactured using Atmels high-density nonvolatile memory
technology and is compatible with the indus try-standard 80C51 instruction set and pinout. The on-
chip Flash allows the program memory to be reprogrammed in-system or by a conventional
nonvolatile memory pro- grammer. By combining a versatile 8-bit CPU with in-system
programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful Microcontroller which
provides a highly-flexible and cost-effective solution to many embedded control applications. By
ATMEL Corporation
5.3 DS1307-RTC
A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit)
that keeps track of the current time. Although the term often refers to the devices in personal
computers, servers and embedded systems, RTCs are present in almost any electronic device which
needs to keep accurate time
Although keeping time can be done without an RTC, using one has benefits:
Most RTCs use a crystal oscillator, but some use the power line frequency. In many cases the
oscillator's frequency is 32.768 kHz. This is the same frequency used in quartz clocks and watches,
and for the same reasons, namely that the frequency is exactly 215 cycles per second, which is a
convenient rate to use with simple binary counter circuits.
• Real time clock counts seconds, minutes ,hours , date of month ,day of week
and year with leap year compensation valid up to 2100
• 56 byte nonvolatile RAM for general data storage
• 2-wrire interface (I2C)
• Automatic power fail detect
• Consumes less than 500 nA for battery back-up
at 25'C
EEPROM (also written E2PROM and pronounced "e-e-prom," "double-e prom" or simply
"e-squared") stands for Electrically Erasable Programmable Read-Only Memory and is a type of
non-volatile memory used in computers and other electronic devices to store small amounts of data
that must be saved when power is removed, e.g., calibration tables or device configuration.
When larger amounts of static data are to be stored (such as in USB flash drives) a specific
type of EEPROM such as flash memory is more economical than traditional EEPROM devices.
EEPROMs are realized as arrays of floating-gate transistors.
Features
Crystal oscillator creates an electrical signal with a very precise frequency 11.0952MHz
Specifications:
Model :CXO\VCXO
Frequency range:1.000125.000MHz
Ts :<10ms
Storage temperature:-40+85
Frequency stability:+25ppm/+50ppm/+100ppm
Symmetry:40%60% 45%55%
Output 0 level:0.5V
Output 1 level:>4.5V(5.0V)/>2.4V(3.3V)
5.6 MAX 232
The MAX220–MAX249 family of line drivers/receivers is intended for all EIA/TIA-232E
and V.28/V.24 communications interfaces, particularly applications where ±12V is not available.
These parts are especially useful in battery-powered systems, since their low-power shutdown
mode reduces power dissipation to less than 5µW. The MAX225, MAX233, MAX235, and
MAX245/MAX246/MAX247 use no external components and are recommended for applications
where printed circuit board space is critical
KEY FEATURES:
APPLICATIONS:
5.7 OrCAD
OrCAD is a proprietary software tool suite used primarily for electronic design automation.
The software is used mainly to create electronic prints for manufacturing of printed circuit boards, by
electronic design engineers and electronic technicians to manufacture electronic schematics and
diagrams, and for their simulation.
The name OrCAD is a portmanteau, reflecting the software's origins: Oregon + CAD.
The OrCAD product line is fully owned by Cadence Design Systems. The latest iteration has
the ability to maintain a database of available integrated circuits. This database may be updated by
the user by downloading packages from component manufacturers, such as Analog Devices or Texas
Instruments.
5.8 Buzzer
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or electronic$. Typical uses of buzzers and beepers include alarms, timers and
confirmation of user input such as a mouse click or keystroke.
LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical
power consumption enables it to be used in battery-powered electronic equipment. It is an
electronically-modulated optical device made up of any number of pixels filled with liquid crystals
and arrayed in front of a light source (backlight) or reflector to produce images in colour or
monochrome.
CHAPTER-6
IMPLEMENTATION
6.1 WORKING
The working of this system is very simple and user friendly.
When the ac mains is switched on, a 12 volts supply is given to the transformer. This voltage
is then stepped down to 5 volts and sent to the power supply board. Here , the ac volt is converted to
dc using a series of resistors and a rectifier network. The capactive network then filters the dc
voltage. The regulated output is sent finally to the micro controller board.
In the micro controller board the AT89S52 microcontroller is pre embedded with a software
program using a keil compiler. The input of the micro controller is given from the oscillating crystal
11.0592 via the pins X1, X2(18,19). The entire system is further interfaced to a pc using a MAX 232
port to connect the RS232 cable. A 6 pin cable is used for the interconnection between the lcd and
the micro controller via the pins (32-37). Next set of pins (8pin connectors) is used for interfacing
between the RTC (Real Time Clock) and the micro controller. Apart from this the micro controller
board is embedded with a reset switch.
In the RTC board a series of 4 switches and a memory battery is connected to the EEPROM
and the DS1307 RTC. Here, the time , date and year along with the entry data for medicines can be
given as input to the EEPROM.
When the power supply is given the leds will glow indicating that the system is running.
Now, the RS232 cable is inserted into the RS232 port of the cpu. When this is done, a hyperterminal
window is opened on the monior. The reset switch has to be turned on at this instant. The monitor
then displays a welcome note. The next step is to switch on the EM(Enter Medicine) switch. When
this is pressed, the monitor displays “ENTER MEDICINE & DOSAGE TO BE GIVEN”. At the
prescribed timings (as prescribed by the doctor/physician) the buzzer gives an alarm, along with the
simultaneous display of the name of the medication and the dosage on the lcd. The alarm can be
turned off by pressing the EM switch once again.
6.2 PROGRAM
#include<reg51.h>
#include<intrins.h>
#include "lcddisplay.h"
void start(void);
void stop(void);
void settime(void);
unsigned int i;
unsigned char ch,j,d11,d22,mem,zzz,msg[17];
bit pm=0,pm1,dayselect;
SBUF=value;
while(TI==0);
TI=0;
unsigned char r;
for(r=0;s[r]!='\0';r++)
SBUF=s[r];
while(TI==0);
TI=0;
void main()
unsigned char z;
enter=inc=dec=alarm_sw=1;
bel=0;
dayselect=0;
lcd_init();
delay(100) ;
lcd_init();
TMOD=0X20;
SCON=0X50;
TH1=0XFD;
TR1=1;
alarmcheck=1;
msgdisplay("welcome");
z=read(0);
bel=1;
if(z==0x80)
alarmcheck=0;
start: lcdcmd(0x01);
type=6;
settime();
write(0,0);
delay(10);
write(1,temptime[1]);
delay(10);
write(2,temptime[0]);
delay(10);
for(add=4;add<7;add++)
write(add,temptime[add-1]);
delay(10);
dayselect=1;
// write(0x07,0x10);
delay(100);
timedisp:
/*
d22=0x15;
for(d11=0;d11<9;d11++)
h_break[d11]=read(d22++);
delay(100);
m_break[d11]=read(d22++);
delay(100);
//delay(300);
alarmcheck=read(0x20);
//
*/
lcdcmd(0x01);
msgdisplay("Dt:");
while(1)
lcdcmd(0x04);
for(add=0;add<7;add++)
time[add]=read(add);
z=time[add];
lcddata(B2+48);
lcddata(B1+48);
if(add<2)
lcddata(':');
if((add>3)&&(add<6))
lcddata('/');
delay(10);
if(pm1)
msgdisplay("pm");
else
msgdisplay("am");
if(dayselect==1)
lcdcmd(0x1);
lcdcmd(0x8d);
lcdcmd(0xe);
if(inc==0)
while(inc==0);
if(day<8)
day=day+1;
daydisplay(day);
if(dec==0)
while(dec==0);
if(day>1)
day=day-1;
daydisplay(day);
write(3,day);
while(enter==0);
dayselect=0;
lcdcmd(0x0c);
goto timedisp;
}
daydisplay(time[3]);
if(alarmcheck)
xy=time[2];
if(((xy==1)||(xy==3)||(xy==5))&&(time[0]<10))
bel=0;
lcdcmd(0x1);
lcdcmd(0xc0);
msgdisplay("medicines");
if(xy==1)
i=0x10;
if(xy==3)
i=0x20;
if(xy==5)
i=0x30;
j=0;
do
{
mem1[j]=read(i);
i++;
j++;
while(mem1[j-1]!=13);
mem1[j]='\0';
lcdcmd(0x1);
msgdisplay(mem1);
while(alarm_sw);
bel=1;
lcdcmd(0x1);
msgdisplay("thank you!!!");
delay(100);
goto timedisp;
//lcdcmd(0xcf);
//lcddata(' ');
if(alarm_sw==0)
while(alarm_sw==0);
lcdcmd(1);
msgdisplay("ENTER MEDICINES");
i=0;
do
while(RI==0);
ch=SBUF;
RI=0;
msg[i++]=ch;
while(ch!=13);
for(i=0;msg[i]!=13;i++)
write(mem++,msg[i]);
delay(200);
write(mem,13);
delay(500);
//
j=0;
i=0x10;
do
mem1[j]=read(i);
i++;
j++;
}while(mem1[j-1]!=13);
mem1[j]='\0';
lcdcmd(0x1);
msgdisplay(mem1);
//
i=0;
do
while(RI==0);
ch=SBUF;
RI=0;
msg[i++]=ch;
while(ch!=13);
mem=0x20;
for(i=0;msg[i]!=13;i++)
write(mem++,msg[i]);
delay(200);
write(mem,13);
do
while(RI==0);
ch=SBUF;
RI=0;
msg[i++]=ch;
while(ch!=13);
mem=0x30;
for(i=0;msg[i]!=13;i++)
write(mem++,msg[i]);
delay(200);
write(mem,msg[i]);
bel=1;
alarmcheck=1;
j=0;
i=0x30;
do
mem1[j]=read(i);
i++;
j++;
}while(mem1[j-1]!=13);
mem1[j]='\0';
lcdcmd(0x1);
msgdisplay(mem1);
delay(1000);
goto timedisp;
if(enter==0)
lcdcmd(0x01);
while(enter==0);
goto start;
void settime(void)
lcdcmd(0xC0);
if(type==6)
msgdisplay("hh:mmAM dd/mm/yr");
while(enter==1)
{
lcdcmd(cmd);
while((inc==1)&&(dec==1)&&(enter==1));
if(inc==0)
delay(30);
while(inc==0);
if(h==uplimit)
h=0;
h=h+1;
if(dec==0)
delay(30);
while(dec==0);
if(h)
h=h-1;
else
h=uplimit;
if(keycount==2)
if(h)
msgdisplay("pm");
pm=1;
else
msgdisplay("am");
pm=0;
else
g=h;
d11=g/10;
d22=g%10;
lcddata(d11+48);
lcddata(d22+48);
temptime[keycount]=g;
keycount=keycount+1;
delay(30);
while(enter==0);
{
start();
ptos(dat); //data//
stop();
start();
_nop_();
start();
SDA=1;
for(i=0;i<=7;i++)
SCL=0;
_nop_();
_nop_();
SCL=1;
v=v|SDA;
if(i<=6)
v=v<<1;
return(v);
if(day==1)
msgdisplay("SUN");
else
if(day==2)
msgdisplay("MON");
else
if(day==3)
msgdisplay("TUE");
else
if(day==4)
msgdisplay("WED");
else
if(day==5)
msgdisplay("THU");
else
if(day==6)
msgdisplay("FRI");
else
if(day==7)
msgdisplay("SAT");
else;
void start(void)
{ SCL=1;
SDA=1;
_nop_();
_nop_();
SDA=0;
SCL=0;
for(i=0;i<=8;i++)
{ c=a&128;
if(c==0)
SDA=0;
else
SDA=1;
SCL=1;
_nop_();
_nop_();
SCL=0;
a=a<<1;
void stop(void)
{ SDA=0;
SCL=1;
_nop_();
_nop_();
SDA=1;
SCL=0;
for(i=0;i<=s;i++)
for(j=0;j<=250;j++);
*/
for(i=0;i<itime;i++)
for(j=0;j<3;j++);
/*
unsigned char n;
n=value;
value=value&(0x0f);
ldata = value;
rs =0;
en =1;
en =0;
value=n;
value=value<<4;
value=value &(0x0f);
ldata = value;
rs =0;
en =1;
en =0;
unsigned char n;
n=value;
value=value&(0x0f);
ldata = value;
rs =1;
en =1;
en =0;
value=n;
value=value<<4;
value=value &(0x0f);
ldata = value;
rs =1;
en =1;
en =0;
for(i=0;b[i]!='\0';i++)
lcddata(b[i]);
}} */
CHAPTER-7
APPLICATIONS
Health maintenance organizations, medical researchers and health practitioners realize that in
an environment that rewards short-term cost savings and emphasizes management of current
diseases, increased use of patient reminders can significantly improve delivery of preventive care
services and treatment for chronic illnesses and can lead to long-term beneficial outcomes as well
The applications of patient medince reminder system is been initiated in a wide range in the
modern health care field. Its been implanted in most of the hospitals to ease the effort of the patient
entourage. It is as well a second-hand for the aged and memory loss group.
It is well known that patients who are prescribed medications, or who take over the counter
(OTC) medications, should take such medications at pre-determined dosage time intervals as
prescribed by the doctor or as indicated on the OTC medication package. Many drugs and
medications currently prescribed by physicians must be taken at prescribed time intervals. If the
patient ignores such instructions, for example, by taking the prescribed medication too often or too
seldom, this may result in serious adverse effects such as overdose risks or reduction in the
concentration of medication in the body. Many patients miss dosages because they are distracted or
forget about their medications at the correct dosage time. This is particularly true of elderly patients
who may be taking more than one medication at different time intervals. Although patients may set
an alarm clock or the like at a prescribed medication time interval, they may set the incorrect time
interval or may forget to re-set the alarm after taking a medication dose, and may also be away from
the alarm and not hear it when it goes off.
When required to take medicine on a daily or hourly schedule, many people have a problem
in recalling the time when the medicine was last taken. Similarly, many patients are unable to
remember or determine the previous dosage of medication taken or whether it has been taken at all.
This problem is particularly common among elderly patients, who may experience short-term
memory loss or, because of their infirmities, confuse the dosage previously taken of each medication.
Patients may also be unable to accurately read the medication containers themselves, and often have
no means to determine whether they have taken the mandated doses at the prescribed time intervals.
CHAPTER-8
CONCLUSION
The report contains a very different mix of studies varying from software to hardware. Vast
research is being done in the field of healthcare and patient medicine monitoring. This project has
given a basic insight into the bridging of technology and medicine. Patient medicine reminder
system is a “Cueing Support System for Evidence-Based Medicine practice.”
CHAPTER-9
REFERENCES
o www.wikipedia.com
o http://www.faqs.org/patents/app/20090040874
o ^ "Senior Care and Safety Check". Garland County Sheriff's Department.
http://www.garlandcountysheriff.com/programs/seniorcare.html. Retrieved 2007-12-16.
o ^ Fairfield County Sheriff's Office CARE! (Call Reassurance Program)
o Celler, Branko, Nigel Lovell, and Daniel Chan. “The Potential Impact of Home Telecare
of Clinical Practice”. The Medical Journal of Australia. 1999: 518-521.