I'm building a kind of pin ball machine, and I need to detect when the ball has hit the wall with the sensor attached.

The ball will hit the wall with a small impact, not large enough to push a button probably. What sensor would be the best to use in this case?

I thought about ultrasonic but I'm not a fan of the constant chirping. Can a light sensor be used here? Eg if there's 10% light left, we assume the ball has reached the wall.

enter image description here

  • 1
    You could use a light barrier (using a small laser diode), which is aligned along the wall. The ball will get into the light ray and will disrupt the light barriers signal. Or you could attach a vibration/sound sensor to the wall to detect the impact.
    – chrisl
    Mar 29, 2022 at 12:03
  • If you want to write an answer, please write only one solution in one answer. If you have more ways to solve this, please write multiple answers so we can vote for the solutions separately.
    – Juraj
    Mar 29, 2022 at 13:36

1 Answer 1


The ball will hit the wall with a small impact...

Consider using the well proven pinball bumper design omitting the hammer feature:

enter image description here

In many pinball machines a "rubber ring" is stretched in front of one or more "leaf switches". When the ball hits the "rubber ring" one or more of the "leaf switches" closes (or opens depending on if the "leaf switch" is N.O. or N.C.). There are many example for connecting switches to an Arduino.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.