Pages: [1]   Go Down
Author Topic: Accelerometr for calculating throw distance.  (Read 611 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. Do you think I could youse an accelerometer for example  MMA 7361 to calculate throw distance of a ball? Im thinking of putting an accelerometer with atmegachip from arduino into small ball and calculate distance from measured accelerations, save them on the chip then connect ball to computer and then recover saved data. But i dont know if the sensor can provide sufficient sensitivity and resolution. Ball would be thrown for distance approximately 4meters by a robot. 10cm precision would be enough for me. What do you think about this idea? Anybody have some experience with that sensor?

Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It is very simple: just pretend you being a mcu and someone has presented you with a series of g readings. Can you calculate distances from that?

If you can, your mcu can.

If you cannot,  your mcu cannot.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes I can if I know how acceleration of ball is changing in time I can calculate distance that ball made. Im just asking if the sensor can provide me good quality readings. It can be done in theory, Im trying to find if there are any piratical difficulties.
I was going to measure the distance of throw with ultrasound sensor but it came out that if the object is moving sensor doesnt sees it, and if it small the range of sight of the sensor for small object is very low. I want to avoid buying another useless part because my budget is getting very low ; )
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Yes I can if I know how acceleration of ball is changing in time I can calculate distance that ball made.

That's great.

The following is a sequency of g readings, in x/y/z format:

Code:
0/0/1
0/0/1
0.5/1/0.5
1/0/-2
8/-2/10
0/1/-2

Taken in 0.1s intervals.

Can you tell me how far the ball has traveled and why?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can tell you the final coordinates of ball if it started to with V=0, in (0;0) point, and i doesnt spin. (I admin i forgot that the ball can spin : ((( it would be necessary to add gyroscope sensor).
s=(at^2)/2

s=s1+s2+s3+s4 ...
s=((t^2)/2)*(a1+a2+a3+a4+...an)
for x axis
s=((0.1)^2)/2)*(0+0+0.5+1+8+0)
for z and y its similarly

For throwing a ball the readings from sensor would be something like this:
10/2/15 its accerating
8/2/10 its till held by a throwing hand
9/1/12
4/0/8 / now accelerating its over, flight phase begins, it has some Vo, and now gravity and air resitance doing their job. (i could stop measuring if i would now the air resitance coefficient for ball. For small velocities the air resistance could be constant)
0/-2/4
-2/-2/-1
-2.5/-1/0
-1.5/0/-3
-1/0.5/-4
0.5/0/5/-7
0/0/20 now it hits a floor and I stop measuring
« Last Edit: November 17, 2012, 09:31:21 am by rydes » Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i doesnt spin.

Let me make it simpler for you.

Here is a series of g readings:

Code:
0/0/1
0/1/0
1/0/0
0/1/0
Sampled at 0.1s interval.

Tell me where the ball is.

After that, you will know how doable your project is.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i just wrote it post before. how im gonna to calculate it...
Quote
s=(at^2)/2

s=s1+s2+s3+s4 ...
s=((t^2)/2)*(a1+a2+a3+a4+...an)
for x axis
s=((0.1)^2)/2)*(0+0+0.5+1+8+0)
for z and y its similarly

Maybe Im wrong but I think its right. Simple physics, acceleration is derivative of distance you can integrate it
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Simple physics

If you cannot get that simple physics right, how do you expect your mcu to get it right?
Logged

Pages: [1]   Go Up
Jump to: