So, depends on what resolution you need. You could simply wire up a bunch of momentary switches, and put them in a rectangular grid, behind wooden squares. (Mechanically, you'll add stops behind the squares to make sure the ball's energy doesn't reduce the poor switches to crumbles.)
Wire that to a microcontroller with enough inputs, and just register the first switch to close (the others might close later, due to the ball bouncing/rolling to neighboring fields, or the whole thing shaking violently).
(You might want to have a lot of inputs, then, more than your average microcontroller has. There's solutions for that – an electronic latch that saves the "active" state of the first switch to get hit and deactivates all others instantly, together with things like shift registers.)
From the high-tech/high-resolution solutions you proposed:
I very much think the microphone solution is the one that's most likely to be viable; it's still not easy.
For localization, there is a technique called Time Difference of Arrival (TDoA), and the idea is very simple: you take two observers (here: microphones) that you know are synchronous (so, a stereo input on a soundcard). You correlate the chunks of the sample streams coming from both; which gives you a cross-correlation function (actually a cross-correlation sequence), telling you "at this temporal shift, the similarity of the A to the B channel was this high". You wait for really loud sounds (high absolute amplitude), you correlate, you find the maximum:
then you know how much longer the sound of impact took to get to the microphone B than to A (or vice versa). Since speed of sound is constant (at least, we're assuming that!), we can directly convert that time difference into a distance difference: the point of impact was so-and-so many millimeters closer to microphone A than to B. (please don't assume you get millimeter accuracy.)
Throw geometry at it (your son might still be a bit too young for that level of math!), and you'll find that the "set of all places with a fixed difference in distance to two fixed points" is a hyperbola (actually, one chord of a hyperbola, because we even know the sign of the difference, not just the absolute value). It's easy to imagine where the must have hit when the sound reaches both microphones at the same time: somewhere on a line going through the middle between the microphones, perpendicularly to the connecting line. If it's "a bit closer" to B than to A, you get a bend-y curve "around B" as possible places. The closer you get to B, the narrower / "sharper" this curve becomes. Here's an example:
Illustration: A, B: place of microphones. Red: board. Yellow: possible places of impact if sound took exactly equally long too reach A and B. Dark grey: Possible places of impact if sound took a little shorter to reach B than A. (not to scale)
Ok, but your son won't like when you tell him
you hit somewhere on that branch of a parabola, can't tell you exactly!
So, you install another pair of microphones:
And you get another hyperbola from the time difference of arrival you observe with microphones C and D. These two hyperbolas cut! And that's where the impact of the ball made a sound.
This is a beautiful method, and we use it for a lot of things – from allowing objects on earth to locate themselves (GPS is not built on a fundamentally different concept!), to finding airplanes approaching airports, to localizations of active shooters.
You can implement that with
- a sound card with four synchronous channels (hard to find, professional equipment, but would actually give the best signal), two stereo channels, or just two soundcards with a stereo channel each. Note that the two pairs don't need to be synchronous – we're combining the hyperbolas, not the individual audio channels. So, only each pair internally must record the audio against the same time basis. So, anything between, say a TASCAM US-4x4HR and just two sound cards with stereo line-ins (microphone inputs typically aren't stereo), like two Behringer UCA222.
- 4 omnidirectional microphones. (omnidirectionality is important because that defines whether the microphone sees the same delay in all directions).
Higher end to go with the US-4x4HR would be something like MOVO LV lavalier mics, or you go with 4 separate cheaper omnidirectional electret microphones, and add a sufficient preamplifier. lcamtuf's microphone amplifier is an option there – don't build the AGC stage, that introduces variable delay, and you don't need much gain, so just use a relatively low-value feedback Rf (say, 47 kΩ to 100 kΩ).
Microphone Amplifier. Circuit and Schematic by lcamtuf.
- A controller fast enough to process the data from the sound cards. Good news is that for modern computers, these rates are ridiculously low. Raspberry Pi, old laptop, … what you have at hand.
- Software! Now, this is where you get to write things yourself. The handling of audio streams is easy (I use GNU Radio for these things, but I'm also biased towards GNU Radio); just drop all your stereo samples on the floor until you find something very loud on either channel, then take the 1500 samples before and 3000 samples after that (just throwing numbers around here), throw both 4500 samples from left and right in a vector, calculate the cross-correlation for shifts of less than 500 samples or so, find the maximum. You get your maximally likely time difference of arrival!
From there it's "just" solving the TDoA equations. Your friend here:
Y. T. Chan and K. C. Ho, "A simple and efficient estimator for hyperbolic location," in IEEE Transactions on Signal Processing, vol. 42, no. 8, pp. 1905-1915, Aug. 1994, doi: 10.1109/78.301830.
is the classic paper, implemented all over the internet.
- Display: you need something to show the position, a score or something.
A word on accuracy: at a sampling rate of 48 kHz, your average sound card would allow for a cross-correlation accuracy of "1 sample", i.e. 1/48000 of a second, equivalent 6.25 mm of distance of sound traveling in air. Now, at sufficiently good signal-to-noise ratios, you can interpolate and get that further down. But: in reality, you probably won't get that accurate: your microphone positions, the actual phase centers of the microphones, and effects like sound echoing off surfaces and being conducted through the board will make this number much worse, even if there's little noise to disturb your estimation. But seriously, I'd say with an estimator stddev of maybe 5 cm to 12 cm you'd not be bad off, for training an upcoming pro :)
Another observation: when you already have these four microphones in place:
You could have a speaker close to the target board that emits a tone (preferably high enough that it doesn't annoy us adults ;) ). The sound bouncing off the ball exhibits Doppler Effect, i.e. the frequency of the reflected wave is higher than the frequency that the speaker emits at the ball. That allows you to build a velocity sonar! Simply shift the frequency you receive by the frequency your speaker emits, you get a so-called beat frequency, which is proportional to the velocity of the ball towards the speaker. This doesn't necessarily interfere with the operation of the TDoA system: you could filter out the frequencies of interest with a simple linear-phase FIR filter in software. And since that has the same delay for all frequencies and all channels, it has no effect on delay estimation.