do infrared sensor can pass through transparent plastic and work?
closed as unclear what you're asking by JYelton, Chris Stratton, RoyC, Lior Bilia, Oleg Mazurov Aug 16 at 21:06
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Your eyes cannot see IR but your (phone) camera can!
Grab your TV remote as an IR source and while pressing a button on the remote look at the remote through your phone's camera (actually almost any digital camera will do).
Chances are you will see the IR transmitter LED in the TV remote flashing like so:
Now hold the pills package in between and check if you can still see the IR LED flashing.
If yes: then the IR light can pass through the holes in the package.
However, the aluminium (?) foil in the pills package will block IR very effectively. If that foil is not removed then the IR light will not pass through.
Only if there is a clear visible hole left (through which you can see light pass through) can this work reliably as a pill present/not present detector.