Electronics > Projects, Designs, and Technical Stuff

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

<< < (28/31) > >>

engineer_in_shorts:

--- Quote from: Starlord on July 14, 2016, 05:27:06 pm ---.....
So how you come to the conclusion that it doesn't work, when it clearly does, and there are clear ways which it could be made better and much more reliable, I don't know.
....

--- End quote ---

Why do you lie to your self? NOT RELIABLE = IT DOES NOT WORK ON YOUR PRODUCT, the very fact that you are asking for help on it confirms IT IS A PROBLEM.  [This kind of pig headed attitude is why things like the batteriser mob exists.]

I would love to read the manual for your board: "The user can control the device using I2C, please note that there is only control when there is zero volume and the speaker leads are disconnected."   :-DD

T3sl4co1l:
The reason money matters is:

0. If you're just giving these away, well, I believe you'd still be liable; but you wouldn't make any money off of it, so you can't do that, anyway.  At most, you might make very small quantities of whatever (like, one-offs), which is still a small risk.  So, there's money involved.

1. Then, quantity.  Sold product means production quantities, and multiplied visibility.  No, you're not talking about much (hundreds), but "production" doesn't mean millions, it just means producing anything.  Having that cash flow means it's scalable, that you can produce (ideally) arbitrarily as much as you can sell.

2. It means you have something to loose.  Well, apparently your personal finances are in such order that you don't have that kind of resource... but someone suing you wouldn't know, or care, about that.

Between you, your customers, your customers' neighbors, and the FCC, you may have more trust in them than any of us know about, but that kind of thing is always a bad idea... I wouldn't suggest trusting a customer any further than their contract / terms of sale extends.  Even if you know them... no, ESPECIALLY if you know them.  If they're any good at all, they'll be that much more understanding of such an agreement.

Speaking of contracts, note you can't put "avoid making this criminal" in there.  IANAL, but I suspect you could construct something functionally similar, though: in this case, you might stipulate that the product is sold as test equipment only, and is to be operated in a suitably shielded and filtered test chamber.  If your customers don't follow suit, that's their problem.  If it looks bad to have this in the fine print, well... cost of lost sales versus cost of lost buttocks, your choice.

Speaking of lawyers, being able to sell a hundred of something, is also a good reason to talk to one.  You'll want to read up on things yourself, look for limited liability clauses and examples, come prepared, and within a few hours of face time, discuss how to form it into a pretty solid agreement.  Lawyers are just as cheap as any other professional service (which is to say, yeah..), so make the best of it.  It will be well worth it, as long as you can amortize that cost right now.

Tim

Starlord:

--- Quote from: engineer_in_shorts on July 14, 2016, 05:45:37 pm ---Why do you lie to your self? NOT RELIABLE = IT DOES NOT WORK ON YOUR PRODUCT, the very fact that you are asking for help on it confirms IT IS A PROBLEM.

--- End quote ---

Sitting on my bench, the product worked fine. If there were any glitches, they were occasional, and barely noticeable, since they would only last for 1/60th of a second in between LED updates. A tiny glitch here and there is acceptable, ESPECIALLY if it means I don't have to spend six to nine months and thousands of dollars redesigning the whole thing from the ground up.

Now that I have added filtering to the amplifier, I expect there will be no glitches at all in general use. 

Can I guarantee that if someone is standing next to a CB radio that is transmitting that it won't glitch?  No.  I could not even guarantee that if I added a shielded cable and buffered the communications.  I have absolutely no way to test it under every possible form of interference it might encounter.  If it doesn't work in those instances though, so what?  Why hold my device to a higher standard than my WiFi router designed by a company with hundreds of millions of dollars in he bank and dozens of highly trained engineers at their disposal, which stops working when the microwave is on?  If there's interference, move away from the source.  No big deal.


--- Quote ---I would love to read the manual for your board: "The user can control the device using I2C, please note that there is only control when there is zero volume and the speaker leads are disconnected."   :-DD

--- End quote ---

Well happily that is not the case now, because I've added filtering to the amplifier's output to remove the noise that was coupling into the I2C lines.  At least I hope so.  I won't know for sure until next month when I get the prototype back. 

T3sl4co1l:

--- Quote from: Starlord on July 14, 2016, 01:27:20 pm ---I suspected that might be the case, as I'm aware of how if you try to compute a Fourier transform on a square wave you'll find an infinite number of frequencies would be required to recreate it perfectly.

Anyway, I'll keep that in mind if I eventually decide to put proper drivers on the I2C lines.

But I would ask why if shielding is so necessary with data transmission over CAT5 cable, why most CAT5 is not shielded?  Does it operate at frequencies that aren't in important bands?  Or does the differential nature of the signal cancel out the noise?  If I used a differential I2C driver chip, would I not need shielded cable?

--- End quote ---

An ideal square wave (truly zero risetime) has harmonics out to infinity, but a real (bandlimited) square wave has only finitely many (imagine that, a real 'square' wave doesn't glow with visible band (~500THz) EM radiation!).  This manifests as finite rise time, and rounded-off corners (or ringing, as the case may be).

For example, you can start with a square wave, which has harmonics as 1/N.

If you introduce linear sloped edges (as the SPICE PULSE source provides), then harmonics go as 1/N until a break frequency (on the order of F = 1/t_r), after which point they go as 1/N^2.

A triangle wave (which is also the time integral of a square wave, so filtered as 1/N) has harmonics as 1/N^2.  You can think of it this way: over suitable frequency ranges, the square wave looks "square" (at lower frequencies), or "triangular" (the linear rising/falling slopes).

If you round it off again, you might turn the linear slopes into quadratic slopes (the rising edge becomes a parabolic section from zero to half voltage, and another flipped upside down, going from half voltage to full voltage).  Now there's a second break frequency, where harmonics go from 1/N^2 ("triangular") to 1/N^3 ("parabolic", I suppose).

If you repeat this process with an infinite series of break frequencies, you could produce a wave where, past some 'ultimate' cutoff frequency, the harmonics drop as 1/e^N, i.e., becoming (for all intents and purposes) utterly zero over not very many steps.  This would be a pretty good representation of a real, physical signal -- and, because the exp(t) function has a useful property*, your signal can be real and physical, too.

*It can be differentiated forever.

So, all that said and done -- you can go back to the scope and make some informed guesses.  The risetime defines where the harmonics start dropping off much faster; the "heel" and "knee" of the edge define where things drop even faster; and so on.  You probably don't have much beyond the 10s of MHz in that waveform, so you probably don't have to worry about radiating VHF.  You do still have to worry about MF and HF, but these require a lot of cable length to radiate effectively, so you can get away with things pretty well as long as your cables are limited in length.

Whether that's good enough for your purpose, who knows...

As for differential signals, going back to what I was saying about delivering discharge current into free space: if the '+' wire charges an equal amount that the '-' wire discharges, simultaneously, then the net change (to free space) is zero -- no radiation!  It's that simple.  This (and some other reasons) is why CAT5 can carry gigabits through free air, without appreciable degradation, radiation, or susceptibility.  (The hardest "other" reason is, they use signals that can be coupled with transformers.  Not every signal can afford such a luxury...)

Tim

janoc:

--- Quote from: Starlord on July 14, 2016, 04:32:34 pm ---
--- Quote ---Or at least recognize that you are way out of your skill level and get help early.

--- End quote ---

You think I just jumped into this without doing any research?  One of the first things I googled was whether or not I2C could be made to work over long distances.  The consensus was yes, it can.  I then did the math, and according to the spec, I was good to go. 

http://electronics.stackexchange.com/questions/106265/maximum-i2c-bus-length

--- End quote ---

That is not what I meant. One of the key things to being a good engineer is to recognize own limitations and ask someone more skilled in the particular domain for help instead of carrying on and digging yourself into a hole, either because of lack of finances or too large ego (or both). By that I mean an actual engineer actually looking over/helping you design your product, not you cherry-picking irrelevant bits and pieces online.

That StackExchange question doesn't consider neither the several feet of cable you are using nor the output of the power amp running parallel to your signal wires. Ever heard of crosstalk? Why did you even consider that it is somehow relevant to your problem? Moreover, none of the answers really apply to your case - guy running serial connection over many meters but using UART not I2C, another one using USB, etc. The only somewhat relevant info on that page is that last guy pointing out the P82B96 line driver - but you didn't choose to use that anyway, so ...

If anything, you pointing to that link only shows you don't really understand what you are doing. Electronics isn't software engineering where you can often "wing it" and it still works, only perhaps a bit slower or less memory efficient. Physics doesn't give a damn whether you are trying to feed a family, doing it as a hobby or for profit. Either you do things properly and it will work or you don't and it will not. Flailing hands in the air and whining about people being mean to you won't change anything on that.


--- Quote ---Can I guarantee that if someone is standing next to a CB radio that is transmitting that it won't glitch?  No.  I could not even guarantee that if I added a shielded cable and buffered the communications.  I have absolutely no way to test it under every possible form of interference it might encounter.  If it doesn't work in those instances though, so what?  Why hold my device to a higher standard than my WiFi router designed by a company with hundreds of millions of dollars in he bank and dozens of highly trained engineers at their disposal, which stops working when the microwave is on?  If there's interference, move away from the source.  No big deal.

--- End quote ---

You should stop obsessing about CB radios, those are irrelevant to the problem. There are many other devices that rely on radio communication that you can be easily interfering with. Radio isn't used only by truckers, you know. When your neighbor stops being able to open his garage door because the receiver of his garage door opener will be saturated with the noise from your amplifier, he won't be happy. The same for grandma's hearing aid picking up the noise. Or a house alarm getting triggered few houses down the street.

Your wifi router is FCC certified and has to accept interference, even if it means it stops working - 2.4GHz is the same frequency band that also microwaves use. That is the nature of that frequency band - shared use. Most frequency bands are not like that and things that are not certified as transmitters (and licensed) are not allowed to radiate anyway, whether intentionally or not.

Your device has to be scrutinized more carefully than that cheap router, because it is not supposed to emit any RF to begin with. And it also pushes a lot more power than the 1W or so your router does, so the potential for shenanigans is much higher.

BTW, rather than complaining about your router you should ditch your cheap microwave that is obviously leaking RF due to poor or damaged shielding (likely the door seal). You could have a much more serious issue than just not working wifi with that - it could be even a health hazard.


--- Quote ---Sitting on my bench, the product worked fine. If there were any glitches, they were occasional, and barely noticeable, since they would only last for 1/60th of a second in between LED updates.
--- End quote ---

 :palm: So the occasional glitches even on the bench in a controlled and pretty much ideal situation didn't actually make you wonder that something could be off with your design? If it was glitching on the bench already, in the real world it would not work at all - as you have discovered. You cannot engineer things to barely work on the bench hoping it will be good enough. But I guess you have learned that now. There is a concept of design margin that covers this. Dave uses the "belt and braces" term for it too.


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