CA2217220C - Automatic prescription pill dispensing system - Google Patents

Automatic prescription pill dispensing system Download PDF

Info

Publication number
CA2217220C
CA2217220C CA002217220A CA2217220A CA2217220C CA 2217220 C CA2217220 C CA 2217220C CA 002217220 A CA002217220 A CA 002217220A CA 2217220 A CA2217220 A CA 2217220A CA 2217220 C CA2217220 C CA 2217220C
Authority
CA
Canada
Prior art keywords
pill
pills
sliding
dispenser
array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CA002217220A
Other languages
French (fr)
Other versions
CA2217220A1 (en
Inventor
Cal Loveless
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CA 2191900 external-priority patent/CA2191900A1/en
Application filed by Individual filed Critical Individual
Priority to CA002217220A priority Critical patent/CA2217220C/en
Publication of CA2217220A1 publication Critical patent/CA2217220A1/en
Application granted granted Critical
Publication of CA2217220C publication Critical patent/CA2217220C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61JCONTAINERS SPECIALLY ADAPTED FOR MEDICAL OR PHARMACEUTICAL PURPOSES; DEVICES OR METHODS SPECIALLY ADAPTED FOR BRINGING PHARMACEUTICAL PRODUCTS INTO PARTICULAR PHYSICAL OR ADMINISTERING FORMS; DEVICES FOR ADMINISTERING FOOD OR MEDICINES ORALLY; BABY COMFORTERS; DEVICES FOR RECEIVING SPITTLE
    • A61J7/00Devices for administering medicines orally, e.g. spoons; Pill counting devices; Arrangements for time indication or reminder for taking medicine
    • A61J7/04Arrangements for time indication or reminder for taking medicine, e.g. programmed dispensers
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D83/00Containers or packages with special means for dispensing contents
    • B65D83/04Containers or packages with special means for dispensing contents for dispensing annular, disc-shaped, or spherical or like small articles, e.g. tablets or pills

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Mechanical Engineering (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Medical Preparation Storing Or Oral Administration Devices (AREA)

Abstract

An Automatic Prescription Pill Dispensing System for home use provides a locked cabinet in which prescription drugs are pre-loaded into a pill array according to the users medication regime using a specially designed pill cartridges. The bottom of the array consists of a series of sliding panels which selectively permit pills to drop into a dispensing location under control of a microcontroller. Certain prescription pills are available upon demand, while other prescription pills are available at preset time intervals only. Visual and audible alarms alert the user when the prescription pills are available to be removed from the dispensing location. A timer ensures that prescription pills which are not removed by the user within a pre-set time are removed from the dispensing location to a holding bin, thus ensuring that pills may only be removed at the appropriate time.
Pills are loaded into special pill cartridges, one type of pill per cartridge and stored in a locked drawer in the unit. This pill cartridge approach simplifies the loading of the main pill array.
A removable portable unit attached to the main dispensing system provides a day's medication when the user is away, from the main dispenser for the day.
A maintenance unit works in conjunction with the main dispenser to set the time and perform maintenance functions on the Main Dispensing System.
A pill cartridge loading tray simplifies the loading of the pill cartridges.

Description

AUTOMATIC PRESCRIPTION PILL DISPENSING SYSTEM
.
BACKGROUND OF THE INVENTION
The need for a Prescription Pill Dispensing System for the ill or elderly has been well documented in the teachings. Numerous novel approaches have been advanced. Large, complex and costly systems have been devised to meet the needs of an institution type environment, namely hospitals and nursing homes. None, to my knowledge, address all the needs of people requiring medication in their homes. The need to focus on this application is becoming more apparent as the trend continues towards home care and away from institutional care. A device that meets all the essential requirements for home use should have the following characteristics:
1. The ability to reliably dispense a plurality of types, sizes and number of pills at a plurality of predetermined time intervals.
2. The ability to alert the user by visual and audible means when these time intervals occur.
3. The ability to not alert the user at times when there are no pills to be dispensed.
4. Have the capability of allowing the user immediate access to a specific type of medication, such as a pain reliever or decongestant, with appropl iate safeguards.
5. Provide the capability for the removal of pills from the accessible part of the unit to a user inaccessible storage bin if the user does not retrieve the pills within a reasonable waiting period.
6. Provide access to one day's supply of medication, in the event that the user is away from the dispenser for a part of the day or if the system is waiting repair, with the appropriate safeguards.
7. Incorporate a reloading procedure which is safe, versatile, operator friendly and can be performed at any time, by the user, if capable, a family member, a care giver or a pharmacist (load pill cartridges).
8. Give extensive attention to safety mech~ni~m~ and ease of use procedures in keeping with the fact that this drug dispensing system is for home use and is operating outside the control of an institution and trained medical staff. Important characteristics to consider are hardware fault detection which produces a controlled shutdown, a local and remote ..
alarm indication system and a procedure which insures prompt repair.
The prerelled embodiment of this invention seeks to meet all the characteristics stated above.
In reviewing the prior art, many of the teachings claim the basic characteristics as stated in characteristics number 1 and 2 above but stops there. This allows for the ejection of drugs into the open environment and possibly into the hands of a forgetful user or a curious child, as opposed to confining the drugs until the user accesses them. Some teaçhing~ claim the On Demand capability as stated in number 4 but these are hand held devices and are specifically designed only for this use. One teaching, to my knowledge, by Daneshvar goes the next essential step in safety, that being, the removal of pills from the access port as stated in number 5 but exhibits other shortcomings. Other teachings focus on the ability to detect the exact time that a pill is taken and record this information for future analysis while others have inventory control capability. These abilities although important for some applications, add complexity and cost to the device with limited value to the average home user. Some teaçhin~ claim the ability of serving many users from the same system. This could be advantageous in an institution type environment but is not essential in a private residence environment.

PRIOR ART
US PATENT DOCUMENTS
3,998,356 12/1976 Bennett 221/2 4,360,125 11/1982 Martindale 221/2 4,573,606 03/1986 Lewis 221/2 4,674,651 06/1987 Scidmore 221/3 4,717,042 01/1988 McT.aughlin 221/3 4,763,810 08/1988 Christiansen 221/3 4,785,969 11/1988 McT.~1ghlin 221/2 4,811,764 03/1989 McT ~1ghlin 221/2 4,838,453 06/1989 Luckstead 221/2 4,872,591 10/1989 Konopka 221/3 ~ 4,911,327 03/1990 Silberfield 221/3 4,953,745 09/1990 Rowlett 221/5 5,014,875 05/1991 McT ~l1ghlin 221/2 5,044,516 09/1991 Hoar 221/2 5,097,982 03/1992 Kendem 221/3 5,152,422 10/1992 Springer 221/2 5,176,285 01/1993 Shaw 221/3 5,221,024 06/1993 Campbell 221/3 5,246,136 09/1993 Loidl 221/3 5,337,919 08/1994 Spaulding 221/2 5,372,276 12/1994 Daneshvar 221/2 5,431,299 07/1995 Brewer 221/3 SUMMARY OF TIIE INVENTION
- The present invention relates to an Automatic Prescription Pill Dispensing System designed for controlling the prescription drug regimes of an individual in his/her home. This invention embodies all the characteristics listed in the previous section.
This invention dispenses a plurality of types, sizes and quantity of pills at 4 selected time periods through out a day and repeats this sequence for 14 full days as predetermined by the user's medication regime. Not all of the time periods need be used in any medication regime. There are 4 time periods, morning, noon, afternoon and evening. Each of these 4 time periods has 2 time intervals associated with it. The operator can choose one of the 2 time intervals when loading the pill array. The morning time period can start at 8 a.m. or 9 a.m. The noon time period can start at 12 a.m. or 1 p.m. The afternoon time period can start at 4 p.m. or 5 p.m. The evening time period can start at 8 p.m. or 9 p.m. This time selection arrangement was chosen because prescriptions do not usually specify an actual time when pills should be taken but rather specify "3 times a day", "take before/after meals" or "at bed time".

The choice of 2 time intervals for every time period provides flexibility to the user and fits in with his/her life style.
Both visual and audible alert mech~ni~ms are used to signal the presence of pills and enable the dispenser to allow the user access, to a specific set of pills, by pulling an access bar.
This invention has an On Demand capability which allows the user immediate access to a predetermined type and quantity of medication. To prevent overdosing, the user is allowed 4 On Demand request per day. The time interval between requests is pre-set to 2 hours. The number of requests made are recorded and displayed on the visual panel. The On Demand function is reset at 9 p.m. to allow the user access to On Demand medication during the night.
As a safety feature, this invention will remove pills from the active part of the device and place them in the inactive part of the device if not accessed after a 28 minute waiting period. This is to prevent possible overdosing. The pills, in the catch bin, can be retrieved at the next reloading, sorted and reused if positively identified or otherwise disposed of.
This dispenser resolves the issue of supplying medication to the user in the instances when the user is away from the dispenser for part of a day or for that period of time that the main dispenser is waiting for repair, should it fail. This is achieved by a hand held Automatic Portable Pill Dispenser that supplies one day's allotment of critical medicine as prescribed. It also contains one set of On Demand pills in an unlocked section of the device The device holds a small number of the types of pills required for the well being of the user. The unit works in unison with the main dispenser in that when removed from the main dispenser, the main dispenser will not dispense pills.
This invention supports an automatic purge mech~ni~m which is activated when theoperator initiates the purge function. It purges the pill array of all rem~ining pills prior to the reloading procedure.
This invention supports a quick, easy to use and safe reloading procedure which can be performed by the operator who can be a member of the family or a caregiver, using specially designed pill cartridges and a color coded pill chart. The pill cartridges themselves can be easily pre-loaded by the operator or pharmacist using a specially designed pill cartridge loading aid.

This invention contains a number of safety features including a remote failure alert mech~nism that, through a modem, automatically dials a repair service and a member of the family in the event the unit fails.
This dispenser is housed in a secure structure which doubles as a locked medicine cabinet for 8 pill cartridges and an On Demand pill container.
The intent of this invention is to develop an Automatic Prescription Pill Dispensing System that meets all the practical drug dispensing needs of the user, be safe to use and load, be flexible, economical, easy to operate and incorporate a comprehensive safety capability. It is believed that this invention achieves this goal.

BRIEF DESCRIPTION OF THE DRAWINGS
FIG. lA is a top perspective illustration of the preferred embodiment ofthe external features of this Automatic Prescription Pill Dispensing System FIG. lB is a left side perspective illustration showing the external features on this side of the system FIG. 2A is an exploded perspective view showing the relative positions of the modules and parts of modules that make up this invention FIG. 2B is a sectional front view showing the relationship of the main modules FIG. 3 is a top perspective illustration of the pill array FIG. 4A is a view of an array slider, front paddle, linker and magnetic latch as seen from the front. The pill array is included to show its relationship with the slider FIG. 4B is a partial front view showing the linker FIG. 5 is a front view showing the pill removal slider, paddles, linker and magnetic latch.
The pill array is included to show its relationship with the slider FIG. 6A is a sectional view of the dispenser showing the pill dispenser, the removal and the locking compartments as would be seen from the front. The removal slider is included to show its relationship with the dispenser FIG. 6B is a top perspective illustration of the Timed Prescription Dispenser access bar including the locking arrangement FIG. 6C is a top perspective illustration of the On Demand Dispenser access bar including the . .
Iockmg arrangement FIG. 7A is a top perspective illustration showing the trolley, magnetic latches and drive mech~ni~m FIG. 7B is a rear view taken along line 7B-7B of FIG. 7A showing the trolley positioning mech~n1~m FIG. 8A is a front view of the pill cartridge in loading position above the internal array FIG. 8B is a top perspective illustration of the pill cartridge of Fig 8A
FIG. 8C is a top perspective illustration of the pill cartridge cap FIG. 9 is a top perspective illustration of the included Automatic Portable Dispensing Unit showing its external features FIG. 10 is a side sectional view of the internal structures of the portable dispensing unit FIG. 1 lA is a cross sectional view taken along line 1 lA-1 lA of FIG. 10 showing the pill cells and LED positions of the portable dispensing unit FIG. 1 lB is a cross sectional view taken along line 1 lB-1 lB of FIG. 10 showing the battery, access panel and 6 pin connector.
FIG. 12A is a front view of the portable dispenser's slider and locking mech~ni~m FIG. 1 2B is a top perspective illustration of the portable dispenser' s magnetic circuit FIG. 13A through I are software flowcharts of the main dispenser FIG. 14A through G are the schematic drawings of the main dispenser electronics FIG. 15 is the schematic drawing showing the frame wiring of the main dispenser FIG. 16 is the layout of the internal control panel and charts FIG. 17 shows the schematic drawing of the Automatic Portable Dispensing Unit FIG. 18 is the schematic drawing showing the frame wiring of the Portable Dispenser Unit FIG. 19 is the software flowchart ofthe Portable Dispenser Unit FIG. 20A is a top view of the pill cartridge loading aid FIG. 20B is a cross sectional view of loading aid taken along line 20B-20B of FIG. 20A
showing the sloped pill trap FIG. 20C is a side view of the pill cartridge loading aid FIG. 21A and B are the schematic drawings of the Maintenance Unit FIG. 22 is the software flowchart of the Maintenance Unit FIG. 23 is a top perspective illustration of the M~inten~nce Unit showing the controls OVERVIEW OF THE INVENTION
As shown in Figure lA, the system in general terms consists of a lockable unit 3, having a top lid 7A which may be opened to allow access to the interior. Actuating pull bars 17A or 17B ~see Figure lB) on the left hand side of the unit allows a user to request access to prescription pills released at timed intervals by the invention, referred to in this document as Timed Prescription Pills, or prescription pills released on request by the invention, referred to in this document as On Demand Prescription pills. These Timed Prescription Pills or On Demand Prescription Pills respectively when permitted by the progl~""~ing ofthe unit, are dropped into discharge trays 16A and 16B respectively.
A bottom drawer 1 serves as a storage unit for pill cartridges 15A, and also receives any pills 15B which are not taken by the user within a predetermined time limit, thereby removing these pills from further access by the user. A sealed compartment 2 on the right hand side of the drawer houses the battery.
As seen in Figure lA, when viewed from the front and above, the top of the unit when opened has a pill array 5A and 5B on the left, and a control cover 21 on the right. Arranged on the left hand side of the control cover is a control panel 8 has mounted on it 4 time interval switches, 1 On Demand switch, the purge button, a STD time button and a volume control.
The control cover also contains the Prescription and On Demand charts 9A, B, and the 3 duration switches 11. The manual access switch 7B is mounted on the top left hand corner of the unit and is accessible when the lid is open. The visual indicator panel 14 is mounted on the front of the box.
The pill array 5 consists of a rect~n~ r array of receptacles or cells for holding pills.
In the embodiment shown, the array measures 8.25 inches wide and 9.3 inches long, and has a depth of 1.4 inches, resulting in each cell measuring 0.75 inches wide, 0.5 inches long, and 1.4 inches deep. These sizes were chosen to allow for most medication regimes to be accommodated within any cell.
The pill array is arranged in 8 horizontal (as seen in Figures 2A and 3) rows of 15 cells, with the top 4 rows 5A being reserved for Timed Prescription Pills and the bottom 4 rows 5B for On Demand Prescription Pills. The dark line dividing section 5A and 5B of the array as shown in Figure 3, is for emphasis only and serves no functional purpose.
Each of the top 4 horizontal rows corresponds to a particular time period during a day.
The first representing morning, the second representing noon, the third representing afternoon and the fourth representing evening. Within each vertical column (see Figure 3), of cells, the top 4 cells corresponds to a day of timed medication. The bottom 4 cells corresponds to a day of On Demand medication. Each cell in the bottom 4 rows contain the same type and quantity of medication and represents an On Demand request. In theembodiment shown, for every day of use, the user receives pills at 4 preset time periods during a day from the Timed Prescription side of the array (the top 4 cells), and an additional 4 sets of pills, as requested, from the On Demand prescription Pill side of the array (the bottom 4 cells).
The top of each cell is open, and pills are retained within each cell by the lid 7A when closed. Therefore, when the lid is open, pills may be loaded into the cells by hand or by using the pill cartridges which will be described later.
The bottom of the pill array consists of 8 horizontal sliding bottom panels which will be referred to in this document as sliders 23A through H, each slider being located under one of the horizontal rows of cells, and set into a track 31 in the array module 22. This enables the sliders to be slid back and forth by a panel movement means which will be referred to in this document as a trolley as described below. When the sliders are fully engaged (to the left as shown in Figure 2A), any pills in each cell are retained in the cell by the slider which forms the bottom of the cell.
Each such slider 23 is independently capable of being retracted or slid from a fully closed position as shown in which each cell in the row has a bottom, to a fully open position in which the cells have no bottom, thereby allowing any pills within any given cell to fall downward. By selecting any one of the 8 sliders 23 and controlling the degree of retraction of the slider, any given cell may thereby be emptied of its contents.
At one end of each of the sliders 23 (the left hand end as shown in Figure 4A) a small vertical rect~n~ r member or sweeper means which will be referred to in this document as the paddle 41 projects downward and stops short of the top surface of the sliding array bottom which will be referred to in this document as the remove slider 24. When the slider is being moved to a fully closed position from a partially opened one, this paddle in cooperation with the top surface of remove slider 24 and the cell walls, which protrude downward on each side of each slider, allows the slider 23 to push forward any pills which have fallen from a cell above, along the surface of the remove slider 24 until they fall through the opening 24A in the remove slider 24 and the opening 25A in the array bottom 25 into the Timed Prescription dispensing area 60A (see Figure 2A).
At the opposite end of each of the sliders, another vertical rect~n~ r member or a l~tehing means which will be referred to in this document as a linker 42 projects downward.
Each linker has a ferrous metal plate 47 attached to a movable rod section 45 such that it may be magnetically held by the magnetic latch 43 mounted on the trolley, thereby permitting the slider to be moved to the desired location.
Mounted below the sliders is a remove slider 24. The remove slider has a width equal to the width of the overlying 4 Timed Prescription Pill rows, and is similarly equipped with a downward projecting linker 51 to allow the remove slider to be retracted.
Below the remove slider is the array bottom 25. The array bottom is the same size as the 8 by 15 pill array and forms the bottom of the array section of the array module 22 (as seen in Figure 2A). Within the bottom 25 is an aperture 25A located at the left underneath the 4 Timed Prescription Pill rows, and a second aperture 25B located at the left underneath the 4 On Demand Prescription Pill rows.
At the left end (as seen in Figure 2A) of the remove slider 24 are located 2 downward projecting paddles, a front paddle 50A and a back paddle 50B. These paddles project through aperture 25A of the array bottom 25 and project into the Timed Prescription Pill dispenser cavity 60A stopping short of the Timed Prescription Pill dispenser bar 17A which forms the -floor of this arrangement. The back paddle 50B forms the back wall of this cavity thereby ._ cont~ining the pills.
Although shown in exploded view in Figure 2A, the pill array 5, the cell sliders 23, the remove slider 24 and the array bottom 25 all form part of the single integrally constructed array module 22.
Mounted below the array module are 2 dispenser areas 60A and 60B, and a retention bin 15B. On demand dispenser 60B is located underneath aperture 25B, and receives any On Demand Prescription Pills that are pushed by the sliders into aperture 25B. Timed Prescription dispenser area 60A and retention bin 15B are located underneath aperture 25A
and any pills pushed forward into aperture 25A will be received into the Timed Prescription dispensing area 60A. Pills in area 60A will drop straight downward to the Timed Prescription Pill dispensing tray 16A, if the user pulls the access bar 17A or will be pushed to the right (as seen on Figure 2A) and down through the remove cavity 66 to the catch bin 15B below, if the remove mech~ni~m is activated. Likewise, pills in cavity 60B will drop straight downward to the On Demand Prescription Pill dispensing tray 16B, if the user pulls the access bar 17B.
A sliding trolley 70 is located below and to the right side, as seen in Figure 7A, of the array module 22, and may be moved right or left by an electrically powered screw mechanism 72. Mounted on the trolley are 9 electromagnetic solenoids or latches which are independently controlled by the microcontroller. Eight of these 9 latches 43 are located on the top of the trolley 70 so as to be able to engage and magnetically hold the 8 linker mech~nism~
42 respectively on the 8 sliders 23 when the electromagnets are powered. The 9thelectromagnetic solenoid or latch 52 is located on the side of the trolley so as to be similarly able to engage and hold the remove linker mechanism 51 on the remove slider 24.
The microcontroller selectively activates any or all 8 of the electromagnetic solenoids or latches, then commands the trolley to move to the right and retract the corresponding slider(s) as it moves, permitting pills to drop onto the top of the remove slider 24 in the case of a Timed Prescription Pill selection or onto the top of the array bottom 25 in the case of an On Demand Prescription Pill selection. The trolley is then reversed by the microcontroller, causing the paddle(s) 41 of the selected slider(s) 23 to push the pills which have dropped onto remove slider 24 toward the aperture 24A or those pill that have dropped onto the array bottom 25 towards aperture 25B. The pills then drop through the aperture 25A or aperture 25B into cavities 60A or 60B where they wait to be accessed by the user or in the case of a Timed Prescription Pill, removed automatically if not accessed within 28 minutes.
In operation, the purge process is initiated by the operator unlocking the system to access the pill array and the control panel. The operator presses a purge button S10, which initiates an automatic purge of any pills rem~ining in the array. This is effected by means of the microcontroller eng~ging all 8 magnetic latches 43 on the top of the trolley 70, then çng~ging the motor 74 to cause the trolley to fully retract and then return to the home position. By so doing, any pills le~ inillg within the cells will fall onto the remove slider 24, or array bottom 25 and then be pushed forward into apertures 25A and 25B from where they will fall into the dispenser cavities 60A and 60B from which they can be removed. The operator is informed of the end of the purging action by the turning off of a WAIT visual indicator.
The operator may then load the desired pills according to the users medication regime into the pill array, by hand or preferably by using the pill cartridges, beginning with the morning cells and repeating this procedure for the other 3 Timed Prescription Pill rows.
When loading the On Demand cells, each cell in the On Demand Prescription Pill rows is filled with the same type and quantity of pills.
Once the system is loaded, the purged pills can be removed by pulling the access bars 17A and 17B. A~[er the purged pills are retrieved, the lid and the storage drawer is closed and locked. The unit is ready for operation for another 14 full days. This removal process is performed after the loading process is complete because it activates the microcontroller causing the trolley to engage the first prescription slider and the first On Demand slider in sequence, and moves them one cell position to the right and then back again, causing the first complement of Timed Prescription Pills and On Demand Prescription Pills to drop down and be flushed into their respective waiting areas When the user achlates either of the access bars 17A or 17B, the desired pills will drop imme(liately into the prescription or On Demand dispensing areas respectively. However, if the user does not request the prescription pills within a prescribed time, the microprocessor will engage the remove slider 24 and move it to the right, 4 cell positions. When paddles 50, which are mounted on the remove slider 24, are moved to the right, the pills trapped within paddles 50 will no longer be supported by access bar 17A, and instead will fall through aperture 62A in the access bar 17A into the catch bin 15B below where they will no longer be available to the user.
In operation, the next set of Timed Prescription Pills is placed in the dispenser after the user accesses the Timed Prescription Pill side of the dispenser or after the remove function is complete. In the case of the On Demand Prescription Pill function, the next set of pills is placed in the dispenser after an On Demand request is made. In both cases, the microcontroller is activated and causes the trolley to engage the next slider for the same day, repeating the process as explained above. Once all 4 Timed Prescription and On Demand prescription sliders have been actuated in this manner, the microcontroller will cause the trolley to go back to the first such slider and repeat the process, but cause the trolley to retract further in order to uncover the bottom of the cell for the next day.
As an aid to loading the pill array, a pill cartridge is described which may be used in conjunction with the array when the top is opened. By placing a pre-loaded pill cartridge above a horizontal row of the array and then retracting a sliding cover, of the pill cartridge, the pills within the pill cartridge will fall into the corresponding cells of the pill array below. For purposes of loading the array, Lettered pill cartridges, each containing 1 type of pill and 1 pill per cell, are positioned over any given horizontal row of cells and secured by means of pins or the like which locate the pill cartridge in the correct position for ~ sr~ g of pills from the pill cartridge to the pill array. This loading would only be performed by an authorised operator.
As an aid to loading the pill cartridge by the pharmacist or the operator, there is further described in this document a special sorting tray which may be utilised in conjunction with the pill cartridge. This device will be described in detail in a later section.
In order for factory and / or m~int~n~nce personnel to set the time in the main dispenser unit and perform a number of other m~int~n~nce related functions, a separate m~inten~nce unit is _ provided which interconnects by means of a ribbon cable and an IDC connector to the main dispenser unit (see Figure 23). Although the functions provided by this m~int~n~nce unit could be performed by means of on-board ele~ olLc~, none of these functions are ever performed by an end user and lhele~ole7 it is cheaper and safer to restrict these functions to m~inten~nce personnel only.
For this reason, these functions may be removed from the main dispenser unit into a m~int~n~nce unit to be described in a later section.

OVERVIEW OF OPERATION OF MAIN DISPENSING SYSTEM
The following is a brief overview description of the operation of this AutomaticPrescription Pill Dispensing System. The best way to describe the operational functions is by example.

TIMED PRESCRIPTION PILL FUNCTION
The Timed Prescription Pill function detects that it is, for example, noon Since this is one of the preprogrammed time intervals, the controller issues a signal that will activate the Timed Prescription Pill audible and visual alert circuits, ~suming that this time interval was selected during the loading process i.e. operator has chosen between noon and 1 p.m. This signal also enables the Prescription Pill access bar which up to this point has been locked. If the user responds within 28 minutes and pulls the access bar, the pills, in the dispenser, will be ejected into the Timed Prescription Pill tray and the pills present visual indicator and chime will turn off. After the access bar is pulled and allowed to return to its normal position, the software activates the Timed Prescription Pill function which causes the slider associated with the next time period to move to the next cell allowing the pills in that cell to drop to the floor of the array. If there are no pills in this next time period cell, nothing happens. After dropping the pills, the slider returns to home position pushing the pills into the dispenser below. This completes the sequence of events of the Timed Prescription Pill function.
-REMOVE FUNCTION
The dispenser supports a remove function which is a safety mech~ni~m that removes pills from the active part of the system to a storage bin if the user does not respond within 28 minlltes, in the plerelled embodiment described. A~[er pills are removed, the pills present visual indicator and chime are turned off and the Timed Prescription Pill function is activated.
The Timed Prescription Pill function will proceed to place the set of pills for the next time interval into the prescription side of the dispenser. This completes the sequence of events of the Remove function.

ON DEMAND FUNCTION
The On Demand Prescription Pill function releases a specific type and quantity of pills when requested by the user with consideration to certain safety conditions. Before a request for pills is acted upon, the following safety factors must be met:
~ The On Demand function is turned on ~ All 4 requests for the day have not been used up ~ The 2 hour delay between requests has timed out ~ The portable Dispenser Unit is inserted into the main dispenser unit The On Demand function is activated and operates in the same manner as the TimedPrescription Pill function. On Demand pills are ejected into the On Demand tray by pulling the On Demand access bar. This action prompts the software to initiate the channel select and drive meçh~ni~m~ to move the appropriate slider and place the next set of On Demand pills into the On Demand side of the dispenser. It also advances the request counter by one and turns on a 2 hour delay timer. This completes the sequence of events of the On Demand function.

PURGE FUNCTION
The system purge is activated by pressing the purge button on the internal control panel which is mounted on the main PCB under the locked lid. This action activates the purge -function which purges the pill array of all rem~ining pills. The pills are placed into the dispenser sections 26 and the purge wait LED turns off.

RELOADING FUNCTION
When the purge function is complete, the reloading procedure can commence. The first 4 rows of the array, starting at the top, are color coded and designated in a color coded chart by the time periods morning, noon, afternoon and evening. The chart shows the lettered pill cartridges, the quantity of pills and the duration for that particular pill. This information is repeated for the 4 time periods (see Figure 16).
Under the prescription pill rows, are the 4 On Demand rows which are not associated with time. The On Demand chart shows the type and quantity of pills that are placed in all 60 On Demand cells.

LOADING PILL CARTRIDGE / PROCEDURE
The structure of the pill cartridge used for loading the main dispenser array, is given in detail in a later section. This section will explain by example the loading procedure. For example, the user's medication regime could call for one each of 3 different kinds of pills to be placed in the morning row (see Figure 8A). The pill cartridge associated with the first of the 3 pills, for example, A is removed from the drawer lSA at the front of the unit and placed over the morning row. A keying mechanism composed of a set of groves on the pill cartridge align with pins on the main array to insure that the pill cartridge is properly aligned and secured to the row. The bottom slider is removed causing one pill, of the first type, to be placed in each of the 15 morning cells. This procedure is repeated with pill cartridges cont~ining the other 2 types of pills. All 15 cells of the morning row now have one each of the 3 required pills. The switch associated with the morning row is then set to the user's plerell ed time interval say 8 a.m. This example calls for 4 different types of pills, 2 of one type and one each of 3 other types to be placed in the next row, which is the noon time period. The appropriate pill cartridges are selected from the drawer and placed over the noon row and the pills transferred by pulling out the bottom sliders. In the case where the regime -calls for 2 pills of the same type, that particular pill cartridge is rotated 90 degrees and the process repeated. Now each cell of the noon row contains 5 pills. The noon time period switch is then set to the user's pr~relled time interval of say noon Now set the noon duration switch to the largest number in the noon part of the chart (see Figure 16). This number represents the number of days that a particular type of pill is taken. This number can range from 7 to 14. The system operates for a minimllm of seven days and a maximum of 14 days with a 1 day grace. The 2 ~ i"i"g Prescription Pill time period rows are filled in the same manner. This completes the loading of the Prescription Pill array. In the case where the pill regime calls for pills less than the full 14 days, the pill cartridge is loaded only with the required number of pills starting from the left hand side of the pill cartridge. The pill cartridge is labeled to aid in the loading. The chart 9A and duration switches 11 are set accordingly. (See Figures lA and 16).
The On Demand part of the array is loaded as follows: Say the user's pill regime calls for 1 heart pill for the On Demand array. One heart pill is placed in each of the 60 On Demand cells and the On Demand switch activated on control panel 8 (as seen in Figure 16).
There are no pill cartridges associated with On Demand pills. This completes the loading of the system. The operator can now retrieve the pills by pulling the access bars. After the Timed Prescription Pills are removed, the On Demand access bar is pulled and the On Demand pills are removed. The pills, in the trays, are retrieved, sorted and reused if positively identified or otherwise disposed of. The lid can now be closed. It automatically locks. The drawer is closed, it automatically locks. The pill dispenser is back in service for another full 14 days.

PILL CARTRIDGE LOADING AID
A device has been developed to be used as a loading aid for pill cartridges. It is a loading tray (see Figures 20A, B and C) similar to that used by pharmacist to count and load pill containers without having to handle the pills. This device channels the pills after being counted, into the 15 cells of a pill cartridge. After all 4 sides of the pill cartridge are filled in this manner (60 pills), the extra 40 pills (say the prescription called for 100 pills) are trapped and l~ re-~ ed to the body of the pill cartridge. This device will be detailed in a later section of this document.

OTHER OPERATIONS
When the system is unlocked and open (lid up), the manual access switch 7B is acces~ible. The operator can activate both the Timed Prescription Pills access bar and the On Demand access bar independent of the system software. Access in this manner does not trigger any software response. This feature works in conjunction with a manual purge action initiated from the maintenance unit.
The operation and loading procedures of the portable dispensing unit are described in a separate section.
A maintenance unit was developed for the Automatic Prescription Pill Dispensing System late in the main dispenser's development for cost and space saving reasons. The original design had the functions listed below incorporated on the main dispenser PCP. The intent was to remove all functions not directly related to the pill dispensing functions and place them into an external unit. The Maintenance unit is used to calibration and perform maintenance on the main dispenser. The functions ofthe maintenance unit are as follows:
~ Time Setting. This function must be set using external equipment because the main dispenser does not have a time display or the corresponding time setting switches. The reason that this function can be external to the main dispenser is because the master clock on the main dispenser is crystal controlled and therefore very accurate, it needs to be reset only if the power is removed. Since the system has battery back up, this is only when m~inten~nce is required ( failure, annual check up or new battery required). Therefore, the main controller time is set in the factory or maintenance facility, before the user gets the dispenser and again if returned for maintenance. The system has the ability to handle the one hour time change i.e. daylight saving time, twice a year so this is not an issue.
~ Purge function. In the case of a system failure that does not impact the mechanical operation, the system can be m~nll~lly purged from the maintenance unit.

~ Maintenance functions. Control of trolley movements is only required during system set up or when the system has failed (trolley run on).
The M~intP.n~nce Unit will be detailed in a later section of this document. Although the functions of the Maintenance Unit have been removed from the main dispenser in the embodiment described, it will be obvious that all of these functions may easily be incorporated into the main unit.

DETAILS OF THE PREFERRED EMBODIMENT OF THE MAIN DISPENSER
To help understand the plerelled embodiment of this Automatic Prescription Pill Dispensing System, this teaçhing will proceed from a description of the exterior features of this invention (as shown in Figures lA and lB), then describe the physical structure and function ofthe 9 interdependent modules/mech~ni~m~ as depicted in the exploded top perspective illustration of the system in Figure 2A and the front view of the system in Figure 2B. In the course of reviewing the function of the 9 modules, the reader should constantly refer to Figures 2A and 2B to m~int~in a perspective of the relationship of the module being ~- described to the overall system.

~;X I ~;KIOR FEATURES
Figures lA and lB show the exterior features ofthis Automatic Prescription Pill Dispensing System as referenced by the numeral 3. The cabinet is locked and can be accessed using a key in lock 4. The locking mech~ni~m releases the top 7A which can be opened to the position shown in Figure lA and held there by the re~ inillg cable 10. This action also releases the drawer 1 which opens under spring action. The drawer has a compartment 15B
called the catch bin which is the repository for pills removed from the system if not retrieved by the user. The remainder of the drawer 15A is a drug storage area for 8 pill cartridges A
through II and One On Demand pills container 27. These pills are not part of the active system. On the inside of the top 7A, directly over the array, is a desiccant pad 6 to control humidity. The pill array consists of 8 rows of 15 cells each. The first 4 rows 5A are the Timed Prescription Pill cells. The next 4 rows 5B are the On Demand Prescription Pill cells. The right hand side of the top houses the main PCP on which is mounted a control panel for the loading function 8, the duration function 11 and the Prescription pill 9A and On Demand pill 9B charts. The manual access switch 7B is mounted on the left hand corner of the top. This switch allows the operator to m~nll~lly unlock the access bars 17 to remove m~nll~ily purged pills by actl1ating the locking solenoids.
Figure lB shows the Timed Prescription Pill 16A and On Demand Prescription Pill 16B pill exit trays. The Timed Prescription Pill access bar 17A and the On Demand Prescription Pill access bar 17B are also mounted on this side of the cabinet. On the left hand side of the cabinet is a holder 13 which houses the Automatic Portable Dispensing Unit 90. A
visual panel 14 is mounted on the front of the dispenser.

ARRAY
The system will now be described with reference to Figures 2A and 3. In Figure 2A, sections, 5, 23, 24 and 25 all form part of an integral array module 22. This structure supports a 120 cell array, 60 cells 5A are used for the Timed Prescription Pill function and 60 cells 5B for the On Demand Prescription Pill function. The 4 by 15 Timed Prescription Pill array represents the 4 time periods in a day and the re~ il-g 4 by 15 cells serve the On Demand Prescription Pill function, in the embodiment shown. The system can operate for 14 full days, regardless of when it was loaded, because of the 1 5th cell in each row. The first row represents the morning time period and can be configured to activate at either 8 a.m. or 9 a.m., in the example shown. The second row represents the noon time period and can be configured to activate at either noon or 1 p.m. The third row represents the afternoon time period and can be configured to activate at either 4 p.m. or 5 p.m. The fourth row represents the evening time period and can be configured to activate at either 8 p.m. or 9 p.m. This choice of 2 time intervals for each time period was incorporated to provide flexibility to the user. It is not expected that all 4 time periods would be used in any given prescription drug regime. The columns are labeled day 1, day 2, through day 15. The 4 On Demand rows are recognized as channels A through D to the software and are sequenced from A through D as requests for pills are made through out the day. Each cell is large enough to accommodate an above average medication regime. The right hand side of this module 32 houses the main PCB 21. The dotted line 31 along the length of the array module is the location of the tracks for the 8 sliders 23A through H that cover the bottoms of the cells. The dotted line 30 is the location of the track for the remove slider 24, both of these will be described in a later section.

SLIDING BOTTOM PANELS
The next part of module 22 (refer to Figures 2A, 4A and B), is composed of 8 sliders 23A through H. Each slider 23 acts as a bottom for each row of cells and therefore contains the pills within those cells. Protruding from the bottom of each slider on the left side (see Figure 2A), is a paddle 41 and on the right side is a linker mechanism 42. The linker allows the slider to be moved. The linker is composed of a member 44 fixed to one end of the slider 23. A rod 45, mounted in a hole in the center of member 44, can move freely over a small distance. The rod is limited in travel by a C clip 48 at one end and a spring 46 at the other end. On the end of the rod is a steel plate 47. In the inactive position, the face of the magnetic latch 43 is touching the face of the linker 47. When the magnetic latch is energized, the 2 faces are held together by the magnetic field. Therefore, as the trolley moves the slider must follow. The small amount of movement in the linker prevents damage to the system in the event of a trolley run-on failure. If the trolley failed to stop when it reached home position, it will encounter a microswitch which would shut the motor drive mechanism down.
This overrun is prevented from crushing the sliders by collapsing the linker. As a slider moves one cell position to the right, the pills in the uncovered cell fall to either the top of the remove slider 24 or to the top of the array bottom 25 depending on which function was activated. As the slider returns to the home position, the paddle 41 pushes the pills through apertures 24A and 25A or 25B.

PILL REMOVE MECHANISM
The next part of module 22 is the remove slider 24. Figure 5 shows the relationship of the remove slider to the array and its magnetic latch 52. The purpose of this slider is to remove pills in the active part of the dispenser 60A to an internal catch bin 15B in the event .._ that the user fails to remove the pills after an appropriate waiting period. This slider 24 covers the Timed Prescription Pill cells. It has 2 paddles 50A and 50B protruding from the bottom of the slider at the front and a linker mech~ni~m 51 at the back. The slider has an aperture at the front between the paddles 24A which allows free passage of pills through the slider into the dispenser 60A below (see Figure 2A). If the remove function is activated, pills trapped between the paddles will be swept to the right through the removal compartment 66 into the catch bin 15B below. This slider is linked to its magnetic latch in the same manner as described in the section on cell sliders. This function is activated by the timing out of a 28 minute timer. When activated, the microcontroller commands the trolley drive mechanism to move 4 cell positions to the right, stop and return to the home position. This action is sufficient to sweep the pills from the active part of the dispenser to the internal catch bin 15B.
When this action is complete, the visual and audible alarms are turned off.

ARRAY BOTTOM
The next part of the module 22 (refer to Figure 2A) is the bottom of the array 25. The ~- floor of the array works in conjunction with the cell slider paddles on the On Demand Prescription Pill side to trap the pills and sweep them over the length of the array through aperture 25B in the bottom of the array to the dispenser conlpal Lment 60B below.

DISPENSER
Below the array module 22 (refer to Figures 2A, 6A and B) is the dispenser 26. It is a temporary repository for pills after they have been ejected from the array. This repository keeps the pills safely out of reach until the user accesses them. The dispenser is divided into 2 parts. One side is for Timed Prescription Pills 60A and the other side for On Demand Prescription Pills 60B. The sliding access bars 17A and 17B form the floor of the 2 parts of the dispenser.

SLIDING ACCESS BARS
These sliding access bars extend through the left side 61 of the cabinet to the outside of the box. Here, they are held in place through the action of return springs 69.. There is an aperture in each sliding access bar 62 which is aligned over their respective remove chutes when the sliding access bars are in their normal positions. These apertures allow pills to pass.
Both access bars operate in an identical way, therefore only the Timed Prescription Pills access bar will now be described. The left hand end of the sliding access bar has a plunger 64 protruding through a hole 68A in the access bar forming a locking mech~ni~m This locking mech~ni~m is composed of a solenoid 65A and 2 microswitches 63A, and B. The microswitches run on tracks 67A, and B on the access bar. In the locked position, the solenoid is de-energized and the plunger 64 prevents the access bar from opening a sufficient distance to allow the pills in the dispenser to fall through the aperture 62A into the external tray 16A below, but is allowed to move a small distance, sufficient to activate microswitch 63A by riding up on the raised section of track 67A. The solenoid 65A is powered through this microswitch but nothing happens unless the microswitch is enabled. A secondmicroswitch 63B, running in track 67B, is activated when the access bar is fully opened. The Timed Prescription Pill function and the On Demand Prescription Pill function operate di~elellLly. In the case of the Timed Prescription Pill function, when the predetermined time interval occurs, the visual and audible alarms are activated and at the same time, the Timed Prescription Pill microswitch 63A is enabled. If the user responds to the alarms and pulls on the Timed Prescription Pill access bar 17A, the associated solenoid 65A will energize and retract its plunger allowing the sliding access bar 17A to be completely pulled open and the pills that are sitting on top of this sliding access bar will fall through aperture 62A to the Timed Prescription Pill tray 16A below. When the access bar is fully open, it activates the back microswitch 67B. The signal from this microswitch informs the microcontroller that the access bar has been fully opened and interprets this as the pills have been removed. When the user releases the access bar 17A, the sliding access bar returns to its natural closed position under action of the return spring 69A. When the sliding access bar reaches its closed position the microswitch 67A turns off causing the solenoid to de-energize returning the Timed Prescription Pill access bar to its locked position and signals the microcontroller to select the next set of Timed Prescription Pills and place them into the Timed Prescription Pill side of the dispenser 60A.
If the pills are not accessed after 28 minlltçs, they are removed from the active part of the dispenser 60A to an internal catch bin 15B by action of the remove function.The On Demand Prescription function does not require a time related enabling condition. The action of pulling on the On Demand Prescription Pill access bar 17B releases pills immediately into the On Demand tray 16B assuming that the safety conditions are met. If these conditions are not met, the On Demand Prescription Pill access bar will remain locked.
If access is allowed, a new set of On Demand pills will be placed into the On Demand side of the dispenser 60B using the same mechanism as described above.
The access bar 17B action on the On Demand side uses microswitches 63C and D andtracks 67C, and D. Both access bars are enabled when the system is open i.e. when the lid is open PORTABLE HOLDER
The next module (refer to Figures 2A and 2B) is the portable holder 13. This is a simple structure that houses the portable pill dispensing unit 90. It has a six contact connector on its bottom which aligns with a connector on the portable unit. This arrangement allows charging and controlling signals to pass between the main dispenser and the portable dispenser. The portable dispenser will be described in detail in a later section.

DRIVE MECHANISM
The next module (refer to Figures 7A and B) is the drive mechanism 28. The drivemech~ni~m consists of a trolley 70 on which 9 magnetic latches are mounted 43 and 52. The trolley slides on a track 78. In the preferred embodiment of this invention, the trolley is driven by a reversible direct current motor 74 through a reduction gear 73 and a threaded rod (screw) 72 having sufficient travel to expose all cells. The trolley speed which is set to 0.5 inches per second is governed by the motor speed, gear reduction and the pitch of the screw.

8 magnetic latches 43 are mounted on the top of the trolley. Four are used for the Timed Prescription Pill function and 4 for the On Demand Prescription Pill function. One magnetic latch 52 is used for the pill removal function. It is mounted on the side of the trolley. They all work the same way.
The moving part of this mechanical mechanism could be accomplished using a stepper motor with the appropl iate controlling circuitry but was abandoned for economic reasons. In the pr~elled embodiment ofthis invention, the physical connection of a slider and its associated magnetic latch, referred to as linking (see Figure 4B)is achieved by a device called a linker. This mechanism could have been achieved using pull or push solenoids or other electronically controlled mechanical latches but were abandoned for economic reasons. The actual linking action will be addressed in the Description Of Electronics section of this document.

CELL POSITIONINDICATOR
In the preferred embodiment, a structure 77 with 16 notches spaced exactly 0. 5 inches apart is mounted on the trolley frame 78. A microswitch 71 mounted on the trolley 70, rides in and out of the notches producing a pulse at every 0. 5 inches of travel (see Figure 7B). This mech~nism could have been achieved using a optical position indicator or the like but was abandoned for economic reasons. A PCB mounted on the side of the trolley 20, makes connections to all 9 magnetic latches plus the position switch 71 and takes the signals back to the main PCB 21 through a connector and a flexible ribbon cable 29 (see Figure 2B). There are 2 end stop microswitches 75 and 76 which are used as a safety shutdown mechanism in the event of a trolley failure that causes the trolley to overrun the home or the 1 5th positions and drive up against the ends of the unit. This occurrence could cause serious damage to the drive meçh~nicm This constitutes a system failure and can only be recovered from by plugging an external maintenance unit into the external remote m~inten~nce connector 12.
The external maintenance control unit is also used for setting the time and performing other maintenance testing. If this capability was not incorporated, a system failure would require major ~i~m~ntling to reset.

DRAWER
The final module (refer to Figure 2A) is the storage drawer 1. It is a locked drawer mounted at the bottom of the cabinet and can be accessed from the front of the unit when the lid is open. The catch bin 15B is the repository for pills removed from the dispenser, if the user did not access the unit in the allotted time. The part of the drawer to the right lSA is used as a storage for 7 pill cartridges. One large On Demand pill container is stored in front of the catch bin 27. An area on the left side of the catch bin is used to store 1 pill cartridge.
The part of the drawer to the extreme right is used as a battery compal ~---ent 2.

PILL CARTRIDGE
For reasons of safety, the prefelled method of loading the main array is by means of a specially designed pill cartridge which will now be described. However, the main array may be loaded by hand if desired.
The pill cartridge 80 is a rect~n~ r container 1.4 inches on a side and 10 inches long.
Each cell is 0.25 inches deep. The 4 sides have 15 cells each, configured to mirror a row of the main array and are covered with sliders 81 (see Figures 8A and B). The sliders run in tracks 88 and are recessed at the front 81 to prevent them from being damaged, but are acces~ible 86 at the back because of the indentation 83 in the back section. The front of the unit including the first cell 82 is left open in Figure 8B so the structure can be seen. A slider is removed by pressing on the slider at the back, this allows the slider to protrude enough at the front so that it can be grabbed and pulled out. The pill cartridge has a keying means 85 which aligns and secures the pill cartridge to the main array 22A so that the bottom slider can be pulled out and transfer all the pills in the cells of the pill cartridge to the corresponding cells of the main array. The pill cartridge is labeled 84 so that it can be easily loaded if the pill regime calls for a quantity of pills less than a full load. The center of the pill cartridge 87 is used as a storage for extra pills. The front end of the pill cartridge is closed and the back end has a removable cap 89 or the like (see Figure 8C). The cap is u shaped and fits the rect~n~ r opening on the back of the Pill cartridge to contain the extra pills in the center of the pill cartridge. The cap is tapered and is squeezed as it is inserted to make a tight fit. The cross member 89A is mounted near the base and is fixed to 1 of the sides of the cap but free on the opposite side. This cross member prevents the structure from being squeezed to the point where it will break.
Each pill cartridge is loaded with 1 type of pill and has 1 pill per cell for a total of 60 pills if fully loaded. This Automatic Prescription Pill Dispensing System is equipped with 8 of these pill cartridges stored in the locked drawer 1.

DESCRIPTION OF ELECTRONICS OF THE MAIN DISPENSER
The electrical operation of the 5 functions in the main dispenser namely the Timed Prescription Pill, On Demand Prescription Pill, Pill Removal, Purge/Reload and Time Change functions will now be addressed. The following description will refer to Figures 13A through I the system software flowcharts and Figures 14A through G, the main PCP schematic. The electronic circuits and software required to perform the above-mentioned functions will be addressed but the detail operation of the components and software is assumed to be known to a person skilled in the art and will not be discussed in detail. Certain hardware and software processes are repeated many times. They will be detailed the first time that they are encountered and then generalized in other instances so as to m~int~in the flow of the description and not bog down in unnecessary detail. A case in point is the Timed Prescription pill access bar and the On Demand access bar. They both operate the same way therefore, only the Timed Prescription Pill access bar will be detailed. The operation of the expanded ports U5 and the trolley movement operation are other examples.

MICROPROCESSOR
In the prerel led embodiment of this invention, the electronics is controlled by a 20 port PIC16C57 microcontroller. The prescaler is assigned to the RTCC as a 1: 16 divider. The software is written with timing based on a 4 MHz crystal. This sets the instruction clock to 1 microsecond after an internal divide by 4. The 8 bit RTCC register rolls over every 256 cycles for a final frequency of 244.1406 Hz, producing a period of approximately 4 milliseconds.
The system makes up the error in time by adding and subtracting nths of a second every minute, hour and half day. The accuracy is kept to 2 nth per day which is equivalent to approximately 1.5 seconds per year. The controller functions as the master clock and generates all timing and logic signals (refer to Figures 13A and 14A). Every 4 milliseconds, the microcontroller checks the status of all ports and registers and responds with the approp~iate action if a change has occurred. Part of the controller is dedicated to time keeping, the remainder of the controller controls the 5 dispenser functions mentioned above.
Every 4 milliseconds the software goes through the following sequence (see to figure 13C).
~ Has a second passed?
No, go to PROCESS
~ Read and record dispenser ports (READ).
~ Test for failure (SYS_FAIL) Test the 4 On Demand conditions.
~ Test if the next time interval was selected PIL_SEL
Test if the portable is present.
~ Has any dispenser functions been activated (PBOX_BSY)?
~ If no, go to (TEST_FUNCTIONS). Pill refill? demand refill? remove? purge? set time?
~ If yes, set TIMER and go to COUNT PULSES
~ Return to MAIN
Flowchart Figure 13C shows the path the software takes when one ofthe above mentioned functions is activated. All of these functions will be described.
-When a second has passed, the software deviates from the above-mentioned sequence and follows a new sequence (refer to Figure 13A and 13B).

~ Update time and perform house keeping duties. Time is based on a 24 hour clock.
~ Test to see if any time delays should be turned on, if so activate them.
~ Is PBOX_BSY?
~ If no, tests for one of the preprogrammed time intervals (HOUR_SEL).
~ If yes, set TIMER and go to COUNT_PULSES.
~ Return to MAIN

TIME INTERVAL DETECTED
If a preprogrammed time interval is detected (refer to Figure 1 3H), the software performs some house keeping functions (steering bits) and sets CODE which is the 4 bit code that selects the next time interval magnetic latch. The signal ETI is sent to the portable to prevent pills from being removed from both the Main dispenser and the portable in the same time interval. The software performs some failure mode detection, i.e. test for SYS_EMPTY and tests for new day (COUNT_T = 0) and then decrements the time position file COUNT_T (8 counts = 1 day). The software then goes to EMTY_WARN where it isdiverted to the alarm routine (ALARMS_ON) (see to Figure 13G), where a signal called ALRM is set on port RB1 which toggles flip flop U24B (see Figure 14E). This signal initiates the audible alarm. Also, the Timed Pill access bar lock is enabled and a 20 second timer is activated. The program returns to EMTY_WARN where the pills present LED is turned on. The controller detects when the trolley position counter TROL_P reaches 15 (the beginning of the 1 5th day) and issues an empty warning signal on RB3 of U6. The system is in the grace period and still contains pills and will continue to issue these pills at the programmed time intervals. But the system is now working in the 1 5th cell. It will continue to operate for another 8 time intervals and then must be turned off or the system could be damaged. This extra day gives the operator ample time to respond to purge and reload the system. If there is no response, when the time position counter equals zero ( end of the 1 5th day) the system will shut down and issue a SYS_EMPTY signal. This is not a hard failure and can be recovered from by activating the PURGE function.
-HOUR SEL FUNCTION
While we are waiting for the user to access the pills in the dispenser 60A, this is agood point in the description to give more detail on the operation of the HOUR_SEL
software. The description above started with the sequence of events after a time interval was detected. This description deals with the structure of the HOUR_SEL code (refer to Figure 14H).
All 8 time intervals are represented as a bit in a file called flag2. They function as steering bits, directing the program through the code as time intervals are detected and action taken. For example, say it is earlier than 8 a.m. The program starts at SLOTl there it detects that the first bit of flag2 is not set, therefore it enters and tests for 8 a.m. If it is not 8 a.m. yet, it goes to MAIN. If it is 8 a.m., it passes and the sequence of events described above occur. One of these events is to set the first bit of flag2. This implies that on the next pass, the program by passes SLOT1 and goes to SLOT2. The code in each of these sections is slightly di~el enl. As the day passes, the program ripples down through this code. Another , important event is to test if the time is greater than the time expected (in this case 8 a.m.).
This is the recovery function that will re-synchronize the system if it should get out of sync for some reason. It operates as follows: say the system has been initialized because of maintenance which sets all bits in flag2 to zero. Say the actual time is 11:32 a.m. and the system is set accordingly. The program will start at SLOT1 and attempt to detect 8 a.m., since bitl of flag2 is clear. Without the recovery function, the software would not detect 8 a.m. since the time is greater than 8 a.m. But the program will detect that the time is greater than 8 a.m. and will set bitl of flag2 and go to MAIN. On the next pass, 1 second later, the program will be diverted to SLOT2 where it will repeat this operation, setting bit2 of flag2.
On the next pass, the program is diverted to SLOT3 which is testing for noon The program will not detect noon (too early) but it will not be greater than noon either, therefore it will go to MAIN. The system is synchronized again and will continue in this loop until it detects noon There is a SLOT9 set to detect 2 a.m. When this time is detected, flag2 is reset and the time changed. Software which is responsible for ch~nging the time 1 hour forward in the Spring and 1 hour back in the Fall resides there.

PILL ACCESS MECHANISM
The system is still waiting for the user to access the pills by pulling on the Timed Prescription Pill access bar, or the 28 minute Timed Prescription Pill timer to time out. The case where the user accesses the pills will be discussed first. First the pill access mech~ni~m will be detailed including how it triggers the software to initiate the pill refill function.
As mentioned above, the controller initiates the process by issuing the signal PPENA
on S14 of U5 which turns on flip flop U22A, which in turn, activates the solenoid enabling signal PPCOM (see Figure 14D). The pulling on the access bar energizes the locking solenoid through driver Q4 allowing the access bar to be opened. This action initiates a steady tone alarm ALMOF which will not turn offuntil the access bar has fully opened, l~tching flip flop U23A and returned to its fully closed position. This feature insures that the operator fully opens the access bar as opposed to partially opening the access bar. When the pill access action is complete and the access bar has been returned to its normal position, the signal PPNO generated by the microswitch 63A, as shown in Figure 6B, resets flip flop U22A
producing PEJTD and at the same time removes the enabling signal PPCOM from the Timed Prescription Pill lock solenoid. It is the signal PEJTD through U21C that turns offthe alarm ALMOF. The signal PEJTD (pill refill) (see Figure 13C), is read by the controller through flip flop UllB and gate U13C on Figure 14B and deflects the program to PILL_ACT (see Figure 13F). This section of software, on the first pass, clears the counters, turns offthe pills present LED, o/ps the CODE that selects the next magnetic latch and enables the ON
Demand access bar if the program is in the PURGE function. On the second pass, the system is tested to see if the next time interval was selected SELECT by testing PIL_SEL.
The position of the duration switch S6, S7 or S8 setting is determined by the controller interrogating the duration switches using signals ODR1, ODR2 or ODR3 and reading their status on the ports RA0, RA1 and RA2 and determining if the position of the switches are equal to or greater than the trolley position. This function comes into play if all 15 cells are not filled. Say only the first 7 cells are filled, which is the minimllm loading of the system and the duration switch is set to the first position. This position is represented by the code 000. The software adds 8 to this code and compares it to the position of the trolley to determine if the alarms (audible and visual) will continue to work. In this case, the alarms will work up to and including day 7 but on the 8th day (trolley position equal to or greater than duration setting), no pills will be available to be placed into the dispenser and therefore no alarm will be issued. This feature prevents confusing the user by having the alarms activated and there being no pills to receive.

CONTINUE PILL REFILL ACTION
Only if the SELECT and DURATION functions are positive will the PILL_ACT
function continue and perform some house keeping functions, activate the appropriate magnetic latch and then turn on the DRFOR signal which is issued by placing a signal on port RA0 of U6 (see Figure 14A). This signal eventually turns on the drive forward relay K1 which in turn, drives the trolley to the right.

MAGNETIC LATCH
The detail of turning on a magnetic latch is as follows: The controller issues the next 4 bit CODE on ports RC0 through RC3 of U6. This code is placed on the i/ps of a 4 to 16 l-allsparelll latch U5. A strobe ST is issued on port RC4 which latches U5 and activates the appropriate o/p Sx. This o/p (time interval) passes through the appropriate switch S2, S3, S4, or S5 producing signal M, N, A, or E. This signal is placed on the i/p of driver U15 (see Figure 14C), and latches when strobe ST1 is issued on port RC5. The o/ps of U15 goes to the appropl iate magnetic latches mounted on the trolley.

COUNT PULSES
Now the appropriate slider is locked to the trolley and the trolley is moving to the right. Microswitch 71 (on Figure 7B) produces pulses as it passes in and out of the notches 77. The software knows how many pulses are required to get the slider to the correct cell.
COUNT_P is decremented every time it receives a pulse and when it reaches zero, it turns off the drive motor which stops the trolley. The trolley reverses direction and drives home by counting the same number of pulses. The magnetic latch does not have to be on in the drive back mode since the trolley will push the slider(s) as it returns to the home position. On the way back, the paddle 41 on the moving slider pushes the pills to the end of the pillbox and into the dispenser, as described in previous sections. This sequence of events will be repeated 4 times a day with a di~el elll magnetic latch being selected for each time period. At the end of the day, defined as 9 p.m. the software reset the 4 requests per day counter associated with the On Demand function and sends a synchronizing pulse the portable dispenser.

COUNTING TIME INTERVALS
As each time interval occurs, the time position counter is decremented COUNT_T.
This counter is set equal to 8 at the time of loading and will equal zero (roll over) at the same time, the next day. To the controller, this is the indication of the passing of a day. This implies that the interval is fixed but the time is dependent on when the system is loaded. At this time, the pulse counter COUNT_P is incremented by one and starting at the next time interval, the trolley will move 2 cell positions, producing 2 pulses, before stopping. Again, in the reverse direction the trolley will stop after receiving 2 pulses at each time interval. This procedure is repeated as each day passes (8 time intervals passes) (refer to Figure 13D) for the COUNT_PULSES software flow.

TIMER
This is a good point to introduce another safety feature that produces a failure signal if the trolley takes too long to complete its travel from home to stop or from stop back to home.
The time it takes the trolley to move 1 cell position is approximately 1 second. The TIMER
is set to the number of cell positions it will be moving plus a 2 second margin. If the trolley mech~ni~m takes longer than it should to move from home to the programmed cell position, a SYS_FAIL signal is generated which shuts the dispenser down and sends a signal to a remote failure monitoring location (see Figure 13E).

REMOVE FUNCTION
In the case where the user does not access the pills within 28 mimltes~ the remove function is activated BIN_ACT. This 28 minutes is generated by the alarm circuit which .
issues a 20 second warble signal followed by a 9 second offperiod. This sequence is repeated 3 times for a total of 28 minutes. If at the end of this period the user has not accessed the pills, the software diverts the program to the remove function BIN_ACT where the audible and visual alarms are turned off, the magnetic latch 52 associated with the remove slider 24 is turned on and the signal DRFOR activated. The trolley moves 4 cell positions to the right, stops, reverses and returns to the home position. The software and hardware processes that make this possible operate the same as described above. This action moves the pills, in the dispenser 60A, to the right where they fall through the orifice 62A to the catch bin 15B below (refer to Figure 6A and B). The pills, in the catch bin, can be retrieved at the next reloading, sorted and reused if positively identified or otherwise disposed of. When this function is complete, the software is diverted to PILL_ACT which operates as described above.
~s~lming that all conditions are met, the next set of pills are placed in the Timed Prescription Pill side of the dispenser 60A.

TWO TIME INTERVALS PER TIME PERIOD
~ One other detail requires discussion, that is the operation of the 2 time intervals per time period and associated with this, the situation where the time period might not be used at all. For the sake of this discussion lets choose the time period MORNING which is composed of the 2 time intervals 8 a.m. and 9 a.m. This physically represents the first row of cells in the array. The choice of time interval is made with the time period switches during the array loading process. The software issues code for all time intervals. It is the position of a particular time period switch, in this case S2 (see Figure 14A), which will determine which of the 2 signals will pass as M. It is the presents of signal M that sets the SELECT state in the controller. If the switch is in the off position (center), there are no pills in any of the 15 cells (in this case the morning time period) and no mechanical movement or alarms are activated but all housekeeping functions are still performed ON DEMAND FUNCTION
The On Demand Prescription Pill function operates in a similar fashion as the Timed Prescription Pill function with one exception. The On Demand function is not triggered by a time interval but is activated when the user pulls the On Demand Prescription Pill access bar 17B mounted on the side of the pillbox. There is no alarm associated with the On Demand function but there are 4 visual indicators which show the user the number of On Demand requests made that day. The signal latches a series of flip flops configured as a ripple counter.
The outputs from these flip-flops drive LEDS through driver U16 . As each On Demand request is made, a LED is turned on. When all 4 LEDS are on, the On Demand function is inhibited by signal ODOF and resets only after 24 hours has passed. The reset time is set at 9 p.m. to allow the user access to the On Demand function during the night. The LEDS are turned off and the On Demand function is active again for another 4 requests (refer to Figure 13C). There is also a time delay between requests built into the system which is set at 2 hours. A visual indicator call OFF LINE is on when the On Demand Prescription Pill function is inhibited. These restrictions are incorporated to reduce the possibility of an overdose.

After the On Demand Prescription Pill function is accessed and the pills removed, a signal call ODON is generated that resets U22B producing DEJTD which is read by the controller and sets a sequences of events in motion through DEM_ACT which sequentially selects a On Demand channel A through D. The movement of the trolley is similar to the process described in the Timed Prescription Pill section. This set of events results in a new set of On Demand pills being placed in the On Demand side of the dispenser 60B. This sequence is user driven and therefore all 4 requests, if any, might not be used in a day. This means that the counter that determines the number of pulses and therefore the number of cells to move must be updated after 4 requests have been made and not at the loading time as is the case with the Timed Prescription Pill function.

PURGE FUNCTION
The purpose of the automatic purge function is to purge the system of all rem~inin~
pills in preparation for reloading. When the sliders are in their home position, the bottoms of all cells are covered. Activating this function is the first step in the reloading procedure.
Pressing S10, outputs signal RLON. RLON is read by the controller which sets up the reload function PURGE_ACT. The controller issues a signal PURGE on RA3 whichafter conditioning turns on driver Q6. The o/p of Q6, PGOUT, turns on all 8 magnetic latches. The software then turns on the DRFOR signal. The software is programmed to count 15 pulses before stopping the trolley. This empties the array of all rem~ining pills. The trolley reverses direction drives to the home position. The WAIT LED which is turned on by either the DRFOR or the DRBAK signals is turned off. The purge code has enabled only the Timed Prescription Pill access bar. The system must be reloaded before the excess pills are removed from the dispenser.
After the system is reloaded as described in a previous section, the Timed Prescription Pill access bar is pulled to remove the excess Prescription pills. At the completion of this action (bar back to closed position), The program initiates the PILL_ACT function (pill refill). This action turns the WAIT LED back on. When this activity is complete (WAIT
LED off), the On Demand access bar can be pulled to remove the excess On Demand pills.

The program initiates the DEM_ACT function (On Demand refill). As mentioned previously, the pills in the trays can now be sorted and reused if positively identified or otherwise disposed of. The system is closed, locked and is set for another 14 full days of operation.

MONITORING AND REPORTING
The software is constantly pelrollllhlg functional tests. The system monitors the status of the S main functions and sets priorities to prevent conflicts. The hardware that produces the external indications of this internal testing is standard circuitry and will not be detailed.
The tests and the actions are listed below. Details can be found in the schematics.
TEST ACTION
External charger not connected Power indicator flashes, system operating on battery Fuse F2 blown (12v supply) Power indicator flashes, system shuts down On Demand offline OffLine indicator on. Delay defaults to 2 hoursMaximum On Demand requests All 4 request indicators on, new requests refused 9 p.m. reached Reset On Demand requests, request indicators off 9 p.m. reached Portable dispenser unit synchronized System empty warning System empty indicator flashes on end of 14th day System empty end of 1 5th day Failure indicator flashes, system on standby System time faults detected Failure indicator flashes, system shuts down System overrun failure Failure indicator flashes, system shuts down Modem activated, service people alerted Portable dispenser removed Portable indicator flashes, turns offwhen unit returned POWER SUPPLY
The system is powered from a 12 volt high capacity battery which is constantly being charged by a float charger U29 (refer to Figure 14F). An external wall mount converter supplies 18.5 volts to the dispenser. This input is monitored and the system issues a visual alarm if this external charging voltage is disconnected. The 12 volt supply directly drives the magnetic latches. A reg~ ted 5 volts U27 is derived from the 12 volts which powers the logic circuitry and the LEDS. A supervisory circuit U28 is incorporated to control system resets. The motor is driven from the 5 volt supply through a series of diodes.
Relays K1 and K2 are powered from the 12 volts and are used to drive the motor so that voltage reversal and dynamic braking can be incorporated. Dynamic braking is essential to reduce motor run-on. A FET H bridge could have been used but was rejected for economic reasons and because dynamic braking could not be incorporated.
An optional safety feature involves a remote alert capability. A Modem dials a programmed number and transmits the identification number of the calling dispenser to a service center. The program records the time of the call at the service center and automatically prints out a work order with the name and address of the user. The user's family or caregiver is informed that a service person is being dispatched to the user's residence. The family must be notified since the service person is not allowed to reload the dispenser. A failure requires a system reload.

CORRECTING FOR TIME CHANGES
- Since the main dispenser has no means for setting time in the particular embodiment described, a mech~ni~m for ch~nging time in the Spring and Fall has been incorporated. The requirement of adjusting the time either backward or forward one hour at specific times of the year can present complications to the operation of the unit and or inconvenience to the operator. The unit should be reset at least 2 hours after the last time interval for the day i.e.
11 p.m. or at least 2 hours before the first time interval for the day, i.e. 6 a.m. This is inconvenient to the operator. To alleviate this problem, a time change initi~ting switch and associated software have been incorporated. This function work as follows: The system has been preprogrammed as to which time mode it is in, i.e. standard time or day light saving time.
Knowing this, the software either adds one hour or subtracts one hour when triggered to change. On the day of the change, at any time of the day, the operator unlocks the unit, lifts the lid and presses the change time switch which is mounted on the control panel 8. Nothing happens until 2 a.m. At this time, the change time software determines whether to add or subtract one hour and then resets the clock. The system operation is unaffected.

It operates as follows: When the change time switch S9 is pressed, the signal STD_T is placed on one i/p of the gate U7C and when the read signal is applied, the o/p ISTD is recorded in the controller as STD_T. When the software detects 2:00 a.m., the software is diverted to SET_STDT. In SET_STDT code7 the bit MOD_T is set and the bit SET_T is cleared.
The signal ETI is issued on S13 of 4-16 latch U5. This signal goes to the portable and makes the appropliate time change there. On the next loop of the software, The MOD_T is detected which diverts the software to INC_T. In INC_T code the MOD_T bit is cleared and the DEC_T bit is tested. This bit toggles. If it is clear7 it represents Spring and 1 hour will be added to HOUR. If this bit is set it represents Fall and 1 hour will be subtracted from HOUR. It is important to get this bit in the correct state during the factory setup operation.

SETTING MAIN DISPENSER TIME
For reasons of economy, set time is accomplished using the maintenance unit. Them~intçn~nce unit has a controller programmed as a 12 hour clock. The second, minute, hour switches and time display are on the maintenance unit. The main dispenser has no time setting switches or time display. This approach was taken for the following reasons:
~ Frees up memory and ports in the main controller, for other functions.
~ Reduces considerably the component count.
~ Reduces chance for error i.e. setting time is under the control of maintenance people and not the operator.
The dispenser is setup in the factory by connecting the maintenance unit to a port on the dispenser 12 and pressing the update time switch on the m~inten~nce unit. The time does not have to be changed while in use because the main dispenser has a very accurate time base and a battery supply which makes it independent of external power for an extended period of time.
The operation is as follows: When the update time switch is pressed, the signal SET_T is sent to the main dispenser and appears on one ofthe i/ps ofthe read gate U14A.
When the read signal is applied7 the o/p ISTM is sent to the controller and recorded as -SET_T, refer to Figure 1 3E. The controller tests the SET_T bit and if it is set, sets TIME_ON, if not set, it returns to MAIN. The first time the software enters the SET TIME
code it encounters a steering bit SB6_6 which if clear will divert the software to SET_MINUTES. The software clears the SET_T bit and tests for time pulses T_PUL.
In the m~intçn~nce unit, the so~ware sets up and transmits a pulse train, 1 pulse every 4 millisecond loop of the software. The first pulses train represents the number of minutes.
These pulses are counted in the main dispenser in a file called COUNT_TIME. At the end of the pulse train, a END_P signal is sent which terminates the counting and the program transfers the contents of COUNT_TIME to the file MINUTES and adds MAXMINS which is the minutes preset. The program jumps to SET_IIOURS and repeats the same process with hours. When COUNT_TIME is t.~n~relled to HOURS it adds MAXIIRS which is thehours preset. It is important to note that the time in the maintenance unit runs on a 12 hour clock while time in the main dispenser runs on a 24 hour clock. The software in the maintenance unit takes this into account by monitoring a.m. / p.m. and adding 12 pulses to hours if time is p.m. The actual time has now been transferred to the main dispenser. The TIME_ON bit is cleared and the time transfer function is turned off.

PORTABLE DISPENSER UNIT
The need for a portable dispenser was not part of the original dispenser concept but evolved later with the realization of how does the user get access to his/her medicine when away from home for the day. The answer to this shortcoming is a hand held dispensing system that can be carried by the user that dispenses 1 days requirement of essential pills and supports all the required safety features. This device also serves as a backup in the event the main dispenser should. fail. In this case, the portable will supply pills for that period of time that the main dispenser is out of service.
The device also holds 1 request of an On Demand pill.
Although not necessary for the functioning of the invention, the preferred embodiment of this invention provides for a Portable Automatic Dispensing Unit. This teaching will start with a description of the external and internal features of this portable dispenser (as shown in Figures 9,10,11 and 12) then describe the features and locking operation. Finally the electrical and software operation of the unit, will be detailed (see Figures 17, 18 and 19).

~;X l ~;KNAL AND INTERNAL FEATURES
The portable dispensing unit is a rect~n~ r device approximately 1.5 inches on a side and 5.0 inches long 90 (see Figure 9). The front end of the unit contains 4 locked time period slots 94. There is a slot on each face of the device and it is covered by a locked thumb operated slider 93. The pill compartments are labeled morning, noon, afternoon and evening.
Under each slider is a switch 99 that work in conjunction with the locking mech~ni.~m Each side has a time period LED 95 and a locking mech~ni~m that prevents the slider from opening until the appropriate time (see Figure 1 2A). The sliders resides in shallow grooves in the surface of the unit, these grooves 97, guide the sliders in their back and forth movement. The front of the unit is enclosed with a cap 98 similar to the top of a pill bottle. The On Demand pills are housed in a slot 100 behind this cap. On the back of the unit, is a 6 pin connector 92 that allow signals to pass between the main dispenser and the portable dispenser and an access panel for the battery 91. Figure 10 shows the position ofthe electronics 101 and the audible alert 103. The battery is housed below the electronics 102. Figure 1 lA and B shows some of the features described above from a front and back perspective.

FEATURES
The device is capable of dispensing a day's allotment of pills according to the user's drug regime. The unit is housed in an unlocked holder 13 on the right hand side of the main dispenser and can be removed at any time. This device can be carried in a purse or pocket and will alert the user both visually and audibly at the approp, iate time. This pill dispenser is not designed to carry a large number of pills but only those essential for the well being of the user for a period of one day. When the portable dispenser is removed from the main dispenser, all Prescription Pills dropped from the time of removal until the unit is returned to the main dispenser will be directed to the internal catch bin. This is to prevent 2 sets of pills, for the same time period, from being available. The On Demand function is also inhibited. It is the responsibility of the system operator to insure that this portable dispenser is reloaded and returned to the main dispenser so as to be available if an emergency should arise. A visual alarm will occur on the visual panel, of the main dispenser, until the portable unit is returned.
The portable unit is being charged when it is in its holder.

LOCKING MECHANISM
The locking meçh~ni~m is shown in Figures 12A and B. The thumb slider 93 is composed of 3 layers of mylar. The top layer 93A extends beyond the center layer 93B
approximately one quarter of the length of the slider. This extension traps the magnetic arm 105 from rising above the slider. The magnetic arm which is pivoted at one end 109 has a tendency to move upward under the action of a weak spring or the like 104. The bottom mylar layer 93C extends beyond the center layer by one sixteenth of an inch. This prevents the magnetic arm from moving downward until the appropliate time. A weak spring 112 provides tension on the thumb slider to hold it against the magnetic arm. Figure 12B depicts the construction of the magnetic circuit. It is composed of a coil 108 mounted on an iron core 106. The ends of the core are capped with iron discs 107 that form the pole pieces of the magnetic circuit. 4 magnetic arms 105 are mounted in a quadrantal fashion on the periphery of one of the discs. The ends of the magnetic arms are bent parallel to the sliders. The periphery ofthe other disc is cut and bent to form tabs 110. These tabs present a large pole face area to the opposing magnetic arms and are angled to conform to the angle of the magnetic arms (see Figure 12A). The distance between the magnetic arm and the pole face 111 is 1/16 of an inch. This allows sufficient displacement for the magnetic arm to clear the slider. The location of the pivot points 109 of the magnetic arms are such as to minimi7e the gap between the magnetic arms and their respective pole faces. The magnetic arms extend past their pivot points and are connected with a spring arrangement (wire clip) 104.
The bottom side of the lower mylar 93C has a slot that traps the actuator of a slider switch 99. When the slider is pushed towards the front, it is allowed to move one quarter of an inch before it is impeded by the front stop 113. In this forward position, the slider switch completes an electrical connection which energizes the magnetic circuit pulling the magnetic arm to the pole face. The magnetic arm is allowed to move down because the slider has moved ahead, clearing the bottom mylar layer. The other 3 magnetic arms are trapped since their sliders were not moved ahead, therefore, these sliders remain locked. The slider is now pulled back and rides over the magnetic arm. After traveling to the full back position of the slider, the slider switch completes an electrical connection which de-energizes the magnetic circuit causing the magnetic arm to spring up and rest on the underside of the slider 93C. The slider is at its full back position uncovering the pill slot. The device is tipped and the pills removed. The user then returns the slider to the front of the device which completes the first electrical connection again disabling the LED and the audible alert. Also, as the slider moves forward, the bottom of the slider clears the magnetic arm allowing it to spring upward only to be stopped by the top mylar layer of the slider 93A. The user releases the slider which moves back a small distance under the action of the tension spring 112 and comes to rest against the magnetic arm 105. This completes the action. The pills have been removed and the device is locked. The mechanism described above is repeated on each of the 4 faces of the unit.

DESCRIPTION OF ELECTRONICS OF PORTABLE DISPENSER
.
MICROPROCESSOR
This Portable Pill dispensing system is controlled by a 12 port PIC16C54 microcontroller operating at 4 MHz (see Figure 17). The controller functions as the master clock and generates all timing and logic signals. The prescaler is assigned to the RTCC as a 1:16 divider. This sets the instruction clock to 1 microsecond after a internal divide by 4. The RTCC rolls over every 4.096 milliseconds. The controller counts 244 rollovers for one second. The error in time is compensated for by adding and subtracting nths of a second every minute, hour and half day. The A ports are dedicated to producing the 4 time intervals.
Table 1 shows the port A o/p port assignment. The B ports control the portable functions.
Table 2 shows the port B i/p and o/p port ~si~nment. Refer to the schematic and wiring diagram in Figures 17 and 18 and the software flowchart as shown in Figure 19.

PROCESS
Every 4 milliseconds the program jumps to a part of the program called PROCESS and reads -the i/ps on the B ports and records the status in tlagl. Table 3 shows the flagl bit ~csignments.

RA1 - TlPM

Table 1 Port A ports assignment RB4 SET_LOAD

RB7 _ LATCH
Table 2 port B port assignments softwareNAME BITCOMMENT
PRTIN 0 Portable connected to main dispenser SYNC 1 Time synchronized at 9 PM
FRONT 2 Front position of slider BACK 3 Back position of slider SET_LOAD 4 Device loading ETI 5 Early time interval STD_T 6 Change time/Spring forward/Fall back ALRM 7 Inhibits alarm when portable present Table 3 flagl bit assignment An explanation of these i/ps and the conditions at which they will be high or low is listed.
PRTIN - Portable monitor normally high, pulled low when charge removed.
SYNC- Synchronization normally low, pulled high when sync arrives.
FRONT - Forward sw position normally high, pulled low when time int. on, & sw at front BACK - Back sw position normally high, pulled low when time int. on & sw at backSET_LOAD - Purge / reload function normally high, pulled low when key placed into Jl ETI - Early time indication normally low, pulled high when ETI sig., arrives.
STD_T - Change time normally low, pulled high in Spring and Fall ALRM -Alarm inhibit normally low, pulled high when portable is present The bit ac~ignment and explanations for flag2, 3, 4 and 5 are shown in tables 4, 5, 6 ~ and 7.

softwareNAME BIT COMMENT
SB2_0 0 Time interval 9:00 am SB2_1 1 Time interval 1:00 PM
SB2_2 2 Time interval 5:00 PM
SB2_3 3 Time interval 9:00 PM
SB2_4 4 ReadFRONT steeringbit SB2_5 5 Read BAK steering bit FRNT 6 Memory of front sw being activated BAK 7 Memory of back sw being activated Table 4 flag2 bit ~csignment softwareNAME BIT COMMENTS
SB3_0 0 At front steering bit SYS_BSY 1 System active TIMER 2 5 minutetimer TIME_DON 3 Timercomplete SB3_4 4 Timer steering bit ETI_INH 5 Inhibits next time interval MOD_T 6 Time change (Spring and Fall) DEC_T 7 Time change memory bit Table 5 flag3 bit assignment softwareNAME BIT COMMENT
SB4_0 0 Loading 9AM
SB4_1 1 Loading 9AM waiting SB4_2 2 Loading lPM
SB4_3 3 Loading lPMwaiting SB4_4 4 Loading 5PM
SB4_5 5 Loading SPMwaiting SB4_6 6 Loading PM
SB4_7 7 Loading PM waiting Table 6 flag4 bit ~signment softwareNAME BIT COMMENTS
T9AM_FULL 0 9AMfilled TlPM_FULL 1 lPM filled TSPM_FULL 2 SPM filled T9PM_FULL 3 9PM filled SB5_4 4 Loading steering bit FRNT2 5 Loadingno fill Table 6 flagS bit assignment TESTING BEFORE ONE SECOND

After recording the status of the i/p ports, the software checks these recorded bits in a specific sequence as listed below. The testing is done every 4.1 milliseconds.
Test PRTIN. If low portable has been removed from the main dispenser.
Test SYNC. If high sync signal has arrived.

Test FRONT. If low, implies that the user has responded to the time interval audible alarm and moved the slider on the side of the unit that the LED is on, to the front.
Test BACK. If low, implies that the user has moved the slider to the back of the unit.
Test SET_LOAD. If low, implies that the operator is planning to reload the unit.Test ETI. If high, implies a early time interval signal has arrived.
After passing through all these tests, the software returns to MAIN.

TESTING AFTER ONE SECOND
When 1 second is detected, the software goes to the time keeping part of the software where it updates time and if so requested, passes through the various delay timers. This system uses a 24 hour clock. It is also in this part of the software that time is moved 1 hour ahead or 1 hour back in the Spring and Fall. This time change is automatically done at 2 a.m. so as not to interfere with the day time functions. There is no means for setting or adjusting time locally.
It is synchronized to 9 p.m. once every day. The Software then tests if the pillbox is busy, if so it returns to MAIN. If it is not busy, it goes to the HOUR_SEL code where it tests for the time intervals. From there it returns to MAIN. The software will repeat the above sequence every second. This completes the normal sequence of events. The operation of the specific functions are detailed in the following sections.
When the portable dispenser unit is in its holder, the following functions are active:
~ The Prescription Pill and On Demand Pill functions are active ~ The Portable Dispenser's presence is being monitored and a visual alert is off~ The Portable Dispenser's visual and audible alerts are disabled ~ The Portable Dispenser's battery is constantly being charged SYNCHRONIZING PORTABLE DISPENSER
The portable software detects the 9 p.m. sync signal from the main dispenser anddirects the program to the SYNC_TIME code. The code starts by setting hours and minutes files to zero. It then sets the hours file to a hex code that represents 2100 hours (24 hour clock). The minutes file is left at zero. The real time in the controller is now 9 p.m.

SOFTWARE REACTION TO SLIDER MOVEMENTS
When the software detects a low FRONT i/p, the program is diverted to AT_FRONT
where the code tests the SB3_0 steering bit. This bit will be clear on the first pass. The software sets the latch on and records that the front switch has been activated by making bit FRNT high. The FRONT bit is cleared and the SB3_0 bit set. The software will not pass through this section of code on the next pass but will be diverted to ALARM_OFF. The program returns RTN_TFI where it continues testing the i/p signals.
When the software detects a low BACK i/p, the program is diverted to AT_BACK
where the code clears the LATCH signal which turns offthe magnetic latch. The BACK bit is cleared and the BAK bit set. The program returns to RTN_TF1 where it continues testing the i/p signals.

ETI SIGNAL
When the software detects a high ETI signal, from the main dispenser, the program is diverted to SET_TIME. The signal has 2 functions. First, it is used to inhibit the 2nd time interval in a time period. For example, if there are pills in the 8 a.m. time interval in the main dispenser, the ETI signal is sent to the portable where it inhibits the 9 a.m. portable action.
This prevents the user from getting access to 2 sets of pills of the same time period. Second, the ETI signal is used for ch~nging the time 1 hour forward or back and is sent at 2 a.m.
These di~eren~ uses identified by testing for the time when the ETI signal is received in the portable.
Under the code SET_TIME, the software clears the bit ETI and then tests to see if the time is greater than 7 a.m. (HEX = 07). If it is, the program goes to SET_INH. At SET_INH the program sets ETI_INH . In general, if the main dispenser is set for all early time intervals i.e. 8 a.m., 12 a.m., 4 p.m. and 8 p.m., all portable time intervals i.e. 9 am, I
p.m., 5 p.m. and 9 p.m. will be inhibited.
When the software detects a ETI signal and determines that it occurred at 2 a.m.(HEX = 02), it sets bit STD_T . When the software is in the HOUR_SEL code and it detects 2 a.m. it sets MOD_T. Now when the software is in the time setting code it detects MOD_T

and sets the time either 1 hour ahead or 1 hour back depending on the status of DEC_T
which toggles with every change. It is essential during the initial setup of the unit that DEC_T be set correctly.

ALARMS
The visual and audible alarms are triggered when the time interval signal on ports RA0-RA3 goes to ground. This condition is removed when the program is diverted to AT_FRONT code and since SB3_0 is set, is diverted to ALARN_OFF. Port A and FRNT2is set and the following bits are cleared: SB3_0, BAK, FRNT and LATCH.

HOUR SELECT
The time interval detection so~ware works in the same manner as in the main dispenser. The software enters the HOUR_SEL code and tests for the 4 time intervals 9 a.m., 1 p.m., 5 p.m.
and 9 p.m.. The sequence is as follows:
Test the 9 a.m. steering bit . If it is clear, it is not 9 a.m. yet therefore the program tests for 9 a.m. If it is set, 9 a.m. has passes therefore the program is diverted to SLOT2 which tests for the next time interval which is 1 p.m. If it is 9 a.m., the software goes to PASSED_9AM
where it sets the 9 a.m. steering bit and tests ALRM which senses if the portable is in its holder on the main dispenser and or if an early time interval occurred. If ALRM is clear, program continues, if not, program returns to MAIN there by inhibiting the visual and audible alarms and also the unlocking of the unit. This implies that pills can not be removed from the unit at 9 a.m. Next, test for full cell. If pills where placed in the 9 a.m. cell at loading, bit T9AM_FULL will be set. If set, program primes and then starts the 5 minute timer. This time will reset the unit if the user does not respond to the visual and audible alarms. Finally, if all conditions have been met, the software places a ground on port A RA0. This signal activates the alarms and unlocks the MORNING side of the dispenser. The user places the portable dispenser in his/her hand with the side with the fl~hing LED facing up. The user pushes the slider forward with a thumb action and then pulls the slider all the way back. The dispenser is tipped and the pill (s) fall out into his/her other hand. The slider is returned to the -front and then allowed to return by spring action back to its normal position. The visual and audible alarms are turned off and the unit is again locked. To retrieve the On Demand pills, the user simply unscrews the top cap and pops the pill into his/her hand.

RECOVERY
Now to continue with the HOUR_SEL function. If when testing for 9 a.m. it did not pass, the software tests for a time greater than 9 a.m. Not greater than 9 a.m. is a do not care situation and the program returns to MAIN. If it is greater than 9 a.m., the software set the associated steering bit and then returns to MAIN. This is a recovery mech~ni~m that allows the unit to return to the proper time interval position if the steering bit file FLAG2 got out of synchronization with real time. The other time intervals operate in the same manner. SLOT5 tests for 2:00 a.m. It is at this time that the other time interval slots are cleared and also if STD_T was set, then MOD_T is set which sets up the conditions to change time back or forward by 1 hour.

LOADING PROCEDURE
The loading procedure is initiated by removing the portable dispenser from its holder on the right side of the main dispenser and inserting the loading key into the connector on the back of the portable unit. This key applies a ground to port RB4 of the controller setting the SET_LOAD bit. When this bit is detected the program is diverted to the LOADING
program.
A general description of the loading procedure will be given first to aid in theunderstanding of the software which can appear to be convoluted. The slots must be loaded in the proper sequence i.e. morning, noon, afternoon and evening. The intent is to select the morning side of the portable dispenser and tell the controller, by slider movements~ if pills will be placed or not place in the morning slot. The first action is to move the slider to the front to get the attention of the controller. Now if the slider is pulled all the way to the back, the controller intermits this as the slot will have pills and it sets the approp. iate memory bit. The operator will at this point add the appl Opl iate pills and close the slider by moving it all the way to the front and then letting it spring back to its home position. The morning slot has been loaded. If the prescription call for no pills in the morning slot, the procedure is as follows: The first action is to move the slider to the front to get the attention of the controller.
The slider is pulled back to the center (enough to break the at front connection) and then returned to the front. This 2nd at front connection without an at back connection signifies to the controller a no fill. The slider is allowed to return to its normal position. This completes a no fill operation. This same operation is repeated for the other 3 sides in sequence. The loading key is removed and the loading procedure is complete. The dispenser is returned to its holder.

DETAILED LOADING ACTION
On the first pass, the program passes through steering bit SB4_0 and turns on the 9 a.m. time interval by placing a ground on port RA0 and then sets SB4_0. This will activate the alarms and unlock the 9 am slider. The software waits for the operator to move the slider to the front ofthe unit. Since the front switch is read twice, the software must ~i~ting~ h between them. It does this by getting diverted to READ_FRNT1 on first pass i.e. through steering bit SB2 4 and tests for the front switch being activated. When it is activated, the bit FRONT is set and the steering bit SB2_4 is set then the program continues to test the other i/ps. On the next pass and subsequent passes, SB2_4 is set so the program is diverted to READ_FRNT2 where the software is testing to see if the switch is still at the front. If it is not, the steering bit SB2_4 is cleared. This code is included to insure that the front switch connection is recorded only once per connection and not repetitively with every 4 millisecond read. On the next pass, the set FRONT bit is detected and the program is diverted to the AT_FRONT code which is executed as detailed above. The program will now jump to the LOADING code and since SB4_0 is set, will branch to T9AM_WAIT. The program passes through SB4_1 and SB5_4 on the first pass and tests to see if the FRNT bit is set. This is the memory bit indicating that the switch was at the front. If set then SB5_4 is set and the program returns to MAIN. On the next pass the program is diverted to T9AM_WAIT and then to TST_FRNT2 where it must record if the cell is filled or not. If the front switch is activated again, it is a no fill situation. But if the back switch is activated, then the bit TgAM_FULL is set. The program sets SB4_1, clears BAK and clears SB5_4. This sets up the conditions for the program to jump to the LOAD_lPM loading code. The software for the other time intervals operate in the same way. If some of the time periods are not used, the user will not be alerted when these time periods occur. These time periods were disabled during loading.
It is important that the portable dispenser be reloaded and returned to the maindispenser so that it will be available for future use and also so that the main dispenser which is disabled during its absence, can return to full operation. The portable visual alert on the main dispenser control panel will turn off, indicating that the portable unit has been returned to the main dispenser. The concludes the description of the Automatic Portable Pill Dispenser.

MAINTENANCE UNIT

INTRODUCTION
The maintenance unit was a late development in the Automatic Prescription Pill Dispenser Program. The main development had reached a point where it was imperative that the cost of the system must be reduced. The biggest saving on the electronics side was to reduce the component count and therefore the number of PCPs (printed circuit packs). This could be accomplished by putting all delay functions, which up to this point where done in hardware, into the main microcontroller (done in software). To achieve this, meant moving the time function from the main controller along with the time setting switches and display to the m~inten~nce unit to free up memory and ports on the main controller. Once this approach was accepted, it became obvious that other functions could be moved to the maintenance unit as well. Although this added another unit, only one of these units is required as opposed to repeating all these functions in every dispenser system. This approach also increases the safety and user friendly aspects of the system by moving these controls out of the reach of the operator and into the hands of a trained maintenance person.
The maintenance unit is connected to the main dispenser through a ribbon cable through an IDC connector (see Figure 23). This cable plugs into the maintenance connector 12 (see Figures lA and 16. On the main PCB the connection is made through J3 (as seen in Figure 14G) and on the Maintenance Unit through J1 ~as seen in Figure 21B).
To aid in the following description, refer to the schematics (Figures 21A, B and 23), and the software flowchart (Figure 22).

FUNCTIONS
This system performs the following functions:
~ Time setting. This is the main function of the unit. After setting the time on the m~int~n~nce unit ( same as any digital clock), the time on the main dispenser can be set simply by pressing the update time switch UDT (see Figure 23). The current hours and minlltes on the m~inten~nce unit are transferred to the main dispenser, as serial bit streams, where they are captured in the hours and minutes files.
~ Overrun recovery. Recovery from a main dispenser overrun is accomplished by pressing the left or right trolley overrun switch on the maintenance unit. These switches are accompanied by LEDs which indicate the end of the main dispenser at which the overrun occurred.
~ Auto / manual stop. This switch controls the position pulses from the cell position switch in the main dispenser when the trolley movement is initiated from the m~inten~nce unit. In the AUTO position, the first pulse that occurs after the trolley starts to move will stop the trolley. In the case of an overrun on the left (as seen from the front of the main dispenser), the trolley would stop at the first cell position (home position). In the case of an overrun on the right, the trolley would stop at the 1 5th cell position. The MANUAL
STOP position is used to allow the trolley to move until the STOP switch is pressed.
This function is used to test the trolley movement, to return the trolley from the 1 5th cell to the home position. in the case of an overrun on the right and to perform a manual purge.
~ Manual purge. The MANUAL PURGE switch supplies a signal to the purge driver Q6 on the main dispenser which turns on all 8 magnetic latches.
The ~inten~nce Unit monitors the following functions.
=> Time. using a four digit LED display =, Battery charging (CHARGE). LED on when battery is being charged.
=~ Position pulses (P). LED on when trolley is at a cell position.
=~ AM / PM (AM). LED on when time is AM.
=~ Left / right overrun (L / R). LEDs mounted over LEFT / RIGHT switches are on when overrun occurs.

DETAILED DESCRIPTION OF MAINTENANCE UNIT

MICROCONTROLLER
The system is controlled by a PIC16C57 microcontroller operating at 4 MHz. The prescaler is set to produce a instruction cycle of 1 microsecond. The controller functions as the master clock and generates all timing and logic signals. The A and B ports are dedicated to operating the time display. The C ports control the maintenance functions. RC4 is not used. The circuit operates in a similar manner as the controllers in the main and portable dispensers.

SET PM
If the time is p.m., switch S4 is pressed producing signal PM which latches flip flop U9B producing a high on 1 of the i/ps of AND gate U8A. When the read signal is applied, the o/p PMIN is placed on port RC0. The a.m. / p.m. state is read into the controller and recorded. The controller responds by turning offthe a.m. LED by removing signal AMMON
on port RC7. This information in the controller is used to convert time from al2 hour day to a 24 hour day before hour pulses are transferred to the main dispenser.

TIME SETTING
When the time in the main dispenser requires updating, the update time switch on the m~inten~nce unit is pressed producing signal SET_T. This action latches flip flop U9A
producing a high on 1 i/p of AND gate U8B. When the read signal is applied, the o/p SET_TIN is produced and placed on RC1. When the controller detects this signal it sets bit S~; l llME in flagl . Signal SET_T also goes to the main controller, is read and sets TIME_ON. The main controller is now alerted that a pulse stream is coming. The maintenance controller detects S~; l l lME and sets SYS_BSY. On the next pass, SYS_BSY
is detected and the program is diverted to MAIN_TIME which is the code that produces the pulse streams. In MAIN_TIME, the program is set up to send the minutes pulse stream first.
The contents of the MINUTES file is put into the COUNT_TIME file. The next step is to transmit this pulse stream. The program waits for the sync. signal CLR from the main controller.
Since the main controller and the maintenance controller are not synchronized, ameans is required to coordinate the actions of the 2 controllers. The CLR signal is used to this end. It is generated in the main dispenser as a reset at the end of the read function and is applied to flip flop UlOA in the maintenance unit causing it to latch. The o/p of UlOA applies a high on 1 i/p of AND gate U8C. When the read signal in the maintenance unit is applied, the signal CLR_IN is generated. The software then sets a bit CLR_ON. Now the program in the maintenance unit will continue executing code. It sets portc bit T_PUL and decrements the COUNT_TIME file. This is the first pulse of a stream of pulses to be sent to the main controller. The main controller receives this pulse and increments its COUNT_TIME file.
Every 4 milliseconds a pulse is sent and received. When the maintenance unit's controller COUNT_TIME file equals zero, it sends a END_P signal which the main controller interprets as no more pulses coming and therefore puts the contents of its COUNT_TIME file into the MINUTES file. The minutes have been updated. The hours are updated in a similar manner. In the case where the hour is p.m., 12 is added to the hour pulse train to produce 24 hour time in the main dispenser.

TIME DISPLAY
The time display consists of 4, 7 segment LED displays that represent hours and minutes. It is a standard arrangement except that the second digit is reversed so that it's decimal point faces the decimal point of digit three. This forms the colon between hours and minutes. The common cathode for each display is turned on by transistors QlA, B, C and D
connected to the 4 i/o lines of port A. A low o/p turns on the PNP transistor associated with the selected display. The port B pins activate the display segments through a resistor which controls the brightness of the display. In this design only the center colon decimal points are connected.
The time setting switches SW1, SW2 and SW3 which represent seconds, minutes and hours respectively share port B i/o pins RB1, RB2 and RB3. They are pulled low by 10K

resistors. These ports are driven high when the switches are pressed. The switches are , powered from Vcc (+5 volts) through current limiting resisters R1, R2 and R3. The techniques of how the controller develops and applies signals to the display segments, to display time, is not unique and is well known to those skilled in the art and therefore will not be detailed in this document.

OVERRUN RECOVERY
Since there is no physical access to the trolley mech~nism short of a major disassembly of the main dispenser, a means is required to return the trolley offthe end stops, should a failure occur that puts it there. The end at which the overrun occurs is indicated by signals DRORF and DRORB which activate RIGHT and LEFT LEDs respectively. These LEDs are positioned over the drive RIGHT and drive LEFT switches. When the drive RIGHT
switch S5 is pressed, UlA is latched producing signal MDRF. This signal resets latch UlB
preventing both drives from being on at the same time and also goes to the main dispenser where it turns on the drive forward relay K1. The trolley will start moving to the right and will stop when the first position pulse PPIN is generated assuming that the auto / manual stop switch is in the auto stop position.
The action is as follows: The position pulse PPIN passes through Switch S8 producing signal PPIN1. PPIN1 latches UlOB producing signal STOP. Signal STOP resets UlA thereby removing drive signal MDRV and turning offdrive relay K1. The drive back function works in a similar manner. If the auto / manual stop switch is in the manual position, the trolley will not stop unless the stop switch is pressed and then only after the next PPIN
signal arrives. By the use of these switches, the trolley can be returned from an overrun situation at either end of the trolley run, to the home position.

PURGE
If the main dispenser should fail and had to be returned for repair, it would benecessary to remove the user's pills from the main dispenser before the unit is removed from the user's home. If the failure did not affect the trolley movement mech~ni~m, a semi-auto purge can be performed. The function works as follows (refer to Figures 21A and B): The s6 auto / manual switch S8 is placed in the manual position. The manual purge button S7, on Figure 21A, is pressed producing a signal which latches U13A which in turn produces signal MPRG and signal DRFIN. Signal MPRG goes to the main dispenser and turns on all 8magnetic latches. Signal DRFIN latches UlA producing signal MDRF which operates as described in the previous section to get the trolley moving to the right. The trolley is now moving to the right pulling all 8 sliders with it. By looking at the array (can be seen from the top), the maintenance person can see the sliders moving and presses and holds the stop switch after the sliders pass the 14th cell position. The trolley will stop automatically when it reaches the 15th cell position. Any rem~ining pills in the array will drop to the dispenser below. They can be removed by pulling on the access bars. In this manual mode of operation, the access bars are not unlocked by the controller, therefore an external means is required. Both of the access bars 17A and 17B are unlocked using the manual access switch 7B as seen on Figure lA and S8 as seen on Figure 15. These pills are sorted if easily identified and placed into the appropliate pill cartridge or disposed of. If the trolley mechanism is not functioning, the pills will have to be removed m~nll~lly EMERGENCY STOP
If for some reason a total, quick reset is required, this can be achieved by pressing the reset button S11. This action resets all flip flops and stops all functions in progress.
This concludes the description of the Maintenance Unit.

DETAILED DESCRIPTION OF PILL CARTRIDGE LOADING AID
The pill cartridge loading aid, referred to as a loading tray, is a extension of the typical loading tray used by pharmacists to count and transfer pills to pill containers without having to handle them. This part of the invention is specifically designed to load the special pill carrying device called a pill cartridge (see Figure 8B). Refer to Figures 20A, B and C during the following description of the pill cartridge loading aid's structure and operation.

BULK PILLS COMPARTMENT
The loading tray, composed of a compartment on the left hand side of the unit, referred to as the bulk pill compartment 202, is bounded by a sloping left side wall 210A, a vertical back wall 210B, a sloping pill trap wall (see Figure 20B) 213A along the front ofthe unit and a semi-circular mound 203 on it's right hand side. This compartment has a bottom 207. It is in this compartment, the pharmacist places the pills prior to counting.

COUNTED PILLS COMPARTMENT
The compartment to the right of the bulk pill compartment is the counted pills coll~al Llllent 205. It is bounded by a vertical wall 210B at the back, the mound structure 203 on its left, a sloping pill trap wall 213B along its front and a upwards sloping ramp 211 on its right. This compartment has a bottom 207. The ramp 211 changes to a horizontal structure which terminates in a series of 15 orifices 206 which mirror the cell structure of a pill cartridge. The edges of the tray starting at the slopped section, through to the horizontal section 210C form a lip to prevent pills from spilling offthe tray. The height ofthis structure on the right is such that a pill cartridge 80 can slide under these orifices 208 along lines A and B (as shown on Figure 20A) and be in alignment with them. The pill cartridge is placed in position with its ~lrst cell at the back of the loading tray (the top in Figure 20A). The back of the pill cartridge has the moon shaped indentation 86. A protruding arm 209, is on the loading tray and buts up against the front of the pill cartridge 81 but does not interfere with the removal of the pill cartridge slider. This arm prevents the pill cartridge from sliding out the back when the pill cartridge slider is pulled. The unit has a line indicating the end of the 7th cell and label 212 which identifies the cells 8 through 15. This aids the operator in filling the pill cartridge, if the prescription calls for less than the full 15 pills per side.

REMOVE STRUCTURES
The 2 bottle like structures at the front of the loading tray 214 and 215 operate in the same way. These structures are composed of vertical walls which are the height of the loading tray (1.5 inches). They are termin~ted at the front with a funnel like structure which channels pills to capped orifices 201 and 203. The backs of these bottles like structures are separated from the pill compal ~---ents 202 and 205 by slopped walls which are only 0.5 inches high (see Figure 20B). Figure 20B shows the pill trap structure for the bulk pill compartment.
The counted pill compartment pill trap is the same. These bottle like structures have a cover which prevents pills spilling out when the loading tray is tilted to a vertical position.

PILL CARTRIDGE LOADING OPERATION
An empty pill cartridge is places in position under the loading tray as described above.
The pill cartridge's sliders are in position. The pharmacist dumps a large quantity of pill as per a prescription into the bulk pill compartment. Using a standard sorting knife like tool, the pharmacist counts the required number of pills while moving them over the mound to the counted pill compartment. After the number of pills called for by the user's prescription have been counted, for example 100, the pills are then moved up the ramp and guided to the 15 shallow orifices. One pill is placed in each orif~lce. These orifices are shallow because the pill cartridge is underneath with its slider in place. The thickness of the loading tray top is only 0.25 inches. These indentations (orifices) are deep enough to insure that the pills will remain separated, but shallow enough that if more than 1 pill should get into a cell while loading, it can easily be flicked out using the sorting tool.
When all indentations are filled or that number of cell as per the prescription, are filled, the pill cartridge slider is removed. This is accomplished by pressing on the pill cartridge indentation 86 and then pulling the slider directly under the orifices (top slider) all the way out 81. The pills sitting in the indentations on the loading tray will fall into corresponding pill cartridge cells below. The slider is then returned to its position on the pill cartridge. This completes the loading of 1 side of the pill cartridge. This process is repeated 3 times, turning the pill cartridge by 90 degrees each time. This completes the loading of a pill cartridge, if fully loaded it will contain 60 pills. Other pill cartridges, cont~inin~ different types of pills are loaded in the same manner.

REMOVAL OF EXCESS PILLS
Since in this example the prescription called for 100 pills, 40 pills still remain in the counted pills compartment. Also there are extra pills in the bulk pill compartment. They are removed as follows: The loading tray is picked up from the horizontal surface and tilted such that the front is lower than the back. The pills in both compartments 202 and 205 slide over the low sloped pill traps 213A and B into the bottle like compartments at the front 214 and 215. The pill are now trapped in these compartments. Therefore it does not matter if the loading tray is tilted back to a horizontal position. The end caps are removed from the pill cartridge 89 and the counted pills compartment 204. The 2 units are aligned one over the other with the pill cartridge on the bottom and the loading tray tipped again to almost a vertical position. The excess pills in the bottle like counted pill compartment 215 are transferred to the center of the pill cartridge . The caps for the 2 units are replaced. This procedure is repeated with the bulk pill bottle like con-l)al ~ ent 214 and the pharmacists bulk pill container or the user' s bulk pill container. The caps for these units are replaced. This completes the loading of 1 pill cartridge and the h~n~lling of the excess pills. Applying the applopl;ate label to the pill cartridge completes the operation.

NOTE
These pill cartridges are not child proof. This is not an issue since they are never left in the open but stored in the locked main dispenser.
-NOTES
' ~ It will be appreciated that this invention may be implemented in a variety of ways that would be obvious to those skilled in the art. Some of the more obvious areas are as follows:
1. The drive mechanism could be achieved using a stepper motor and associated driving clrcultry.
2. The trolley position could be implemented using a optical position indicator.3 . The linking of the sliders to the trolley could be achieved through mechanical means or other types of solenoid means.
4. The movement of the pills to the exit end of the unit could be achieved by a chute mech~ni~m (was done this way in the prototype).
5. The ejection of the pills to the external trays could be achieved using a motorized clearing meçh~ni~m (was done this way in the prototype).
6. The electronic control of the dispensers could be accomplished with a stronger emphasis on software or conversely on hardware.
7. The electronic circuitry in the main unit could be reduced in size using surface mount - technology or even further reduced using large scale integration.
8. The passive, color coded visual loading aid in conjunction with the pill chart could be accomplished by incorporating a LCD module.
The embodiments of the invention disclosed in this document are therefore to be understood as being by way of example only. The invention is not to be limited by the embodiments shown, but by the claims which follow.
9. The configuration of the array of cells could be arranged to dispense pills over different intervals, a di~elc.ll number of days, more and different times during each day. The array configuration and time periods described are merely the prer~- ~ ed choice amongst a wide variety of combinations possible.

Claims (19)

1. An Automatic Prescription Pill Dispensing System, the system consisting of a main unit comprising a horizontal pill-holding array comprising a plurality of rows of pill-retaining cells for holding pills to be dispensed, each of the cells being open at the top for loading of pills therein and open at the bottom to permit pills to fall through the cell;
a sliding bottom panel under each row of cells forming a pill retaining bottom for each of the cells in said row, each of the panels being able to slide between a closed position such that pills in the cells are prevented from falling through the cells, and an open position such that pills fall through the cells;
a top cover to retain pills in the pill-holding array and to prevent unauthorised access;
panel movement means associated with each of the sliding bottom panels for selectively moving any panel a predetermined distance between the open and closed positions to permit pills from a desired cell to drop into a pre-dispensing location;
user-operable dispenser activation means to cause movement of pills from the pre-dispensing location to a dispensing location where they may be accessed by the user;
microprocessor means for controlling the movement of the sliding panel movement means to permit dispensing of pills.
2. The pill dispensing system of claim 1, wherein each of the sliding bottom panels has a latch end adapted to be engaged by latching means located on the panel movement means to permit movement of the sliding bottom panels, and the panel movement means comprises an array of spaced apart latching means positioned in a fixed position relative to each other so as to be able to engage the latch end on adjacently located sliding bottom panels and which is movable under electric motor control in the direction of sliding of the sliding bottom panels, such that each latching means may be individually actuated to engage the latch end of the adjacent sliding bottom panel to enable said sliding bottom panel to be moved when the panel movement means is moved.
3. The pill dispensing system of claim 2, further including a sliding array bottom under one or more of the plurality of rows of sliding bottom panels, the sliding array bottom having a latch end adapted to be engaged by latching means located on the panel movement means to permit movement of the sliding array bottom, and the panel movement means having located upon it a latching means adjacent the sliding array bottom latch end, such that the latching means may be actuated to engage the latch end of the sliding array bottom to enable the sliding array bottom to be moved when the panel movement means is moved.
4. The pill dispensing system of either of claim 2 or claim 3 in the alternative, wherein the latch ends include ferrous material, and the latching means includes electromagnets for magnetically engaging the ferrous material of the latch ends to enable the engaged latch unit to be moved.
5. The pill dispensing system of either of claim 3 or claim 4 in the alternative, further including an aperture in the sliding array bottom through which pills must pass in order to be dispensed, and further including a pill dispensing area to which the user has access and a pill removal area to which the user does not have access located under the aperture, the aperture of the sliding array bottom being selectively located over the pill dispensing area or the pill removal area in order to selectively dispense pills to a user or to remove the pills from access by a user under control of the microprocessor.
6. The pill dispensing system of any one of claims 1 through 5 in the alternative, wherein each of the sliding bottom panels further includes means for moving pills which have dropped from a desired cell into the pre-dispensing location when the sliding bottom panel means is moved back to a closed position.
7. The pill dispensing system of claim 6, wherein the means for moving pills comprises vertically mounted sweeper means attached to each of the sliding bottom panels sized to push any pills which have dropped from a cell onto a lower supporting structure in front of the sweeper means when the sliding bottom panel is moved.
8. The pill dispensing system of any one of claims 1 through 7 in the alternative, wherein the microprocessor means for controlling the movement of the sliding panel movement means permits dispensing of pills at predetermined time intervals.
9. The pill dispensing system of any one of claims 1 through 7 in the alternative, wherein the microprocessor means for controlling the movement of the sliding panel movement means permits dispensing of pills as requested by a user up to predetermined limits over predetermined time intervals.
10. The pill dispensing system of any one of claims 1 through 8 in the alternative wherein if the user does not retrieve pills from the dispenser within a predetermined time, the pills are removed from the pre-dispensing location so that they are no longer accessible by the user.
11. The pill dispensing system of any one of claims 1 through 10 in the alternative, further comprising external controller means which may be electrically connected to the main unit when required in order to set a time in the microprocessor means of the main unit.
12. The pill dispensing system of claim 11, wherein the external controller means also permits maintenance functions to be performed on the main unit when connected.
13. The automatic pill dispensing system of any one of claims 1 through 12 in the alternative, further including a hand-held pill dispenser capable of being stored with the main unit of the automatic pill dispensing system when not in use and of being separated for use away from the main unit of the automatic pill dispensing system, the hand-held pill dispenser comprising a body sized to be hand-held by a user and having a plurality of pill-retaining apertures therein for dispensing of pills, a sliding cover over each pill-retaining aperture, means for preventing each sliding cover from opening except at a predetermined time, such means comprising a timer means and a locking mechanism associated with each sliding cover to allow the sliding cover to be opened by the user only at predetermined times; and whereby the automatic pill dispensing system is prevented from dispensing pills from the main unit to a user when the hand-held pill dispenser is separated from the main unit.
14. The automatic pill dispensing system of claim 13, wherein the hand-held pill dispenser further includes means for alerting the user at the predetermined time.
15. The automatic pill dispensing system of claims 13 or 14, wherein the means for preventing each sliding cover from opening except at a predetermined time further includes means for also preventing each sliding cover from opening at the predetermined time if pills for that predetermined time have already been removed from the main unit.
16. The pill dispensing system of any one of claims 1 through 15 in the alternative, further including a pill cartridge for loading pills into the horizontal pill-holding array, the pill cartridge comprising a rectangular body having four sides;
a row of pill-holding cells located upon each side of the body configured to align with a single row of cells in the horizontal pill-holding array of the main unit when the pill cartridge is located over the single row of cells;
a sliding cover on each of the fours sides to retain pills in the pill-holding cells of the body when the cover is fully closed and to allow access to the pill-holding cells when the cover is slid back;
means for removably locating the pill cartridge over a row of the horizontal pill-holding array to permit pills from each cell of a selected row of the pill cartridge to fall into an adjacent corresponding cell in the horizontal pill-holding array when the sliding cover is slid back on the selected row of the pill cartridge.
17. The pill cartridge of claim 16, further comprising a pill-retaining central section in the rectangular body for storage of extra pills.
18. The pill dispensing system of claim 16 or 17 in the alternative, further comprising a pill cartridge loading tray, the tray comprising a tray means for sorting and counting pills to be loaded into a pill cartridge;
a bulk pill compartment to receive pills to be counted;
a counted pill compartment to receive counted pills to be loaded into the pill cartridge;
a row of apertures configured to align with a row of pill-holding cells on the pill cartridge so that counted pills may be manually pushed from the counted pill compartment into the apertures as desired;
means for positioning the pill cartridge beneath the shallow apertures whereby the sliding cover on the pill cartridge forms a bottom surface under each aperture to receive one counted pill;
whereby when the sliding cover is displaced sufficiently, each counted pill will fall through the aperture into the corresponding pill-holding cell in the pill cartridge.
19. The pill dispensing system of claim 18, further including means for moving excess pills from the counted pill container to the centre of the pill cartridge and from the bulk pill container into a bulk storage container.
CA002217220A 1996-12-03 1997-12-01 Automatic prescription pill dispensing system Expired - Fee Related CA2217220C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA002217220A CA2217220C (en) 1996-12-03 1997-12-01 Automatic prescription pill dispensing system

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CA2191900 1996-12-03
CA 2191900 CA2191900A1 (en) 1996-12-03 1996-12-03 Automatic prescription pill dispensing system
CA002217220A CA2217220C (en) 1996-12-03 1997-12-01 Automatic prescription pill dispensing system

Publications (2)

Publication Number Publication Date
CA2217220A1 CA2217220A1 (en) 1998-06-03
CA2217220C true CA2217220C (en) 2001-05-01

Family

ID=25678884

Family Applications (1)

Application Number Title Priority Date Filing Date
CA002217220A Expired - Fee Related CA2217220C (en) 1996-12-03 1997-12-01 Automatic prescription pill dispensing system

Country Status (1)

Country Link
CA (1) CA2217220C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11410764B1 (en) 2019-11-15 2022-08-09 Express Scripts Strategic Development, Inc. Smart medication dispenser

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9953140B2 (en) 2013-03-15 2018-04-24 Intent Solutions, Inc. Systems, methods, and apparatuses for securely dispensing one or more prescribed substances to a securely identified intended user
CN107438395A (en) 2015-04-04 2017-12-05 因滕特解决方案公司 System and method for portable pill distributor
CA2933860C (en) * 2016-06-23 2017-08-29 Matthieu Grosfils Systems and equipment for monitoring the contents of one or several compartment(s) in a medication distributor, fabrication method for the systems and equipment and corresponding methods for use
WO2019133404A1 (en) 2017-12-27 2019-07-04 Intent Solutions, Inc. Systems and methods for portable pill dispensers with various dispensing mechanisms
CN108839826B (en) * 2018-08-15 2024-03-26 北京恒安众生科技有限公司 Small-sized traditional Chinese medicine formula granule dispensing device and dispensing method thereof
CN110265109B (en) * 2019-06-13 2023-05-26 浙江树人学院(浙江树人大学) Combined intelligent traditional Chinese medicine cabinet system and control method
CN115361933A (en) * 2020-04-17 2022-11-18 株式会社汤山制作所 Drug discharge device and control method for drug discharge device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11410764B1 (en) 2019-11-15 2022-08-09 Express Scripts Strategic Development, Inc. Smart medication dispenser

Also Published As

Publication number Publication date
CA2217220A1 (en) 1998-06-03

Similar Documents

Publication Publication Date Title
JP3337471B2 (en) Automatic drug release device
US4872591A (en) Medication dispenser
US20060184271A1 (en) Cartridge-loaded automatic prescription pill dispensing system and dispensing unit and cartridge for use therein
US4911327A (en) Dispenser
US5176285A (en) Pill dispensing apparatus
US5159581A (en) Medicine reminder and dispenser
US3998356A (en) Electronic system for article dispensing apparatus
EP1036365B1 (en) Apparatus for controlled dispensing of pharmaceutical and medical supplies
US4047635A (en) Article dispensing apparatus for selectively dispensing articles
US4763810A (en) Medication dispenser
US5042685A (en) Dispensing having a compartment for detecting and counting the dispensed objects especially adapted for dispensing medication and method of using the same
US5752621A (en) Smart automatic medication dispenser
US6510962B1 (en) Programmable automatic pill dispenser
US7213721B2 (en) Personal medication dispenser
US5152422A (en) Medication dispenser
US4640560A (en) Pill dispenser
US20040129716A1 (en) Portable medication dispenser
EP1161933A2 (en) Medication regimen container and system
CA2033164A1 (en) Drug dispensing apparatus
CA2217220C (en) Automatic prescription pill dispensing system
US5667097A (en) Multiple pill dispensing unit
US5133478A (en) Pill dispenser
CA2191900A1 (en) Automatic prescription pill dispensing system
US20180133110A1 (en) Medication dispensing and monitoring device and system and methods of formation and use
DE19850890A1 (en) Dispenser for medication

Legal Events

Date Code Title Description
EEER Examination request
MKLA Lapsed

Effective date: 20141201