Memsic 2125 code?


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Memsic 2125 code?

    Hi Ed,

    I am unclear where you got that formula. From what I have read, it seems a little too simple to work. What am I missing? The Memsic 2125 outputs in measurements of gravity, not angle.
    http://www.scalerobotics.com

  2. #2
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Memsic 2125 code?

    Hi Walter,
    This is where I get confused. To measure a servo's angle you do a calculation based upon the pulse width (1ms-2ms with 1.5ms as center). From what I can see the 2125 gives a variable pulse width based upon the temperature difference between temperature sensors based upon the angle of the internal gas bubble. Therefore the 2125 output pulse width should be related to the tilt of a given axis?

    Name:  28017-Memsic2Axis-v2.0[1]_Page_1.jpg
Views: 5236
Size:  97.4 KB

  3. #3
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Memsic 2125 code?

    I gather from the datasheet http://www.parallax.com/dl/docs/prod/acc/memsickit.pdf the 2125 is just an accelerometer, and will give the pulse output based on the G sensed, but not based on angle. Perhaps you don't need an angle, if you are just wanting to keep the nose of your sub pointed at 0 tilt.


    This spreadsheet sort of shows the correlation (or lack thereof) between angle and G sensed. It could be used to make a lookup table to determine angle.
    Name:  tilt.png
Views: 5912
Size:  73.5 KB
    http://www.scalerobotics.com

  4. #4
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Memsic 2125 code?

    Thanks Walter!
    I already have an Automatic Pitch Controller that keeps the sub level and just wished to display the pitch angle as well as the roll angle. Things like "look-up tables" are completely foreign to me and trig math just seemed to complex. Maybe I am just looking at the wrong type of sensor? I saw the electrolyte type and apparently they do not like DC. It also seems silly to buy another Automatic Pitch Controller just to read the roll angle. Best, Ed

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts