# Trouble detecting I2C device

**URL:** <https://community.particle.io/t/trouble-detecting-i2c-device/40889>\
**Category:** Troubleshooting\
**Created:** [April 6, 2018, 5:34pm UTC](https://community.particle.io/t/trouble-detecting-i2c-device/40889 "2018-04-06T17:34:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vitesze](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/vitesze/32/15427_2.png) [@Vitesze](https://community.particle.io/u/Vitesze)\
**Post date:** [April 6, 2018, 5:34pm UTC](https://community.particle.io/t/trouble-detecting-i2c-device/40889/1 "2018-04-06T17:34:33Z")

</div>

I’m having an issue detecting the [MaxBotix MB-7137](https://www.maxbotix.com/documents/XL-TrashSonar-WR_Datasheet.pdf) 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](https://community.particle.io/t/i2c-information/4667).

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

 ![Untitled](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/c/3c67a675104a8cd15cc9afc51ad43d1c176b23dd.jpg)

I use [this code](https://go.particle.io/shared_apps/5ac7a964926c9fe8cb00049e) 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?

 ![Untitled](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/b/f/bf9c33e06165584050ed4c5262e27886689eb23c.png)

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

---

<div class="post-metadata">

**Author:** ![jenschr](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jenschr/32/4792_2.png) [@jenschr](https://community.particle.io/u/jenschr)\
**Post date:** [April 6, 2018, 8:25pm UTC](https://community.particle.io/t/trouble-detecting-i2c-device/40889/2 "2018-04-06T20:25:32Z")

</div>

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

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?

---

<div class="post-metadata">

**Author:** ![Vitesze](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/vitesze/32/15427_2.png) [@Vitesze](https://community.particle.io/u/Vitesze)\
**Post date:** [April 6, 2018, 8:34pm UTC](https://community.particle.io/t/trouble-detecting-i2c-device/40889/3 "2018-04-06T20:34:01Z")

</div>

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 😳

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)

---

<div class="post-metadata">

**Author:** ![jenschr](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jenschr/32/4792_2.png) [@jenschr](https://community.particle.io/u/jenschr)\
**Post date:** [April 6, 2018, 8:39pm UTC](https://community.particle.io/t/trouble-detecting-i2c-device/40889/4 "2018-04-06T20:39:51Z")

</div>

Cool. Be sure to use the [VIN pin for power](https://docs.particle.io/datasheets/photon-(wifi)/photon-datasheet/#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 🙄

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

> **[Projects](http://jcprojects.tumblr.com/post/161106484709/for-a-recent-project-i-managed-to-burn-up-two)**
>
> For a recent project I managed to burn up two Particle Photon’s by accidentally feeding them a not so well regulated 3.3V on the 3.3V pin. But what’s beneath the metal cap? I popped it off and used my...

---

<div class="post-metadata">

**Author:** ![Vitesze](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/vitesze/32/15427_2.png) [@Vitesze](https://community.particle.io/u/Vitesze)\
**Post date:** [April 6, 2018, 8:56pm UTC](https://community.particle.io/t/trouble-detecting-i2c-device/40889/5 "2018-04-06T20:56:07Z")

</div>

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 😜

---

<div class="post-metadata">

**Author:** ![jenschr](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jenschr/32/4792_2.png) [@jenschr](https://community.particle.io/u/jenschr)\
**Post date:** [April 7, 2018, 12:57am UTC](https://community.particle.io/t/trouble-detecting-i2c-device/40889/6 "2018-04-07T00:57:20Z")

</div>

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