Electronics > Projects, Designs, and Technical Stuff
EMF pickup from amplifier in I2C line causing glitches. (Now with scope trace!)
<< < (3/31) > >>
Fungus:

--- Quote from: Starlord on July 03, 2016, 08:59:16 am ---

The rise time obviously isn't great

--- End quote ---

It's awful. I'd definitely use lower value pullups.

There's no lower limit on I2C pullups except what your devices can pull to ground. The lower the better.

Those TI devices can sink 20mA or more on SDA (see datasheet) so you can go much lower than 2k.
Fungus:

--- Quote from: Starlord on July 03, 2016, 08:59:16 am ---Note that when I probed this, I had the ground lead attached to the board, and I was probing the end of the cable.  I'm not sure if this matters.

--- End quote ---

It matters a lot, especially on unshielded cable.

Connect the ground lead to the return ground on the line you're probing.

But remember the clip is connected to mains earth - watch this video:

2N3055:
Hi!
Let me throw in my 2c...
I2C bus is chip interconnect...something you use on a PCB with maybe 25cm (10 inches) distance...
It is very prone to noise pickup and very sensitive to capacity of the com lines..
What are you trying to do is realm of CAN and RS485 an the likes..
I'm not saying that with enough duct tape (filters, buffers etc..) you will not be able to stabilize your prototype.. If you put enough effort you will but it will be hard to reproduce later and your product will be unreliable...

And now shortly as to why...

First, as they say devil is in details.. As you can see on your scope trace, your rise time is takes up whole signal.. It should resemble some kind of trapezoid with soft edges.. Slopes are OK, but there is no top.. :o.

What that means is that while signal raises, at one point it will reach threshold to be recognized as HIGH (I know you know all this but bear with me).. at slow speed I2C has NO hysteresis, and at fast it has 0.05V (50mV).. which means as your signal slowly rises, reaches threshold level, and at that point when it is around the right level, even 50mv (and less for slow speed) will make it go up and down the threshold many times, potentially triggering logic transitions... What it will do at that moment nobody knows... By spec it should swallow pulses shorter that  50ns, or not...  That is why you need quick, fast and clean logic transitions..

The fact that you build a shortwave radio transmitter that poses as audio amplifier doesn't help..  :o That thing is a EMI nightmare, filter everything, supplies, ground, input, output, sever pipes....

Anyways, good luck with that, that will be great learning experience...

Take care,


Sinisa
 
radar_macgyver:
Are you sure the I2C chip is picking up radiated interference, as opposed to conducted interference? Do they share a common power supply? Common AC power? If this is due to conducted interference being picked up through the power supply, adding ferrites there might be worthwhile.

And yes, open-collector single-ended signals with 2k pullups are good candidates for all kinds of interference. Lower pullups, maybe experiment with a small (~10-100 pF) capacitors on the lines to form an RC filter.


--- Quote from: Starlord on July 03, 2016, 08:59:16 am ---Note that when I probed this, I had the ground lead attached to the board, and I was probing the end of the cable.  I'm not sure if this matters.  It would be a bit more difficult to attach the alligator clip at the end of the cable, but I guess I should try that next and see if there is any difference.  My intuition tells me I won't see much of a difference.

--- End quote ---
Big difference. Please see: http://www.cbtricks.com/miscellaneous/tech_publications/scope/abcs_of_probes.pdf

Specifically the section on ground lead effects (page 26).
Starlord:

--- Quote from: Kleinstein on July 03, 2016, 09:47:34 am ---The rise time is way longer than 200 ns. Depending on what you use for the rise time (usually 10% to 90%, sometimes 0 - 70%, rarely 30-70%), the rise time is more like 500-1000ns.

--- End quote ---

Ah crud.  I just noticed that the I2C spec says 0.7Vdd.  As in 0.7 * Vdd.  I thought it was stating 0.7V is considered a high signal.


--- Quote ---This low rise-time with all the noise (might not be as bad without the probe), glitches are expected.  A 1:1 probe has a considerable capacitance and thus could increase the rise time. A 1:10 probe is not a problem at this speed.

To get a shorter rise time, use a smaller pull-up. More like 1/5 the current value. At higher capacitance lower value pull-ups are needed.
--- End quote ---

I am already using 2K pull ups.  These should be in-spec according to the I2C spec.  And the I2C spec seems to prohibits anything less than around 1.56K for a 400KHz bus speed with 5V supply.

So I don't know if I can go much lower.  But I guess I should take a look at the datasheets for the chips I'm using and see if they all support fast mode or specify the current for those pins at 20mA.  As for the Atmega I'm using to interface with them I know that doesn't support over 400KHz, but I know most of the pins can handle 20mA including the I2C pins when they're not being used for I2C, so I suspect it can handle it.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod