Pages: [1]   Go Down
Author Topic: Tracking Distance on one Axis with an Accelerometer  (Read 1562 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a ADXL193 Accelerometer and I am planning on lunching it out of a potato gun connected to a Arduino Mini 04 and i want to be able to track the distance that it goes. has anyone done anything like this before and/or have any advise on how to do this I herd that the RK4 method is bettor than double integration
Logged

Southern California
Offline Offline
Full Member
***
Karma: 0
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately, once the potato exits the barrel it will basically be in free-fall until it hits something. During free-fall, the accelerometer will experience "weightlessness" and should read zero. Not sure how to measure flight distance with an accelerometer. In the Olympics, they just walk over to the javelin and measure the distance it was thrown...
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 30
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Rather than just an accelerometer, you could launch an IMU, which includes accelerometer and gyroscope at a minimum.  The combination of the two can allow for dead reckoning calculations which can include distance traveled.  However, whether an Arduino can perform the calculations fast enough to do so given the acceleration and speed of the projectile is questionable.

You best bet for obtaining distance is a gps, though the accelerometer distance would be interesting in and of itself.
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12541
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a ADXL193 Accelerometer and I am planning on lunching it out of a potato gun connected to a Arduino Mini 04 and i want to be able to track the distance that it goes. has anyone done anything like this before and/or have any advise on how to do this I herd that the RK4 method is bettor than double integration

The distance is going to need you to integrate some very short sharp acceleration spikes and I'd question your ability to capture the acceleration with high enough frequency and accuracy to produce an accurate answer. It might work, but it seems unlikely to me.

If you can restrict the problem, you may be able to get something working: Design the projectile so that it is at a fixed orientation relative to the barrel, i.e. think bullet rather than bean bag. Use the accelerometer to measure the elevation of the barrel before the firing. Use the accelerometer to detect the firing and landing events so you know the flight time. Assume the start and end height are the same. Calculate the vertical speed from the flight time, and calculate the horizontal speed from the barrel elevation and vertical speed. From the flight time and horizontal speed you can estimate the horizontal distance traveled.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Peter- Genius!  I'm going to try your idea.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

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

Peter that's an awesome idea but I am creating a projectile that flies through the air and has that and a 2 axis gyro (X and Y axis sensing) that corrects its trajectory and adjusts 2 sets of flaps on the back to go a spafic distance I can model the exit speed very well (mab just use that inatility to smooth out the huge jump in readings)
Logged

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12541
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Peter that's an awesome idea but I am creating a projectile that flies through the air and has that and a 2 axis gyro (X and Y axis sensing) that corrects its trajectory and adjusts 2 sets of flaps on the back to go a spafic distance I can model the exit speed very well (mab just use that inatility to smooth out the huge jump in readings)

... and now the true requirements start to come out! smiley

Do you know how high the landing point is relative to the launch point?

Do you actually know the launch speed and direction?

Am I correctly understanding that the projectile is NOT ballistic? I don't think a two-axis gyro will give you enough information to know where it is, since you don't know the orientation and hence direction of acceleration. If it flies consistently and generally stays in a predictable orientation you might be able to fudge that.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

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

it is ballistic following a parabolic trajectory without outside power, and I know the exit velocity and i can measure it using a chronograph and I will be able to set the angle of launch. I was thinking to simply track the distance and have it adjust its angle to hit a specific spot the projectile is stable in flight not a ball.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12541
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it is ballistic following a parabolic trajectory

What's this about flaps, then? If it's gliding then it is not ballistic.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

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

Well it is designed to follow that general trajectory but not roll and to adjust the pitch to hit where it needs to hit so i can just shoot at 45 degrees every time and hit different distances (within reason) see pic for what I am thinking.


Red is actually the adjusted path green is the ballistic path
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2865
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think that by the time you finished the calculations and Started to adjust the "Flaps" the Potato would be long on it's way to being chips... (OR Potato Fries... If you live in the US...) servo's being what they are and the surface area big enough to affect the flight quickly enough, Interesting concept though... Great info to translate to other ballistic objects... One other point would be the necessity of applying a variable/changing datum (Position) to a basically digital device (servo)... is it one bit too long or one bit too short?. <BG>

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Pages: [1]   Go Up
Jump to: