Tuesday, April 7, 2015

20140515 - MMA7361 and Memsic2125 Accelerometer Demos

20140515 - MMA7361 and Memsic2125 Accelerometer Demos

The mma7361 accelerometer is a 3 axis, 3.3v or 5v accelerometer - the ones I have happen to be “banned” Chinese knock offs, and probably when I bought them I wasn’t aware of that. They work, and work quite well, but took some digging to find the right information for them.

I started off looking at eBay, and found

which has a library included with it. I couldn’t get mine to work with this library, so I started to google, and ended up finding,
which appears to be the one that the knock offs are based on. Difference that I can tell, is that in the “real” model they use A1 A2 A3, the knock off sketches used A0 A1 A2 (yes I know that is all software, but seems like that is really the only difference). So I downloaded the library for the “real” thing. And it’s the same library I got from eBay (Including, being written for A0, A1, A2)
What does this tell me....even the real MMA7361 is still Chinese junk :-) and probably made by the same people that made the knock offs. Anyways, the datasheets and everything else seemed to be the same. Turns out it didn’t work with the real library either. About to give up on these accelerometers, I decided to change the reference voltage in the sketch from 3.3 (yeah, that is what they started with) to 3 and then later to 5, both of those values seemed
to work. The demo sketches all seem to work, and seem to be fairly easy to use, there is no documentation that I found for the library, but there are three sketches included, RAW values, G-Force values, and voltage values, this sensor basically is a variable resistor changing the voltages as it moves around. Using any of these values thou you can figure out it’s position in space, if it’s falling or moving forward or backward. I am going to try and step something up to
say just that before the demo tonight.
Here is another place to get the library, it appears to be the same library that was included with
the eBay auction:


The Parallax Memsic2125 is a two axis accelerometer capable of measuring acceleration up to plus or minus 2g, it is a digital accelerometer, unlike the above one that is analog. It emits pulses whose duration corresponds to the acceleration of that axis. and it is very sensitive. It uses 2 wires, one for the X and one for the Y axis. And needs 5 volts, and ground (it has two
grounds and both need ot be hooked up).  It also has a Temp pin, but that wasn’t used in the demo sketch, no library is needed to make this work. it uses the pulsein() function. See the arduino website, it has a lot of information, and
sketches for this:


more info on the Memsic2125


Personally, I think I like the MMA7361 more then the Memsic2125 and cost wise the MMA7361 seems to be a clear winner. Memsic2125 - $30.00, MMA7361 (knock off from eBay) $2.50,MMA7361 (From Elecrow, not knock off) $7.00 - it’s a clear winner. But then again, the MMA7361 uses 7 pins to work, and if you are limited on pin space, well...
I guess you pay big for less pins being used.

No comments:

Post a Comment