Best way to detect an object presence

Hello to everyone! I just wanted to come by and say thanks for all the answers you gave me. The proyect was a success! Not only the pieces of concrete and thermomolded plastic ended up well, but the control system "without a button" works smoothly.

I used an IRED and a phototransistor, mainly because of the cost. The process of removing all the backgroud IR radiation turned out to be quite a headache. I had to learn a lot of programming, light properties and signal detection. Through several test and iterations of the code, we have finally archieve a detection failure rate of less than 1% even while being exposed to direct sunlight or light changes.

A couple of images:
https://photos.app.goo.gl/oJSo5YtxEKSHrgZRA
https://photos.app.goo.gl/tg1w2U5HkNqz9U8F9

A video!
https://photos.app.goo.gl/WfiW6NE8WBJ4H8UNA

Well, I thinks thats it. I felt the need to share it with you beacuse you were really helpfull! :slight_smile: