0

I2C pass-through problem on SD Datalogger
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

I2C pass-through problem on SD Datalogger

by bryanbarmore on Sat Sep 19, 2020 5:22 pm

I recently bought the SD card datalogger shield (Rev B). I added it to an existing project that connects to an MPU-9250 via I2C. The existing project works fine with data being reported via Bluetooth. After soldering the header pins I just added the shield on top of of RedBoard (behaves as Arduino UNO) and there is no communications to the MPU-9250. Connection to Bluetooth module works fine. I tried some debugging:
1) check continuity between board and headers. Everything was fine.
2) took shield off Redboard, plugged wires into SDA and SCL on datalogger shield and then plugged wires from pins for SDA and SCL to SDA/SCL header on Redboard; No connection.
3) tested continuity on wires and checked out. Checked for cross-connection and no problem.
4) repeated #2 but used digital pins 10 and 11 for pass through and I2C worked.

So it seems something isn't working with the SDA/SCL slots on the datalogger. I've previously got the RTC on the datalogger working with no issues.

Attached are two photos of the datalogger with header pins.
Thanks for any help.

DataShield bottom.jpg
DataShield bottom.jpg (107.87 KiB) Viewed 151 times


DataShield top.jpg
DataShield top.jpg (119.8 KiB) Viewed 151 times

bryanbarmore
 
Posts: 4
Joined: Sat Sep 19, 2020 5:08 pm

Re: I2C pass-through problem on SD Datalogger

by mikeysklar on Mon Sep 21, 2020 2:08 pm

Hi BryanBarmore,

We do have two versions of the datalogger shield. The older had A4/A5 connected to SDA/SCL respectively. The newer does not.

https://learn.adafruit.com/adafruit-dat ... and-config

Older Shield Pinouts
On the older shields, the pinout was fixed to be:

Digital #13 - SPI clock
Digital #12 - SPI MISO
Digital #11 - SPI MOSI
Digital #10 - SD Card chip select (can cut a trace to re-assign)
SDA connected to A4
SCL connected to A5
The RTC (DS1307) I2C logic level was fixed to 5V

Rev B Shield Pinouts
ICSP SCK - SPI clock
ICSP MISO - SPI MISO
ICSP MOSI - SPI MOSI
Digital #10 - SD Card chip select (can cut a trace to re-assign)
SDA not connected to A4
SCL not connected to A5

On an UNO, note that Digital #13 is the same as ICSP SCK, #12 is ICSP MISO, #11 is ICSP MOSI, SDA is tied to A4 and SCL is A5. However, that is only true on the UNO! Other Arduino's have different connections. Since the shield no longer makes the assumption it's on an UNO, it is the most cross-compatible shield.

On the bottom of the Rev B shield, you can see that if you have an older Arduino where there is no ICSP 2x3 header, and no SDA/SCL pins, you can short the solder jumpers closed.

If you are using the shield with a 3.3V logic Arduino, you may want to change the Vio jumper. This is what the 10K pullups for I2C are pulled up to. Honestly, the pullups are very weak so if you forget, it's not a big deal. But if you can, cut the small trace between the center pad and 5V and solder the other side so that Vio is connected to 3V

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: I2C pass-through problem on SD Datalogger

by bryanbarmore on Mon Sep 21, 2020 5:58 pm

Thanks mikeysklar but I don't think that is my problem. If I plug into the SDA and SCL pinon the RedBoard directly, everything works. So those pins are fine on the RedBoard. When I include the shield and plug into the SDA and SCL pin on the shield, it doesn't work.
It seems to be something with those pins. I tested with sitting the shield on the side and using jumper wires to connect sensor to shield and shield to RedBoard. If I move the wires to D10 and D11 on the shield but leave them connected to SDA/SCL on the RedBoard, I can communicate with the sensor.
I'll rerun the test and post a picture later tonight.

bryanbarmore
 
Posts: 4
Joined: Sat Sep 19, 2020 5:08 pm

Re: I2C pass-through problem on SD Datalogger

by bryanbarmore on Mon Sep 21, 2020 6:28 pm

So this is the test I tried.

datalogger passthrough SDA-SCL.jpg
datalogger passthrough SDA-SCL.jpg (79.91 KiB) Viewed 143 times


Jumper wires are connected to SDA/SCL on arduino and pass through SDA/SCL on datalogger shield.

And now the same test except I use pins 11 & 12 on the datalogger shield for the pass through.

datalogger passthrough pin11-12.jpg
datalogger passthrough pin11-12.jpg (127.88 KiB) Viewed 143 times


Test 1 fails to connect to the sensor and Test 2 does connect to the sensor.
I don't think it should matter but the sensor runs at 3.3V and the RedBoard/arduino at 5V so on the breadboard there is a logic level converter.

Is there anything special the datalogger board does to SDA and SCL that could be causing problems?

Thanks!

bryanbarmore
 
Posts: 4
Joined: Sat Sep 19, 2020 5:08 pm

Re: I2C pass-through problem on SD Datalogger

by bryanbarmore on Sun Sep 27, 2020 11:53 am

So I tracked down the problem. there was an I2C address conflict between my sensor and the RTC. I noticed the AdaFruit page about the data logger shield doesn't actually list the address. It wasn't until I found an older reference that mentioned the address 0x68 and that triggered the memory for my sensor which was also 0x68. I changed that address and now everything works fine.

bryanbarmore
 
Posts: 4
Joined: Sat Sep 19, 2020 5:08 pm

Re: I2C pass-through problem on SD Datalogger

by mikeysklar on Mon Sep 28, 2020 5:55 pm

Good find. That is confusing that there are two devices defaulting to the same i2c address.

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.