I'm trying to figure out how to detect exactly where a thrown ball has hit on a 4' x 6' sheet of vinyl (ie. what banners are printed on). The idea is for a pitching target that could identify exactly where in the strike zone, or how far outside of the strike zone your pitch was. I wouldn't be throwing actual baseballs, but maybe either tennis balls or hockey balls.
Unfortunately, I'm drawing blanks on many ideas to even try. I considered two layers of vinyl, with conductive fabric that essentially makes a grid of buttons, but that feels like a pretty inelegant solution, and unlikely to be very durable.
Any suggestions for other ideas that I could explore?
A sensitive IR camera can detext (see) the heat retained in the banner (briefly) by the energy transferred to it by the ball. Snap shot and search for the white (hot) pizels.
I guess, excluding the use of a camera (hard to use with only arduino board in my mind), you have 2 differents solutions:
make your target full of button, like a matrix (what you proposed) and so you can determine the resolution (by the size of the button) and have very accurate response after the ball hit the target. It will be a "contact" solution but will require a large amount of button and wiring.
put any detector to 2 consecutives sides of your target like ultrasonic device. There you can obtain a 2 dimensionnals coordonates of the hit point (assuming velocity of the ball is low enough to be detected through ultrasound). You dont need a lot of hardware for this but the detectors could be touched by a thrown ball. This set up could work but only considering (unlike arrows in a target) the ball will "disappear" from the sensor range after have hit the target.
Put microphones out at the corners of the board. When a sudden sound occurs, capture the instant it was heard at each microphone, then use trigonometry to calculate a position from the time differences.
Many thanks for all of the suggestions! So just thinking out loud, some of my options might look like:
A grid of mechanical switches of some kind. My instinct is that the accuracy and reliability here would be pretty good, but durability could possibly be low. Also, a large number of switches would be required for a decent amount of resolution.
A camera of some kind. I am not familiar with this approach at all, but I am not averse to learning more about it, nor am I averse to learning how to use a device other than an Arduino. This project is just for fun, and I don't have a deadline, so it sounds interesting to look at. Might a Raspberry Pi be a good choice here?
A grid of non-contact transmitter/receiver devices that would be broken by the ball. A tennis ball/hockey ball is about 2.5 inches across, so I would need about 50 pairs to cover the full target. I would also be using this outdoors, so it would need to be a transmitter/receiver that could work in full sunlight, which might be a problem with reliability.
A series of distance sensors that could measure the distance of the ball from the top and side of the target as it goes by. I'd definitely need ones with a very high refresh rate so that they don't miss the ball as it is going by. I'd probably also need to have them on all sides of the target so that there aren't any blind spots when the ball passes by close to the sensor.
Triangulation of some kind. Either through sound, or possibly even vibration if the target was rigid like a sheet of plywood. I am not familiar with this approach either, but it sounds intriguing. It feels like a minimal amount of equipment would be required compared to some of the other methods, and it should work outdoors. Would anyone be able to point me in the direction of some resources, or a starting point for the math involved here?
If I have misunderstood anything, please correct me! Thanks again, this has been awesome!
I think you summarized well, and I share your point about the camera detection. Surely the best approach from an industrial point of view but you can manage your project without it.
My vote goes to start with 2 ultrasonic sensor (I am gulty, it was my proposal) as it is cheap and easy to code.
Speed of sound in air versus the speed of your object will be enough for precise detection. If you can test the angle beam of your ultrasonic sensors (approximatively 15° for the HC05 SR4 I use) you can adjust their positions so they "see" only the surface of the target (and wont record the coordonnates during last times of fly).
Please note in this configuration, the ball will be detected just before hitting the target, during the bounce and the consequent fall. I propose you select the minimum value detected by the sensor (considering it on the top of the target, pointed to ground)
Keep us on date!
btw: ultrasonic sensor require roughly 20ms to send the signal and get the echo (for a little distance measured):
12 ms of trigger (send the ultrasonic wave)
wait for wave is back (related to object distance*2 / speed of sound)
5 ms triggering the echo pin (lenght of pulse is related to distance, so 5 ms will be for close detection)
Rounded to 30ms for a single measurment and a pause just after, you may have 30 measure per sec.