# What kind of senor do I need?

I want to make a ball that, when thrown, will know when it is at the top of the arc.

I thought the sensor would be an accelerometer, but all I can find are ones measuring tilt and roll.

Can anyone point me in the right direction?

That's going to be really hard to do, an accelerometer or a gyro will have big problems with that as the ball is going to be rotating on multiple axis the whole time it's in the air...

It will require extremely complex calculations to work out the arc, you might have better luck with a high speed GPS, like a 10hz GPS, it should (as long as signal strength was adequate to give good accuracy) be able to calculate altitude, then you would simply subtract altitude at ground level from the peak altitude to give you the altitude of the arc.

Add to that the difficulty in protecting the electronis inside a ball that is thrown, and therefore also will "land".

Forgot about that part, even if you can secure the electronics well enough inside the ball the sudden decrease in acceleration that happens as the ball hits the ground could quite easily crack PCB's and damage all sorts of components, don't even think of using a lipo battery for this.

In theory you can do this with an accelerometer, you said:-

but all I can find are ones measuring tilt and roll.

Yes that's what they all measure when they are stationary because they are measuring the acceleration from gravity. I saw a manufactures demonstration board some time ago of a wireless accelerometer that would do just what you ask. The demo software had it making a bleep when you tossed it in the air and it reached the point where no gravity was acting on it. That happens at the top of the arc when the acceleration upwards balances the gravity downwards. The spin problem can be resolved by calculating the movement vector and seeing what the first vector to drop to zero is. Of course you had to catch it on the way down.

I have seen a bunch of electronics that have survived drops and bashes.

There was a ball a few weeks (months maybe) ago that was used for a gps navigation type game. This was then thrown against a wall to achnowledge the finding. Something like that anyway. You would need the electronics to be supported in foam or something I would have thought, then it should bounce a bit. You would need some strong connections between any parts in it though.

If you weighted the ball then you could keep it the right way up...

Mowcius

If you weighted the ball then you could keep it the right way up.

It's not a matter of the right way up it is the question of the ball spinning that is the problem. A spin generates a force that is like gravity that is picked up by the sensors. So in a non spinning ball at the peak of the arc gravity is balanced out and all the sensors read zero. But if the ball is spinning on one axis then the sensor at right angles to the spin will read none zero. Of course the spin will not be aligned with one of the sensor axis so the vector will be a combination of the two axis. However the third will drop to zero as there will be no gravity being felt in that direction.

It's not a matter of the right way up it is the question of the ball spinning that is the problem. A spin generates a force that is like gravity that is picked up by the sensors. So in a non spinning ball at the peak of the arc gravity is balanced out and all the sensors read zero. But if the ball is spinning on one axis then the sensor at right angles to the spin will read none zero. Of course the spin will not be aligned with one of the sensor axis so the vector will be a combination of the two axis. However the third will drop to zero as there will be no gravity being felt in that direction.

That makes sense. I had casually forgotten about the x rotation :P

How about a pressure sensor? While the spinning is likely to affect the readings, I think it might still be able to detect the lowest (atmospheric) pressure. You may have to use some kind of level shifting to get the sensor in the right range to measure what you want.

Wow, thanks for all the replies!

I guess a bit more info on what I want to build would clear up some of the questions and misunderstandings. I want juggling balls that I can program to change color at the top of the arc or a number of MS after I toss it or hits the top of the arc.

I figured durability would be the number 1 issue. I need to get an idea of the parts I need to use before I start tackling that.

It's not a matter of the right way up it is the question of the ball spinning that is the problem. A spin generates a force that is like gravity that is picked up by the sensors. So in a non spinning ball at the peak of the arc gravity is balanced out and all the sensors read zero. But if the ball is spinning on one axis then the sensor at right angles to the spin will read none zero. Of course the spin will not be aligned with one of the sensor axis so the vector will be a combination of the two axis. However the third will drop to zero as there will be no gravity being felt in that direction.

So a 3 axis accelerometer sounds like it would work. I just have to wait for one axis to read 0, but then there is a problem if I happen to toss the ball with no angular momentum on one of the axis.

The angular momentum when I toss the ball should remain the same for the entire time the ball is in the air (or degrade very slowly). So when 2 axis change suddenly that is when the ball is caught or hits the ground.

I don't need to be able to figure out the entire path the ball has traveled just when it has reached the very top of the arc. I guess the pressure sensor would work is it was really fast and really accurate. I don't think is would sense any differance only going up a few feet. Same for the GPS.

If I could make the inside of the ball a gyro, I dreamed up a cheap sensor that would work. A bar with a washer on it and at the top and bottom on the bar are incomplete circuts. When the washer is completing the bottom circut the ball is moving up, when no circut is complete it is at the top, and when the top circut is complete it is moving down. That leaves the really hard part of building a gyro though. I don't think this idea will go anywhere, but I thought I would throw it out.

I guess the pressure sensor would work is it was really fast and really accurate.

There is no way a pressure sensor would work.

but then there is a problem if I happen to toss the ball with no angular momentum on one of the axis.

No problem, this axis is already at zero and will stay there. What you are looking for is an axis that goes towards zero and wen it reaches it is at the top of the path.

but I thought I would throw it out.

I dreamed up a cheap sensor that would work

Your idea seems pretty similar to this device:

http://www.seeedstudio.com/depot/roller-ball-tilt-swtich-through-hole-version-p-79.html?cPath=6

I can't see it working for your project though. .

I couldn't bring myself to buy from a online store that are too lazy to correctly spell please! its not spelt plz!

Sorry little off topic...

Might a "rolling ball tilt sensor" work?

Might a "rolling ball tilt sensor" work?

No. At the top of the arc the switch is essentially weightless so there is nothing to make the ball roll.