You are on page 1of 6

ISSN (Online) : 0974-5645

ISSN (Print) : 0974-6846


Indian Journal of Science and Technology, Vol 8(S2), 189–194, January 2015 DOI : 10.17485/ijst/2015/v8iS2/58744

Smart Pill Box


Aakash Sunil Salgia*, K. Ganesan and Ashwin Raghunath
VIT University, Vellore-632014, India; aakashsalgia@yahoo.com, kganesan@vit.ac.in, ashwin.rghnth@gmail.com

Abstract
Untimed medicine administration can always show adverse effects on the health of the patients. The proposed system is
designed to help these patients to take the required medicine in the right proportion at the right time. The basic ideology
is integrating the principle of Alarm clock with Light based slot sensing on a normal pill box. An alternate to the light based
sensing method using capacitive fields is also employed. To make it more state-of-the-art, it is inbuilt with a GSM module
for alerting the patient and also the chemist at the needed instant.

Keywords: Alarm Clock, GSM Module, Slot Sensing, Light Based Sensing, Load Cell, Capacitive Sensor

1.  Introduction the increase in Cardio vascular diseases and Diabetes


among the peer group regular medicine administration
The fast paced life of people has always taken a toll on
has become a necessity. But among this another 40-60%
the people. The irony is that the new medicines are found
for the never ending chain of diseases. These new diseases is having the issues related to forgetting the taking of
often require timely medication and course therapy for ­medicines at right time.
curing. But the busy life schedule of the people often let The current common techniques used in market for
down the best procedure. Most common reason for the the reminder includes the normal alarm with a pill box.
failure of a method of cure is the failure of the patient to
But this does not check for overdose and wrong dosage
administer the dosage in the right proportion and at right
time. among the patients.
The new awaited feature in these so called intelligent It only uses a clock, which on passage of a set time
pill boxes is the availability of the automated alert system generates an alarm. Moreover the timely alerting for the
for the chemist to send the re-fill of the tablets. With the re-filling of the pill box to user is also absent resulting
GSM technology, we are able to connect to most people
often in breaks in the course of therapy.
around the planet. So a link between the patient and the
chemist is employed using GSM. Also, it is not ­convenient The sensing of slots of the pill box can be done by both
for a fixed device to alert the patient ­nowadays. So Load Sensing methodology and by Light based sensing.
­portability is a necessity in this device. The advantages of the slot based sensing is that individ-
ual moment sensing is possible for detecting over dosage
2.  Literature Survey problems and incorrect dosage issues. The survey for var-
ious modes of sensing the slots has been performed both
According to World Health Organization, over 80% of
the people above the age of 60 years are prescribed medi- analytically and practically and comparisons between the
cines that are to be administered 2 - 4 times a day. With modes have been performed.

*Author for correspondence


Smart Pill Box

3.  sensing Methodology presence of a medicine, but also the number of medicines
in each slot. This design can be achieved specifically for
Based on various references available, we have concluded a type of a pill. The slot includes placement of pills over
to test the slot sensing using three main methods. each other, such that the increase in height of the pill pile
will allow less light to fall on the LDR, thereby giving a
• Milligram measuring Load Cell higher voltage at the output.
• Light based sensing The last method is capacitive based sensing where
• Capacitive based sensing the change in frequency is proportional to the change in
dielectric strength of the sensor. Here the arrangement is
First we have checked for the characteristics of a Load same as the light based sensing, i.e. slot sensing mecha-
Cell. By analyzing and studying the bigger version i.e. a nism. The principle of working is that the medicine or
Load Cell used to measure 50kg of mass, we felt it will be tablets placed in the slot will produce a varying dielectric
the most accurate method provided it is connected on the value leading to varying frequency than when it is empty.
Centre of Gravity (CoG) of the box. The Load cell effec- C = єA/d ---- (1)
tively reported the changes in mass at the corners of the where, C – Capacitance across the sensor
box keeping the centre of mass intact. Thus the measuring Є – Permittivity of the dielectric medium
is possible with just one sensor connected at the CoG of A – Area of the conducting trace/plate
the box. But, the milligram measuring Load Cell was very d – Distance between the plates/traces
expensive making it not suited for a commercial product. The sensor developed is made to become a part of
The next method which can be used is light based the potential divider at inputs of an astable multivibra-
sensing. It is found to be relatively cheap and more suit- tor, which gives a pulse output with variable frequency
able method of sensing. This method is effective if slot for varying capacitances of the sensor. This frequency
based sensing is used. Thus each slot will be sensed with output can be monitored by a microcontroller which will
one sensor individually. The sensor employed is Light count the corresponding number of pulses in a stipulated
Dependent Resistor (LDR). The light blockade on the amount of time. The frequency is calculated using the
LDR will give maximum output voltage. ­following equation (2)
By studying the Table 1, it is observed that the light is f = 1.44(R3 + 2R2)C ---- (2)
totally dependent on the ambience illumination. On test- Where, f = frequency of oscillations
ing for an entire day with a 4g tablet on a normal LDR C = capacitance of sensor
sensor, it is observed that the after blocking voltage is R3 and R2 = Resistances forming the potential
nearly the same (5V), the empty voltage varies as a func- divider
tion of ambient flux. The voltage will be maximum during 1.44 is the constant.
the dawn and drops as the day progresses. After the noon, The unknown capacitance C shown in Figure 1 is the
the voltage again rises to the maximum value till dusk. designed capacitive sensor, which is connected to the
Thus, fixing a standard threshold voltage especially ­during control terminal of an astable multivibrator. The capaci-
night becomes difficult. tive sensor is developed by drawing conductive traces
A specific design of structure of the slots can be separated by dielectrics. The presence of a medicine pill
developed, such that it will assist in not only sensing the will change the permittivity from the default permittivity
of free space, hence there is a change in capacitance.
Table 1.  Light based (LDR) sensing test with A 4g pill While understanding the Table 2, it is seen that the
capacitance sensor yields an output that is dependent on
Time Indoor (in V) Outdoor (in V) the pill mass or area. Wider or heavier pills will yield lower
06.30 4.98 4.94 count of pulses. Apart from that, there is a wide range of
difference from the output due to touch from one’s hand.
08.30 4.63 3.87
The sensor also showed promise as it didn’t get affected by
13.40 3.91 2.75
the external surrounding as much as by the light.
17.00 4.64 3.92
Out of the proposed techniques, the capacitive based
21.30 4.83 (Tube light) 5.00 sensing proves to be the most suitable and ­appropriate

190 Vol 8 (S2) | January 2015 | www.indjst.org Indian Journal of Science and Technology
Aakash Sunil Salgia, K. Ganesan and Ashwin Raghunath

Figure 1.  Astable multivibrator with sensor input.

Table 2.  Capacitive based sensing test


MEDICINE FREQUENCY (Hz)
50mg 20580
100mg 20240 Figure 2.  Flowchart of operation.
4000mg 19990
5000mg 19700 resolve the complexity surrounding the project. With
Empty 21000 or higher the detection of power, all the registers are cleared of the
Hand Touch 5000
previous values and previously stored values are loaded
from the ROM memory. The Real Time Clock within the
ARM7 controller board is initialized. At first the mode
of the system is checked. There are 3 basic modes for this
option. It does not face the problem of inappropriate system:
blockage of light or triggering due to external sources
of light. The capacitive based sensing methodology also 1. Set Time And Date
sheds the bulky appearance as in the case of the other 2. Set Medicine Frequency And Alarm
­methodologies. Also the design of the sensor is cost 3. Display Mode
­effective.
The Set Time and Date mode will enable the user to
adjust the Time and Date of the display system ­according
4.  Software Algorithm
to his country’s standard time. Referring to Figure 3, we
The smart pill box is designed to assist the users who can see that inside two selection options are given to
are generally in the age group of a 50+ who tends to for- adjust the date and time independently. Within the date
get their periodical medicinal intake. The software that or the time option, we can increment the values by using
governs the control message flow is designed on ARM a loop and check function.
platform using Keil Software. The flowcharts given below The Set Medicine Frequency module is for enabling
explain the operations of the design under different the user to set the frequency of the medicine in a day and
­conditions and their response. also set the convenient time for the alarms during the
From the general flowchart of operation given above course. The entry to this mode is similar to the Set Time
in Figure 2 we realize the most optimum code that will and Date mode. Initially the number of the times or the

Vol 8 (S2) | January 2015 | www.indjst.org Indian Journal of Science and Technology 191
Smart Pill Box

will be executed. Else, the next alarm value will be loaded


to Alarm registers. Figure 4 above explains the operation
of Scan and Alarm function.
The code not only covers the all necessary functions
of the system, but also eliminates the possibility of a false
alarm. For example, the user choosing to have his medi-
cine before few minutes of the alarm will set the next new
value of alarm registers as soon as he closes the box. This
will prevent the unwanted ringing after the event.
Side heading 5 not found…

6.  Design
The smart pill box is combination of two major parts:
Sensor board and the Control board. The Capacitive
based Sensor was finalized after the above testing owing
to it its cheap and all time operation advantage over the
Figure 3.  Flowchart of (i) set_alarm ( ) (ii) set_date_and light based sensor.
_time ( ) The sensor board was fabricated using the ORCAD
PCB wizard. For a prototype we designed a 2*4 matrix
sensor board (Refer Figure 5). Each element in this
medicine frequency is set. Then by incrementing function matrix will form an individual slot for the medicine or
we can set the time of the day for the alarms correspond- pills. The individual sensor is connected to the inter-
ing to the number of alarms in a day as shown in Figure 3 face board designed based on the principle of the astable
below. ­multivibrator.
Display Mode is the normal mode of operation. It
works by no manual operation and displays the current
time and date of the day.
After the normal mode of execution, the alarm ­function
checks for the time to map with the set alarm values. If
the result yields positive, the GSM module is activated via
the UART messages (AT commands) to call the user in
his contact number. In order to activate a snooze option,
the alarm_min variable is incremented twice thereafter.
If the person fails to take the pill on time, another UART
­message to the GSM is sent for ringing again.
The detection of activity of box opening will trigger the
Scan and result function. The loop for the reading the val-
ues from each sensor is defined via selection lines of the
multiplexer IC. The received values are stored in the regis-
ters. The values stored in an array are again scanned for the
values of the counter read. If they exceed the maximum set
threshold, then a count variable is incremented. If the count
variable value approaches the number of slots, the UART
will send AT command to GSM module to set an SMS to
the user or the pharmacy to refill the medicine box.
Once the box gets closed, count variable is checked for
incremental updation. If it fails, then the snooze operation Figure 4.  Flowchart of alarm_and_scan ( ).

192 Vol 8 (S2) | January 2015 | www.indjst.org Indian Journal of Science and Technology
Aakash Sunil Salgia, K. Ganesan and Ashwin Raghunath

c­ onsumption by the GSM module. Alternatively, we can


use Li-ion battery pack for easy portable use.

7.  Working/Operation
The system will work as normal Digital clock by default.
The Real time clock inside the LPC2148 will update the
registers every 12000000 cycles. The registers are then
loaded to the RAM of the LCD and hence displayed on
the Screen. When the Set button is pressed, the display
Figure 5.  Prototype sensor board. is cleared and message for setting the time is displayed.
When the adjust button is pressed the time registers are
updated and new value is displayed. The components can
be changed by pressing again the Set button. The register
is updated by incrementing the operation.
Similarly, the Medicine frequency can be set for an
atmost of 4 times a day. Based on this individual alarm
can also be set by the same operation. When the time reg-
ister value equals the Alarm register value, PWM pulse
is generated at the Pin connected to the Buzzer and the
UART1 sends the AT command for calling the user to the
GSM module.
When the box is opened, a delay timer is set for 2
­minutes. At the end of 2 minutes, a buzzer will sound
and a display message alerting the user that the box is
open for long. If the box is closed before this alert, the
Figure 6.  Integrated block diagram. timer is interrupted and reset. Once the box is closed, the
selector lines are updated one by one to read the current
frequency value of the sensor. The sensor slot with very
The sensor output is multiplexed to the controller
high frequency will be considered empty and a count reg-
board (LPC2148) via the multiplexer IC. The selector
ister will be incremented. The user will be aware of the
lines receive inputs from the microcontroller. The micro-
scan, as the message will be displayed on the LCD screen
controller is interfaced with two output modules. The
at this moment.
LCD module for display operations and Buzzer for alarm
As the count value is near to 85 % of the total slots in
function. Additional switches and push buttons are con-
the medicine box, the UART will send AT command to
nected as inputs to adjust the register values. The GSM
GSM module to send a SMS to the pharmacy or the user
module is connected via the UART.
alerting him about the need to refill the pill box. The box
The GSM module (SIM300) is interfaced to the
has to be scanned while it is closed to obtain results with
­controller for sending messages to the Chemist and to the
minimum external interferences.
patient as an alert system. The numbers to be accessed
by the GSM is read from the microcontroller’s memory.
Also the time for setting the alarm will be accessed from
8.  Experimental Result
the microcontroller. This will help the chemist to find any
case of over dosage or under dosage. The system was tested in office and home environment and
To reduce the interference from the nearby sen- passed the test with ease. The system was successfully tested
sors a one side conducting MYRAL material division is for 10mg tablets. Below 10mg, the results were marred by
created between each of these sensors. The clock is pow- interferences from the surrounding. A higher sensitivity
ered by external AC to DC adapter owing to high power sensor will result in cross-talk between the sensors.

Vol 8 (S2) | January 2015 | www.indjst.org Indian Journal of Science and Technology 193
Smart Pill Box

The system can be often be limited by the network   2. Abbey B, Alipour A, Camp C, Hofer C. The smart pill box.
problems or engaged/busy lines of communication. These Resna annual conference; 2012; PDF version.
additional solutions will result in higher price and often   3. Availablefrom:http://resna.org/conference/proceedings/2012/
unfeasible keeping in mind the portability of the system. StudentDesign/SmartPillBox.html.
  4. A Smart Pill Box Uses Face Recognition Tech to Ensure We
Take Our Meds. Popular Science Magazine. 2011 Jan 28.
9.  Conclusion   5. Available from: http://www.popsci.com/science/
article/2011-01/smart-pill-box-taps-face-recognition-tech-
The solution of this complication is supplemented by the ensure-we-take-our-meds.
development of an advanced technology supported pill   6. Sabate E. Adherence to long-term therapies, evidence for
box called the Smart pill box. This technology is derived action. Geneva, Switzerland: (World Health Organization);
by combining the two vintage experiments from our 2003.
­technical education.   7. Kulkarni AU. INTELLIGENT PILL BOX. Patent No:
The smartness of the pillbox is achieved using cost US7,877268 B2, 2011.
effective slot sensing techniques like capacitance based slot   8. Savir J, Sharon R, Ben-Zur G, Gan-Ner. Online Smart Pill
sensing. These simple efficient techniques are supported Box Dispensing System. Patent no: US2009/0299522 A1,
by advancements like GSM technology to bridge the gap 2009.
  9. Easy-to-use pill dispenser with clock talking reminder.
in communication between the supplier or the chemist
2014 Feb 7. Available from: http://www.epill.com/week-
and the customer or patient, thus aiding the patient.
lymed.html.
10. ADG1206/ADG1207, Monolithic iCMOS analog
10.  Acknowledgement ­multiplexer. Datasheet. Analog Devices; 2006.
11. LPC2141/42/44/48 microcontroller, 32/64 bit ARM7
The authors would like to thank the TIFAC-CORE in TDMI-S CPU. Datasheet, NXP Semiconductors; 2008 Nov.
Automotive Infotronics, VIT University, Vellore, India for 12. Arduino forum. 32 channel multiplexer. 2012 Feb;
providing necessary hardware and software support. Available from: http://forum.arduino.cc/UsingArduino/
Generalelectronics/32 channel multiplexer.

11.  References
1. Reach G. Can technology improve adherence to long-term
therapies? Journal of Diabetes Science and Technology.
2009; 2.

194 Vol 8 (S2) | January 2015 | www.indjst.org Indian Journal of Science and Technology

You might also like