Author Topic: EMF pickup from amplifier in I2C line causing glitches. (Now with scope trace!)  (Read 45024 times)

0 Members and 1 Guest are viewing this topic.

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Never said anything about EMC - don't care.  I was curious about you asking for help on a forum and a number of top posters trying to point your project in a different direction, only for you to ignore them.

I haven't ignored anything anyone has told me.  Weighing advice against one's budget and deciding you can't afford to implement it doesn't mean you're ignoring the advice, have learned nothing, and won't take said advice into account when designing future devices.

Quote
Nobody is initiating any witchhunts.

Quote
And yes i did read the post about your business issues. In fact it is nicely archived here:

Nobody's going on a witch hunt!  He's just trying to find out who you are so he can publicly expose you, and digging up archives to old posts you specifically wanted to avoid having people read!


Quote
http://web.archive.org/web/20141220033446/https://www.eevblog.com/forum/projects/customer-w-unrealistic-expectations-what-would-you-have-charged-for-this-job/?

After I posted that I was surprised and overjoyed that I got such positive and supportive and helpful responses from everyone.  It made me gad I came to this forum, and think highly of the people here.  What's happened in this thread... not so much.

Quote
If you are struggling to put food on the table STOP tinkering with these projects AND GO AND FIND A SALARIED JOB --- IMMEDIATELY. If you have one and it's not enough money/hours then go and find another TODAY.  Trust me, it's for your own health both physically and mentally.

And do WHAT?  I don't have a degree in electrical engineering.  I'm all self-taught.  Nobody would hire me.  And my software engineering skills are for the most part 20 years out of date.  Do you know anyone who's looking to hire a C++ programmer who is well versed in Arduino?  Didn't think so.  Right now, it's this, or work retail, and I'm earning more money doing this than I would be working for minimum wage.  And as a side bonus, I don't want to die every morning when I get out of bed.  I'm poor as shit and barely scraping by but I love what I'm doing, and I've learned a ton these last six years.  Having no money all the time is stressful to be sure but I wouldn't be any better off in a dead end job, and I think in another six years I might be able to grow this into a sizable business, if I can just get over this hill I've been pushing this boulder up for so long.
« Last Edit: July 14, 2016, 01:46:47 pm by Starlord »
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3925
  • Country: de
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?

Actually a lot of CAT 5 wiring is shielded. I would say both the differential nature of the signal (thus the fields cancel out) and probably also the shape of the signals and termination of the cable is what makes the difference.

I am not sure what you mean by "differential I2C driver chip" as I2C is defined as single-ended system. However, there are translators/drivers for e.g. RS485 with I2C interface. So you can run RS485, which is differential, over your cable instead of fighting with I2C which was not designed for that. However, doing that will likely require changing the protocol you are using, because RS485 is not I2C, obviously. So depending on what you are communicating with, you may have to add/reprogram the MCUs as well.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3925
  • Country: de
And do WHAT?  I don't have a degree in electrical engineering.  I'm all self-taught.  Nobody would hire me.  And my software engineering skills are for the most part 20 years out of date.  Do you know anyone who's looking to hire a C++ programmer who is well versed in Arduino?  Didn't think so.  Right now, it's this, or work retail, and I'm earning more money doing this than I would be working for minimum wage.  And as a side bonus, I don't want to die every morning when I get out of bed.  I'm poor as shit and barely scraping by but I love what I'm doing, and I've learned a ton these last six years.  Having no money all the time is stressful to be sure but I wouldn't be any better off in a dead end job, and I think in another six years I might be able to grow this into a sizable business, if I can just get over this hill I've been pushing this boulder up for so long.

Um, well, so you solution is to pour more money down the drain, because you don't have marketable skills?  :palm:

It is great that you are doing what you love to do, but I think you would have been better off trying to update the skills you actually have first, solve your financial problems and only then try to start a business. Or at least recognize that you are way out of your skill level and get help early. It is going to get only much more expensive later when you have burned through a ton of cash already.

Unfortunately engineering and business don't reward effort, only results, so that you have spent years "pushing a boulder up the hill" sadly doesn't mean it will pay off.

I wish you luck, you will really need it. You have more balls than I would have in such situation.


« Last Edit: July 14, 2016, 02:19:48 pm by janoc »
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
The argument about Lady Ada and Sparkfun is not really relevant neither, because they are selling kits and components, not complete products. These don't have to be EMC tested, it is the responsibility of whoever integrates them into a final product. It doesn't make sense to test a component without the enclosure or other parts of the final system because they all can affect the performance - e.g. a metal grounded case acting as a shield vs. a plastic one which does not. And even then both Sparkfun and Adafruit are actually applying for FCC testing these days, even though they don't really have to.

They are selling products to people with the knowledge that the people buying them don't know what they're doing, and will wire them up in such a way that they're likely to emit all sorts of radiation. You're just giving them a pass because they're helping people learn electronics rather than simply designing a finished product and selling it.  But what if I told you my boards don't come with a battery or a power switch, or a speaker or even an enclosure, and that it's the end user's job to add those things?  Is it my fault if they don't install it in a shielded metal case that is grounded or that their speaker wires won't be less than three inches long?  I know they're not going to do that, but Adafruit and Sparkfun also know their end customers won't be doing that when they buy the convenient electronics "kit" that is a battery pack, microcontroller, and neopixels to solder together and stick on their clothes, sneakers, or backpack.  And I know for a fact that the amplifiers Adafruit sells have no more than a ferrite bead filter on the output and just require you to plug in a 12V supply.  How could they possibly expect that to be used in a manner that won't cause EM interference?   

Quote
Oh puh-leeze. You have been told and explained many times what you have to do, but you shoot down most of the proposed solutions right away. Or you lack the understanding or means to implement them. And that is somehow the fault of everyone else but you.

I didn't shoot them down.  I explained that I don't have the funds to implement them, and asked for alternatives.

I can take criticism of my designs just fine. What I can't take are personal attacks because you don't like the fact that I have two hands tied behind my back and I'm doing the best I can with what I've got.

Quote
And the deal with the new account - you somehow think that if you do that people will miraculously start solving your problems for you, because obviously the only thing standing in the way is them knowing it is @Starlord who is asking these questions?

I think that now nobody is going to be willing to answer any of my questions because they know I'm trying to make money at this and that I can't afford to do full EMC compliance testing.

Quote
You are asking people to do free consulting for you, refuse to provide information, shoot down the proposed solutions, think that rules don't apply to you for some reason and show incredible arrogance in general and now think that making a new account will somehow change this? Do you think that everyone is an idiot?

I don't know what information it is you think I've refused to provide, unless you mean my name and address, and if that's what you mean, too bad!

And incredible arrogance?  The more I learn about electronics, the more I realize how little I know.  And being unwilling to simply take people's money and run, which what you're asking me to do, isn't arrogance, it's honesty.  Also, wanting to keep a roof over one's head?  Also not arrogance, just a will to survive.

You mistake my unwillingness to implement the solutions presented to me because I can't afford to as me thinking I know better than everyone else.

Quote
A guitar pedal with a few opamps or linear power amp is typically not going to spew interference all over the place, unlike your class D power amplifier switching in the megahertz range and connected using long wires. If you don't see or understand the difference between these, I think you really should first educate yourself more before you dig yourself into an even bigger  hole than you are in already.

And yet someone relayed a story in this very thread about how I should be so scared of the FCC because they'd heard of some boutique guitar pedal designers getting fined.  So either they're lying, or you're wrong.  And I admit, I have no idea which is which.
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
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?

Actually a lot of CAT 5 wiring is shielded. I would say both the differential nature of the signal (thus the fields cancel out) and probably also the shape of the signals and termination of the cable is what makes the difference.

I am not sure what you mean by "differential I2C driver chip" as I2C is defined as single-ended system. However, there are translators/drivers for e.g. RS485 with I2C interface. So you can run RS485, which is differential, over your cable instead of fighting with I2C which was not designed for that. However, doing that will likely require changing the protocol you are using, because RS485 is not I2C, obviously. So depending on what you are communicating with, you may have to add/reprogram the MCUs as well.

NXP sells a buffer chip that takes I2C as input, converts it to a differential signal that can be sent over two twisted pairs, and can then convert it back at the other end:
http://www.nxp.com/documents/data_sheet/PCA9615.pdf

They also sell a version with 3 lines, which I'm guessing is for I2C chips that have an interrupt:
http://www.nxp.com/documents/data_sheet/PCA9616.pdf

I've mentioned this chip before in the thread.  I considered using it at one point early on in the project, but due to costs and my calculations indicating the system would work without it, I decided not to go with it, and I put the spare lines to use for some other stuff so I can't really go back now and use it.  Unless maybe I don't have to worry about voltage droop and my logic levels with this in place, in which case maybe I could get rid of a couple of my power lines to make room for it.  But though that might work it would have to be saved for a future revision.
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
It is great that you are doing what you love to do, but I think you would have been better off trying to update the skills you actually have first, solve your financial problems and only then try to start a business.

Trial by fire.

If I had not needed to find a way to make money six years ago when all my software endeavors failed to make ends meet, I wouldn't have picked up an Arduino and I wouldn't have been motivated to learn the black art of electronics. 


Quote
Or at least recognize that you are way out of your skill level and get help early.

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

Quote
If your wire is 20pF/30cm and you have another 50pF of stray and input capacitance, you're limited to 2.25m of cable length. 

Quote
I work for a company making sensors. Most of them are based on I2C sensor chips, those devices can be split in two, so you can install the CPU part in one place and the sensor part in another. We conducted quite a lot of tests on the I2C connection between the device CPU and the I2C sensors. At 100 kHz, with a good error recovery protocol, 25m can be easily reached using basic wires. We were even able to reach 100m once with CAT5 cable.

Quote
IIC is a synchronous protocol, and as such, it can be run arbitrarily slowly to meet system requirements with respect to distance and noise.
There are many examples of using IIC over a cable, all the way from ACCESS.bus back in the 1990s to how it is used today to retrieve EDID information from video displays.

Quote
The insane sounding lengths like 10,25, and 100m are perfectly possible, and i use the method often(with uart not i2c, but the method stands) when i need to put stuff together quickly.

Yes, there is one dissenting opinion there, talking about how it is designed for only short runs on a PCB, but overwhelmingly the response was that it can work.  And I think I've proved that.  It doesn't work WELL, without special driver chips, but it can work.

Speaking of which here is an application note from NXP describing different drivers that can be used to make it work over long cables:
http://www.nxp.com/documents/application_note/AN10658.pdf
« Last Edit: July 14, 2016, 04:34:40 pm by Starlord »
 

Offline engineer_in_shorts

  • Regular Contributor
  • *
  • Posts: 122
  • Country: gb
I do not understand why you are arguing about IIC on long cables.  Since it clearly is not suitable because you have communication issues, and what's more is that you have been able to identify these as line transmission issues.

Secondly you didn't look very hard at your own sources of research as they are talking about 100kHz rate, not 400kHz.
 

Offline CJay

  • Super Contributor
  • ***
  • Posts: 4136
  • Country: gb
I do not understand why you are arguing about IIC on long cables.  Since it clearly is not suitable because you have communication issues, and what's more is that you have been able to identify these as line transmission issues.

Secondly you didn't look very hard at your own sources of research as they are talking about 100kHz rate, not 400kHz.

Confirmation bias, he's possibly unwittingly chosen to read the best out of the messages, one of them even says it's not about I2C but using a UART, another talks about cable capacitance but he's not qualified the cable, another talks about using an error correction protocol which to my knowledge isn't part of standard I2C and yet another mentions slowing down the bus speed until it works.

None of those messages prove his point, at best, they prove that a protocol that was also known as Inter Integrated Circuit bus can possibly be bodged to work over greater distances
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
I do not understand why you are arguing about IIC on long cables.  Since it clearly is not suitable because you have communication issues, and what's more is that you have been able to identify these as line transmission issues.

It clearly IS suitable, IF you drive the signals properly.  Saying I2C can't be used with long cables is WRONG, and might lead someone to think they can never use an I2C chip on any board that is remotely located from their microcontroller.  But you can, IF you use an appropriate buffer chip.  Is that a hack?  Sure, I guess one could make that argument.  But it'll work nonetheless if the companies selling those chips are to be believed. 

Naturally, one should take into account the cost of using said buffer chips versus the advantages of using I2C instead of SPI.  But if the chips you want to use are all I2C, or SPI versions are all significantly more expensive, or you can't spare all the extra CS lines you'll need, then using those buffer chips may just make sense.  I suppose one could use an IO expander to circumvent the issue of requiring multiple CS lines, but then you may be no better off in the cost department than using the buffer chips.

Quote
Secondly you didn't look very hard at your own sources of research as they are talking about 100kHz rate, not 400kHz.

And you didn't pay very close attention to this thread because 100KHz vs 400KHz made absolutely no difference in this case, and furthermore no matter how much I slow the I2C bus down, the slew rate will remain the same; out of spec for both 100KHz and 400KHz with the pull-up resistor sizes I chose.
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Confirmation bias, he's possibly unwittingly chosen to read the best out of the messages, one of them even says it's not about I2C but using a UART, another talks about cable capacitance but he's not qualified the cable, another talks about using an error correction protocol which to my knowledge isn't part of standard I2C and yet another mentions slowing down the bus speed until it works.

None of those messages prove his point, at best, they prove that a protocol that was also known as Inter Integrated Circuit bus can possibly be bodged to work over greater distances

I read all the messages.  Even if half say it works, and half say it doesn't, and there were far more saying it works, who am I to believe?  I can't tell who has more experience.  And the people who say it doesn't work perhaps have never even tried it.  While the people so said they got it to work clearly did try it, and succeeded.  This compounded with the official I2C spec itself having sections suggesting the best way to route I2C signals over twisted pairs and long cables, could lead me to only one conclusion: it must be possible.

And they were right.  It is possible.  I got it to work.  It's glitchy when there's noise, I'll give you that.  And it's way out of spec and whether it will be 100% reliable is certainly questionable.  But it works.  And if I had only FM+ devices on there where I could use stronger pullups, perhaps it would have been immune to noise.  Or, perhaps if I had used a shielded cable it would have been immune to noise.  Or, I could have used one of several buffer chips to make it immune to noise.

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.

I mean I get why you would shy away from it if possible since it's not as immune to noise as other protocols.  But in my particular usage scenario, it made the most sense.

Kind of like how using a 4017 decade counter to animate some LEDs makes sense, even though the thing can barely sink any current, if you are a beginner and need something really simple and cheap and easy to implement.  That's where I got my start actually.
 

Offline engineer_in_shorts

  • Regular Contributor
  • *
  • Posts: 122
  • Country: gb
.....
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.
....

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
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
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.

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

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. 
« Last Edit: July 14, 2016, 06:13:53 pm by Starlord »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
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?

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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3925
  • Country: de
Quote
Or at least recognize that you are way out of your skill level and get help early.

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

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.

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.

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


« Last Edit: July 14, 2016, 08:00:33 pm by janoc »
 
The following users thanked this post: SteveyG

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21226
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
I got it to work.  It's glitchy when there's noise, I'll give you that.  And it's way out of spec and whether it will be 100% reliable is certainly questionable.  But it works.  And if I had only FM+ devices on there where I could use stronger pullups, perhaps it would have been immune to noise.  Or, perhaps if I had used a shielded cable it would have been immune to noise.  Or, I could have used one of several buffer chips to make it immune to noise.

Ah. This is clearly a meaning of "work" that is unfamiliar to me. I wonder how long it will be before your unique definition is recorded in dictionaries.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21226
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
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.

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

Just so.

Engineering is 10% thinking about how things will work, and 90% about thinking about how they will fail. And then avoiding the failure modes.

Hackers and the less competent engineer-wannabes never quite seem to realise that.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
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.

I recognize my limitations.  That's why I came here looking for help when I ran into a problem I wasn't sure I could solve on my own in a reasonable period of time.


Quote
By that I mean an actual engineer actually looking over/helping you design your product, not you cherry-picking irrelevant bits and pieces online.

Can't afford to pay someone more talented than you $50/hr to look over your shoulder as you design a product?  Then you're a bad engineer and shouldn't bother trying to design anything.  Got it.

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

Sure I've heard of it.  But until now, I was flying blind.  I've been doing this for six years, and until a couple weeks ago I'd never even used a scope.  I couldn't afford one.  So, while I knew crosstalk was a thing, I had no idea if it was occurring in any of my circuits, or how serious of an issue it was.  As long as my circuit worked, that was good enough for me.  And after experiencing it once, it's not like I've suddenly gained the insight I need to know when and where it might crop up again so I can prevent it before it happens.  Well, except in the case of this amplifier.  I know now that I need that filter on the output if I'm gonna have a long data cable nearby.

Quote
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 guy using USB isn't using USB, he just worded it poorly.


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

Ah, but I was AWARE of it.  See, I didn't just jump into this like an imbecile.  I did my research, like I said.  And the plan ALWAYS was that if I could not make it work using just pullup resistors, that the fallback plan would be to use one of those differential buffer chips or the P82B96 to make it work.  I was certain those would work.

Of course, I was only certain because I wasn't aware of what my amplifier would be doing to my data transmission.  But if I'd been aware of that, I would have implemented the filtering on it in the first place, and we wouldn't even be having this conversation because everything would have worked well enough for me with just the pullups.


Quote
If anything, you pointing to that link only shows you don't really understand what you are doing.

Gee, you think?  Personally, I think that if you think YOU know what you're doing, you're the fool.  Because the more I learn about his stuff the more I'm certain that I could be at it for the next 30 years and still be learning new stuff.  And frankly, that's pretty awesome.  I HATED software development for the opposite reason.  Once I learned a language, I basically knew everything I needed to know to write any app in it.  Then it just became rote.  I like solving problems. 

Quote
Electronics isn't software engineering where you can often "wing it" and it still works, only perhaps a bit slower or less memory efficient.

I beg to differ.  I've been winging it for six years.  And my stuff still works.  But it may be a bit buggy.  And it may fry the occasional SD card.  Well, the previous version did anyway.  I fixed that particular issue.

And code, like electronics, can simply not work, or crash constantly if you don't know what you're doing.  One can easily write into program memory by mistake if you're not careful with your pointer arithmetic (and you're not coding on an architecture that prohibits that) and then you'll get random crashes and have no idea what's causing them.  Heck, even on the Atmega where you can't overwrite program memory, you can still end up having your variables crash into your stack because you've only got 2K of ram to work with and that's a fun bug to track down since there's no way to know exactly how much RAM you're using on either end. 

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

Define work.  Because in software, a program is considered to work even if it has hundreds of bugs just waiting to wreak havoc, and people have come to expect that in any software package. I wouldn't say a board that doesn't work perfectly in every instance is necessarily broken.  Is a toy that glitches when the batteries run low instead of shutting off broken?  Or did the toy maker decide that was an acceptable mode of failure for a product of that price range and purpose? 

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

 :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?

Of course I wondered what was wrong with the thing when I saw glitching on the bench.  But having no scope, I had no idea if it was a software or hardware issue.  So I tweaked the software, and eventually got the glitching to go away.  At least 99.9% of it.  The 0.1% was barely noticeable, to the point that I wasn't even sure if I was seeing it. It could have been an artifact of multiplexing in my peripheral vision.  And since I was pressed for time and money, if I couldn't even be sure it was happening myself, my customers probably wouldn't notice it.


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

Dave also says that failures can be a good learning experience:

 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 8135
  • Country: gb
Define work.  Because in software, a program is considered to work even if it has hundreds of bugs just waiting to wreak havoc, and people have come to expect that in any software package. I wouldn't say a board that doesn't work perfectly in every instance is necessarily broken. Is a toy that glitches when the batteries run low instead of shutting off broken?  Or did the toy maker decide that was an acceptable mode of failure for a product of that price range and purpose?

Work: Function without error across the entire expected and acceptable range of operating conditions.

Discharged batteries are outside the acceptable operating conditions. Presence of a radio transmitter in a licensed band is not outside acceptable conditions, it is inevitable. If your product craps itself when someone walks past with their phone ringing, it does not work!

No, you can't test every possible source of interference, but you can test quite a range easily enough with items you have at home, and you can make a serious effort to protect it against interference. Alternatively, you can just shove a 'high' speed single ended interface down a bit of unshielded cable and hope for the best.. and receive the worst.

Quote
I know now that I need that filter on the output if I'm gonna have a long data cable nearby.

No, you need that filter, and a reasonably proven working example for that matter, on the output whenever you're going to have a cable attached to it. It is not about it interfering with your own product, it's about everything else it interferes with!
« Last Edit: July 14, 2016, 08:40:27 pm by Monkeh »
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
And do WHAT?  I don't have a degree in electrical engineering.  I'm all self-taught.  Nobody would hire me.  And my software engineering skills are for the most part 20 years out of date.
I also lack a degree and my software skills are mainly C and old C++ with a few assemblers thrown in (So also 20 years out of date to some ways of thinking), it has not stopped me being hired as lead hardware engineer (Who ends up doing a disgusting amount of software).

Task domain knowledge is the key to getting jobs without a degree, by which I mean that 'electronics hobbyist' is unimpressive, electronics hobbyist who understands diving or soil mechanics or concrete engineering or hydrology or broadcast TV workflow or fleet logistics or whatever is potentially very interesting to the right sort of company (The dirty little secret is that figuring out what problem needs solving is often harder then designing something to solve it).

I would second the comment that design is less about the ways it can work then about eliminating the ways it can fail, and EMC is not exactly an area that gets no discussion, you can never ignore physics, them laws need no court. 

Regards, Dan.
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Quote
I know now that I need that filter on the output if I'm gonna have a long data cable nearby.

No, you need that filter, and a reasonably proven working example for that matter, on the output whenever you're going to have a cable attached to it. It is not about it interfering with your own product, it's about everything else it interferes with!

I only didn't include the filter in the first place because I didn't know the amplifier would interfere with anything.  Now that I know it might, I'll include it in future designs.
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5155
  • Country: au
    • send complaints here
It's funny how the moment I mentioned I'm trying to make a meager, VERY MEAGER, living at this all the hate began to spew forth.  Nobody cared when they thought I was just doing it for myself.
Right now, it's this, or work retail, and I'm earning more money doing this than I would be working for minimum wage.
Its one or the other, you keep trying to walk this line of need when you actually have a self interested want. This isn't the business for you, most startups fails and most of us would have taken on plans we couldn't complete, its the nature of exploring and inventing but you have to accept that you don't always get the positive outcome. You've backed yourself into a corner with promises for delivery and taking payment for a "product" that doesn't work, and thats your real problem. You've learnt a lot in the process but as my posts have mentioned already, you won't find free and easy solutions to your problems, it needs going a long way back in the design process and starting again.

Having no money all the time is stressful to be sure but I wouldn't be any better off in a dead end job, and I think in another six years I might be able to grow this into a sizable business, if I can just get over this hill I've been pushing this boulder up for so long.
So you'd still like us all to subsidise your business endeavours with free consulting.
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Its one or the other, you keep trying to walk this line of need when you actually have a self interested want.

Well sure, I don't need to enjoy life, I could live out the remainder of my days working a job I hate for minimum wage, every morning getting up at the crack of dawn wanting to kill myself, I GUESS.

Quote
This isn't the business for you, most startups fails and most of us would have taken on plans we couldn't complete, its the nature of exploring and inventing but you have to accept that you don't always get the positive outcome.



I've been trying to start a business for 20 years. I've been a failure for 17 of them.  Most startups fail?  Every startup fails... until it succeeds. 

Designing electronics is the first somewhat successful business venture I've had.  And yes, I consider it a success, even if I'm only barely earning a living, because barely earning a living working for myself doing something I love is a thousand times better than barely earning a living making someone else rich while doing something I hate.

But aside from that, I can now actually see my business growing.  Especially in the last year, after several manufacturers targeting agile business models popped up specializing in small runs of PCBs.  It only took LadyAda ten years to grow her company into a $33M juggernaut. There's no reason I can't do the same.

:box:


Quote
So you'd still like us all to subsidise your business endeavours with free consulting.

Do you do this professionally?  Do you watch Dave's videos?  Do you learn anything from them?  How dare you!

You know in all my days, I have never seen a software developer refuse to help another software developer because they were doing it for a living.  We actually have conferences where people go to give free advice to their direct competitors.

In fact you might have heard of this little thing called virtual reality, and a guy named Palmer Luckey?  Maybe you've also heard of John Carmack, creator of Doom and rocket scientist?  Well Palmer's business, the one that just got bought out by Facebook for hundreds of millions of dollars, only took off because John decided to take him under his wing, and then Gabe Newell at Valve software did the same.  To no benefit of them I might add.  Aside from the fact that they wanted to push VR in their respective industries.

I wouldn't refuse to help someone just because I knew they were making something to sell.  And frankly if that's your attitude, I'm not even sure why you're here, because I'm sure a good half of those here requesting assistance have at some point sold something they made, or work in the industry.
« Last Edit: July 15, 2016, 01:26:11 am by Starlord »
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5155
  • Country: au
    • send complaints here
So you'd still like us all to subsidise your business endeavours with free consulting.

Do you do this professionally?  Do you watch Dave's videos?  Do you learn anything from them?  How dare you!

You know in all my days, I have never seen a software developer refuse to help another software developer because they were doing it for a living.  We actually have conferences where people go to give free advice to their direct competitors.

In fact you might have heard of this little thing called virtual reality, and a guy named Palmer Luckey?  Maybe you've also heard of John Carmack, creator of Doom and rocket scientist?  Well Palmer's business, the one that just got bought out by Facebook for hundreds of millions of dollars, only took off because John decided to take him under his wing, and then Gabe Newell at Valve software did the same.  To no benefit of them I might add.  Aside from the fact that they wanted to push VR in their respective industries.

I wouldn't refuse to help someone just because I knew they were making something to sell.  And frankly if that's your attitude, I'm not even sure why you're here, because I'm sure a good half of those here requesting assistance have at some point sold something they made, or work in the industry.
Right now you're pleading how your business relies on us giving you help, and how its affecting your personal situation. Some of us don't care, and I for one as a contractor am offended at your approach to the industry. I get paid to produce designs for people, that are delivered in a certain timeframe and with a certain price. You're coming along and trying to provide a product without the ability to do so, and now want free help so you can complete on time and on budget. Its not just some experimenting and learning (as most of the contributed work on this site is) you want free advice which other people would pay for, so you can bid lower on offering designs/products and make a profit for your self. We get nothing out of this transaction unlike all the wonderful projects explored here at the expense of dedicated hobbyists who both take on and share experience about the project that we can all learn from. There are other people on here that make wildly narrow requests obviously for their paid employment and they don't get help from me, a friendly pointer or assistance but not the laid out designs they are fishing for.

On that note it is amusing to watch the complicated solutions which get posted to these threads.

You put it best yourself:
"Sorry, I'm gonna need another $500 and another year to design a new revision because I made a mistake in the present design.  It works well enough for your needs, but I can't in good conscience sell this to you in its present state.  It's not dangerous, but this guy on the EEVBlog forum said it was bad design and I'm a bad engineer."
Though we'd replace the end of the sentence with something more like: "It works well enough for your needs, but I can't in good conscience sell this to you in its present state.  It's not dangerous, but its unlikely to work reliably and might interfere with other things around you which would put me in legal trouble"

All the time you spend here is time you could have spent debugging your problems. Enjoy the ride: https://en.wikipedia.org/wiki/Scam_baiting
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
[edit]

Eh, you know what, I'm done with letting you waste my time.
« Last Edit: July 15, 2016, 04:48:14 am by Starlord »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf