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
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...
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.
ferret_guy:
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.
@Peter- Genius! I'm going to try your idea.
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)
ferret_guy:
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!
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.
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.
ferret_guy:
it is ballistic following a parabolic trajectory
What's this about flaps, then? If it's gliding then it is not ballistic.
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
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?.
Doc