Author Topic: Funky I2C edge with slew control enabled  (Read 4064 times)

0 Members and 1 Guest are viewing this topic.

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: us
Funky I2C edge with slew control enabled
« on: October 01, 2016, 03:14:45 am »
I'm doing a project involving a PIC24FJ64GA102 talking to a MPL3115A2 altimeter over I2C. The altimeter is the only slave device.
There are 1K pullups, and the traces from altimeter to mcu are ~5mm long.

When initially setting up the I2C driver, I scoped the start condition and got this:


Now that doesn't look particularly good, so I tried without slew control and got:


Much better without slew control. So any ideas why there's so much ~100MHz oscillation when it's enabled?  :-// Isn't the point of slew control is to reduce EMI and ringing? Seems like it would make it worse in this case.

It will probably work either way, but haven't tried yet. This is going into a gadget that absolutely cannot afford having flipped bits in the I2C bus data.
 

Offline rx8pilot

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: Funky I2C edge with slew control enabled
« Reply #1 on: October 01, 2016, 03:28:20 am »
Your pull-up may be a bit heavy - interfering with the slew rate control. How difficult is it to try a 3k so see if it changes?
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Funky I2C edge with slew control enabled
« Reply #2 on: October 01, 2016, 03:30:03 am »
Heh, they made a slew rate control that manages to control nothing at all... :-DD

Possibly you've terminated the pin incorrectly.  The period may be characteristic of trace length.  The trace may not be properly terminated, matched or dampened.  A resistor or ferrite bead (right at the pin) may do it, or some R+C dampers on the trace (probably at the far end).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: us
Re: Funky I2C edge with slew control enabled
« Reply #3 on: October 01, 2016, 03:44:29 am »
How difficult is it to try a 3k so see if it changes?

Actually that was one of my first thoughts too. I wacked a 10k in (didn't have any 3k), got this with the slew control:


So definitely better, but not even close to a nice smooth ramp-down that I expected.
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: us
Re: Funky I2C edge with slew control enabled
« Reply #4 on: October 01, 2016, 03:47:06 am »
A resistor or ferrite bead (right at the pin) may do it, or some R+C dampers on the trace (probably at the far end).

Hmm I've never actually encountered I2C termination anywhere. Are there any recommendations/resources for that?
More importantly, is even necessary? Without the slew rate control it's a pretty nice (albeit fast) edge.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Funky I2C edge with slew control enabled
« Reply #5 on: October 01, 2016, 04:15:08 am »
Well.. if the pin worked to spec, termination wouldn't be needed, which is the point.

They're running that "slew rate control" pretty hot, by the looks of it.

Oh, obvious dumb things should be gotten out of the way first -- your grounding, bypass and layout is good, right?  :-//

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline rx8pilot

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: Funky I2C edge with slew control enabled
« Reply #6 on: October 01, 2016, 04:18:40 am »
Can you show the schematic and layout?
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: us
Re: Funky I2C edge with slew control enabled
« Reply #7 on: October 01, 2016, 04:37:22 am »
Can you show the schematic and layout?

Sure. Schematic doesn't say cap values, but the C12 and C11 are 10uF X7R and the rest are all 1uF X7R. The groundplane is mostly solid.
Relevant part of schematic:


Relevant part of layout (highlighted traces are SCL/SDA):
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Funky I2C edge with slew control enabled
« Reply #8 on: October 01, 2016, 06:12:03 am »
Given how short your I2C bus is, I'd turn off the slew rate control and be done with it. Don't spend any more time on a feature which doesn't work, that you don't need.

Is there any reason why you're using routed power instead of a proper power plane?

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: us
Re: Funky I2C edge with slew control enabled
« Reply #9 on: October 01, 2016, 06:20:09 am »
Given how short your I2C bus is, I'd turn off the slew rate control and be done with it. Don't spend any more time on a feature which doesn't work, that you don't need.

Is there any reason why you're using routed power instead of a proper power plane?

Yeah that's what I'm gonna do, I was just curious if anyone had a similar issue.
The reason for routed power is so I can use a cheap 2-layer board.

Thanks for the suggestions everyone.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Funky I2C edge with slew control enabled
« Reply #10 on: October 01, 2016, 02:53:30 pm »
Grounding and supply are as good as they're going to get!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: Funky I2C edge with slew control enabled
« Reply #11 on: October 01, 2016, 03:34:40 pm »
Grounding and supply are as good as they're going to get!
But does that include the scope probe? I would be interested to know how the probe was grounded.
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: us
Re: Funky I2C edge with slew control enabled
« Reply #12 on: October 01, 2016, 08:22:43 pm »
But does that include the scope probe? I would be interested to know how the probe was grounded.

It was grounded with one of those short spring leads into a ground via in the vicinity of the altimeter. So should be pretty good and low impedance. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf