ping pong table

we have a project, the idea is to have a ping pong ball go though two light curtains and calculate the velocity and use the velocity to calculate the time to fire a board to hit back the ping pong ball back to the player. Will this be possible with Arduino and if so can someone point me in the right direction for making the code Or if there is a code made for this already

Thank you

I recall reading about a ping pong robot some time ago, and I looked it up: http://www.i-programmer.info/news/169-robotics/3223-ping-pong-robots.html.

Have a look here: http://coolarduino.wordpress.com/2011/12/07/arduino-laser-3d-tracking-range-finder/ Arduino UNO is tracking laser dot, calculate speed and trajectory 60 frame per second. Code is available to download. There should be no difference what to track, laser dot or highlighted ball, what is matter is contrast. Probably, with a ball you would need a black painted background.

Calculating the velocity and timing some external actuator sounds easy enough. But getting the 'light curtains' working, and creating the hardware to 'fire a board' both sound potentially tricky.

I've seen videos of various systems that solve this problem optically (using 3-D ball tracking techniques) but they do look rather complex. If you only want something that will bounce the ball back with a bit of energy added, I suspect your simplest bet would be to put a touch sensor on the board or your 'light curtain' just in front of the board and use that to trigger some sort of high force mechanism that knocks the board forward. And I'd probably do [u]that[/u] by having it restrained against some springs with a trigger mechanism to release it suddenly, then slowly wind it back against the springs for next time.