Electronics > Projects, Designs, and Technical Stuff

EMF pickup from amplifier in I2C line causing glitches. (Now with scope trace!)

<< < (4/31) > >>

Starlord:

--- Quote from: Fungus on July 03, 2016, 09:59:19 am ---
--- 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:


--- End quote ---

The first thing I did before I used the scope was watch that video. :)  But this thing is battery powered, so no worries about blowing my scope up.

Starlord:

--- Quote from: radar_macgyver on July 03, 2016, 10:05:56 am ---Are you sure the I2C chip is picking up radiated interference, as opposed to conducted interference?

--- End quote ---

I'm not sure of anything.


--- Quote ---
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.

--- End quote ---

Yes, a battery.

But I don't believe it's a power supply issue because the noise is there regardless of whether I have the volume turned up. If the speaker is attached, the LEDs glitch, even if the volume is turned way down to where its almost inaudible.  The glitching stopped when I turned the volume down to 0 however.  In that scope capture, the volume was way down, but not off.  I will have to do another test to see how the results differ with the volume all the way off, but I believe I did test that and there was still just as much noise.


--- Quote ---
--- 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).

--- End quote ---

Well, I'll try that and report on what I see.

Starlord:

--- Quote from: Fungus on July 03, 2016, 09:51:07 am ---It would severely limit the data rate. Is that a problem?

--- End quote ---

Considering I2C is already super slow and I need to update something like 32-64 bytes worth of data 60 times a second for smooth animation?  Probably.


--- Quote ---
--- Quote from: Starlord on June 29, 2016, 10:28:44 pm --- I also considered the possibility of using shielded Cat5.

--- End quote ---
That would be the first thing I'd try. Transmitting data over long, unshielded cables simply doesn't work.

--- End quote ---

I'd prefer to avoid that if at all possible.  As I said before, I'd be throwing away money on the cables I already purchased, and the shielded cables are more expensive and have bulky connectors.

Besides, you say it simply doesn't work yet the signal looks fine with the speaker disconnected, and the whole thing works great.  I have to assume that the speaker is only causing a problem because it is in such close proximity to the cable.  So if I can get rid of that noise, it ought to be fine.  And if it does fail in some rare circumstances, well, that's acceptable for this setup.


--- Quote ---
--- Quote from: Starlord on June 29, 2016, 10:28:44 pm ---Should I add a resistor on series with the shield?  I'd rather not go this route because I'd have to buy new more expensive Cat5 cables and modify the design of one or both boards to add the shielded connectors, and I don't know if the shield would affect the I2C transmission.

--- End quote ---
As a quick test you could try wrapping the cable in tinfoil. Ground it at one end and see what happens.

--- End quote ---

I guess if it comes to it, I'll try that.  I don't have any tinfoil right now to test with.

Starlord:

--- Quote from: 2N3055 on July 03, 2016, 10:05:07 am ---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...

--- End quote ---

I spent a year on this thing, so I've got no choice but to make it work with minimal changes.  On the upside, it doesn't matter if the thing isn't 100% reliable under all conditions.  If it works 99% of the time that's good enough.



--- Quote ---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..

--- End quote ---

I understand what you're saying.  It's just that the signal looks pretty clean without that amp on.  And I'm not sure I _can_ lower the value of the pullup resistors by much. I'll have to check and see if all the parts can handle lower values.  The 2K I'm using right now is really close to the 1.56K minimum the I2C spec states for 400KHz operation, but I know at least some of the chips I have support higher speeds so they should be okay with lower pull ups.  But dropping that to 1/5th... 400 ohms... that seems crazy.  At that level I'm afraid it might start acting like a voltage divider and pull the line up from 0V when it's supposed to be low.  Plus that SMT resistor is probably gonna get pretty warm.


--- Quote ---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....

--- End quote ---

Well, I followed TI's reference design.  They said the filter part was optional, so I took them at their word.  :/

Starlord:

--- Quote from: Fungus on July 03, 2016, 09:52:59 am ---
--- 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.

--- End quote ---

And the AS1115?  I'm also running a MCP3021.  Looking through their datasheets I can't see any clear indication they can sink 20mA.  Though if the AS1115 is to spec for the 1MHz bus it supports, then that at least should be able to handle 20mA.  But the MCP is a 400KHz device.

And the Atmega1284P two wire serial bus electrical characteristics state the minimum pull up assuming 3mA... it's not clear if they're just referring to the minimum to remain in spec for that bus speed or if those pins have some special requirement in I2C mode.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod