Time measurement/Using an accelerometer to calculate current position.
JoMo
Posts: 19
Hi,
I have a·question about making time measurements. Which·may be painfully obvious to do. (It's just that I am good at missing the obvious, especially the·painful variety).
Here is the scenario:
I want to measure the distance traveled using a single·3-Axis accelerometer to determine my position
(relative to the initial start of events) and·display that·position in real-time (every few milliseconds).
The entire event would take place in a small area, a room for example, and would last a only a few minutes.
I know that the method of using an accelerometer to do determine distance·will·propagate any errors introduced, but I hope that won't be a big problem·if the·distance traveled and·over all begin/end elapsed time is relatively short (distance being reset at the start of each run time).
Since I would like·the position granularity to be smallish (to the centimeter or so) that leaves GPS out.
Alluding to a side question: How would you·go about measuring the current position of something·during a·walkabout in a room? Since GPS won't help me, the accelerometer was my next approach.
But my main question here is:
Using the Prop, what would be the best method for measuring the time from start of the event
so that I can use that value to calculate the distance traveled in real-time?
Could I simply start a new cog that waits every nth milliseconds which then increments a counter?
Where if·n=10·then 10 counter hits = 100 msecs.· Is there a better way?
thanks
-Joe
·
I have a·question about making time measurements. Which·may be painfully obvious to do. (It's just that I am good at missing the obvious, especially the·painful variety).
Here is the scenario:
I want to measure the distance traveled using a single·3-Axis accelerometer to determine my position
(relative to the initial start of events) and·display that·position in real-time (every few milliseconds).
The entire event would take place in a small area, a room for example, and would last a only a few minutes.
I know that the method of using an accelerometer to do determine distance·will·propagate any errors introduced, but I hope that won't be a big problem·if the·distance traveled and·over all begin/end elapsed time is relatively short (distance being reset at the start of each run time).
Since I would like·the position granularity to be smallish (to the centimeter or so) that leaves GPS out.
Alluding to a side question: How would you·go about measuring the current position of something·during a·walkabout in a room? Since GPS won't help me, the accelerometer was my next approach.
But my main question here is:
Using the Prop, what would be the best method for measuring the time from start of the event
so that I can use that value to calculate the distance traveled in real-time?
Could I simply start a new cog that waits every nth milliseconds which then increments a counter?
Where if·n=10·then 10 counter hits = 100 msecs.· Is there a better way?
thanks
-Joe
·
Comments
You're probably not going to get the kind of accuracy you want for "dead reckoning" because the accelerometers you're likely to use are not that accurate.
You might be better off using a combination of IR distance sensing and ultrasonic distance sensing (like the PING) since there are walls usually within range. If there are a lot of obstacles (like people or furniture) that might not work that well either.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Thanks for the suggestions and information.
I am using this accelerometer:
Triple Axis Accelerometer Breakout - LIS3LV02DQ
http://www.sparkfun.com/commerce/product_info.php?products_id=758
I can't·use ultrasonics or IR, as potentially are·may be no landmarks to ping.
thanks
Joe
I studied your exact issue for a couple of days with a dual axis, mems type unit from RadioShack. What I found was that there was a patterned error, part of which was no doubt due to the fact that I wasn't compensating for ambient temperature...In fact, without correction I felt that the unit could be used as a better temperature sensor than as an accelerometer... it is a nice problem, more than worth your time.
(I think we probably also have to correct for atmospheric pressure too but I have no idea how to do either right now[noparse]:)[/noparse]. I intend to get back to the issue one of these nights.
The spec on your unit is .025 percent per degree C... with a footnote... " typical specifications are not guaranteed." You have to convert that error into a per second acceleration error and then you can compute the distance error by integrating over time... my guess is that you will end up having to settle for short runs or really dealing with the engineering challenge.
But if you are just talking about short runs around a room with uniform temperature, then you can zero out the errors, leaving you with the problem of distinguishing between acceleration and tilt, which is not trivial. Martin Hebel was looking at using the Parallax ultrasound pinger for short distance/high accuracy measurements, but I don't know if he got there or got deflected. I want to do this for my car, so I'm considering placing a couple of pingers at the corners to see what it will do for me.
I also never figured out which temperature to measure... I think a thermistor on the chip is the way to go.
Rich
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style
Paul-
The Optical·Mouse idea is an interesting one. One of the challenges there·would be to extend the focal point·as my application is a hand held device. I like the concept though.
Simon-
Thanks, not sure·how much of a·problem the ambient·temperature is yet with this device, but I will keep that in mind.
rjo_-
yeah,·I figured if I·had short runs I could mitigate the errors somewhat.
The temperature issue I will need to investigate.
As for tilt vs translation,·adding·a gyroscope came to mind, then I found this:
·http://www.sparkfun.com/commerce/product_info.php?products_id=741
Can't find any docs on this as a whole unit so I suspect the onboard·gyroscope and an accelerometer are not integrated with each other in any meaningful way, so I could just get a gryo separately.
As usual this is turning out to be trickier than I had hoped.
thanks
-Joe
·