Pill Counter


I am helping a small cottage to do re-packaging of small tablets / pills into bottles. Counting by hand is not accurate. Counting by weight may varies as the pill density may varies. So, i need a counter hardware.

Solution Idea:

I want to build a system to count a number of pills. It will still be a manual job, but at least it speeds up the counting part. I was thinking to use some laser / infra-red module to do the counting. once the pill drops through the funnel, it blocks the laser / IR light, it counts as 1.

Stopping the funnel flow would be manual job i guess. I haven't thought of more detail on the hardware part. Just want to do the counting part.

Hope someone can give me thoughts on the idea or some ideas that can work on the pill counting.

note i am totally new to Arduino, not familiar with the language and module (but willing to learn). i used to work with some machine language before. LED and micro-controller and stuff.

I recently concocted a device to count the swings of a pendulum. It's basically what you want to do: each time the beam breaks, add one.

It's very simple.... as long as the item is of a size guaranteed to break the beam, and as long as a second pill can't overlap the one in front it should work.

Another way would be to have a gear like fitting onto a stepping motor. The spaces between the gear teeth would be enough to hold one pill. Then rotating the stepping motor by the required amount lets one pill through.

Thanks for the inputs.

Can anyone tell what sensor is that on the video?


Not sure... it looks like it might be a Light Dependent Resistor (LDR) which was changing its resistance when it was in shadow. That would not be reliable.

Or, it might have been a reflective IR sensor like this. It senses the presence of an object because its transmitted beam is reflected back.

My pendulum used an IR source and an IR receiver so it had a beam to break.