Connect with us

Calculating Speed with an accelerometer

Discussion in 'Electronic Design' started by [email protected], Mar 7, 2005.

Scroll to continue with content
  1. Guest

    Im thinking of a senior project for next year, and thought of making a
    module that calculates velocity and then can transmit the data
    wirelessly. I could demonstrate it on a r/c car, rocket, etc.

    The wireless data transmission isnt the problem, the speed calculation
    is what Im thinking about. Analog Devices (ADXL202) and ST have
    accelerometers that output a PWM signal that a micro could then count
    over time and determine velocity.

    But since theres no absolute reference coming from the accelerometer,
    it seems like the calculated velocity could easily get out of sync over
    time and with stop/go bumpy acceleration.

    Anybody have any thoughts on this? Are there other approaches better
    suited?

    Ben
     
  2. On 7 Mar 2005 13:39:25 -0800, in sci.electronics.design
    GPS seems obvious

    martin

    "An eye for an eye makes the whole world blind"
    Gandhi
     
  3. Rob Gaddi

    Rob Gaddi Guest

    Integral of acceleration provides velocity information, subject to
    restrictions of the resolution of your measurements and the bandwidth of
    your integrator.

    Voltage across the drive motor also provides velocity information,
    subject to a voltage drop error in the armature resistance when
    providing torque (either due to friction (minimal) or acceleration), and
    scaled by an unknown constant.

    Creative coding in a micro may allow these techniques to cross check
    each other.
     
  4. Phil Hobbs

    Phil Hobbs Guest

    <snip>

    Using accelerometers by themselves tends to become inaccurate very
    quickly, since any dc offset or drift turns into a position error that
    grows quadratically or cubically, respectively, with time.

    Inertial navigation of this sort is very much easier for a land vehicle
    than for a rocket, because in free fall, the acceleration due to gravity
    won't register on the accelerometer--and tiny, tiny errors in finding
    the vertical direction have large effects.

    Cheers,

    Phil Hobbs
     
  5. DaveM

    DaveM Guest

    If you think about it, an accelerometer measures change in velocity. At a
    constant velocity, the accelerometer output would be zero (or nearly zero).
    A more appropriate way would be to sense motor speed with a tach or by
    sensing power being supplied to the motor.

    --
    Dave M
    MasonDG44 at comcast dot net (Just subsitute the appropriate characters in
    the address)

    Never take a laxative and a sleeping pill at the same time!!
     
  6. John Larkin

    John Larkin Guest

    Even a 1% acceleration zero error will accumulate rapidly into a big
    velocity error. And tilt looks just like acceleration. For a rocket,
    with high g's and a short burn time, this would be usable (in fact,
    it's done), but for something like a car, probably not.

    John
     
  7. James Meyer

    James Meyer Guest

    For a rocket, the easiest way would be to include a small transmitter in
    the rocket. The transmitter's output frequency would be doppler shifted due
    directly to velocity. A receiver on the ground would measure the shift. Both
    transmitter and receiver would need appropriate frequency stability.

    Jim
     
  8. Guest

    Congradulations, you just fell upon the problem with inertial
    navigation; that and drift in the gyros. Better components, lower
    drift, better tracking.
     
  9. John Larkin

    John Larkin Guest

    Right. It might be difficult to get an oscillator that's sufficiently
    g-insensitive to make this work.

    John
     
  10. Tim Shoppa

    Tim Shoppa Guest

    Are there other approaches better suited?

    Find somebody with a good radar speed gun, and offer them "I'll give
    you this accelerometer if you measure my speed for me".

    Tim.
     
  11. Rich Webb

    Rich Webb Guest

    And Kalman filters... ;-)
     
  12. Mac

    Mac Guest

    There was a thread about this right here in this newsgroup a while back.
    IIRC, it is not at all obvious that this is the best approach or that it
    will even work.

    --Mac
     
  13. Ken Smith

    Ken Smith Guest

    I don't think the vehicle case is any easier. You have the lumps and
    bumps and jerking around to make sure that any inaccuracy in the ADC gets
    found.

    When a lump pushes the car up, tips it and shoves it sideways all at once,
    you are really screwed unless you have a rotation detector that is quite
    good. With out it, the exact same data can come from two very different
    events where the car speed and direction are both different between the
    cases.
     
  14. Ken Smith

    Ken Smith Guest

    An atomic clock or Laser may be required.
     
  15. Ken Smith

    Ken Smith Guest

    Kalman filters are nice but they can easily lead you to making pretty
    looking lies. GPSes commonly use Kalman filters. Sometimes you'll see a
    path like this:

    ..........................*........................
    ..........................*........................
    .........................*.........................
    ........................*..........................
    ......................**...........................
    ....................**.............................
    ..................**...............................
    ................**.................................
    .............***...................................
    .........****......................................
    ********..................************************


    The GPS'es model for what was going on got very far from the real physics
    for a while and then the code realized it screwed up and corrects its
    self. I've seen as many a 3 or 4 of these in 8 hours of GPS data.
     
  16. Mac

    Mac Guest

    This is the understatement of the year.
    The accelerometer idea won't work at all, except maybe in a rocket, as
    suggested by someone elsewhere in the thread.

    I suggest you forget about the accelerometer and use GPS or ultrasonics,
    or just use the rotation speed of the axle or motor or something.

    --Mac
     
  17. Guest

    If I went with a GPS approach, would a GPS have enough precision to
    resolve between an rc car moving pretty short distances, on the order
    of a tens of feet maybe?

    If the resolution is there, it seems plausable that changes in position
    could be timed.
     
  18. Mac

    Mac Guest

    The position reported by the GPS has plenty of precision. But there is a
    lot of error. How the error varies with time is something I'm not too sure
    about, but that is what you need to know. For example, if you imagine
    logging positions from a stationary GPS over half an hour, you would
    expect that the reported position would wander during that half hour. But
    if it never wanders more than a foot or two over the course of a minute,
    then GPS might work. If it jumps around 20 feet per second, then it
    probably won't work for you.

    There are differential GPS's that will definitely work, but for that,
    you have to buy two, and they are expensive, and require either a radio
    link or data post-processing. These things will give you sub-inch
    precision and relative accuracy.

    The way they work in the post processing mode is that instead of just
    solving for position, they record all the GPS information from all the
    satellites they can track. Later the post processing software figures out
    the position of the mobile GPS with respect to the stationary one to very
    high resolution.

    If you have a real-time radio link between the two units, then they
    transmit enough information back and forth to do the same thing, but the
    mobile unit then does it itself, internally, in real time.

    I wonder whether you could just use two regular GPS's, with one on the
    vehicle, and one stationary, but nearby. Then whatever hardware is
    receiving the messages from the RC car could also receive messages
    from the stationary GPS, and subtract the two GPS positions (vector wise)
    to get a vector from the known location of the stationary GPS.

    There are a lot of reasons why this might not work very well, but it is a
    thought. I doubt it would work any worse than a single GPS, which still
    might work OK, especially if you have a good view of the sky.

    Good luck. Don't let the scope of this project get out of control.
    Otherwise you'll never finish! ;-)

    --Mac
     
  19. Barbarian

    Barbarian Guest

    All of the GPS receivers that I am familiar with will give you a speed
    calculation once per second, not very practicle for an R/C vehicle moving in
    fits and spurts.
     
  20. James Meyer

    James Meyer Guest

    However, it's head and shoulders above an accelerometer approach.

    What was the consensus concerning why doppler shift woldn't work?

    Jim
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-