I want to put a small Arduino and some sensors inside a tennis ball to measure the ball's height above the ground. It won't be used for tennis, just for fun.

Is there any sensing solution that would allow for the accurate distance detection of the ground through the rubber? Any sort of time-of-flight IR would get absorbed by the rubber that's that thick. I believe sonar would too? My best bet may be using an accelerometer to estimate distance, then determining the height from that.

  • Without drilling holes in the ball, you will be detecting the inside of the ball with pretty much any "measurement device". Best bet would be to set up a camera aimed at a ruler, and use the footage to check how high the ball was at specific times. – Paul Sep 11 '16 at 18:35
  • Purely theoretically you can also make the ball emit "radio waves” and you could measure the signal strength or " time of flight " to check it's position. – Paul Sep 11 '16 at 18:38
  • I dont think 3d tracking of arbritary moving objects (which seems to be what you require) in 3d space can be done accurately (e.g. to the nearest millimetre) by an arduino.Arduino is probably the wrong tool to answer your question (if what you want is a totally isolated ball-i.e. no wires coming out from ball or holes in ball-with some arduino completely sealed inside). It can be done by using a machine vision solution, something like openCV (on a PC)with a webcam can track colored tennis balls for example. Another example may use Microsoft Kinect. I maybe wrong though as Im new to arduino. – qwerty10 Sep 11 '16 at 20:39
  • I moved this comment to the answer. – st2000 Sep 11 '16 at 21:08

It may be easier to suggest a solution if you were to "describe the goal" of your project.

If this is just a science experiment, I like your idea of accelerometers. What you need then is to take the next step and understand dead-reckoning in order to determine the height of the ball.

In other words, the integral of acceleration is velocity. And the integral of velocity is position. That means the integral of the integral of acceleration is position. As you may or may not know, for each integral you add a constant. The current speed for the first integral operation and the current position for the second. But we can assume we can detect hitting the ground. And, at that point, our position is X = 0 and our velocity is also 0.

That said, dead reckoning is difficult to use mostly because of the accumulated errors. However, you may have more luck as you get to "reset" your values each time you detect impacting the ground.

  • I thought of using an accelerometer, too, but - my brain is getting in a tangle trying to figure out how to handle the rotation of the ball AND do a couple of integrations on top of that data. IS there an emoticon for a brain explosion? ;) Regards, – Michael Vincent Sep 12 '16 at 10:14
  • I know this has been asked a while ago... But did you follow through with this project? I'd be interested to know what you've learned about it – fditz Nov 24 '18 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.