Shop OBEX P1 Docs P2 Docs Learn Events
Memsic 2125 and Velocity — Parallax Forums

Memsic 2125 and Velocity

ArchiverArchiver Posts: 46,084
edited 2003-08-22 18:51 in General Discussion
Has anyone tried using the Memsic 2125 to measure velocity?

I am having a hard time with mine with tracking velocity. It drifts alot
when it is not moving.

Also, does anyone have a schematic of this circut. The Memsic documents
reference using two capacitors and a resistor to help filter the data. I
can see 2 surface mount components on the Memsic board, but I don't know
what they are.

Any info would be appreciated.

Pete Miles

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-08-21 16:37
    Hi Peter,

    An accelerometer cannot directly measure velocity, or, I should add,
    unless you rig up something that translates velocity into
    acceleration or tilt.

    There are a lot of application notes as well as the data sheets
    available at <http://www.memsic.com>. The '2125 has a digital PWM X
    and Y outputs, and the docs show how to use an RC circuit to convert
    the PWM to analog and also filter it to restrict the bandwidth. But
    if you use the digital output directly into the Stamp, via PULSIN,
    then the lowpass filtering will have to be done digitally in the
    Stamp. The docs also suggest a noise-reduction filter circuit for
    the power supply that uses two capacitors and a resistor, to filter
    the analog and digital supplies.

    -- Tracy


    >Has anyone tried using the Memsic 2125 to measure velocity?
    >
    >I am having a hard time with mine with tracking velocity. It drifts alot
    >when it is not moving.
    >
    >Also, does anyone have a schematic of this circut. The Memsic documents
    >reference using two capacitors and a resistor to help filter the data. I
    >can see 2 surface mount components on the Memsic board, but I don't know
    >what they are.
    >
    >Any info would be appreciated.
    >
    >Pete Miles
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-21 17:10
    Tracy,
    TO convert Accelereation into velocity, you need to integrate veleocity with
    respect to time IE the old Physics equation V=A*T where V=velocity,
    A=Acceleration
    and T=Time.
    Bill Higdon
    > Hi Peter,
    >
    > An accelerometer cannot directly measure velocity, or, I should add,
    > unless you rig up something that translates velocity into
    > acceleration or tilt.
    >
    > There are a lot of application notes as well as the data sheets
    > available at <http://www.memsic.com>. The '2125 has a digital PWM X
    > and Y outputs, and the docs show how to use an RC circuit to convert
    > the PWM to analog and also filter it to restrict the bandwidth. But
    > if you use the digital output directly into the Stamp, via PULSIN,
    > then the lowpass filtering will have to be done digitally in the
    > Stamp. The docs also suggest a noise-reduction filter circuit for
    > the power supply that uses two capacitors and a resistor, to filter
    > the analog and digital supplies.
    >
    > -- Tracy
    >
    >
    > >Has anyone tried using the Memsic 2125 to measure velocity?
    > >
    > >I am having a hard time with mine with tracking velocity. It drifts alot
    > >when it is not moving.
    > >
    > >Also, does anyone have a schematic of this circut. The Memsic documents
    > >reference using two capacitors and a resistor to help filter the data. I
    > >can see 2 surface mount components on the Memsic board, but I don't know
    > >what they are.
    > >
    > >Any info would be appreciated.
    > >
    > >Pete Miles
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body

    > of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-21 18:24
    I have read most of the docs from the memsic website. I have the memsic
    2125 working just fine with my BS2p and a LCD display. Right now it make a
    great digital level. So reading the values are not a problem. I even know
    the that the PWM X and PWM Y outputs are transmitted at the same time
    (something the docs don't mention).

    The docs do talk about using two capacitors and a resistor to filter the
    data. On the Parallax Memsic 2125 board there are two surface mount
    components which the manual, that comes with the device, doesn't explain
    what they are. So I was wondering if the filter was already on the board,
    or do I still have to add one.

    I am aware that you can not measure velocity directly with an accelerometer.
    But if you integrate accelleration, you can get velocity.

    Using the trapezoid method, velocity is:

    velocity = ((delta_T)/2)*Sum(a_0+2*a_1+2*a_2+2*a_3+....+2*a_(i-1)+a_i)
    Where a_n values are the acceleration values that are measured, and delta_T
    is the time increment between each acceleration measurement. In essence it
    is just a summation of the acceleration values.

    The program I am using right now, delta_t is consistant at 30 ms. (I
    measured this with an oscope).

    The problems I am having is there is a lot of drift in the summation values
    when the accelerometer is just sitting on a table and not moving. Some
    times all it will do is increase, or decrease, or move to some value and
    oscillate around it for a while then move to a different value and
    oscillate. The other problem, is that the values grow so fast, I overload
    the 16 bit number, and it rolls over. I suppose I need to learn how to do
    32 bit math on the stamps.

    Since there are accelerometer based inertial navigation systems that can be
    purchased for several hunderd dollars, I suspect there is a technique that
    needs to be used to use these types of things.

    My application is for sumo robots, so the exact velocity in not important.
    I just need to know if the robot is moving forward, backwards, or sideways,
    and the time scale will generally be from 5 to 30 seconds, with a worse case
    total time period of 3 minutes.

    I originally thought this would be easy, but it has turned out to be a
    rather tough problem. Maybe that is why nobody else is doing this.

    Pete Miles
    petem@o...


    Original Message
    From: "Tracy Allen" <tracy@e...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, August 21, 2003 8:37 AM
    Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    > Hi Peter,
    >
    > An accelerometer cannot directly measure velocity, or, I should add,
    > unless you rig up something that translates velocity into
    > acceleration or tilt.
    >
    > There are a lot of application notes as well as the data sheets
    > available at <http://www.memsic.com>. The '2125 has a digital PWM X
    > and Y outputs, and the docs show how to use an RC circuit to convert
    > the PWM to analog and also filter it to restrict the bandwidth. But
    > if you use the digital output directly into the Stamp, via PULSIN,
    > then the lowpass filtering will have to be done digitally in the
    > Stamp. The docs also suggest a noise-reduction filter circuit for
    > the power supply that uses two capacitors and a resistor, to filter
    > the analog and digital supplies.
    >
    > -- Tracy
    >
    >
    > >Has anyone tried using the Memsic 2125 to measure velocity?
    > >
    > >I am having a hard time with mine with tracking velocity. It drifts alot
    > >when it is not moving.
    > >
    > >Also, does anyone have a schematic of this circut. The Memsic documents
    > >reference using two capacitors and a resistor to help filter the data. I
    > >can see 2 surface mount components on the Memsic board, but I don't know
    > >what they are.
    > >
    > >Any info would be appreciated.
    > >
    > >Pete Miles
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-21 20:08
    Hi Peter,

    The surface mount parts are both capacitors, in parallel across the
    power supply. I'd guess they are two different values for better
    filtering. This is not the 2C + R filter, though, if it is the one
    you are referring to in the data sheet (figure 5) that goes between
    the analog and digital power supply pins of the '2125. The analog
    and digital power supply pins to the '2125 are connected directly
    together on the Parallax carrier board.

    I see what you mean about integrating the acceleration. I've just
    started playing with the memsic chip myself, so I haven't hit those
    issues (yet). We are evaluating it for monitoring the choppiness of
    a water surface by potting the chip inside a float, but that is AC
    and the drift and accumulation of offsets won't matter so much.

    In the appnotes memsic has information about temperature correction
    of both the offset and the scale factor, so if your 'bot is heating
    up, that may be a factor.

    Over-sample? Run the samples through an exponential or boxcar filter,
    before putting them into the integration. That would decrease the
    variance. Or, I don't know, tell it to ignore acceleration readings
    below some threshold. Low accelerations with vibration are going to
    be the hardest to integrate.

    Maybe it would in fact be better to convert the PWM into analog, and
    read it via an ADC, so that the sampling error (at 30 ms/) wouldn't
    be so under-sampled.

    2125 100k
    PWMx or y ---/\/\----o--- ADC to Stamp
    |
    ===== 1uf
    |
    Vss

    (Data sheet figure 4 except with 1/2piRC = 16 hz instead of 166 hertz.)


    Scale it so that the maximum acceleration reading will be ~100, so
    that worst case it won't overflow for 10 seconds. (or better yet, do
    the double precision thing!) It is just add/subtract and multiply*2,
    not hard.

    -- Tracy
    http://www.emesystems.com




    >The docs do talk about using two capacitors and a resistor to filter the
    >data. On the Parallax Memsic 2125 board there are two surface mount
    >components which the manual, that comes with the device, doesn't explain
    >what they are. So I was wondering if the filter was already on the board,
    >or do I still have to add one.
    >
    >I am aware that you can not measure velocity directly with an accelerometer.
    >But if you integrate accelleration, you can get velocity.
    >
    >Using the trapezoid method, velocity is:
    >
    >velocity = ((delta_T)/2)*Sum(a_0+2*a_1+2*a_2+2*a_3+....+2*a_(i-1)+a_i)
    >Where a_n values are the acceleration values that are measured, and delta_T
    >is the time increment between each acceleration measurement. In essence it
    >is just a summation of the acceleration values.
    >
    >The program I am using right now, delta_t is consistant at 30 ms. (I
    >measured this with an oscope).
    >
    >The problems I am having is there is a lot of drift in the summation values
    >when the accelerometer is just sitting on a table and not moving. Some
    >times all it will do is increase, or decrease, or move to some value and
    >oscillate around it for a while then move to a different value and
    >oscillate. The other problem, is that the values grow so fast, I overload
    >the 16 bit number, and it rolls over. I suppose I need to learn how to do
    >32 bit math on the stamps.
    >
    >Since there are accelerometer based inertial navigation systems that can be
    >purchased for several hunderd dollars, I suspect there is a technique that
    >needs to be used to use these types of things.
    >
    >My application is for sumo robots, so the exact velocity in not important.
    >I just need to know if the robot is moving forward, backwards, or sideways,
    >and the time scale will generally be from 5 to 30 seconds, with a worse case
    >total time period of 3 minutes.
    >
    >I originally thought this would be easy, but it has turned out to be a
    >rather tough problem. Maybe that is why nobody else is doing this.
    >
    >Pete Miles
    >petem@o...
    >
    >
    >
    Original Message
    >From: "Tracy Allen" <tracy@e...>
    >To: <basicstamps@yahoogroups.com>
    >Sent: Thursday, August 21, 2003 8:37 AM
    >Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    > > Hi Peter,
    >>
    >> An accelerometer cannot directly measure velocity, or, I should add,
    >> unless you rig up something that translates velocity into
    >> acceleration or tilt.
    >>
    >> There are a lot of application notes as well as the data sheets
    >> available at <http://www.memsic.com>. The '2125 has a digital PWM X
    >> and Y outputs, and the docs show how to use an RC circuit to convert
    >> the PWM to analog and also filter it to restrict the bandwidth. But
    >> if you use the digital output directly into the Stamp, via PULSIN,
    >> then the lowpass filtering will have to be done digitally in the
    >> Stamp. The docs also suggest a noise-reduction filter circuit for
    >> the power supply that uses two capacitors and a resistor, to filter
    >> the analog and digital supplies.
    >>
    >> -- Tracy
    >>
    >>
    >> >Has anyone tried using the Memsic 2125 to measure velocity?
    >> >
    >> >I am having a hard time with mine with tracking velocity. It drifts alot
    >> >when it is not moving.
    >> >
    >> >Also, does anyone have a schematic of this circut. The Memsic documents
    >> >reference using two capacitors and a resistor to help filter the data. I
    >> >can see 2 surface mount components on the Memsic board, but I don't know
    >> >what they are.
    >> >
    >> >Any info would be appreciated.
    >> >
    >> >Pete Miles
    >>
    >> To UNSUBSCRIBE, just send mail to:
    >> basicstamps-unsubscribe@yahoogroups.com
    >> from the same email address that you subscribed. Text in the Subject and
    >Body of the message will be ignored.
    >>
    >>
    >> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >>
    >>
    >>
    >>
    >
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the
    >Subject and Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-22 01:20
    When integrating acceleration to velocity, drift is almost inevitable.
    Any DC offset gets integrated to a ramp, which eventually causes
    overflow. One solution is to use a rate gyro chip, which produces
    rotational velocity directly, instead of an accelerometer. Or, use both
    in combination, and some extra math, to correct for the accelerometer
    offset.

    Dennis

    Original Message
    From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=dQNtE7-RJFKvj4ZLVMGasqOdsdPao-UMxx1Hpz1gI7fAqcDQNCBxSjpiMrmH4yR9HBbJ2EwB92XPSdFdiug]petem@o...[/url
    Sent: Thursday, August 21, 2003 10:25 AM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    I have read most of the docs from the memsic website. I have the memsic
    2125 working just fine with my BS2p and a LCD display. Right now it
    make a great digital level. So reading the values are not a problem. I
    even know the that the PWM X and PWM Y outputs are transmitted at the
    same time (something the docs don't mention).

    The docs do talk about using two capacitors and a resistor to filter the
    data. On the Parallax Memsic 2125 board there are two surface mount
    components which the manual, that comes with the device, doesn't explain
    what they are. So I was wondering if the filter was already on the
    board, or do I still have to add one.

    I am aware that you can not measure velocity directly with an
    accelerometer. But if you integrate accelleration, you can get velocity.

    Using the trapezoid method, velocity is:

    velocity = ((delta_T)/2)*Sum(a_0+2*a_1+2*a_2+2*a_3+....+2*a_(i-1)+a_i)
    Where a_n values are the acceleration values that are measured, and
    delta_T is the time increment between each acceleration measurement. In
    essence it is just a summation of the acceleration values.

    The program I am using right now, delta_t is consistant at 30 ms. (I
    measured this with an oscope).

    The problems I am having is there is a lot of drift in the summation
    values when the accelerometer is just sitting on a table and not moving.
    Some times all it will do is increase, or decrease, or move to some
    value and oscillate around it for a while then move to a different value
    and oscillate. The other problem, is that the values grow so fast, I
    overload the 16 bit number, and it rolls over. I suppose I need to
    learn how to do 32 bit math on the stamps.

    Since there are accelerometer based inertial navigation systems that can
    be purchased for several hunderd dollars, I suspect there is a technique
    that needs to be used to use these types of things.

    My application is for sumo robots, so the exact velocity in not
    important. I just need to know if the robot is moving forward,
    backwards, or sideways, and the time scale will generally be from 5 to
    30 seconds, with a worse case total time period of 3 minutes.

    I originally thought this would be easy, but it has turned out to be a
    rather tough problem. Maybe that is why nobody else is doing this.

    Pete Miles
    petem@o...


    Original Message
    From: "Tracy Allen" <tracy@e...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, August 21, 2003 8:37 AM
    Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    > Hi Peter,
    >
    > An accelerometer cannot directly measure velocity, or, I should add,
    > unless you rig up something that translates velocity into acceleration

    > or tilt.
    >
    > There are a lot of application notes as well as the data sheets
    > available at <http://www.memsic.com>. The '2125 has a digital PWM X
    > and Y outputs, and the docs show how to use an RC circuit to convert
    > the PWM to analog and also filter it to restrict the bandwidth. But
    > if you use the digital output directly into the Stamp, via PULSIN,
    > then the lowpass filtering will have to be done digitally in the
    > Stamp. The docs also suggest a noise-reduction filter circuit for the

    > power supply that uses two capacitors and a resistor, to filter the
    > analog and digital supplies.
    >
    > -- Tracy
    >
    >
    > >Has anyone tried using the Memsic 2125 to measure velocity?
    > >
    > >I am having a hard time with mine with tracking velocity. It drifts
    > >alot when it is not moving.
    > >
    > >Also, does anyone have a schematic of this circut. The Memsic
    > >documents reference using two capacitors and a resistor to help
    > >filter the data. I can see 2 surface mount components on the Memsic
    > >board, but I don't know what they are.
    > >
    > >Any info would be appreciated.
    > >
    > >Pete Miles
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
    >
    >



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-22 01:34
    I have been thinking about that for some time now. Any recommendations for
    them?

    Pete Miles

    Original Message
    From: "Dennis O'Leary" <doleary@e...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, August 21, 2003 5:20 PM
    Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    > When integrating acceleration to velocity, drift is almost inevitable.
    > Any DC offset gets integrated to a ramp, which eventually causes
    > overflow. One solution is to use a rate gyro chip, which produces
    > rotational velocity directly, instead of an accelerometer. Or, use both
    > in combination, and some extra math, to correct for the accelerometer
    > offset.
    >
    > Dennis
    >
    >
    Original Message
    > From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=FFDBeC2I5AW9G_PSLuGsphwaIkkoEczYuBnD5-pKxvHeyGIEWcypYZ7qNsWaDuX2byV2ti_eKgZ08w]petem@o...[/url
    > Sent: Thursday, August 21, 2003 10:25 AM
    > To: basicstamps@yahoogroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    > I have read most of the docs from the memsic website. I have the memsic
    > 2125 working just fine with my BS2p and a LCD display. Right now it
    > make a great digital level. So reading the values are not a problem. I
    > even know the that the PWM X and PWM Y outputs are transmitted at the
    > same time (something the docs don't mention).
    >
    > The docs do talk about using two capacitors and a resistor to filter the
    > data. On the Parallax Memsic 2125 board there are two surface mount
    > components which the manual, that comes with the device, doesn't explain
    > what they are. So I was wondering if the filter was already on the
    > board, or do I still have to add one.
    >
    > I am aware that you can not measure velocity directly with an
    > accelerometer. But if you integrate accelleration, you can get velocity.
    >
    > Using the trapezoid method, velocity is:
    >
    > velocity = ((delta_T)/2)*Sum(a_0+2*a_1+2*a_2+2*a_3+....+2*a_(i-1)+a_i)
    > Where a_n values are the acceleration values that are measured, and
    > delta_T is the time increment between each acceleration measurement. In
    > essence it is just a summation of the acceleration values.
    >
    > The program I am using right now, delta_t is consistant at 30 ms. (I
    > measured this with an oscope).
    >
    > The problems I am having is there is a lot of drift in the summation
    > values when the accelerometer is just sitting on a table and not moving.
    > Some times all it will do is increase, or decrease, or move to some
    > value and oscillate around it for a while then move to a different value
    > and oscillate. The other problem, is that the values grow so fast, I
    > overload the 16 bit number, and it rolls over. I suppose I need to
    > learn how to do 32 bit math on the stamps.
    >
    > Since there are accelerometer based inertial navigation systems that can
    > be purchased for several hunderd dollars, I suspect there is a technique
    > that needs to be used to use these types of things.
    >
    > My application is for sumo robots, so the exact velocity in not
    > important. I just need to know if the robot is moving forward,
    > backwards, or sideways, and the time scale will generally be from 5 to
    > 30 seconds, with a worse case total time period of 3 minutes.
    >
    > I originally thought this would be easy, but it has turned out to be a
    > rather tough problem. Maybe that is why nobody else is doing this.
    >
    > Pete Miles
    > petem@o...
    >
    >
    >
    Original Message
    > From: "Tracy Allen" <tracy@e...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Thursday, August 21, 2003 8:37 AM
    > Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    > > Hi Peter,
    > >
    > > An accelerometer cannot directly measure velocity, or, I should add,
    > > unless you rig up something that translates velocity into acceleration
    >
    > > or tilt.
    > >
    > > There are a lot of application notes as well as the data sheets
    > > available at <http://www.memsic.com>. The '2125 has a digital PWM X
    > > and Y outputs, and the docs show how to use an RC circuit to convert
    > > the PWM to analog and also filter it to restrict the bandwidth. But
    > > if you use the digital output directly into the Stamp, via PULSIN,
    > > then the lowpass filtering will have to be done digitally in the
    > > Stamp. The docs also suggest a noise-reduction filter circuit for the
    >
    > > power supply that uses two capacitors and a resistor, to filter the
    > > analog and digital supplies.
    > >
    > > -- Tracy
    > >
    > >
    > > >Has anyone tried using the Memsic 2125 to measure velocity?
    > > >
    > > >I am having a hard time with mine with tracking velocity. It drifts
    > > >alot when it is not moving.
    > > >
    > > >Also, does anyone have a schematic of this circut. The Memsic
    > > >documents reference using two capacitors and a resistor to help
    > > >filter the data. I can see 2 surface mount components on the Memsic
    > > >board, but I don't know what they are.
    > > >
    > > >Any info would be appreciated.
    > > >
    > > >Pete Miles
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the Subject
    > > and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
    > >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-22 01:49
    Murata ECN gyros work well. They come in A and B flavors. If you neet
    to mount 2 on the same board, use one A and one B, instead of 2 of the
    same. If you need only one, either is OK.

    Dennis

    Original Message
    From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ucgh4vQNJ85ZX4sAsV-qRCQaS2d8Xc8bCfo0I-LIWiqiryzu_wy-FWPC0k0txtYAr36sZp766jsbjwQjv1M]petem@o...[/url
    Sent: Thursday, August 21, 2003 5:34 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    I have been thinking about that for some time now. Any recommendations
    for them?

    Pete Miles

    Original Message
    From: "Dennis O'Leary" <doleary@e...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, August 21, 2003 5:20 PM
    Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    > When integrating acceleration to velocity, drift is almost inevitable.

    > Any DC offset gets integrated to a ramp, which eventually causes
    > overflow. One solution is to use a rate gyro chip, which produces
    > rotational velocity directly, instead of an accelerometer. Or, use
    > both in combination, and some extra math, to correct for the
    > accelerometer offset.
    >
    > Dennis
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-22 01:57
    You have a link for them?

    Thanks,

    Pete

    Original Message
    From: "Dennis O'Leary" <doleary@e...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, August 21, 2003 5:49 PM
    Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    > Murata ECN gyros work well. They come in A and B flavors. If you neet
    > to mount 2 on the same board, use one A and one B, instead of 2 of the
    > same. If you need only one, either is OK.
    >
    > Dennis
    >
    >
    Original Message
    > From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nQrcDhopJSGphpOGPWtRDsB3aCrSEJHw9R3rfbskZHx0j6vTJs-Ra9cRK2m_mS9Bu87AjdvqiOFrC1CG]petem@o...[/url
    > Sent: Thursday, August 21, 2003 5:34 PM
    > To: basicstamps@yahoogroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    > I have been thinking about that for some time now. Any recommendations
    > for them?
    >
    > Pete Miles
    >
    >
    Original Message
    > From: "Dennis O'Leary" <doleary@e...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Thursday, August 21, 2003 5:20 PM
    > Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    > > When integrating acceleration to velocity, drift is almost inevitable.
    >
    > > Any DC offset gets integrated to a ramp, which eventually causes
    > > overflow. One solution is to use a rate gyro chip, which produces
    > > rotational velocity directly, instead of an accelerometer. Or, use
    > > both in combination, and some extra math, to correct for the
    > > accelerometer offset.
    > >
    > > Dennis
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-22 02:41
    Quick question: How do you use a rotational rate gyro to sense linear
    acceleration?

    - Robert


    Original Message
    From: "Dennis O'Leary" <doleary@p...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, August 21, 2003 6:20 PM
    Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    > When integrating acceleration to velocity, drift is almost inevitable.
    > Any DC offset gets integrated to a ramp, which eventually causes
    > overflow. One solution is to use a rate gyro chip, which produces
    > rotational velocity directly, instead of an accelerometer. Or, use both
    > in combination, and some extra math, to correct for the accelerometer
    > offset.
    >
    > Dennis
    >
    >
    Original Message
    > From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=-2slBGrRjJslnA05DzD_TbCiW7PX6jouVHEhWPNd9mYBtETJlg1zemqf0qUT2UfA69bTRUUyPKR6fuSChEQ]petem@o...[/url
    > Sent: Thursday, August 21, 2003 10:25 AM
    > To: basicstamps@yahoogroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    > I have read most of the docs from the memsic website. I have the memsic
    > 2125 working just fine with my BS2p and a LCD display. Right now it
    > make a great digital level. So reading the values are not a problem. I
    > even know the that the PWM X and PWM Y outputs are transmitted at the
    > same time (something the docs don't mention).
    >
    > The docs do talk about using two capacitors and a resistor to filter the
    > data. On the Parallax Memsic 2125 board there are two surface mount
    > components which the manual, that comes with the device, doesn't explain
    > what they are. So I was wondering if the filter was already on the
    > board, or do I still have to add one.
    >
    > I am aware that you can not measure velocity directly with an
    > accelerometer. But if you integrate accelleration, you can get velocity.
    >
    > Using the trapezoid method, velocity is:
    >
    > velocity = ((delta_T)/2)*Sum(a_0+2*a_1+2*a_2+2*a_3+....+2*a_(i-1)+a_i)
    > Where a_n values are the acceleration values that are measured, and
    > delta_T is the time increment between each acceleration measurement. In
    > essence it is just a summation of the acceleration values.
    >
    > The program I am using right now, delta_t is consistant at 30 ms. (I
    > measured this with an oscope).
    >
    > The problems I am having is there is a lot of drift in the summation
    > values when the accelerometer is just sitting on a table and not moving.
    > Some times all it will do is increase, or decrease, or move to some
    > value and oscillate around it for a while then move to a different value
    > and oscillate. The other problem, is that the values grow so fast, I
    > overload the 16 bit number, and it rolls over. I suppose I need to
    > learn how to do 32 bit math on the stamps.
    >
    > Since there are accelerometer based inertial navigation systems that can
    > be purchased for several hunderd dollars, I suspect there is a technique
    > that needs to be used to use these types of things.
    >
    > My application is for sumo robots, so the exact velocity in not
    > important. I just need to know if the robot is moving forward,
    > backwards, or sideways, and the time scale will generally be from 5 to
    > 30 seconds, with a worse case total time period of 3 minutes.
    >
    > I originally thought this would be easy, but it has turned out to be a
    > rather tough problem. Maybe that is why nobody else is doing this.
    >
    > Pete Miles
    > petem@o...
    >
    >
    >
    Original Message
    > From: "Tracy Allen" <tracy@e...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Thursday, August 21, 2003 8:37 AM
    > Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    > > Hi Peter,
    > >
    > > An accelerometer cannot directly measure velocity, or, I should add,
    > > unless you rig up something that translates velocity into acceleration
    >
    > > or tilt.
    > >
    > > There are a lot of application notes as well as the data sheets
    > > available at <http://www.memsic.com>. The '2125 has a digital PWM X
    > > and Y outputs, and the docs show how to use an RC circuit to convert
    > > the PWM to analog and also filter it to restrict the bandwidth. But
    > > if you use the digital output directly into the Stamp, via PULSIN,
    > > then the lowpass filtering will have to be done digitally in the
    > > Stamp. The docs also suggest a noise-reduction filter circuit for the
    >
    > > power supply that uses two capacitors and a resistor, to filter the
    > > analog and digital supplies.
    > >
    > > -- Tracy
    > >
    > >
    > > >Has anyone tried using the Memsic 2125 to measure velocity?
    > > >
    > > >I am having a hard time with mine with tracking velocity. It drifts
    > > >alot when it is not moving.
    > > >
    > > >Also, does anyone have a schematic of this circut. The Memsic
    > > >documents reference using two capacitors and a resistor to help
    > > >filter the data. I can see 2 surface mount components on the Memsic
    > > >board, but I don't know what they are.
    > > >
    > > >Any info would be appreciated.
    > > >
    > > >Pete Miles
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the Subject
    > > and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
    > >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-22 17:03
    You don't. They are useful for sensing rotational velocity. Note that
    they can be mounted anywhere on a rotating body, not just at the center
    of rotation, because of the "parallel axis theorem" from rotational
    physics. They are often used in combination with accelerometers to sort
    out gravitational tilt from linear acceleratation.

    Dennis

    Original Message
    From: Robert Ussery [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=qPixz8ws7hsh7mg9JZS3I0I3TwL8GyeU6Wjrk0QJJ_k5gnr4iSk0ruUDEvfUnj5duVN-FiUoEdKQJDo02g]uavscience@f...[/url
    Sent: Thursday, August 21, 2003 6:42 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    Quick question: How do you use a rotational rate gyro to sense linear
    acceleration?

    - Robert


    Original Message
    From: "Dennis O'Leary" <doleary@p...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, August 21, 2003 6:20 PM
    Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    > When integrating acceleration to velocity, drift is almost inevitable.

    > Any DC offset gets integrated to a ramp, which eventually causes
    > overflow. One solution is to use a rate gyro chip, which produces
    > rotational velocity directly, instead of an accelerometer. Or, use
    > both in combination, and some extra math, to correct for the
    > accelerometer offset.
    >
    > Dennis
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-22 17:08
    Yes -- http://www.murata.com/catalog/s42e3.pdf . Originally, they were
    through-hole, now they seem to be only surface mount.
    Dennis

    Original Message
    From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=j-Fi9WKhcfWLNlkNaQ0C40Mk-baynI2sZ2lmG9ePPOEb7dRuboZBRPSHlOrL3V45dvjsvKfKmTRvsvUUng]petem@o...[/url
    Sent: Thursday, August 21, 2003 5:58 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    You have a link for them?

    Thanks,

    Pete

    Original Message
    From: "Dennis O'Leary" <doleary@e...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, August 21, 2003 5:49 PM
    Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    > Murata ECN gyros work well. They come in A and B flavors. If you
    > neet to mount 2 on the same board, use one A and one B, instead of 2
    > of the same. If you need only one, either is OK.
    >
    > Dennis
    >
    >
    Original Message
    > From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=j-Fi9WKhcfWLNlkNaQ0C40Mk-baynI2sZ2lmG9ePPOEb7dRuboZBRPSHlOrL3V45dvjsvKfKmTRvsvUUng]petem@o...[/url
    > Sent: Thursday, August 21, 2003 5:34 PM
    > To: basicstamps@yahoogroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    > I have been thinking about that for some time now. Any
    > recommendations for them?
    >
    > Pete Miles
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-22 18:22
    Hi Dennis,

    Do you have a source for these chips? In an earlier message you said
    you had to buy them in quantity for your postural sway studies a few
    years ago. Mouser carries Murata stuff, but not that particular
    sensor.

    -- Tracy




    >Yes -- http://www.murata.com/catalog/s42e3.pdf . Originally, they were
    >through-hole, now they seem to be only surface mount.
    >Dennis
    >
    >
    Original Message
    >From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ebZANZbHit2PuROjWvSlbzgjJldSRVjcGH87uoKkkhxbFbEWtnnFVeezJmkzs8XIQoXbDqop9ZEkQXvouvI]petem@o...[/url
    >Sent: Thursday, August 21, 2003 5:58 PM
    >To: basicstamps@yahoogroups.com
    >Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    >You have a link for them?
    >
    >Thanks,
    >
    >Pete
    >
    >
    Original Message
    >From: "Dennis O'Leary" <doleary@e...>
    >To: <basicstamps@yahoogroups.com>
    >Sent: Thursday, August 21, 2003 5:49 PM
    >Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    >> Murata ECN gyros work well. They come in A and B flavors. If you
    >> neet to mount 2 on the same board, use one A and one B, instead of 2
    >> of the same. If you need only one, either is OK.
    >>
    >> Dennis
    >>
    >>
    Original Message
    >> From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ebZANZbHit2PuROjWvSlbzgjJldSRVjcGH87uoKkkhxbFbEWtnnFVeezJmkzs8XIQoXbDqop9ZEkQXvouvI]petem@o...[/url
    >> Sent: Thursday, August 21, 2003 5:34 PM
    >> To: basicstamps@yahoogroups.com
    >> Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >>
    >>
    >> I have been thinking about that for some time now. Any
    >> recommendations for them?
    >>
    >> Pete Miles
    >>
    >
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the
    >Subject and Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-22 18:51
    Hi Tracy,

    Yes, I get them directly from Murata. But I had to buy quantities of
    100 each of A's and B's, in order to build them into a medical device
    that we manufacture. I'm just now reaching the end of that lot, so I'll
    soon have to buy a similar quantity of the newer surface-mount models.
    Let me know off list if you need a few of the new lot.

    Dennis

    Original Message
    From: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=1ubWkPHRjEaIyUxhb6slr3j3bj8yJ4FeOA_n_GvxqqWwojlRIqrTUCmf1rLoalHG0iW5CXN_99rWFufjRCs]tracy@e...[/url
    Sent: Friday, August 22, 2003 10:22 AM
    To: basicstamps@yahoogroups.com
    Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity


    Hi Dennis,

    Do you have a source for these chips? In an earlier message you said
    you had to buy them in quantity for your postural sway studies a few
    years ago. Mouser carries Murata stuff, but not that particular
    sensor.

    -- Tracy




    >Yes -- http://www.murata.com/catalog/s42e3.pdf . Originally, they were

    >through-hole, now they seem to be only surface mount. Dennis
    >
    >
    Original Message
    >From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=fSRbdIzi66NnfeLmkNPPvdukIu1aUDGQzb1YtBNw6ZIuiOGnMa__QvTlad2XCv94hXIRJJ89PwW0JgGYWg]petem@o...[/url
    >Sent: Thursday, August 21, 2003 5:58 PM
    >To: basicstamps@yahoogroups.com
    >Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    >You have a link for them?
    >
    >Thanks,
    >
    >Pete
    >
    >
    Original Message
    >From: "Dennis O'Leary" <doleary@e...>
    >To: <basicstamps@yahoogroups.com>
    >Sent: Thursday, August 21, 2003 5:49 PM
    >Subject: RE: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >
    >
    >> Murata ECN gyros work well. They come in A and B flavors. If you
    >> neet to mount 2 on the same board, use one A and one B, instead of 2
    >> of the same. If you need only one, either is OK.
    >>
    >> Dennis
    >>
    >>
    Original Message
    >> From: Pete Miles [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=fSRbdIzi66NnfeLmkNPPvdukIu1aUDGQzb1YtBNw6ZIuiOGnMa__QvTlad2XCv94hXIRJJ89PwW0JgGYWg]petem@o...[/url
    >> Sent: Thursday, August 21, 2003 5:34 PM
    >> To: basicstamps@yahoogroups.com
    >> Subject: Re: [noparse][[/noparse]basicstamps] Memsic 2125 and Velocity
    >>
    >>
    >> I have been thinking about that for some time now. Any
    >> recommendations for them?
    >>
    >> Pete Miles
    >>
    >
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the
    >Subject and Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to
    >http://docs.yahoo.com/info/terms/


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
Sign In or Register to comment.