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?

    Quote Originally Posted by Ramius View Post
    I have to believe that the people building robots must have a simple way to keep their robot "balanced". Again, going back to the Subtech APC-3 and 4 these Automatic Pitch Controllers which drive a servo were on the market long before the code using the "trig" include was created.
    Hi Ed,
    I suspect that the Subtech APC-3 or 4 may not really care about angle, and just looks at how far off a neutral horizon you are, adjusting the pitch accordingly (much like some simpler robots). It may use a lookup table of some sort to do this, or some math, or a combination of the two. From what I read about one of the sensors mentioned (in another forum) PitchControlStamp LR2 , it doesn't really state if it is working off a 1,2 or 3 axis accelerometer. As I mentioned earlier, a lookup table could get you close for angle. For example, at 75 degrees a (1 axis) pitch lookup table would start to get off by more than 3 degrees, and even more if there was any roll involved. This error goes up to about 10 degrees as you approach 90 degrees. And remember with some roll involved, it would be much higher error. Perhaps there is not much roll in a sub, I am not sure. If these are close enough, then certainly it can be done with a lookup table, and many on this site, including myself would be willing to help you with that. As for cost of on the market pitch controllers, even the Subtech parts look to be about $55 each, the LR2 $95 each, and both seem to only control 1 axis.

    Looking up your ideal sensor made us realize there is a need for an inexpensive sensor that outputs an angle. I did find this one, and it fit the bill, all except for the inexpensive part: http://www.sparkfun.com/products/8656 .

    We are making a similar sensor, giving an angle output for Pitch, Roll and a tilt compensated compass heading. But price will be much less. It should take about 4 weeks to get the PCB made and code finalized.
    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 cncmachineguy,

    Here is the link for the OSD http://www.decadenet.com/bob4/bob4.html . It allows 40 characters by 22 lines. In the past I looked at the OSD-232+ and it only allowed 30 columns by 12 rows. Have not yet finalized the goggles yet, there are a few considerations such a if they underscan the video or overscan and if I can shift the display on one display horizontally as this would allow for a "3-D" effect!

    Walter, if you are playing with compasses then maybe look at http://www.robsonco.com/Dinsmore/Untitled_5.html .


    Best, Ed

  3. #3
    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,I have looked and looked and looked at all this different information and it still has me very lost and confused. I need to calculate the PWM outputs to acceleration, then take the arcsine of the acceleration determine the angle of incination. I know you suggested using a look-up table and I have never done this before and not sure how it is done. Basically I am asking how is the code written in simple terms I can study. Thanks, 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