detect impact from digital audio
If your environment's noise level allows it, you can use a quiet no-brainer solution. Just make sure that the impacts have greater peak amplitude than the noise floor in every case.


Specify a threshold level based on previous experiments. This level has to be great enough for all the impacts you generate and you want to detect. If your signal crosses the level, you can assume, that an impact has happened.
If a detection has occurred, you can start a timer, that prevents unwanted re-detection for the same impact because you can't expect that your impact will be below the threshold for the next sound sample. For this reason, the timer has to run longer than the maximum detectable length of any impacts. Until the timer runs, you disable the threshold detection.
After the timer has fired, you can enable the threshold detection again.




This method requires previous experiment and knowledge about the detectable impacts. You have to determine the minimum sampling rate that allows you to catch at least a few sample of the impact. Standard audio quality sampling rate would be good enough.

You can of course apply signal conditioning by filtering the signal with a digital filter, but this necessity is highly depends on your environment and noise floor.

Note that this is possibly the most no-brainer solution. There are many more sophisticated methods for this particular problem.