Shop OBEX P1 Docs P2 Docs Learn Events
MEMSIC 2125 raw readings unstable? — Parallax Forums

MEMSIC 2125 raw readings unstable?

denodeno Posts: 242
edited 2005-08-28 02:10 in BASIC Stamp
Hello...has anyone playing around with the MEMSIC 2125 had trouble with the x and y raw readings drifting to higher values as the device is left on.· In an hours time, I can watch (using the DEBUG screen) the raw readings start out at 2456 in a level situation, and drift up to 2465 with no movement of the device.· Is this normal and due to somesort of gravity change around the device?

As a mater of fact, it seems like every night when I sit down to play with it, I get a different "level" reading, and have to re-calibrate to a "level" conditions.

I know that the 5 volts that I am supplying is solid, and well filtered.

Also, I have noticed that some documentation shows using a 220 ohm resistor on the
"y out" and "x out" line to the stamp. However, documentation that comes with the MEMSIC 2125 does not show this resistor.· Which way is correct?

Thanks....Deno



Post Edited (deno) : 8/28/2005 1:22:16 AM GMT

Comments

  • denodeno Posts: 242
    edited 2005-08-28 01:58
    Found the problem....I was using a TO-220 case 7805 voltage regulator, and didn't notice that over use had broken the center leg off at breadboard level, so the regulator voltage was floating around 6 volts...with no ground connection.

    Lucky, I didn't screw up the stamp, as this was being powered by the above as well as the MEMSIC 2125.

    Thanks again...deno
  • Russ FergusonRuss Ferguson Posts: 206
    edited 2005-08-28 02:10
    Deno:

    The 220 ohm resistors are to limit the amount of current going through the stamp pin when it is set to output mode.

    When the pin is in input mode the pin will be like a meter to the circuit that it is attached to. The stamp itself will only look at the voltage on the pin and no measureable current will flow through the pin. The 220 ohm resistor will only have an effect when current is flowing through the resistor.

    The resistor is not needed in the circuit for the MEMSIC because the code sets the measuring pins to input mode, but also note that·the resistors·have no effect on the pulse measurments at all.

    So now you can ask "Why is it in the Parallax circuit?". It is there because all of us can accidentally write code that makes a pin an output when it was supposed to be an input pin.

    Assume the resistor is not·in place·and·the coding mistake is not caught.·When power is applied·the stamp pin will·probably be·shorted directly to ground and probably burn out. Now you have two problems: 1. The code·has a mistake in it. ·2. The Stamp pin that is dead.

    When the resistor is in place and the code is wrong then you will only have one problem: 1. The code has a mistake in it.

    Final thought - When the code works and no more changes will be made to the code, then the resistors on the input pins are truely not needed and can be removed (to save you the 2 cent resistor for next time).

    About the drifting -
    It appears that you are seeing the need for 'Temperature Compensation' which is what the 'TOut' pin·would be·used for.·The 'TOut' pin·is mentioned but not·demonstrated in the Parallax document 'Memsic 2125 Accelerometer Demo Kit' (#28017).
Sign In or Register to comment.