Electronic – Sensor to detect ball impact

piezosensor

I want to detect the impact of a ball against a table tennis racket.

I'm currently using Piezo discs tightly fixed in the racket wood.

However, in addition to correctly detect impact, the sensor also detects sudden accelerations in the racket. As an example, it is very common to make a fast movement backwards just before hitting the ball.

My approach is very naive: I'm reading the ADC as fast as possible and if the average of the last 10 measures reaches a threshold, I consider the impact detected. (I tried other numbers besides 10.)

Questions:

  • Is there a better sensor for this purpose?
  • If not, how can I differentiate (or filter out) sudden movements from ball impacts.

Best Answer

I think you need to connect the sensor to an oscilloscope and compare the voltage signal during hand movements and during ball impact, or dump your ADC data and plot it (as @Harry Svensson mentioned). If you don't have good data, then you're just guessing at the correct algorithm.

I think the ball hit will have a very fast voltage rise time whereas hand movements will be slow risetime. If data confirms this then you might put an opamp configured as a differentiator before the ADC. It's output will vary based on how fast the piezo signal is changing, instead of being based on the actual level .

enter image description here

The diagram above is from a good tutorial on the differentiator circuit at http://www.electronics-tutorials.ws/opamp/opamp_7.html

Basically, the faster the piezo voltage signal rises (or falls) the greater Vout excursion will be. Your code than then just look for exceeding a threshold like your present algorithm.

Keep in mind the highest voltage excursion can be positive or negative during the ball hit depending on which way you've oriented your piezo. Your analysis of your raw sensor data will reveal this.

If your MCU is fast enough, you could even do this digitally in real time. Basically you just need to look the difference between samples and trigger when you see a large difference.

Related Topic