Author Topic: I2C data transfer issue - signal is probed  (Read 1005 times)

0 Members and 1 Guest are viewing this topic.

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I2C data transfer issue - signal is probed
« on: October 01, 2019, 12:50:05 pm »
For outputting info on a oled display which uses the I2C protocol I had some stability issues.
https://www.eevblog.com/forum/projects/nerfo-meter-measuring-the-speed-of-nerf-darts/msg2717374/#msg2717374

To get it stable I reduced the clock speed to 50 Khz, but now I wanted to know why this matters.

So soldered some wires at the receiving end, just long enough for a probe hook.

When no data (In rest) is send, some stuff can be seen on the line. The same stuff could be seen at the VCC, so I added a 1000 uF and a ceramic, to try to eliminate that. Only for the VCC it did.

The other pictures are self explanatory.

What I would like to know is can this be improved? The wires to the display are one pair of power wires, and 2 loose ones for data. (The project thread has photo's of it) So a capacitive problem seems not likely.

And if it can't be improved, is the 200 Khz signal good enough, or should I drop the freq further?
« Last Edit: October 01, 2019, 03:48:44 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: I2C data transfer issue - signal is probed
« Reply #1 on: October 01, 2019, 03:59:42 pm »
I went for the 100 Khz, faster doesn't really offer benefits.

From what I've read using a smaller pull-up resistor might be an option, however I did't want reverse engineer the tiny components/pcb of the display module.

I also went to 5V vcc, but that didn't make much difference in how the signal looked.

That makes me wonder where the pull-up resistors are. Do they use the internal pull-up resistors of the ATMega2560? Does the display also has its own? (Will measure that soon.)
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3229
  • Country: be
    • Freelance Hardware Engineer
Re: I2C data transfer issue - signal is probed
« Reply #2 on: October 01, 2019, 04:11:12 pm »
- That 'stuff' on the VCC bus shouldn't be there. I think you have an actual problem there somewhere

- It is obvious @400kHz that the pull-up is too-large in value. The pullup makes sure the line gets back to power supply voltage once released (slaves and masters High-Z). You can see there isn't enough time to return to the supply rail before a new period starts. Have you measured the resistance between SDA and/or SCL and the power rail? Nothing keeping you from adding a 4k7 or so on your end. Don't have to reverse eng anything.
 
The following users thanked this post: HendriXML

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: I2C data transfer issue - signal is probed
« Reply #3 on: October 01, 2019, 05:04:07 pm »
Maybe I should check the VCC of the Arduino board as well. It is has a daisy chained power source, and I don't see much of a bypass capacitor, so that might be the cause.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1966
  • Country: us
Re: I2C data transfer issue - signal is probed
« Reply #4 on: October 01, 2019, 05:37:16 pm »
I use 2.2k ohm pullups for 1Mb I²C and get a rise time of 192.7ns. Which works flawlessly. I would assume your display module has the pullups and they're probably 10K. Internal pin pullups are usually too high a value to be effective. Adding a 4.7K like Ice-Tea said is probably a good idea at least to see how it affects the signal. I also wouldn't be using high res to check those signals. Use normal or peak detect.
 
The following users thanked this post: HendriXML

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: I2C data transfer issue - signal is probed
« Reply #5 on: October 01, 2019, 05:54:49 pm »
I used normal, but that showed the traces very dimmed. (Not good for posting them here)
Using HiRes made them vivid again, without altering it much.


“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: I2C data transfer issue - signal is probed
« Reply #6 on: October 01, 2019, 07:38:43 pm »
I went for 2x 3K3 PU resistors. In that case  it only works stable with 3.3 V VCC. The max frequency that is stable is 400 Khz. That's is also the max freq in the datasheet of the SH1106, so that's ok.

The power supply to the Arduino board is very stable and high enough, so no issues there.
« Last Edit: October 01, 2019, 08:02:48 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: I2C data transfer issue - signal is probed
« Reply #7 on: October 01, 2019, 07:42:16 pm »
The (pull up) resistance measured that was 2x around 250K between VCC and the data lines.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline kathy

  • Contributor
  • !
  • Posts: 11
  • Country: cn
    • Maclight display
Re: I2C data transfer issue - signal is probed
« Reply #8 on: January 05, 2020, 08:40:43 am »
To I2C interface of OLED module, adding the resistors is necessary between the Data and clock signal between Vdd.
If the frequency is too low, the oled screen might have flicker.

Custom make lcd module, OLED module, https://www.szmaclight.com
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf