Object counter with Raspberry Py and Infrared Photoelectric switch

Hi all,

I would like to build a simple system that uses an Infrared (IR) Photoelectric Switch to count objects or trigger a signal every time an object passes through it, however I have no experience with this, can anyone please suggest what components I would need and/or a tutorial to show me how to do it?


1 Like

This item will detect an object passing through a beam:

There is a tutorial here:

Note that detecting an object is the easiest place to start. Counting objects becomes slightly more complex because you have to avoid multiple triggers per object, and how you do that depends heavily on the context.


perfect, thank you!

1 Like