A Pill Reminder Box To Be Proud Of

Not satisfied with the traditional daily pill boxes, [Ryan] set out to build his own. According to his article, these particular pills had to be taken every three days, and he wanted a solution that required “zero effort.” Although one might question whether his solution actually took this amount of effort, the build came out very well.

The result is a box that reminds one to take a pill from one or two bottles using a blinking LED. When the pill bottle is picked up, consumption is assumed and the timer is reset. The main components consist of an Arduino, real time clock, and a battery backup.  Additionally, two picture frames are used to form the project enclosure along with some LEDs and other assorted hardware to finish everything.

This project combines some basic electronics hacking and programming with a very nice looking cover. The results are a very clean looking build with a good write up. For another example of a well finished project with great pictures, check out this N64 portable build.

37 thoughts on “A Pill Reminder Box To Be Proud Of

  1. My initial thought on this was “Hey, you could do this with a 555 timer!” Seriously–tie the reset/enable pin to a pressure sensor or photodiode, tie the output to one LED or the other, and have a capacitor and very-high-resistance resistor on the threshold/discharge pin.

  2. @msc
    Mohontri’s comment doesn’t sound like trolling to me. I think that there are many other ways to come to the same end product and he was just examining one possible solution. possibly giving insperation to others who migh want to tryy a similar project while taking it up another notch

    I felt more like you were the one who was trolling

  3. Mohontri’s comment may appear as a subtle troll since anybody who would recommend a 555 for a three day period (259,200 seconds) clearly lacks experience using the 555.

    When designing your RC network, the minimum value of R should be about 1k to prevent too much current flowing into the 555. The maximum value of R should be about 1M so that enough current can flow into the input of the 555 while there is also current to allow for the electrolytic capacitor’s leakage current.

    The minimum value of C should be around 100pF to avoid the timing equation being too inaccurate. The maximum value of C should be about 1000uF as any larger value of capacitor will discharge too much current through the 555.

    These maximum and minimum values give a minimum period of around 0.1 us and a maximum period of 1000s.

    Saying throw high values of R or C at it will not work. Not for a three day timer. And it won’t have any accuracy. I can see the advantages of using an RTC; the timer will be accurate and it can even fire at a predetermined time.

    Personally, if I were using a microcontroller, I’d choose something a lot cheaper (like an ATtiny13A, which should be up to the task of bit-banging a couple of i2c commands every so often. Alternatively, use a 555 feeding into a couple of counter chips. A denary example: a 555 with a period of 1000s feeds into a decade counter. The 10th output of the counter feeds into the input of another decade counter. Which feeds into another decade counter. You’re now counting hundreds, tens and units. Throw in a three input and gate and you can count to 259 and you have a three day counter without using a microcontroller. Make an astable multivibrator from a pair of transistors and use a switch with a thyristor in series to switch a transistor powering the multivibrator. Simple!
    That microcontroller based solution is looking pretty attractive right now, isn’t it…

    I love 555s as much as the next guy (and I love working out how to make stuff with discrete logic, too!) but just give in sometimes. If someone can’t program an ATtiny chip, and Arduino will work wonders for them.

    Bonus solution: have a read of Maxim’s DS1307 RTC datasheet. Once programmed (through i2c – a piece of cake with an Arduino), you can enable a square wave output. There’s plenty of things you could do with that (and it’s temperature compensated – it will keep better time than a 555).

  4. @patrick
    Maybe you should read the recent post about cleaning up the HAD comment section: http://hackaday.com/2011/07/27/hackaday-comment-policy-were-cleaning-up/
    Complaining about the use of an arduino just because you happen to know of a simpler solution adds nothing to the discussion and results in people not wanting to post their hacks because of fear of criticism. Also there’s really no reason to accuse me of trolling when I’m just trying to help.

  5. For someone who takes just a few pils once or twice a day, I give you kudos…. For the person who takes a figuritive pharmacy upwards of five times a day, a more elaborate solution will be required.

  6. msc: Seconded — it’s especially not trolling when, per Pedro’s comment, a 555 wouldn’t work in this application anyway.

    This is an awesome hack! The only thing I might change about it would be to make the section with the pill-bottle holes a separate insert that could be replaced. That way, if you need to remind yourself about a different medication, you can not only reprogram the AVR to a different timing, you could also cut out a new insert with holes precisely sized to fit the bottles you’re using.

  7. Uh, I say this politely:- consider having a locking mechanism to prevent access to the pills by, for example, children.

    A disturbing number of children die because they take someone’s medication.

    I really liked the write-up. Lots of good pictures showing the process is really good.

  8. It’s a good project and writeup. I can’t even remember to take my daily multivitamins, much less something on a three day schedule. :)

    I made a pill reminder too, but went about it a different way. I already have an X10 automation system hooked up to my computer, with a MR26A X10 RF receiver. And I’d accumulated a pile of those little RF four-button keychain remotes that no one ever seems to use, so people tend to give them away for free with other modules. Seemed a shame not to find some use for them!

    So I wrote a quick little VB program that waits to receive certain X10 codes. If it doesn’t within a certain time, a sound is played. If that’s ignored, a bit later a reminder appears on the screen until the code is received.

    A keychain remote sits right next to the pills. Take a pill, press a button. It tracks up to four different ones.

    Another remote found its way into the laundry room, hanging from a hook on the wall. Press button #1 when you start a load of laundry, which starts a timer in the program. Press button #2 when you transfer the laundry to the dryer, or the program will remind you if you forget. And press button #3 when you fold and put the laundry away, or the program will again remind you. No more forgotten, musty or wrinkled laundry.

    I’m sure I could find other uses. I still have more remotes. And since it uses stuff I already had, doing it this was almost zero effort/cost for me.

  9. @msc
    “Complaining about the use of an arduino just because you happen to know of a simpler solution adds nothing to the discussion and results in people not wanting to post their hacks because of fear of criticism. Also there’s really no reason to accuse me of trolling when I’m just trying to help.”

    Nobody is complaining about the use of arduinos – everybody knows that there is going to be a cheaper but harder way to do this and I think many of us would want to know what it is. Mohonri was trying to improve on the OH’s work (original hacker’s). After pedro steps in to help, both I and Mohonri have learned something new.

    In my opinion that is exactly how all the HAD threads should go. Why learn from the one solution featured when you can scroll down and see the relative merits and drawbacks of all possible solutions? The ability to weigh up alternative solutions to problems is a massive part of what engineering is.

    If this thread were just 9 “great hack :)” posts then what would be the point?

    1. @all regarding criticism… feel free to criticize. You’re fully capable of telling the difference between constructive criticism and needless jerkiness.

      Maybe I’m reading it wrong, but Mohonri’s post is not offensive in anyway. He’s not even rude. Actually, the only thing that would have made his comment better would have been to supply a better description of the circuit. Same with Abobymouse. A simple word of caution without insulting anyone is fine.

      We don’t need a thousand yes men. We just want civility and it seems you guys are doing a good job.

      (p.s. we’re working on a flagging system).

  10. If this thread was just 9 “great hack” posts than we would be doing exactly what HAD wants us to do. So instead of offering criticism, “durrrr… GREAT hack man!”

  11. Why was the RTC needed at all? I’m working on building a clock, and I am just planning on using an arduino… really, just the microcontroller from the arduino. I thought I would need an RTC at the beginning, but I didn’t find anything that couldn’t be done with just the arduino. Is there a reason to have the RTC?

  12. I don’t think Mohonri was trolling because he didn’t directly make fun of or criticize what the OH used, he was just offering a different approach.

    Seriously, comments can be a lot worse than that and at least it wasn’t “So and so is stupid for using a blank when it’s just easier to blah…”

    Also, if not for Mohonri’s comment I wouldn’t have learned some valuable points about 555’s from Pedro’s post.

    Constructive criticism doesn’t equal praise so sometimes it’s going to offer up possibilities different from what others have done and as long as it’s stated without pejorative comments I think it’s harmless.

  13. “these particular pills had to be taken every three days, and he wanted a solution that required “zero effort.” Although one might question whether his solution actually took this amount of effort,”

    I think by zero effort, he meant remembering to take the pills requires zero effort.

  14. @LeeRay
    The regular Arduino clock (16 MHz ceramic resonator) is not precise enough: it’s rated for 0.5% or about 7 minutes of drift a day. You would have to go with some sort of calibration, and even then, as conditions change, it would not hold time very precisely.

    There seems to be a way to hook up a 32KHz quartz to an Atmega, but I never tried. It’s much easier to use a RTC to obtain reasonable precision. For instance, the DS1307 drifts by about 1 minute a month.

    If you are (crazy) serious about building a clock, the precise-to-the-microsecond way to go is, IMHO, to use a GPS receiver over a serial connection along with the heartbeat line of the receiver.

    (and maybe I’ll post something when I’m done, now that HAD seems to have cleaned their act)

  15. Interesting hack, though I’m glad I’m not old enough to have to take daily (tri-daily?) pills.

    @pedro: Regarding the 555, can’t you chain/cascade the 555s/use a 556 with multiple timing circuits?

    To the commenters: can we please carry on with our own comments and let the HAD crew clean up what they deem as problematic instead of trying to peer-police them?

    1. Remembering to take med three times a day, would be a piece of cake as compared to remembering to take a med every third day, which what prompted this build I believe. Did I take it yesterday or was it the day before? I’m older,but not old. For a time I was taking on med three times a day. Not problem for me to remember. Remembering every third day could be.

  16. Re why use the RTC, the arduino’s own internal timer would be based upon the millis() command, and that rolls over every 15? days. Suddenly it’s resetting and re-syncing and effort. Using an RTC makes that effort go away.

  17. I think it will take more than a kitchen scale. I dont think they have high enough resolution to measure one pill missing. You could do it with a counting scale though. High resolution and accuracy. There are some pretty cheap chinese ones out there.

  18. @HaD staff

    I posted a comment thanking Pedro for his knowledge and insight. It has apparently been removed. (It was double posted accidentally, however both were removed.) Is this an error? I certainly hope so…

    Again…
    @Pedro

    Thanks for the knowledge and insight…

  19. 555:
    i’m completely in the “if all you want to do is blink a led
    don’t buy an atmega”-camp.
    but: ~$1+ for a low-end pic or atiny, versus $0.40 for a 555
    plus $.40 for a large cap just to end up with an unreliable 3-day rc-timer?

    looks, the project is just fine as it is ;)

  20. weighing the pills:
    a large vitamin tablet -like in the picture- is 1.3g, so it might work.
    but some smaller pills are 0.1g -that’s 280 pills to the ounce.
    if you’d even be able to make it that accurate it would probably trigger if someone walks by..

Leave a Reply to anonymousCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.