Trouble detecting I2C device

I’m having an issue detecting the MaxBotix MB-7137 through I2C. According to the documentation, Pin 4 is used for SDA, and Pin 5 is used for SCL. I added in 4.7kOhm pull-up resistors as well as documented here.

(MB-7137 pins from bottom to top: GND - V+ - 5 - 4 - 3 - 2 - 1)

I use this code to scan for any I2C devices.

I’m kind of at a loss here. I’m assuming I’m not doing the pull-up resistors correctly?

EDIT: The connection on the breadboard may be flimsy. After taking it out and putting it back in a couple of times, it now returns 0x70 as the address

So you got it working? Good!
Loose connections on the breadboard is a classic. Been there, done that :wink:

I guess you could power it from the 5V interface also if you want since D0 and D1 are 5V tolerant? That way you’d get better range?

1 Like

Yeah, admittedly it’s not the first time I had the loose-connection issues, but it has been a while since I used a breadboard so I forgot to troubleshoot that :flushed:

This setup is eventually to be powered by a 3.6V LiSOCl2, so no 5V (I also only need to use about 50% of its max. range)

Cool. Be sure to use the VIN pin for power? I’ve killed a couple Photon’s trying to feed them 3.3V directly. Didn’t work out at all since my regulated power wasn’t precise enough, so I killed them :roll_eyes:

Got something good out of it though - I got to take a peek under the metal cap:

2 Likes

They actually supply their power through the JST-connector, and a Voltage Booster keeps the supply at a steady 3.6V. It has worked great for me so far, haven’t had to do any surgeries on them yet :stuck_out_tongue_winking_eye:

Oh My… So used to working with Photon that I didn’t see your Electron in that first picture :stuck_out_tongue: