Go to Post i wish ours was done so i could get some sleep - keagara [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-22-2006, 06:13 AM
Leav's Avatar
Leav Leav is offline
Spud Gun Division
AKA: Leav Oz-Ari
FRC #3316 (D-Bug) & FRC #2630 (ThunderBolts)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Technion, Haifa, Israel
Posts: 732
Leav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond repute
Send a message via ICQ to Leav Send a message via AIM to Leav Send a message via MSN to Leav Send a message via Skype™ to Leav
Accelerometer integration

Hey,
Despite this thread, I want to use accelerometers for a bit of navigation this year.

In the attached excel spreadsheet, you can see that using the angles 0degrees 45degrees and 90degrees, I have found that the relation between the real acceleration and the output value is non linear and appears to be something like:
y=(a^3)/12+500
where a is the real acceleration and y is the sensor value.

My questions:
1)How can I convert this to a more linear connection? (do i need to?)
2)How do I integrate the values over time to get speed and more importantly distance?


Thanks!
-Leav
Attached Files
File Type: xls acceleration.xls (17.0 KB, 153 views)
__________________
"We choose to build robots this season and do the other things; Not because they are easy, but because they are hard."
-Paraphrasing JFK

Participated in FIRST as a student: 2005-2006 (But still learning every season!)
Mentor: 2008 - ? (Team 2630 2008-2011, and Team 3316 since 2013)
Engineer: 2011 - ? (B.Sc. and M.Sc. in Mech. Eng. from the Technion IIT)
FIRST Volunteer - 2007 - ? (MC, FTA, FIRST Aid etc.)

Last edited by Leav : 01-22-2006 at 06:14 AM. Reason: added excel file
  #2   Spotlight this post!  
Unread 01-27-2006, 01:44 AM
doubleslash's Avatar
doubleslash doubleslash is offline
driven
AKA: Justin Huang
FRC #0649 (Saratoga Robotics)
Team Role: Leadership
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Saratoga, CA
Posts: 11
doubleslash is an unknown quantity at this point
Send a message via AIM to doubleslash
Re: Accelerometer integration

Integrating the acceleration is pretty straightforward; dimensional analysis tells you that all you need to do is multiply your acceleration by your time element (if you're in user_routines, that would be 0.0262 seconds) to get velocity, and multiply your velocity by your time element to get your distance.

I would be careful with that, though, I've been having quite a time trying to get the acceleration to integrate accurately.
__________________
I, I'm allergic to bee stings. They cause me to uh, die.
  #3   Spotlight this post!  
Unread 01-27-2006, 08:48 AM
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Accelerometer integration

to get the real equation you have to remember that acceleration is a vector - it has magnitude and direction

when the bot is not moving the magnitude is 1g, and its pointing straight down

when the bot is accelerating forward at 1g on a level surface, the magnitude the sensor will read is (1^2 + 1^2)^ 0.5 = SQRT(2) and the direction will be 45 forward from -Z.

so the forward magnitude of the robots total acceleration vector should always be = SQRT(sensor^2 - 1^2) [units = g's]. You must keep track of the direction through the SQ and SQRT calculations.

note that 1^2 assumes the sensor reading has been scaled so that 9.8M/S^ = 1g. also, if the robot is not on a level surface you must know the angle that it is tilting to separate out gravity and motor acceleration.
  #4   Spotlight this post!  
Unread 01-27-2006, 10:43 AM
Leav's Avatar
Leav Leav is offline
Spud Gun Division
AKA: Leav Oz-Ari
FRC #3316 (D-Bug) & FRC #2630 (ThunderBolts)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Technion, Haifa, Israel
Posts: 732
Leav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond repute
Send a message via ICQ to Leav Send a message via AIM to Leav Send a message via MSN to Leav Send a message via Skype™ to Leav
Re: Accelerometer integration

I may have gotten things all wrong but I was under the impression that the accelerometer tells you the magnitude of acceleration on a given axis.

so if you know how you mounted the accelerometer you would know the acceleration direction relative to the robot (though you would miss any part of the acceleartion perpendicular to the axis that the accelerometer was measuring unless you had two gyros or a dual-axis accelerometer)

-Leav
__________________
"We choose to build robots this season and do the other things; Not because they are easy, but because they are hard."
-Paraphrasing JFK

Participated in FIRST as a student: 2005-2006 (But still learning every season!)
Mentor: 2008 - ? (Team 2630 2008-2011, and Team 3316 since 2013)
Engineer: 2011 - ? (B.Sc. and M.Sc. in Mech. Eng. from the Technion IIT)
FIRST Volunteer - 2007 - ? (MC, FTA, FIRST Aid etc.)
  #5   Spotlight this post!  
Unread 01-27-2006, 10:56 AM
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Accelerometer integration

Leav,

you are correct - if the accelerometer is positioned with its axis horizontal, then gravity will not affect the reading, unless the robot tilts (climbs a ramp).

For some reason I had tilt-sensing on my mind and got the two applications mixed together.


I dont understand your original equation at all: a^3 ?! Which accelerometer are you using, I will look up the data sheet and see if I can make sense of this.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accelerometer Timer Question psquared Programming 3 02-12-2005 12:34 AM
URGENT! We need help with the accelerometer lkdjm Electrical 5 02-11-2005 03:42 PM
Accelerometer Wiring/Input DAN THE MAN Control System 1 02-06-2005 07:02 PM
Accelerometer vs Gear Tooth Sensors zdeswarte Electrical 4 01-22-2005 02:35 PM
Example accelerometer code released. Kevin Watson Programming 0 01-20-2005 02:45 AM


All times are GMT -5. The time now is 05:46 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi