Searching \ for '[EE] Accelerometer to measure rotation?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/io/sensors.htm?key=accelerometer
Search entire site for: 'Accelerometer to measure rotation?'.

Exact match. Not showing close matches.
PICList Thread
'[EE] Accelerometer to measure rotation?'
2006\02\22@193320 by Jake Brownson

picon face
I'm trying to measure relative rotation within a sphere. I have an ACA302
(http://www.star-micronics.co.jp/eng/products/sensor/se01.htm).

So, imagine holding a pole with an accel attached at the end, you can
spin in place (horizontal rotation), and raise the pole up and down
(vertical rotation), but the accelerometer stays a fixed radius
(approximately) from a central point. (Note that the accelerometer is
not always level)

Let's establish some terminology. The Z axis is pointing up from the
accelerometer, the X axis is pointing out from the middle of the
sphere and the Y axis is normal to the plane made by Z and X. The
origin is at the accel, and moves as the accel moves.

okay, I hope I've painted a good picture... here's how I'm trying to do it...

I'm assuming that the person's rotations will be _relatively_ slow and
smooth, so the vertical rotation can be measured by looking for an
acceleration of 1G between the Z and X axes. technically there are
some problems with this, but this will be close enough.

The horizontal rotation will be a little more tricky... theoretically
I can do a numerical 'integration':

1. Get the acceleration along the Y axis
2. Linear Velocity += sample period * acceleration
3. Angular velocity = linear velocity * 360/(2 * 3.14 * r) (or
something like that)
4. Horizontal rotation = sample period * Angular velocity
5. Repeat as fast as possible

I've been looking at the accel on the scope and it seems like for the
slow movements that would be used there is just a lot of noise. Also
I'm concerned that if the zero point for the accelerometer isn't
calibrated _exactly_ the drift will add up very quickly.

So is this idea insane? Do I need a more accurate accelerometer? Is
there another sensor that would be better?

I'm aware of digital compass modules, and that is a possibility,
however those need to be level to operate, and this is a portable
system so that might be a bit of trouble. I also have a very low
budget for this, and anything over $50 might be a problem.

By the way this is for a student project at Oregon Institute of
Technology if anybody is curious.

~Jake B

2006\02\23@075723 by olin piclist

face picon face
Jake Brownson wrote:
> I'm trying to measure relative rotation within a sphere. I have an
> ACA302 (http://www.star-micronics.co.jp/eng/products/sensor/se01.htm).

If you want to become a good engineer, you're going to have to learn to
describe things carefully.  This is a mess.  My freshman physics professor
would have thrown me out of class for a description like this.  You have a
picture in your mind, but are forgetting there are more degrees of freedom
than you are fixing in your description.  Frankly I'm rather confused about
your setup.

> So, imagine holding a pole with an accel attached at the end, you can
> spin in place (horizontal rotation),

So the pole is being extended horizontally?  What the heck is "spin in
place" supposed to mean, rotation along the pole's axis, or just that the
center of rotation is as the center of the pole?

> and raise the pole up and down (vertical rotation),

Think back to freshman physics.  Raising something up or down describes a
displacement, not a rotation.  I can't even imagine how to get "vertical
rotation" (rotation about the Z axis?) out of this.

> Let's establish some terminology.

Good idea.

> The Z axis is pointing up from the accelerometer,

OK, I'm with you there.

> the X axis is pointing out from the middle of the sphere

That narrows it right down!  Can you show me a vector that does NOT point
out from the middle of the sphere.  *Think* about it.

> and the Y axis is normal to the plane made by Z and X.

That's a good thing, and I'll even assume that you mean that X, Y, and Z all
meet at right angles and that the coordinate system is right handed.

Why couldn't you have said "If you're looking at the sphere in front of you,
X is to the right, Y goes out the back, and Z is up.", if in fact that's
what you meant.

> I'm assuming that the person's rotations

What person?  This is the first mention of a person in all this.  How is the
person related to or connected to the sphere?  What does a person have to do
with anything at all?  And whatever happened to the pole?  What's it got to
do with anything?

> will be _relatively_ slow and
> smooth, so the vertical rotation can be measured by looking for an
> acceleration of 1G between the Z and X axes.

What the heck is "vertical rotation"?  It doesn't look like it's rotation
about the Z axis.  Since you want to measure it with changes in orientation
of the X and Z axes, I guess it's rotation about the Y axis, but I don't see
how "vertical rotation" specifies that any more than rotation about X
assuming it doesn't mean rotation about Z in the first place.

I think what you're trying to say is that you want to track slow rotations
(slow meaning centrifugal "accelleration" can be ignored?) by finding the
gravity vector.  Yes, that works except that it can't tell you angular
position about the vertical axis.

> The horizontal rotation will be a little more tricky...

I guess, whatever "horizontal rotation" means.

> theoretically I can do a numerical 'integration':

Theorectially, yes.  However the gain errors, offset, and hysteresis of real
accellerometers will cause runaway drift.  Your positional error will
increase with the square of time.  In practise this kind of inertial
navigation will probably only be useful for a few 100mS to a couple of
seconds or so, depending on the quality of your accellerometers and your
accuracy requirements.  I'm assuming you are using MEMS devices.  There are
gyros and accellerometers that can do useful inertial navigation for much
longer times, but these units cost in the 10s to 100s $K.

> Also
> I'm concerned that if the zero point for the accelerometer isn't
> calibrated _exactly_ the drift will add up very quickly.

Right.

> So is this idea insane?

For some thresholds of sanity.  How accurate does it need to be?  For how
long after starting from a known position?

> I'm aware of digital compass modules, and that is a possibility,
> however those need to be level to operate,

Why?  You should be able to measure the direction of external magnetic field
lines.  At least this will have a fixed angular error which will not
accumulate over time.  Whether the external magnetic field lines are all
parallel over the operating range of your device is another question.

> I also have a very low budget for this, and anything over $50
> might be a problem.

Then inertial navigation for anything more than a second or so to maybe 5-10
degrees error is probably out of the question, and I'm probably being
generous.

> By the way this is for a student project at Oregon Institute of
> Technology if anybody is curious.

It sounds like a good project you will learn a lot from.  Learning how to
perform inertial navigation with recalibration from as many external clues
as possible will be an excellent lesson, whether the final product severs a
useful purpose or not.

In general, I think you have the right idea.  Try to use gravity and the
magnetic field to provide a fixed external reference and try to fill in the
cracks with inertial navigation.  This won't be trivial, but an excellent
lesson.

What year are you in?  What course is this for?  What is your major?


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2006\02\23@094304 by M. Adam Davis

face picon face
I'm going to assume for the sake of this discussion that a person is
holding a stick with the three axis accelerometer on the far end.  The
user is spinning around and pivoting the near end of the stick so the
far end (with the accel) can 'touch' any point on the surface of the
imaginary sphere the user is in.

Your description will work, but as you know you'll have a lot of error
over time for the "RPM".

Also note that centripetal force is going to drastically affect the Y
and Z accelerometers depending on the angle of the stick relative to
the angle of the spin.  However, this may be to your advantage since
the outward force of those two combine will also give you some
information about how fast the user is spinning.

You should expect to see several degrees of error per second on the
rotation while spinning at a constant rate.  You should expect to see
much more error when the spinning is starting or stopping.  Fo the
most part (assuming this is an entertainment toy, and not a remote
surgical robot control) these effects are probably not important, and
may even be used for creative purposes.

If you want to add to your workload and still keep it cheap, I'd
consider adding a phototransistor to the tip of the stick.  Put a
diffuse screen over it, and low pass filter it to drop frequencies
above 5Hz.  As the user spins around this will output a signal whose
lowest major frequency is very likely to be the spin rate of the user.
The diffuse screen helps give the same signal while the user "raises"
and "lowers" the stick.  Since you already know the ballpark spin rate
due to the accelerometer you can use that to digitally filter the
signal and give yourself a synchronizing pulse to correct the
accelerometer's error.

Sounds like fun.  I've always wanted to do essentaily this with soft
foam swords for play fighting.  Video tape it, and perform automatic
rotoscoping.  Keep score of electronic hits, perform accurate sound
effects, etc.  But it's near the bottom of a very long list of
interesting projects...

Good luck!

-Adam


On 2/22/06, Jake Brownson <spam_OUTjbrownsonTakeThisOuTspamgmail.com> wrote:
{Quote hidden}

> -

2006\02\23@095128 by John Ferrell

face picon face
I probably missed the whole point but my first read on this sounds a lot
like a track ball.

John Ferrell
http://DixieNC.US

{Original Message removed}

2006\02\23@145738 by Jake Brownson

picon face
I appolagize if my description wasn't clear, but it sounds like you
got the basic right idea.

> > So is this idea insane?
>
> For some thresholds of sanity.  How accurate does it need to be?  For how
> long after starting from a known position?

Accurate to within ~5 deg or better, for at least ~10 mins.

> > I'm aware of digital compass modules, and that is a possibility,
> > however those need to be level to operate,
>
> Why?  You should be able to measure the direction of external magnetic field
> lines.  At least this will have a fixed angular error which will not
> accumulate over time.  Whether the external magnetic field lines are all
> parallel over the operating range of your device is another question.

I meant to specify 2-axis compass modules (which we can afford), from
what I've read in the datasheets I understand that they must be level
and calibrated to be accurate, perhaps this is only true if you
actually care where North is?

> What year are you in?  What course is this for?  What is your major?

I'm in my 4th year, but have one year remaining after this one. I'm
working on a BS in Computer Engineering Tech, BS in Software
Engineering Tech, AE in Electronics Engineering Tech, and minor in
math. I think I've found that I enjoy the hardward side of things much
more than the high level software. This is for a 'Junior' Project
class, a year long 5 person team project class.

The entire project is actually a nerf targeting system. We're mounting
a distance sensor, wind sensor, and rotation/incline sensor system
(what I'm working on right now) so that the user can aim at the
target, push a button and the required trajectory will be calculated
and the user will then be guided to the correct rotation and
inclination to fire. The gun should be operated as normal (on the
shoulder) so we decided not to just use a tripod (which would have
made it a bit easier). So yes it's a pretty fun project :). This
project was inspired by the airsoft (think paintball) team on campus
hoping to make some sort of mortor system.

We've ordered a 2 axis compass module that has a nice I2C interface, I
think we're going to give up on using the accel for rotation unless
somebody here give me some good ideas. It would be a fun project for
later though. Maybe a stick w/ an accel at both ends that can be moved
around in more than just a sphere.

Thanks for your responce,

~Jake B

2006\02\23@150139 by Jake Brownson

picon face
> I'm going to assume for the sake of this discussion that a person is
> holding a stick with the three axis accelerometer on the far end.  The
> user is spinning around and pivoting the near end of the stick so the
> far end (with the accel) can 'touch' any point on the surface of the
> imaginary sphere the user is in.

This is exactly right, how concise :)

> Your description will work, but as you know you'll have a lot of error
> over time for the "RPM".

Actually, the RPM will be about 0. This isn't meant to be a continuous
rotation, but just somebody moving the stick around the sphere in a
realtively smooth, slow way. I didn't make that clear.

> Also note that centripetal force is going to drastically affect the Y
> and Z accelerometers depending on the angle of the stick relative to
> the angle of the spin.  However, this may be to your advantage since
> the outward force of those two combine will also give you some
> information about how fast the user is spinning.

I don't think this will be a problem because the rotation isn't
actually continuous.

{Quote hidden}

I really like that idea, I'll have to keep it in mind, but again, as
the rotation isn't continuous...

~Jake B

2006\02\24@074946 by olin piclist

face picon face
Jake Brownson wrote:
>>> So is this idea insane?
>>
>> For some thresholds of sanity.  How accurate does it need to be?
>> For how long after starting from a known position?
>
> Accurate to within ~5 deg or better, for at least ~10 mins.

That is many orders of magnitude beyond what is achievable by itegrating
MEMS gyros and accellerometers.  So to answer you question, yes.

> I meant to specify 2-axis compass modules (which we can afford),

That just means it's measuring the magnetic field along two basis vectors.
That may be enough, but you don't have to buy a "compass module" to get the
magnetic field.  You could use your own Hall effect sensors, which is what
is in the compass modules.  There is nothing stopping you from using three
orthogonal Hall effect sensors, although getting the horizontal component of
the magnetic field will be useful too since you can use gravity to find the
up direction.

{Quote hidden}

So why do you need to measure the rotation about the vertical axis at all?
Won't the gun rotation with the sight since it's on your shoulder?  Why not
instead of "Show me what to hit and I'll compute the firing parameters"
instead "I'm showing you what you'll hit if you fire now."?  Then the signt
and gun can be rigidly connected and angular position in the horizontal
plane becomes irrelevent.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2006\02\24@112800 by Jake Brownson

picon face
> That is many orders of magnitude beyond what is achievable by itegrating
> MEMS gyros and accellerometers.  So to answer you question, yes.

That's what I had started to suspect, I guess there's just no real way
to manage an exponentialy increasing error like that.

> > I meant to specify 2-axis compass modules (which we can afford),
>
> That just means it's measuring the magnetic field along two basis vectors.
> That may be enough, but you don't have to buy a "compass module" to get the
> magnetic field.  You could use your own Hall effect sensors, which is what
> is in the compass modules.  There is nothing stopping you from using three
> orthogonal Hall effect sensors, although getting the horizontal component of
> the magnetic field will be useful too since you can use gravity to find the
> up direction.

For now I think I'll go w/ a canned system due to time constraints.

{Quote hidden}

I think that approach would be much more difficult. The system would
have to know the topogrophy of the imediate area. It's true that
rotation detection about the vertical axis would be irrelivant, and
this would work great if we assumed level ground. Might have been a
good way to go, but it's a little late to change now.

~Jake B

2006\02\24@120103 by Peter

picon face


On Thu, 23 Feb 2006, John Ferrell wrote:

> I probably missed the whole point but my first read on this sounds a lot like
> a track ball.

Imho he is trying to make a low cost strapdown platform. That could take
a while ;-)

Peter

2006\02\24@125909 by M. Adam Davis

face picon face
On 2/24/06, Jake Brownson <.....jbrownsonKILLspamspam@spam@gmail.com> wrote:
> For now I think I'll go w/ a canned system due to time constraints.

Use the two axis compass module, and attach it to your unit with a
pendulum.  It will always remain level with respect to ground (some
swinging shouldn't affect the output drastically).  A universal joint
is fairly inexpensive and can be found at most tool stores in the
socket wrench accessories area::
http://www.mcmaster.com/catalog/112/gfx/small/5521ap11s.gif

Combine that with a two axis accelerometer to determine angle with
respect to ground and you'll have a fairly straightforward and
complete knowledge of exactly where the nerf gun is pointing.

The advantage to these methods is there is no accumulated error -
you're measuring a fixed gravitational field, and a fixed magnetic
field.

Of course, the accuracy and precision of your sensor readings is the
key to getting adequate aim, and is where you're going to run into the
most trouble.

Alternately, make the gun barrel about 300ft long, and attach GPS
devices to both ends.

Good luck!

-Adam

2006\02\24@132652 by David VanHorn

picon face
It's been a long time since I messed with this, but I had some success with
determining orientation in a rocketry project using a three axis compass.

The compass determined orientation by watching "north" move around.

2006\02\25@140642 by Peter

picon face

Required pointing accuracy in azimuth is +/-1 degree at 10 meters (30
feet) for a 15cm radius (1 foot diameter) target. Do you have a sensor
that can manage that good ? (actually about twice as good to account of
other error sources) ? I think not. Crossbow for example are rated at
+/- 2 degrees.

http://www.xbow.com/General_info/gyro_guide.htm

Peter

2006\02\27@132150 by M. Adam Davis

face picon face
Is that rated at +/- 2 degrees accuracy, or precision?  Since this
application is for relative movement then one may be able to use it
for better than +/- 1 degree if the precision is high enough and the
noise is low enough, regardless of the accuracy.  In this case
linearity and repeatability play a larger role.  It doesn't matter if
it reports 0 degrees when it's pointing north - what matters is that
if it is then rotated 2 degrees it reports that it's moved 2 degrees.

The magnetic field sensors one can find now may be adequate, but might
require some amount of testing and calibration.

-Adam

On 2/25/06, Peter <plpspamKILLspamactcom.co.il> wrote:
>
> Required pointing accuracy in azimuth is +/-1 degree at 10 meters (30
> feet) for a 15cm radius (1 foot diameter) target. Do you have a sensor
> that can manage that good ? (actually about twice as good to account of
> other error sources) ? I think not. Crossbow for example are rated at
> +/- 2 degrees.
>
> http://www.xbow.com/General_info/gyro_guide.htm
>
> Peter
> -


'[EE] Accelerometer to measure rotation?'
2006\04\03@102150 by Bill & Pookie
picon face
A harmless Nerf, sure...

Didn't Nobel claim his invention was to smooth the rough edges from stones?

Pookie

----- Original Message -----
From: "Jake Brownson" <.....jbrownsonKILLspamspam.....gmail.com>
To: "Microcontroller discussion list - Public." <EraseMEpiclistspam_OUTspamTakeThisOuTmit.edu>
Sent: Thursday, February 23, 2006 12:57 PM
Subject: Re: [EE] Accelerometer to measure rotation?


> The entire project is actually a nerf targeting system.>
> ~Jake B

2006\04\03@154654 by Peter

picon face

On Mon, 3 Apr 2006, Bill & Pookie wrote:

> A harmless Nerf, sure...
>
> Didn't Nobel claim his invention was to smooth the rough edges from stones?

But what is a Nerf ? This is not very enlightening:

http://www.google.com/search?hl=en&q=define%3A%20nerf

Peter

2006\04\03@162400 by William Chops Westfield

face picon face

On Apr 3, 2006, at 12:46 PM, Peter wrote:

>
>> A harmless Nerf, sure...
>
> But what is a Nerf ? This is not very enlightening:
>
Really?  You should try http://nerf.com

A selection of toys featuring projectiles made from a mid-strength
foam.  Most famously, weaponry shooting foam darts, "rockets", balls,
and so on.  But also "sports balls" somewhat lighter and softer than
the real things.

http://www.hasbro.com/nerf/pl/page.nstrike_blasters/dn/default.cfm

(and during the search, I found this interesting result from a
"customer service" survey here:
http://www.vocalabs.com/resources/blog/C1045710889/index.html )

Another kind of customer service experience
Fri - November 18, 2005 09:31 AM
My wife needed a Nerf gun to take to work. Don't ask.

So last night I found myself in a local Toys 'R' Us. I would have
thought it was Retailing 101 to make it easy to find things in a big
store, but apparently Toys 'R' Us management thinks otherwise. So after
a few minutes of fruitless wandering the aisles, I spotted an employee.

"Excuse me, can you tell me where to find Nerf guns?"

The man's eyes lit up. "Oh yeah, I know where the Nerf guns are. I've
got a whole collection at home."

"A regular Nerf arsenal, eh?"

"Every Nerf gun ever made. I even have the Nerf bazooka."

He led me to the aisle with about a dozen different models of Nerf
armaments, ranging from a Nerf crossbow to the giant combination Nerf
rocket launcher with two detachable Nerf machine guns. He clearly
couldn't wait to share his depth of knowledge and experience in all
things that fling Nerf.

"This one is a good basic set. It has six Nerf darts which glow in the
dark. Or this model has a laser sight, with a laser pointer built into
the gun. This one can shoot either a barrage of darts, or a big Nerf
grenade. Is this a gift for someone?"

"Actually, it's for my wife," I said. "She needs to take it into work."

His eyes lit up with something approaching awe: as though I had told
him that Shangri-La is real and located in the Western suburbs of
Minneapolis. "Wow, what kind of place does your wife work?"

"It's a software company. They have programmers who like too blow off
steam."

"Here, this model is pretty cool. It's based on a German-designed
machine gun..."

In the end I chose one of the simpler models, but I felt that I had
made a truly informed choice, and I came out knowing far more about
Nerf weaponry than I ever expected or wanted to. The employee who
helped me was one of those rare gems in today's big box retail world: a
true enthusiast. Odds are, he took the job at Toys 'R' Us at least in
part to feed his Nerf habit, and doesn't get a whole lot of recognition
for his unique knowledge base. Frankly, it's hard to see how the
company could really make use of such a narrow specialty.

But it certainly made this trip unexpectedly interesting for me.

Posted by Peter Leppik

2006\04\05@171405 by Jake Brownson

picon face
Thought I'd add a little update to this thread. The project is progressing
fairly well. We are still using the accelerometer as an incinometer, and are
using a $50 compass module for the rotation information. Most of it is
basically working with the exception of the wind sensor. We have 4 more
weeks to get it working completely.

I'm using PICos18 (http://www.picos18.com) which is turning out very nicely
btw, check it out.

~Jake B

2006\04\05@221833 by Peter Todd

picon face
On Wed, Apr 05, 2006 at 02:14:04PM -0700, Jake Brownson wrote:
> Thought I'd add a little update to this thread. The project is progressing
> fairly well. We are still using the accelerometer as an incinometer, and are
> using a $50 compass module for the rotation information. Most of it is
> basically working with the exception of the wind sensor. We have 4 more
> weeks to get it working completely.

One question for you... With your compass module, how fast a rotation
can it measure? Is it an instant thing, or sluggish?

--
petespamspam_OUTpetertodd.ca http://www.petertodd.ca

2006\04\12@212520 by Jake Brownson

picon face
it's pretty fast. For this we don't need it to be very fast, so I haven't
done any tests to see exactly how fast it can go, but there isn't any
noticible delay between rotating the thing and the rotation showing up, at
least at human speeds. Here's the link

http://www.robot-electronics.co.uk/shop/Compass_CMPS032004.htm

really easy to interface w/ too, great module.

On 4/5/06, Peter Todd <@spam@peteKILLspamspampetertodd.ca> wrote:
{Quote hidden}

> -

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...