New blog entry about photointerrupter basics


I wrote a new blog post about the basics of photointerrupters. It is about the basic function, different types and how to connect them. In future posts I will continue with details on how to choose the right components around the photointerrupter and practical use in a rotary encoder.

You can find the post here: photointerrupter basics - heliosoph

Hope this information is useful to you.


Thanks sharing, useful, I miss Arduino examples using it - polling or interrupt - analog/digital ;)

Hello robtillaart,

thanks for your reply. I am already writing the next one...

Practical applications will also come.

Have a nice day


Thanks for sharing.

I am going to use one on a moving vertical platform & use a upside down T rail with holes drilled at incremental distances for the interrupter. ----------0----------0----------0----------0----------0----------0----------0----------0----------0----------0----------0----------

Start Finish

Add some code to accelerate from starting pos, then decelerate , and move slower until end position.

Thanks again.

I wrote a second post about how to choose the right values for the current limiting resistors in order to get a stable signal and to reduce energy consumption. You will also find some hints about the problems with ambient light.

You can find the post here:

Hope it is also useful.