I really want to do something with my raspberry pi, so I thought of a game that's a mix between skee ball and beer pong. Basically, the build is a mini skee ball board (about 20x24 inches) without the ramp. The player would throw ping pong balls from a distance (like beer pong) and try to make it into the holes. The board would be padded so the balls don't bounce off, but would slide into a hole and down a return ramp that's below the board. I want the holes to sense the ping pong balls, but I don't know the best way of going about doing that (cheaply, too).

enter image description here


This is where I need help. Which way of sensing would be best? Have any other ideas? I thought of:

  1. Distance/Proximity sensor. When the balls go through a hole, they're sent along a path that makes them go through a "lane" of the exit. The proximity sensor would read how far away it is (its "lane") and from that reading I would know which hole it went through.
  2. Cons are that this one is a little complicated, as it requires me to tunnel the balls as they fall down the ramp. I also don't know how much room a sensor would need to detect distances straight in front of it. It would register the ball late, which is not preferred. However, the plus sides are that it requires only one sensor and it wouldn't be prone to shaking the table.
  3. Force-sensitive sensor. Use an analog (converted to digital because raspi) force sensitive resistor under each hole to pick up when a ball hits the area and get which cup it went into.
  4. Cons are that I would need multiple sensors and a D-A converter, the ball might be too light to register, and could be prone to shaking to acquire points. Pros are that it's faster feedback and would be fairly simple to implement.
  5. Capacitive touch. I could by a cheap board (MPR121) that triggers on capacitive touch and somehow get the balls to trigger them.
  6. Cons are that I don't know how to get the balls to trigger them (help pls, ping pong balls are light). Depending on the setup it could be complicated and/or prone to shaking. Pros are that it's cheap and would probably trigger quickly.

I can give more information if needed (crude drawings of plans, etc.) or any other information. I really want to make this a reality so help if you can or input any ideas of your own!



2 Answers 2


Good luck keeping ping-pong balls from bouncing — they are really good at it!

As far as detection, I would recommend going with infrared emitter-detector pairs, sensing when a ball blocks the path of the light as it passes through a target cup.

  • 2
    \$\begingroup\$ Or a reflective sensor, like mouser.com/ProductDetail/Sharp-Microelectronics/GP2A231LRSAF/… \$\endgroup\$
    – Phil Frost
    May 30, 2013 at 2:03
  • \$\begingroup\$ @PhilFrost: Good idea! One assembly per detector, rather than two. \$\endgroup\$
    – Dave Tweed
    May 30, 2013 at 2:05
  • \$\begingroup\$ Infrared will be simple and cheap, and it's easy to interface. \$\endgroup\$ May 30, 2013 at 3:45
  • \$\begingroup\$ Thanks for the input, guys! I though about IR, but I assumed it would be too expensive... \$\endgroup\$ May 30, 2013 at 5:56

A marble or ball bearing would work better than a ping pong ball. That's like using a ball pit ball on a regular sized skee ball game. Or if you need bigger, a mini golf ball.

As for sensing the ball, there is way more options than just three you mentioned. First, the cap sense option seems way too complicated to even bother with. Second, the force sensor is also overly complicated. You just need to know which hole the ball went into, not how strongly it did.

The Proximity Sensor could work. The popular hobbyist Ping))) Ultrasonic Distance Sensor (and all it's clones) tend to have 2cm (~0.8 inches) minimum distance, and 0.3cm resolution. This can easily work with the center holes in the picture you provided, but the two holes at the corners would need their own.

BUT, even that is more complicated than needed. You could use IR led and IR Sensors across each hole, where the ball coming in would break the light connection. Or the same, with an led and a LDR (Light Dependent Resistor), or with a laser, etc. You could have use a reflective sensor, where the led and the sensor is on the same side, and the ball passing through the hole makes the sensor see the light.

Or the simplest one, use switches! Micro switches installed at the bottom of the hole, would trigger once something touches the switch.

enter image description here

As it goes with the bigger skee ball machines, they either use switches or they use infrared sensors. And there really isn't a reason you need to deviate from that. The RPI has 8 GPIO, you could drive the switches directly even.

  • \$\begingroup\$ Wow! Thanks for the insight! I thought the IR sensors would be expensive... I guess I didn't do my research thoroughly enough. Thanks for the link! I'll definitely look into switches! The only thing I'm worried about is if the ball could trigger it - some balls will be rolling in and wont provide much force. I know the concept of ping pong balls seems dumb because of how light they are, but they're cheap and familiar among friends. Thanks again! \$\endgroup\$ May 30, 2013 at 5:51
  • 1
    \$\begingroup\$ @RowdyHowell since you are going for more of a toss it in instead of roll it in type thing, you want cones instead of cylinders, like the picture you linked to shows. And the bottom of the cylinder should be just big enough for the ball to go through. The microswitches don't need much to trigger, especially with the levers (mechanical advantage). As for the IR sensors, photodiodes/phototransistors and a ir led can be had for ten or twenty cents a piece on ebay ($7 for a 50 pack). \$\endgroup\$
    – Passerby
    May 30, 2013 at 6:15

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.