Page 1 of 1

Broken I2C bus.

Posted: 02 Jun 2019, 14:09
by Hairyloon
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?

Re: Broken I2C bus.

Posted: 02 Jun 2019, 16:03
by rayE
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??????????? :-)

Re: Broken I2C bus.

Posted: 02 Jun 2019, 16:55
by Hairyloon
Possibly, but the puzzle there is of why does an identical module in the same circuit behave differently?

Re: Broken I2C bus.

Posted: 02 Jun 2019, 18:06
by grovkillen
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.

Re: Broken I2C bus.

Posted: 03 Jun 2019, 11:51
by Hairyloon
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.

Re: Broken I2C bus.

Posted: 03 Jun 2019, 18:47
by ThomasB
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

Re: Broken I2C bus.

Posted: 03 Jun 2019, 18:50
by Hairyloon
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.

Re: Broken I2C bus.

Posted: 05 Jun 2019, 19:18
by kimot
ESP8266 do not have i2c bus.
It is sw emulated.
So try different pins or check possibly conflicts (TX,RX - disable serial port etc.)