Ironically, I think the best testament to the program [Dean Kamen] founded and his ideals wouldn't be if he won a Nobel Prize. It would be if you did. - Kevin Sevcik [more]
 Chief Delphi Accelerometer integration
 User Name Remember Me? Password
 CD-Media CD-Spy
 portal register members calendar search Today's Posts Mark Forums Read FAQ rules

#1
01-22-2006, 06:13 AM
 Leav FTA - Israel District AKA: Leav Oz-Ari no team Team Role: Alumni Join Date: Dec 2004 Rookie Year: 2005 Location: Technion, Haifa, Israel Posts: 776
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
 acceleration.xls (17.0 KB, 160 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
01-27-2006, 01:44 AM
 doubleslash driven AKA: Justin Huang FRC #0649 (Saratoga Robotics) Team Role: Leadership Join Date: Jan 2005 Rookie Year: 2005 Location: Saratoga, CA Posts: 11
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
01-27-2006, 08:48 AM
 KenWittlief . no team Team Role: Engineer Join Date: Mar 2003 Location: Rochester, NY Posts: 4,211
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
01-27-2006, 10:43 AM
 Leav FTA - Israel District AKA: Leav Oz-Ari no team Team Role: Alumni Join Date: Dec 2004 Rookie Year: 2005 Location: Technion, Haifa, Israel Posts: 776
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
01-27-2006, 10:56 AM
 KenWittlief . no team Team Role: Engineer Join Date: Mar 2003 Location: Rochester, NY Posts: 4,211
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.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     User Announcements FIRST     General Forum         FIRST E-Mail Blast Archive     Rumor Mill     Career     Robot Showcase Technical     Technical Discussion     Robotics Education and Curriculum     Motors     Electrical         CAN     Programming         NI LabVIEW         C/C++         Java         Python     Control System         FRC Control System         Sensors     Pneumatics     Kit & Additional Hardware     CAD         Inventor         SolidWorks         Creo     IT / Communications         3D Animation and Competition         Website Design/Showcase         Videography and Photography         Computer Graphics     National Instruments LabVIEW and Data Acquisition         LabView and Data Acquisition Competition     Unsung FIRST Heroes     Awards         Chairman's Award     Rules/Strategy         Scouting         You Make The Call     Team Organization         Fundraising         Starting New Teams         Finding A Team         College Teams     Championship Event     Regional Competitions     District Events     Off-Season Events     Thanks and/or Congrats     FRC Game Design     OCCRA         OCCRA Q&A         OCCRA Programming Other     Chit-Chat         Games/Trivia             Fantasy FIRST     Car Nack's Corner     College & University Education     Dean Kamen's Inventions     FIRST-related Organizations         Western Region Robotics Forum         Southern California Regional Robotics Forum         The Blue Alliance             Video Archives     FIRST In the News...     FIRST Lego League         Lego Mindstorm Discussion     FIRST Tech Challenge     VEX         VEX Robotics Competition         VEX IQ     Televised Robotics     Math and Science         NASA Discussion ChiefDelphi.com Website     CD Forum Support     Extra Discussion

 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 02:40 AM.

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

 -- English (12 hour) -- English (24 hour) Contact Us - Chief Delphi - Rules - Archive - Top