I wanted to make something for the health contest, but I had no clue where to start until my girlfriend got ill. I noticed how easily she forgot to take her prescripted medication and that made me think. A lot of people, especially elderly people, take a lot medication on a daily basis to stay as healthy as possible. Some of that medication needs to be taken on a exact time, or they don't function as well.
So I decided to make a machine that automatically gives the right pills at the right moment and also sounds an alarm so that the person who needs those pills knows it's time for his or her medication.

It is my first 'big' project that combines a clock/calender, memory and movement.

If you like it, then please vote for it in the Health contest.

Step 1: What Does It Do?

The 'machine' has seven drums (one for each day of the week) with 4 compartments that you can fill with your medication. When filled, you put them back in the machine and connect them to it.

On the front of the machine is a lcd-screen and 2 buttons. There you can set the time and date and program when you need the medication.

When it is time for your medication, the machine drops the correct pills and sounds an alarm until you take the pills and push a button. After that it goes back to "sleep" until the next alarm.

<u><strong>Note to everybody who are interessed in the code: </strong></u>I am rewriting the Bascom code for this project and will publish it as soon as I have finished it. But a newborn baby around, they work doesn't go very quickly.
<p>sir can you send the code for this project to my email idzhamyahaya97@gmail.com</p>
sir im very impressed with your, can u give me the code and other materials used in project<br>cherukushreya96@gmail.com
<p>Sir, i would also like to ask about the specific materials used in this project. thank you very much. Vincewantuten@gmail.com</p>
<p>Good day sir, could you kindly give me the code for this particular project. Vincewantuten@gmail.com</p>
<p>i liked the project very much so i need the project code. plz forward to my mail shilpa.s.rathod25@gmail.com. where can i get the components? for this project</p>
<p>hi sir, would u please send the code? my email amboihadoi@gmail.com</p>
<p>sir, would you please send the code for this project? this is my emails<br><br>cjdescorial@usm.edu.ph<br>macnilrad@gmail.com</p>
<p>hello there sir. do you have the code of this already? the one that you rewrote? i hope i can get a copy of it. i'll be using this for my project. please send me your code. pretty please! thanks in advanceeeeeee~~</p>
<p>Hi!! :) please send me the Arduino code for this project :)</p><p>yinqiheng5@gmail.com</p><p>hoping for a response! God bless u! :)</p>
<p>Sir, i am very wall impressed with your project,</p><p>can you please share details of this project, </p><p>so that i can use it for my final year project </p><p>mail ID reajith@gmail.com</p>
<p>Hi!! :) please send me the Arduino code for this project :) </p><p>michaelcadag2@gmail.com</p><p>hoping for a response :) God Bless :) :)</p>
<p>Hello,</p><p>Please send me the code on e-mail: mistermahir@gmail.com along with cct and motor types.</p><p>God Bless you</p>
hi ! your project really amazing . if you dont mind , can you list all the component that you used for this project ? thank you very much for your help: )
<p>hi author! your project was very very amazing !! i've decided to built one of this for my granny..Its hard to build this without the ciruit and a program, can you upload them author?? please?? <br>btw GOOD JOB!</p>
<p>Can you please post arduino code of this project?</p>
will you please send me the programming, component list and their approximate cost and other details of this project my email is premkumarsn1@hotmail.com. a huge thank you to you!
<p>Hi, can i get arduino code of this project...</p>
<p>hye there..i really love your project..thus,my team and i have decided to use your idea for our project.can you please email me the complete coding,circuit diagram and anything that is needed to complete this project?my email is ahmadsyazni92@gmail.com.I really hope u can help us.</p>
<p>hi, this is a very nice project...please can you send me the complete code, circuit diagram and how you designed the hardware, anything to help me do this project....this is my email:(haidangvip3123@gmail.com).....thanks</p>
<p>This looks fantastic! I will be making a pill dispenser for my final year project. It will be controlled by raspberry pi instead of a microcontroller. I have found your example to be very useful. Are there any chance of you having knowledge of raspberry pi? I look forward to hearing from you soon. </p>
<p>I have worked with raspi before. It might be a bit overkill for a project like this but maybe you are planning extra features.</p>
<p>Thank you for the reply. I am planning to make a pill dispenser that will be circular in shape, with segments to hold the medications. The rotation of the box will be controlled by a stepper motor which in turn will be controlled by the raspberry pi. It would require an LED desplay and switches which will be used to set the specific times. I don't know how it would be made possible. I was wondering if I would require a clock like yours maybe? I would be very grateful if you could just give me an idea please since you have worked with raspberry pi before. I look forward to hearing from you. </p>
<p>I personally wouldn't use a raspi for that. I would use an arduino or just a microcontroller.</p>
Hi sir I'm am very very interested in the project that you've and made and I am deciding to make one in my final year project. But I need some of the stuff from you. You could contact me at my email, chul.yu.kyung@hotmail.com <br>I'm lookin forward to your reply.
<p>It's been a while since you posted this instructable but I was wondering if it was possible to take a look at your code? Thanks.</p>
Is it possible at all to get the code for this project? <br> <br>Thank you.
The system could also have only one stepper motor, if all the dispensing drums were linked to each other via a pair of pins like the disks in a combination lock: https://www.instructables.com/id/3D-Printed-Combination-Lock/
Hi, just wanted to know what kind of motors are you using? <br>I take it you are using bipolar stepper motors? also how many phases are each of the motors?
Good question. It took me a long time to figure out what motors they were (I got a batch of them very cheaply for somewhere). The motors have 3 coils with internally connected common. So 4 wires: 1 common and 1 for each coil. They have only 15 steps so they really 'jump' from step to step but that was not a problem in this machine but I wouldn't recommend them for CNC stuff.
Hello, <br>Im helping my friend develop something similar for her senior project and she is planning on using it for grandmother afterwards. Would it be possible if you can help us out with the parts list &amp; how the programming was done. We are planning on adding few more features in it as well and ur help would give us more time to spend on the new features. Your help would be greatly appreciated. <br>I have built an RC controlled lawmower recently that I can share the instructions for if you like to build one..heeh<br>Here is my email: alapakiboy@yahoo.com<br>Thanks,<br>Mike
Great Job! Do yoiu mind adding me to the list please?.<br><br>ebmstsscjs@yahoo.co.uk
please give me the codes...:( for avr...coding is very tedious..going wrong all time..anyone who did it can u give the codes?. id is rainbowangel2013@gmail.com <br>need it urgently as i am doing this as my project:)
hi, i have completed the coding and used PROTEUS Software to simulate the design. but the clock is slow compare to real time clock. can u tell me what frequency oscillator is used for both atmega and ds1307. and also specify current rating for power source for microcontroller and stepper motor driver.<br>thanks.
if you have the code for this pill dispenser..will you please mail it to me?need it urgently for my project..to my mail.. <br>vinay.pisharody@yahoo.com <br>please sent it:) need it asap...
Hi congrats with your simulation. I am still hoping to rewrite the code but my little newborn daughter sucks up a lot of my time so it will take time. <br> <br>The clockspeed of the atmega is 8Mhz and is generated by the internal oscillator. <br> <br>The DS1307 uses a 32.768Khz crystal as requested in the datasheet. <br> <br>I used a 12V 2A supply for this project. I had it lying around and it was enough so I have to recalculate how much the project really needs to give you the exact current
thanks for info, so u mean i dont need to connect external oscillator for atmega. and one more thing the main input consist of two supplies (12 v and 9 v). so the current rating is same for both. i thought giving it a advance feature like remote control setting of alarm time using IR Remote and adding a digital thermometer . hows that?
You do not need an external oscillator indeed. You only need 1 of the 2 supplies, go for 12V, the 9V is for a backup battery. <br> <br>Adding a temperature sensor is very easy. use an I2C one and just hook it up to the same lines as the DS1307. The datasheet will provide you with the correct way of adressing it. <br> <br>I have not much experience with IR controles but I am sure that you can figure it out.
hi again, actually i m troubling with stepper motor rotation. the program i designed is just for rotating stepper motor for certain angle. and when alarm clicks again it goes back to initial position and rotates for same step angle. i need your help in this part , i want it to remember the position (angle) it had already rotated and start from same angle in place of going to back to initial position (angle). hope u understood my problem. please help me with this part of programing.
It shouldn't jump back indeed. The steppers I bought came without any information and have 4 leads. By testing them, I found out that they have 3 coils + a common GND and that they have 15 steps in a full rotation. Instead of giving pulses to a stepperdriver, I connected PB0 to PB2 to each coil via a motordriver. <br> <br>The pinnumbr of the port is placed in variable i and then you can state something like (This is how it works in Bascom): <br> <br>PORTB.i = 1 to activate a coil and PORTB.i = 0 to deactivate it. By placing it in the variable i, the program will always know what the last coil was and by increasing, you go forward, by decreasing you go back.
Could you send me a copy of the specifications? <br>The sizes of the drums and the code<br>I am trying to complete a project for my digital II class similar to this.<br>purejunk86@gmail.com<br>Thank you
I could really use one of these but I know Diddly about circutry and microcontrollers and etc... good thing I was friends with all kinds of people in HS and I didn't burn my bridges with the &quot;nerds&quot;. I just hope one would be willing to make this for me about cheap as free... LOL Great Job!
very awesome machine.. Great Job.. i sent you a pm^^..
hi, this is a very nice project...please can you send me the complete code, circuit diagram and how you designed the hardware, anything to help me do this project....this is my email:(braide4all@yahoo.com).....thanks
Sir, could you send me the schematic diagram of the project, please? Or the circuits you used. I want to know how it is built. We have similar project. Thank you sir.
hi, <br> <br> <br>The schematic is in step 4.
HI. can i use 16f877 microcontroller in place atmega8. suggest me some microcontroller which can replace atmega and please provide pin connection too. please
I only use AVR microcontrollers so i have no idea if you can use a 16f877. You have to look into the datasheets to see whether they are compatible.
I've been a family medicine doctor for over 30 years. This is a great boon to the elderly and cognitively or memory limited. I'll try to make one, or if you have one available buy one for my mother in law.

About This Instructable




Bio: I'm mainly interested in music, food and electronics but I like to read and learn about a lot more than that.
More by janw:Pickled Chillies Extra hot sriracha sauce (Mme Jeanette) Build a Nest Box for Bumblebees 
Add instructable to: