Build Your Own Tablet Counter and Dispenser
Counting out your pills for the week can be a pain, which is why Mr Innovative built this dispenser/counter machine.
I'm 34 years old and that means that I have a few different pills I need to take each day. Like many of you, I use one of those daily pill container thingies. That means that each week, I have to sit there and count out seven of each of my pills to put into the container. And as my pill bottles get low, I have to count the remaining pills to figure out when I need to call in refills. I would definitely benefit from this tablet counter and dispenser designed by Mr Innovative.
This machine has two functions: it can dispense specific quantities of pills or it can count the total number of pills. The user only has to drop a bunch of pills onto the turntable and then use the touchscreen interface to either enter a quantity or start the counting process. Then the turntable will start spinning, pushing the pills along guides to form a neat, orderly row. Another guide then pushes that row past a sensor and down a chute, where the pills drop into a collection drawer. The sensor detects each individual tablet, increasing the count until it reaches the user-set total or there are no more pills.
The cool thing about this design is that it only requires a single stepper motor. That motor spins the turntable and the passive guides handle the rest. A generic Arduino development board controls the stepper motor through a custom driver board PCB designed by Mr Innovative, which he uses for many of his projects. It takes input from a Nextion resistive touchscreen LCD panel. That has a simple interface for entering a desired quantity of tablets and a readout of the total counted so far. Most of the machine's body was constructed from plywood, with a few 3D-printed parts.
The last piece of the puzzle was the sensor. Mr Innovative started with a standard infrared sensor module, which looks for the reflection of the infrared light. But he found that that module failed to detect some colors of tablets. To get around that issue, he modified the module to work like a break beam infrared sensor. That shines the infrared LED directly into the sensor. Anything that moves between the LED and sensor breaks the beam, which works with any color of tablet.
If you want to build your own tablet counter/dispenser machine, Mr Innovative posted the Arduino code.