Broken I2C bus.

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Hairyloon
Normal user
Posts: 42
Joined: 19 Dec 2018, 00:30

Broken I2C bus.

#1 Post by Hairyloon » 02 Jun 2019, 14:09

I was trying to attach a real time clock to an ESP-01: a DS1307 which is an I2C device.
I did an I2C scan on the ESP Easy interface, and get something at 0x8, with every other address giving an "Unknown error".
I checked the wiring and scanned again and got nothing, but errors...
After a few repeats giving similar results, I was about to post here when it occurred to me that perhaps there was a problem with the module: a new module and it is all fine.
I'm a bit puzzled as to what's occurring: if the module is duff, then how come it works at all?
I'm going to try wiping it and re-flashing it. I suppose it might make sense to test the GPIO ports with something basic like an LED, but does anyone have any thoughts on it?

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Broken I2C bus.

#2 Post by rayE » 02 Jun 2019, 16:03

Pull up's?
https://learn.sparkfun.com/tutorials/i2 ... ware-level

OR
Tools - Advanced - I2C ClockStretchLimit..................i have absolutely no idea what this does but im guessing it does something??????????? :-)

Hairyloon
Normal user
Posts: 42
Joined: 19 Dec 2018, 00:30

Re: Broken I2C bus.

#3 Post by Hairyloon » 02 Jun 2019, 16:55

Possibly, but the puzzle there is of why does an identical module in the same circuit behave differently?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Broken I2C bus.

#4 Post by grovkillen » 02 Jun 2019, 18:06

I've had 2-3 broken units out of the 200+ I've flashed. So I'd say it's broken and trash it. Not worth the time to fault search.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Hairyloon
Normal user
Posts: 42
Joined: 19 Dec 2018, 00:30

Re: Broken I2C bus.

#5 Post by Hairyloon » 03 Jun 2019, 11:51

grovkillen wrote: 02 Jun 2019, 18:06 I've had 2-3 broken units out of the 200+ I've flashed. So I'd say it's broken and trash it. Not worth the time to fault search.
Fair point, but at the moment I'm running at about 50% so I'd like to get some idea of what's going wrong, and I'm also wondering if the defective module can still be used if the application is not critical and does not involve I2C.

Probably what's gone wrong is that I fried the modules somehow before I worked out what I was doing, but I don't recall doing anything that would have done that.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Broken I2C bus.

#6 Post by ThomasB » 03 Jun 2019, 18:47

I'd like to get some idea of what's going wrong
A careful visual inspect is your best tool.
1. Visually inspect the i2c pins' copper traces with a magnifier. Use a sharp knife between neighboring traces to remove contaminants. And check the soldered regions at the ESP8266 chip.
2. Check the data & clock pullup resistor values on the RTC board. Usually should be around 2K - 3K ohms. Much higher values may cause random i2C success on some boards.

FWIW, I recommend using short (<5cm) i2c wires from ESP8266 to the RTC during your troubleshooting (long wires can affect the i2c data/clock waveforms). Do not try longer wiring until after correct operation is observed.
I'm also wondering if the defective module can still be used if the application is not critical and does not involve I2C.
Sure, nothing wrong with that. But the modules are very low cost, so it is an easy decision to toss them in the junk bin.

- Thomas
Last edited by ThomasB on 03 Jun 2019, 18:51, edited 1 time in total.

Hairyloon
Normal user
Posts: 42
Joined: 19 Dec 2018, 00:30

Re: Broken I2C bus.

#7 Post by Hairyloon » 03 Jun 2019, 18:50

ThomasB wrote: 03 Jun 2019, 18:47
I'm also wondering if the defective module can still be used if the application is not critical and does not involve I2C.
Sure, nothing wrong with that. But the modules are very low cost, so it is an easy decision to toss them in the junk bin.
Yeah, but I am a crazy person and I hate to throw anything away if it might be useful.

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: Broken I2C bus.

#8 Post by kimot » 05 Jun 2019, 19:18

ESP8266 do not have i2c bus.
It is sw emulated.
So try different pins or check possibly conflicts (TX,RX - disable serial port etc.)

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests