Sensebender Micro - Problem accessing accelerometer via SDA and SCL pins



  • Has anyone had any issues using the SDA and SCL pins on the Sensebender Micro.

    I have a sketch running on an Arduino Pro Mini ( 3.3v 8 Hz) that accesses a Sparkfun accelerometer via the SDA and SCL pins using a Sparkfun library. I’m able to upload this same sketch to the Sensebender Micro but when I run the sketch the accelerometer fails to initialize.

    This same sketch runs perfectly on a Nano v3 and the Pro Mini. I’m trying to get the sketch working on the Sensebender Micro so that I can take advantage of the Micro’s low power consumption since I’m planning to run the Micro on AA batteries.

    Thoughts?

    Thanks


  • Mod

    @jwoods this is just a wild guess, but maybe you need to add pullups to the signal lines? https://learn.sparkfun.com/tutorials/i2c/i2c-at-the-hardware-level


  • Admin

    @mfalkvidd

    There is two 4k7 pullups on the sensebender micro, as i2c is used for the onboard sensor.

    @jwoods

    One thought, can you use the onboard Si7021, while the accelerometer is attached to the sensebender? Also, which chip is used for the accelerometer? (Sparkfun has 3-4 different versions with different chipset onboard)



  • @tbowmo - Thanks for the response. I'm using the mma8452q accelerometer. I'll have to pull some code together to see if I can get a reading from the si7021 while the accelerometer is attached.


  • Admin

    @jwoods

    You could just use the default sensebender micro sketch 🙂

    just a thought, is there pullups on sda/scl on the Sparkfun board? If so, they are in parallel with the pullups on the sensebender, and when in parallel, the total resistance will be lower, and create a stronger pullup, which might mess up things.



  • @tbowmo I’ve complied and uploaded the default sensebender micro sketch. The sketch hangs on the following line of code humiditySensor.begin(); -- actually hangs on Wire.endTransmission(); inside the begin procedure from the SI7021 library.

    For my original sketch that accesses the accelerometer… that code also hangs when I call the a readRegister function that is also trying to execute Wire.endTransmission() function.

    Could I have inadvertently damaged the sensebender and or the I2C circuitry?


  • Admin

    It hangs without the accelerometer connected? Could sound like hw problems.

    Do you have a scope so you coukd2check sda /scl lines?



  • @tbowmo Correct. Hangs with and without accelerometer connected. No scope, only multimeter.



  • @tbowmo - Just to close the loop on this one. A few weeks ago I had ordered a few additional Micro's.... they arrived today, uploaded my sketch and got good readings from the accelerometer. Must have been a problem with hw and or I2C circuitry. Thanks again for your assistance.


  • Admin

    @jwoods

    Thanks for the feedback 🙂 problem could be either the atmega or the Si7021 chip on board the micro.. But hard to figure out without access to a scope..

    (Btw. you have checked the board for solder bridges etc, right?)


Log in to reply
 

317
Online

6.7k
Users

7.6k
Topics

80.3k
Posts

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.