Pages: [1]   Go Down
 Author Topic: Measuring point to point distances with accelerometer  (Read 8644 times) 0 Members and 1 Guest are viewing this topic.
0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
 « on: January 26, 2011, 05:20:49 am » Bigger Smaller Reset

Hi Everybody,
I'm happy to be the first one to write a topic on this forum session.
I'm mostly a beginner with Arduino.

I'm loosing my mind in finding a way to measure the distance between two point.+
I can can consider the A point as fixed and initial speed and position of B (moving) as 0.
I would like to have a precision of about + or - 10 cm for my project.

I'm using a Razor - 6DOF http://www.sparkfun.com/products/10010.
For the moment i'm considering just data coming from y axis moving on a flat surface and in a linear direction along the axe.
I'm not finding any method to read a real distance covered.
In fact I have nice result if i'm not accelerating to fast of too slow. Moreover if I shake the sensor I get kilometers without any reason.
Can you suggest me something? Should I abandon this way?

I found on the internet that some company is selling something similar to inertial navigation system and that something similar was used in the 60s for ballistic rockets so I'm not loosing fait in this project.

I already tried other technologies like the RSSI from Xbee radio to measure distances but without nice results even because I need to measure distances even when point B is moving behind walls.

Thanks

Paolo

I was proudly made in Italy like Arduino .

 Logged

Seattle, WA USA
Online
Brattain Member
Karma: 547
Posts: 45995
Seattle, WA USA
 « Reply #1 on: January 26, 2011, 07:15:31 am » Bigger Smaller Reset

An accelerometer measures instantaneous acceleration. Since acceleration is change in velocity over time, you are getting delta V. You need to keep track of how delta V affects V, and V for any given time, to get distance.

Unfortunately, while you are busy doing that, you will be missing acceleration changes.

It seems to me that other mechanisms for tracking distance would be more appropriate. Which mechanisms depend on the type of object moving, the terrain being moved over, the type of wheels, the speeds involved, whether the object is indoors or outdoors, the total distance that needs to be measured, and the ability/inability/desire/lack thereof to place any kind of reference points in the area being traversed.

None of these details were provided.
 Logged

0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
 « Reply #2 on: January 26, 2011, 08:36:44 am » Bigger Smaller Reset

Thanks a lot PaulS.
Unfortunately I don't have the possibility to use encoders or trackballs or something similar.
The most important part of my project is that the moving point B will be an Arduino in a box and will be handheld so i have not any idea to solve this problem.

Paolo

 Logged

Seattle, WA USA
Online
Brattain Member
Karma: 547
Posts: 45995
Seattle, WA USA
 « Reply #3 on: January 26, 2011, 08:48:06 am » Bigger Smaller Reset

Quote
The most important part of my project is that the moving point B will be an Arduino in a box and will be handheld
Quote
I would like to have a precision of about + or - 10 cm for my project.
This just does not seem likely to be achievable. Is it the location of the handheld device that you are trying to determine? Relative to what? For what purpose?

The more details you can provide, the more likely it is that someone will have a suggestion for you.
 Logged

New York
Offline
Edison Member
Karma: 1
Posts: 1023
E != m*c^2
 « Reply #4 on: January 26, 2011, 09:49:53 am » Bigger Smaller Reset

What you are talking about is double integration, which is just too inaccurate with a single accelerometer on this hardware. Even single integration will have a growing error per unit time simply because of the lack of accuracy in this setup.
 Logged

0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
 « Reply #5 on: January 26, 2011, 10:31:53 am » Bigger Smaller Reset

Thanks to all.

In my mind I will have a fixed receiver that can be considered 0 point and a moving handheld that will start from point 0 and send by radio his movements to the fixed receiver.
I just need to know roughly the distance covered by the handheld in its movements, I don't need a real localization.
I also need to filter all the small movement and acceleration that a handheld device can have.

jezuz what do you mean with
Quote
double integration
?

I already told you that I'm a beginner, sorry .

 Logged

0
Offline
Newbie
Karma: 1
Posts: 26
Arduino rocks
 « Reply #6 on: January 26, 2011, 12:40:24 pm » Bigger Smaller Reset

OK, i think i get the idea of what you are attempting and is in fact used in the real world for submarines, however they use a whole load of accelerometers, some serious computing power (and a whole bunch of other stuff, which i wont bore you with). What others have said is very true regarding the difficulty of achieving the desired results with just an accelerometer.

My suggestion would be to focus on other methods, there are a number of alternatives, you could pull apart an old mouse take one of the scroll wheels out and attach it to your arduino, work out some distance calculations and hey presto (you could use an optical mouse as well), or you could do something even simpler, measure the time taken for the vehicle to cover a number of distances get an average m/s then just run the motors for a given time for each distance (remember, there will be an error which will be compounded over time), or finally use a stepper motor and drive it via that.

And finaly good luck with the whole project and make sure you keep things updated on your progress.
 Logged

0
Online
Shannon Member
Karma: 159
Posts: 10414
Arduino rocks
 « Reply #7 on: January 26, 2011, 09:58:04 pm » Bigger Smaller Reset

The double integration means that you can only hope to achieve anything meaningful if

a) you are taking all the readings within a very short space of time, perhaps less than a second,
b) you are using large accelerations (near the upper limit for the sensor) so that you get reasonable number of significant bits in the A->D conversion.

Basically you can use an accelerometer like this to measure gestures, say, but for steady-state position all you'll get is accelerating drift - unless you can find an accelerometer with _very_ high specs, I don't think this is viable.  Differential GPS is the way to go I think.  Also even with a high-spec accelerometer you have the problem of earth's gravity swamping the wanted signal...
 Logged

[ I won't respond to messages, use the forum please ]

Seattle WA
Offline
Full Member
Karma: 1
Posts: 208
Arduino rocks
 « Reply #8 on: January 27, 2011, 01:47:51 am » Bigger Smaller Reset

Getting position from acceleration is a double integration, so the error stackup is really evil. Getting good position data with a bolted down IMU (what you are trying to do) is a genuinely hard problem; the kind of accelerometers needed to do it are very expensive. IMUs capable of getting good performance over an hour or two without correction start at \$10k and go *WAY* up from there.
 Logged

Central Europe
Offline
Edison Member
Karma: 6
Posts: 1220
Use the Source, Luke.
 « Reply #9 on: January 27, 2011, 03:31:53 am » Bigger Smaller Reset

bluto74,

what kind of distances are you considering? Are you taking the hand-held device for a hike or is it just moving around in a room. For larger outdoor distances, GPS is probably the best solution. If you move around inside a room however, it won't give you a good enough resolution, you might be better of installing a few beacons and triangulate the position. Also, as mentioned above, if your receiver is crawling along the floor, you can use things like the detectors from a mouse or add some wheel-encoders to the chassis. That however won't help you if the device is carried around by an operator in his hand.

Korman
 Logged

0
Offline
Newbie
Karma: 1
Posts: 26
Arduino rocks
 « Reply #10 on: January 29, 2011, 07:00:54 am » Bigger Smaller Reset

I think i may have misunderstood your post slightly, i didn't appreciate that the device would be carried (ie. no wheels etc), in this case, may i suggest the possibility of using say 3 laser range finders, you should be able to hack them to get a serial signal to feed into your arduino, then simply measure the distances and time between measurements and you should be able to get a direction of travel and speed. The more range finders the better, the more readings per second the better. You could alternatively have a sweeping rangefinder (like a radar) and obtain not just movement, but the shape of the area around the device (like a radar), but the time gap between your distance readings may be too grate to get accurate readings.

Taken from wikipedia

"Precision
The precision of the instrument is determined by the rise or fall time of the laser pulse and the speed of the receiver. One that uses very sharp laser pulses and has a very fast detector can range an object to within a few millimeters."