FLORA and MSA311 Stemma QT accelerometer

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Dalts
 
Posts: 8
Joined: Thu Apr 28, 2022 5:21 am

FLORA and MSA311 Stemma QT accelerometer

Post by Dalts »

Hi everyone,
I am a complete n00b when it comes to circuits but after watching the excellent videos on your website decided to take the plunge for my wearable project using a Flora. I thought it would also be cool to have an accelerometer attached, but as the Flora-specific one is no longer available, I went with a MSA311 Stemma QT.

After much gnashing of teeth to get the Flora to talk to Windows 10 (good news for anyone else stuck: it worked over USB 3.0 once I found a self-powered hub), I then followed a mash-up of instructions to add the MSA311 using the Stemma QT to crocodile clip set (https://www.adafruit.com/product/4398). First, I used the colour instructions on that page to connect to my Flora: Black-GND, Yellow-SCL, Blue-SDA and Red-3.3V.

I followed the instructions here (https://learn.adafruit.com/msa301-tripl ... er/arduino) to run the accelerometer demo, but when it runs I get an error message in the serial monitor of Arduino saying "Failed to init i2c address. Failed to find MSA301 chip".

I checked that the MSA301 library I downloaded was the latest version that included support for the MSA311, and the power light on both boards (Flora and MSA311) is solid green. I am at a loss for how to troubleshoot this, can anyone provide me with any ideas? Thanks in advance!

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: FLORA and MSA311 Stemma QT accelerometer

Post by dastels »

My immediate thought is that alligator clips are not a good idea for something involving a high speed signal like I2C. You need better electrical connections that don't have the chance of shorting to adjacent clips/pads. Ideally they should be soldered.

Dave

User avatar
Dalts
 
Posts: 8
Joined: Thu Apr 28, 2022 5:21 am

Re: FLORA and MSA311 Stemma QT accelerometer

Post by Dalts »

Thanks Dave,
I do have a JST-pin cable too, I was just trying the crocodile clips before I soldered anything as I'm learning and couldn't find any resources online to 100% confirm that these boards would work together. Have clipped the clips on very carefully to make sure there are no shorts/crossed contacts, can try soldering if that's the only way forward. I suspect it's a problem with the library/demo more than the wiring, but that's just gut feeling rather than knowledge or experience.

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: FLORA and MSA311 Stemma QT accelerometer

Post by dastels »

They should work fine together. That's the beauty of something like I2C.

Hmm.. Your error says it failed to find an MSA301 but you're using an MSA311. As per the product page:
The MSA311 is very similar to the MSA301, but is not a drop-in replacement. The I2C address has changed from 0x26 to 0x62!


The library supports both. Instantiate an instance of Adafruit_MSA311 instead of Adafruit_MSA301.

I.e. change line 7 of the accel demo:

Code: Select all

Adafruit_MSA311 msa;
Dave

User avatar
Dalts
 
Posts: 8
Joined: Thu Apr 28, 2022 5:21 am

Re: FLORA and MSA311 Stemma QT accelerometer

Post by Dalts »

Hi Dave,

THANK YOU SO MUCH! That fixed it, seems so obvious now :)

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: FLORA and MSA311 Stemma QT accelerometer

Post by dastels »

Cool. It wasn't totally obvious... I ended up browsing the library code to find that.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Wearables”