• Welcome to the blog, follow CapsuleMate's progress with weekly updates!

  • Table of Contents


    Week 1 Update: When Gravity Just Isn't Enough

    Week 2 Update: RIP Raspberry PI & One Quadrant Assembly

    Week 3 Update: The Power of Gears

    Week 4 Update: Photoresistor + LED

    Week 5 Update: Demo Time!

    Week 6 Update: ¼ of the Way There!

    Week 7 Update: The Puzzle is Coming Together

    Week 8 Update: The Light at the End of the Tunnel

    Week 9 Final Update: Symposium and Beyond


  • Week 9 Final Update: Symposium and Beyond

    After months of work to bring our ideas to life, we unveiled our CapsuleMate prototype at the 2019 Mechatronics symposium. It was a fun day spent chatting with fellow students and the general public who were curious about our design and it’s applications. We were able to share our goals, learnings and most of all, actually demonstrate CapsuleMate in action. For anyone who wasn’t able to see it live, check out a quick compilation of it on Youtube

    With symposium wrapped up, the team celebrated our success with some much deserved Korean food. Now, we look forward to completing the report and reaching the finish line (graduation is in sight!). As excited as we are with our progress, we currently do not have any plans to refine Capsulemate’s design or pursue this project any further. It’s been a great 8 months filled with lots of learning, iteration and most of all fun! For anyone who has followed along with all of CapsuleMate’s progress, thank you! We had a blast and are grateful to have had the opportunity to work on this project.

    Regards,
    Anne, Vivian, Martin, Tyurina

    Left: Our Symposium booth Right: Tired Team eating Korean food
  • Week 8 Update: The Light at the End of the Tunnel

    After 8 months of work, we’re finally at T- 3 days till symposium, hooray! This past week was spent putting the finishing touches on the entire assembly, but mainly writing the accompanying software to have the pill dispenser work from start to finish. Now that all the loose ends have been tied, we can dedicate this post to a step by step breakdown of the pill dispenser in action.

    First, the pharmacist/user will provide all the information that the pill dispenser requires for the setup using the simple web interface.

    Left: The Website to Load Pill Information Right: The Information Required Per Quadrant

    The Raspberry Pi then receives this information and prompts the user to load the pills in succession. After all the quadrants are loaded, the screen tells the user that loading is complete and when the pill will be dispensed next.

    Video Left: The cylinders turning to start loading Image Right: Sample Loading Message

    Finally, when it is time to dispense, the appropriate quadrant starts the sequence of operations required to dispense the pills. First, the continuous servo motors starts up and stirs the pills to dislodge any that might be stuck in the storage compartment. Then, the photoresistor verifies that a pill is in place and ready to dispense. At this point, the solenoid is powered causing the pill to fall through the tubes and land in the nifty drawer we assembled this week. Finally, the buzzer is sounded at the end to alert the user that a pill is dispensed.

    Video Left: Sequence of Events to Dispense Video Right: Continuous Dispensing

    Tada, and that is the pill dispenser in action! To look at the code more in-depth check out the repository containing all the operational logic. In the next couple of days, we will smooth out some minor aesthetic details and get the dispenser ready for the big day. We’ll check back, after symposium is done!

  • Week 7 Update: The Puzzle is Coming Together

    This week was a blur of action assembling all the bits and pieces into something ressembling a pill dispenser. This involved ample time soldering the PCBs along with general assembly of each quadrant (the solenoid, servo motors, photoresistor etc.). We also got around to designing and assembling the screen and button components both pictured below. Though chaotic the dispenser it starting to take shape and we are thrilled!

    Left: MVP Pill Dispenser Right: The User Interface

    This week, progress was made towards the software. Up until now, software has been on the back burner as this project is mechanically intensive. However, now that we are closing in on symposium it became a larger focus. We wrote the functions to control the pill dispenser (i.e turning the cylinder, pushing the solenoid) and also found a cool Python library that easily allows us to schedule tasks to occur at arbitrary times such as dispensing pills. All the code is sitting in our public repository.

    Next week we will tie up the remaining loose ends to get a fully functional dispenser end to end. For now enjoy some videos of not one, but two quadrants working!

    Video Left: Quadrant One Cylinder Turning Video Right: Quadrant Two Cylinder Turning

  • Week 6 Update: ¼ of the Way There!

    Last week we got one quadrant of the dispenser working for the demo. This week we were able to get rid of the breadboard and start using our fresh PCBs. In addition, we finally found some time to assemble the storage container and said goodbye to the infamous cardboard walls from all the previous iterations. Next week, we will focus heavily on organizing and cleaning up the software which up until this point has been run as separate scripts. For now, enjoy a video of one quad in action and a sneak peek of what the final assembly will look like!

    Video: Quadrant one of four in action
    Left: Quad Cross Section Middle: Final Storage Container
  • Week 5 Update: Demo Time!

    This week was an eventful one with the Iron Ring Ceremony happening on Feb 9th (we were all very excited to receive our rings!). Alongside that, it was time to demo the progress on our FYDP. Our goal for the demo was to have one quadrant of the machine working end to end. Thankfully, we were able to accomplish this by adding in the photoresistor to detect when pills have been dispensed (check out Week 4).

    In addition, over a few weeks time we made important modifications to our design. This includes adding gears to rotate the cylinder component 360 degrees and moving the photoresistor to sit inside the pusher piece. To hold everything in place we modified the basket holding the motor to also fit the gears, printed out the remaining storage funnels, and laser cut the acrylic divider walls.

    Left: New Motor Basket, Middle: Dividing Walls, Right: Storage Funnels

    We then designed and ordered the PCB’s that will control the solenoids and motor. The order from PCB way came very quickly and is pictured below with the original design.

    Next week: We will assemble the frame of the final structure, solder the PCB and make headway towards finishing the electro-mechanical build.

  • Week 4 Update: Photoresistor + LED

    This past week we tested the last electrical component required to get quadrant one of the dispenser up and running. This is the photoresistor and LED combo that verifies that a pill is actually dispensed in order to prevent false positives. In our initial design, we toyed around with several different sensors to verify the pill dispensed such a load sensor and an RGB colour sensor to verify based on weight or colour respectively. Ultimately, we chose a photoresistor and LED combo that would sit inside the final dispensing tube. Upon testing the system we realized that while the photoresistor worked correctly, the pill fell down through the tube too quickly for the photoresistor to recognize a change in light intensity. In the videos below you can see the pill fall through the tube however in the second video you can that the photoresistor barely recognizes a change in value.

    Video 1: The Photoresistor and LED setup inside the tube. Video 2: The photoresistor detecting the pill

    We then brainstormed alternate solutions, one of which was to re-locate the photoresistor to the bottom of the tube so that the pill would be stationary; thus, giving the photoresistor enough time to detect it. When this didn’t work we rethought our strategy for the pill dispenser. The purpose of the photoresistor and the LED combo is to verify that a pill is actually dispensed by the solenoid and prevent false positives. Therefore, we can detect the pill anytime after it is dispensed not solely as it’s falling through the tube. For this reason, we decided to relocate the photosensor into the side of the pusher piece where the pill remains stationary for several seconds until it is dropped into the tube.

    Video 3: A large change in light intensity detected by the photoresistor

    In the video above, the photo resistor values increase by 200 when the pill is detected. With some more testing, we found that the photosensor seemed to output the greatest difference in values without the LED shining on it. The contrast between the ambient light and the presence of the pill seemed sufficient, but we will test this again on the final build and pick a solution that maximizes the change in light intensity. Either way, with this we managed to complete all the functions (mechanical and electrical) required to get one quadrant of the structure working!

  • Week 3 Update: The Power of Gears

    Last week we left off with the struggle of finding non-continuous 360 servo motors to rotate the cylinder component. While it is possible to turn a regular servo motor into a continuous rotation one, there were no hacks to make the opposite true. We scoured the interwebs some more and disgruntedly accepted that we would have to replace servos for stepper motors. This was undesirable because stepper motors require separate boards to control them, which then need to be stacked on top of the Pi. We then had the ingenious idea of converting the servo motor’s 180 degrees range to 360 degrees using gears (2:1 gear ratio)

    We quickly made a CAD model of the gears and after iterating to find the correct size we 3D printed them. With a little bit of sanding, some will power and Martin holding everything in place, we tested the prototype and found it successful! In the video below you can see that the cylinder is able to rotate from funnels 1 - 4 even though the servo motor only supports ~160 degrees of rotation.

    Now that we extended the range of motion of the servo motors, we will update the code so that the funnels of the cylinder align to the storage component correctly. We will also modify the CAD for the base plate to accommodate for the gears.

    This week, we also tested the pill detection strategy by assembling prototype 1 of the light sensor + photoresistor but we will talk about that more in next week’s blog post. Anyway, we are 75% of the way to automating a quadrant of the whole structure and are excited to see it working end-to-end!

  • Week 2 Update: RIP Raspberry PI & One Quadrant Assembly

    This week the team went in with the goal of assembling a full quadrant of the full pill dispensing apparatus.

    Right off the bat there was a slight hitch, namely that our Raspberry Pi had died. This was a problem since it controls the solenoid for dispensing, the stirring rods, the alignment cylinder and basically our entire apparatus. Nevertheless, this unexpected hump turned out to be a valuable lesson about static electricity and that anything with exposed electronics including the Raspberry Pi is vulnerable to it. We replaced the PI and reviewed ESD precautions by investing in an anti-static strap, and generally discharging static by touching a grounded metal object before touching the PI.

    With the new PI in place, we were able to assemble a full quadrant of the structure and power it with electronics. We laser cut the base (which will house all the electrical components) out of acrylic sheets. Then, we mounted the dispensing structure above it to see a full quadrant in operation.

    v

    As a bonus, we connected the electronics available (servomotors to control the stirring rod and the solenoid to push out pills) to get a quasi-automated structure as seen in the video below. As anticipated, with the aid of the stirring stick the pills dislodge from the storage container, then the pusher piece and solenoid combo successfully isolate one pill to dispense.

    Next steps


    Assembling this quadrant gave the team an opportunity to observe nuances with the physical build that weren’t noticed in the CAD designs. As expected we discovered a few changes we need to make with the remaining parts before printing them:

    → Reduce the size of the base plates to 14cm x 14 cm so they fit together better on top of the base

    → Design a more sturdy stirring rod

    → Support the motor so that it stays aligned in the centre of the storage compartment.

    We also discovered that the servo motor we purchased only supported continuous 360 rotation, and cannot turn to a specified angle. Since our cylinder component needs to be turned a certain amount we ordered new motors.In this upcoming week, we will focus on the photosensor and LED combo to detect whether a pill has fallen, which should be the last step to produce a fully automated mechanism.

  • Week 1 Update: When Gravity Just Isn't Enough

    Coming into 2019, we moved out of the design phase and started building the first iteration of the full mechanical structure. This includes the dispensing mechanism prototyped early last fall, the storage component, and the tube with the photosensor. To see earlier updates of the dispensing mechanism and some other CAD designs check out our gallery page.

    To begin, we started by 3D printing the components and fitting them together. After printing out the bits and assembling one quadrant of the final structure we identified the first hurdle. The pills did not fall out of the storage component as expected. Instead, they jammed in the storage component, totally unreachable by the dispensing mechanism as seen in the video below.


    Fluke solution: Frustrated with the problem, we knocked the storage component around a little bit and realized that with enough of a push the pills would dislodge. Then came the problem of how to automate this motion. After pondering for a few days we came up with several creative solutions to address the problem of the jammed pills (the viable ones are listed below):

    → A slide or conveyer belt within the storage vault to keep the pills moving. The con to this solution is how to go about accomodating a conveyer with the existing design.

    → Another idea is to make the entire storage container vibrate. One concern with this idea is how much vibration is required to keep the pills moving. In addition, there is difficulty decoupling the storage component from the rest of the chassis.

    After many rounds of brainstorming, we came to the easiest solution, a rotating arm in the centre of the storage component to prevent the pills from getting jammed. The benefit of this idea is that it is minimally invasive to our current design and was easy to test out. Immediately, we went about making a quick prototype as seen below.

    The straw has an arm at the bottom that sweeps the bottom of the storage funnel and dislodges any stuck pills. Content with the first test we went about automating it by adding a motor to control the rotation.


    Success, we will update our SolidWorks model to reflect these changes and continue to move forward!