Shop OBEX P1 Docs P2 Docs Learn Events
Accelerometer Questions — Parallax Forums

Accelerometer Questions

ry.davidry.david Posts: 63
edited 2012-01-11 17:37 in Propeller 1
Hi,

I am new to the propeller, and hopefully I recieve it today in the mail! My project is a datalogger for my car (logging MAP, throttle position, RPM, etc), and wanted to have acceleration data from it to.· I was able to get some free samples of the ST accelerometer, E-LIS3L02AS4.·I read up on them and was thinking to try and cancel out some of the noise and error, I'd use two accelerometers.· I don't know if this would help or not.· If it does, would it be better to mount them perpendicular to each other or parallel?

Also, does anyone know if that sensor I sampled would be semi-accurate for inertial navigation (i.e. double integrate acceleration data to get position data)?· I know the longer you try and do that the more drift you get.· I want to be able to record an autocross run (under a minute), and within a couple of feet would be amazing.·

My goal is to be able to have a visual of my path through the course, color coded based on the magnitude of the acceleration vector.· Then put the datalogger in my buddy's car, and see what lines he's taking and how he is doing so much better! tongue.gif

Thanks for your time,
Ryan

Comments

  • RichardFRichardF Posts: 168
    edited 2007-06-15 16:37
    Ryan,
    A great idea and use for the Propeller chip. I don't think you are going to get a definitive answer about the inertial navigation question. Just do it, and see how it works. It will be fun and not very expensive to try.
    Regards,
    Richard
  • BergamotBergamot Posts: 185
    edited 2007-06-15 17:20
    ry.david said...
    double integrate acceleration data to get position data

    As far as I know, the only accelerometers capable of that kind of precision are $100,000 military-grade ones used for missile guidance.

    Even if I'm wrong, this assumes that the accelerometer is always pointing in the same direction. If the car turns, your data becomes meaningless in a real-world position sense.
  • ry.davidry.david Posts: 63
    edited 2007-06-15 18:53
    Thanks for the replies. I just got my propeller a few hours ago in the mail, and got the 'Hello World' working. I will eventually try it, but wanted to see if anybody had done it before. Even if the inertial navigation doesn't work, I'll still easily get the value out of it by logging sensors on my car.

    As far as finding the postion, since this is about a $50 project, I'm expecting about $50 accuracy, haha. Unfortunatley, a student doesn't have $100,000 to blow on a sensor.· I was thinking since I am using a two-axis accelerometer, then I can make them into a vector (basically pygathorean theorem), therefore finding both new Y and X cordinates based off last position.

    Thanks again
    Ryan
  • parskoparsko Posts: 501
    edited 2007-06-16 10:39
    Ryan,

    I agree with Berg. You won't get the precision that you want. But, i recognize that you're doing SCCA. I also recognize that you're looking for bragging rights...

    The double integration thing wont' be precise, but if you add a RTC with .01sec accuracy, and use it to trigger your accelerometer readings, you would effectively get the same thing. Plus, you'll have legit data you'll be able to use to make yourself faster.

    Keep us posted, maybe I'll steal your code [noparse];)[/noparse]

    -Parsko

    BTW - I appreciate the $50project => $50 accuracy comment!!!!!!! That is one profound hobbiest statement!!
  • ry.davidry.david Posts: 63
    edited 2007-06-19 04:01
    Thanks for your input.· I looks like the INU-stuff I have to try several different things, which I am excited to get any decent readings out of.· Ok, I think I am going to hijack my own thread now- sorta...

    I started hacking apart the Graphics Demo, and designing my "dashboard".· I want to have one cog display data, one collect sensor variables, one write data to SD, and one to do any math I need to do. I have my display as far as I can go right now, and want to be able to pass values to the "display cog" and have it update with the new values.· I tried creating a new process on a seperate cog and have it just increment values, but I cannot get them to pass through to the other cog.· How would I go about doing this?·

    Also, does anyone have a cheat sheet for text colors?· I only can get black, white and blue.

    I have attatched my current project.· Please be gentle, blush.gif , I've only have a few hours on the propeller.

    Thanks a lot!
    Ryan
  • JamesxJamesx Posts: 132
    edited 2007-06-19 11:23
    Ryan:

    As long as you are at it, you might consider an electronic compass. This could be used to stabilize or orient the vehicle in 2-D space, and then the accelerometer could work off of that known orientation.

    Also, you wrote of comparing results from two different drivers: I'm working on a project where the Propeller connects to the outside world via Wi-Fi. (Lantronix) Once you get your data logger working, you could make two data loggers, one for each driver. Then, get them communicating with each other, such that you'd be able to see the other driver's data real-time, as you watch your own! (is the course safe enough to be distracted with all this)

    Jim C
  • ry.davidry.david Posts: 63
    edited 2007-06-19 12:34
    Well, in autocross one car is out on the track at a time. And, the people are split up between working the course first, or driving first. Usually we try and get in opposite work/drive times so we can take pictures or just watch each other. So, I don't think I need realtime communication between cars. Maybe realtime from the car -> person watching. That would be really cool. Haha, now you have me distracted with all of the stuff the propeller is capable of!

    I'll have to check out the compasses. I'm writing down all of the posibilities to do this, so I can test and see which is the most accurate. I recieve my accelerometers today, so I can start trying. I still don't know how to pass variables around from cog to cog.

    Thanks again,
    Ryan
  • simonlsimonl Posts: 866
    edited 2007-06-19 13:36
    Hi Ryan,

    Passing variables between cogs is something I want to do too. I think the answer is in EXAMPLE 17 of http://forums.parallax.com/showthread.php?p=574524 (Thanks to Dave Scanlan for the excellent examples).

    HTH.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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 smile.gif
  • LawsonLawson Posts: 870
    edited 2007-06-20 00:41
    I think the accelerometer data with a good time stamp will be quite useful on it's own. If you can get someone to take video of all the runs the data logger is on that'd be even better. Gear shifts and brake application "should" give a good way to line up the two sets of data. For IMU use just be super careful of any DC offset in the accelerometers. (the integration suppresses noise but amplifies DC offset) Usually I've seen compasses used to cancel drift in IMU gyros.

    marty
  • ry.davidry.david Posts: 63
    edited 2007-06-20 02:50
    simonl - Awesome! Exactly what I was looking for.· Thank you so much...

    Lawson - I was looking at some compass IC's earlier today.· I think I will have at least one other IMU device in conjunction with the accelerometers. BTW, they arrived today, so I am going to have to practice my SOIC soldering skills..

    Now that I am thinking about it, I can tap into the rear ABS sensors (thats right, REAR... haha FWD) to keep the distances in check.· Not the most accurate, but would be a good sanity check.

    Thanks for everyone's help!
    Ryan

    Post Edited (ry.david) : 6/20/2007 2:54:58 AM GMT
  • ry.davidry.david Posts: 63
    edited 2007-06-25 22:17
    Ok, does any one have any examples using either TLC0831 or TLC0838 ADC's?· I haven't sat down with the pinouts, but I haven't have an idea how to go from ADC -> propeller, both software and hardware.

    Side note/Project update:· Video output, VGA, Mouse, Keyboard, and SD card are all attatched/soldered and coded in.· Next goes on the accelerometers, and I think I am going to have to order a gyro. Now I just need data...

    Thanks in advance!
    Ryan
  • RafRaf Posts: 3
    edited 2007-09-24 13:41
    Ryan,

    Did you ever get the ST E-LIS3L02AS4 accelerometers working ?


    Raf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you're not crashing, then you're not trying hard enough.

    ·
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-24 16:47
    The accuracy of innertia navigation is generally understimated..
    The formula

    s = a/2 * t^2

    gives you the worst case global error

    a_error = n*a + m, with - maybe - n = 1% and m = 0.01 m/s^2

    For a = 2m/s^2 and t = 100 s

    s_mean = 10 km

    s_max =1.01 m/s^2* 10,000 + 0.01* 10.000= 10,1km + 0,1 km

    = 200 m @ 10 km
  • ry.davidry.david Posts: 63
    edited 2007-09-27 14:48
    Yes, I did get those ST accels working, but I ended up ordering and currenting using a 2DOF IMU breakout from Sparkfun
  • ericcoericco Posts: 1
    edited 2012-01-11 17:37
    Dear Bergamot,
    We are the China supplier for the below products:
    • Accelerometer (Quartz)
    • Dynamical Tuned Gyro
    • MEMS Gyro
    For Application of our inertial sensor (Accelerometer, Dynamical Tuned Gyroscope), We supply to our clients in China Aerospace, Industry, civil application, and have mainly supplied foreign customers for oil & gas directional drilling fields (Components for borehole surveying instrument, MWD Tools, civil aviatio, etc.)
    Should you have any interest or need, please do not hesitate to contact me.
    Thanks & Best regards,

    Jessica Zhang
    Ericco International Limited
    Address: Room 1603, Sigma mansion, GaoXin Road,Xi’An,China
    Phone: 029-87545860 Ext.603
    Fax:029-87545860/87545861/87545863-601
    E-mail: ericco186@163.com
    MSN:ericco186@163.com
Sign In or Register to comment.