Arduino sensor kit - confusion about accel library

Hello,

I just bought a new Arduino sensorkit, and while I love it, am finding some of the explanation info confusing. For example, with the accelerometer, the Arduino instructions say it is a Grove/Seeed unit using a Freescale chip MMA7660FC with specs of +/- 1.5g. I tried using the example Grove/Seeed library that Arduino links on the sensor kit website and cant make it work. Then I tried the Arduino sensor kit library itself, which is described as a wrap around of other OEM libraries and then explains it uses the library for accelerometer LIS3DHTR which has much higher g ratings, its obviously a totally different instrument. Anyway, with the LIS3DHTR library within the sensor kit library I get readings with the simple .ino example, although I don't know what the units are (g maybe?) with the unit at rest I get readings of roughly -1.0, 0.1 and 0.01 steady state (they vary a bit but that is the avg. Can anyone advise? What library SHOULD I be using? Shouldn't I be getting readings of zero for the three axes? Thanks, Steven Lightfoot

Gravity works downwards so one axis should be one. The other two should be close to zero.
G

1 Like

This is what you expect. If properly configured, the accelerometer library will report +1 g along any vertical axis, pointing in the upward direction, -1 g if the axis points downward, and approximately zero g for any horizontal axis.

Intermediate orientations lead to intermediate values along various axes.

The axial directions are usually printed on the sensor PCB.

Fair enough. Honestly that is a Homer Simpson Doh! kind of moment. Thank you. Do you have any comment on the library I should be using for this MMA7660FC?

You should use the library written for the chip you have, which is not entirely clear from your post. Please post a close up, focused pic of the sensor board.

Thanks, ouf. I now see what is going on. I bought the sensor kit mainly to get used to using instrumentation with Arduino, and its great. I do have applications for some accelerometers for vibration measurement, and I see this MMA7660FC wont really help (too low gs) but its definitely useful for orientation. Thanks for your comment. Any thoughts on the best library for this?

Cool thx, I will post a photo later today. This is the link to the Arduino sensor kit site. You can see they have a link at the bottom to the Grove/Seeed website where they describe the actual chip.

Sensor Kit (arduino.cc)

As far as I know, the MMA7660FC and the LIS3DHTR are completely different, so the library for one will not work for the other.

The issue is the Arduino sensor kit library explicitly says it uses a sub library for a different chip with very different g ratings, and this Arduino Sensor kit library v1.2.1 library works for me.

Arduino_Sensorkit - Arduino Reference

Agree, which is why I am confused. I will post a photo later.

Libraries can be written for multiple chips, and autodetect which one to support.

Now that I looked more closely (I am having a lot of Homer Simpson moments today its clear its really a LIS3DHTR unit, though maybe the chip is still MMA7660FC. So its more clear now why the Arduino library works. The LIS3DHTR library also says its rated for up to 16 g which is WAY better for my needs, which is great.


So I guess I have answered my own question (with your help) although I dont know why the Arduino sensor kit explanation and example page sends you to the Grove Seed site for the MMA7660FC.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.