Too noisy in the crow's nest
Erlend
Posts: 612
I want to tie my complete prosject together around my Prop PDev Board, and lots of testing - before I assemble the final thing and connect in a more permanent to a Propeller Project Board.
It looks like noise will put a stop to that. The MCP23017 (on a small pcb) goes haywire when I start communication with the MCP3208 (on another small pcb). Even if the below picture shows a horror show of unshielded wires, I'd thought that the i2c was a more robust signal. But maybe high frequencies are creepiong in all over the place and upsets the chip itself. There are a few 10nF, but not many.
Do you think I should just forget it, and move from breadboard to pcb, with short wires - maybe screened too - or are there measures I can try to silence the crows?
Erlend
It looks like noise will put a stop to that. The MCP23017 (on a small pcb) goes haywire when I start communication with the MCP3208 (on another small pcb). Even if the below picture shows a horror show of unshielded wires, I'd thought that the i2c was a more robust signal. But maybe high frequencies are creepiong in all over the place and upsets the chip itself. There are a few 10nF, but not many.
Do you think I should just forget it, and move from breadboard to pcb, with short wires - maybe screened too - or are there measures I can try to silence the crows?
Erlend
Comments
I2C stands for Inter-Integrated Circuit and was meant to be on the same board. Over in Europe, though, it seems quite popular to add I2C extender devices to allow comms between boards. Elektor magazine and related pubs are a great source of these things.
Here's one example of an extender:
-- www.nxp.com/documents/data_sheet/P82B715.pdf
Use a separate pair of VDD - GND wires to each of your IC/boards such that they have a common point ground back on the main PCB. Use 1uf or larger on each board. Then put them on different I2C buses, at least to temporarily troubleshoot the problem. If the problem doesn't go away its not the crows nest causing the problem. When you do the final board layout you should keep your ADC and reference IC away from digital switching devices (like GPIO) to keep DGND noise out of the AGND.
Dom..
If you get some solid-core phone cable you can strip it easily and use it for hook-up wire rather than all the fixed length jumpers that you seem to be extending with other jumpers. That way you can even keep your power/ground/i2c in the one 4-core phone cable and it will all be neat and tidy. You can also use CAT5 solid-core if you have that handy too.
BTW, 10nf is a bit too low a value, good for much higher frequencies but I suspect you need at least 100nf or even 1uF ceramic but if you also use 10uF then don't bother with electrolytics, try to use tantalum for much better decoupling.
No point jumping from this mess to a pcb if you haven't at least tidied up the wires first which is a lot less trouble than getting a pcb made. Breadboarding is about testing things out first, but you still need to observe sensible wiring practices.
This is the result of a minimum effort strategy - which I guess was bound to hit the wall sooner or later.
I will first tidy up the wiring of the most noisy signals, i.e. serial comms. As suggested I will use some CAT5 cable or such like. Second I will put some good capacitors at hot spots, e.g. between V+ and GND close to the consumer. Then, if that doesn't do it I will start tidying up the wiring acting as noise receiver antennas now, and make sure there are no loops or daisy chaining of power. Maybe I'll drop in the odd choke as well.
I hope that will do it, I am not in the mood for a complete rewiring of the breadboard setup now -just before I am going to move to a pcb layout.
Erlend
EDIT: by pcb layout I do not mean real pcb, but just moving to a propeller proto-board - and no, it will not be looking like a crow's nest then.
I found that a Tx and Rx wire pair in close proximity can cause huge crosstalk problems when working with RS232 asynchronous serial. Fortunately with only a pair of wires in conflict, it was easy to reposition them to get things working.
In your case, diagnosis and solution are next to impossible. No sooner than you resolve one issue (if that is even possible), you will likely have another. I do use the same wiring system for temporary stuff, and even permanent wiring between boards -- but I build slowly and sequentially while watching for problems AND I try to keep sub-systems isolated from each other.
In sum, it is all about an organized technical approach to wiring.
Minimum effort strategy = minimum successful outcomes
okokok! - I'm running; where's my plyers?, where's the soldering iron?: its got to be neat and tidy, millitary spec! I get the point, folks.
Erlend
Minimum effort strategy = minimum forum recognition
Erlend
-Phil
Classic!
See the pictures in Appendix F, Figures F1, F2 and F3 in Jim's App Note 47 "High Speed Amplifier Techniques". Here http://cds.linear.com/docs/en/application-note/an47fa.pdf
Which is a very good read for everyone, no matter if using digital or analog.
What we have to realize is that even slow digital circuits are high speed analog circuits when you take into account the speed of the signal edges involved.
Oh, and those guys knew what they were doing and what they could get away with
That crows nest picture in the OP could be a scan of my brain. A few remaining nodes with long, tenuous and unreliable links between them
-Phil
Oh- I am not so bad after all, then. But ground loops, yes, is the root of all evil. My first hifi amplifier ('75) upon power on immediately started transmitting a 30 watt megahertz carrier signal, then quickly started to produce blue smoke from the 2N3055s. Guess I am a slow learner.
Erlend
[SERIOUS]
Where exactly is the best place to put the pull-up resistors - at the far end?
[/SERIOUS]
-Phil
1) Tracing problems in the wiring or noticing a wire connection has pulled loose.
2) If there are signals with fast edge rates (a few nano-seconds or less).
3) High current in the many amps range, esp from switching power supplies.
4) Very low or precise signal levels that require paying attention to everything imaginable.
I2C edge rates are slow, the signals are low current and logic levels are not too precise---. The I2C setup and hold times have huge safety margins, so rise/fall times are unlikely to cause problems.
So it comes back to wiring errors, star power-ground instead of daisy chained, end of bus 2k pullups (only 1 per line), generous bypass caps at the devices.
If this was a high speed circuit operating in the mega to giga hertz range, then line impedance, matching terminations, cross talk, via bypassing, magnetic interference and line lengths might be issues - but none of that's the case here.
Dom..
Not exactly the message I was hoping to convey. I take your reply in good humor (not seriously offended)..
Simply put, digital electronics is a technical subject and just jumping into it gets us into all sorts of snags. Support here is all about learning to develop good methods -- for programming, prototyping, and construction.
It seems obvious that the issue of forum recognition is an entirely different subject. And of course, one can be come admired, respected, famous, infamous, or notorious.
I just wanted to offer a suggestion on how to maximize your successes.
It just seems so daunting to look at a rat's nest and be asked how to resolve a problem.
I am really enjoying the feedback I am getting here - my forum cred remark was just pure humour, no offense intended. I appreciate the mix of plain good advise and more or less 'corrective remarks' or silly comments I am getting. I've said before; this forum is unbelievably good-hearted.
Resulting from all the knowledge sharing I have decided to test the matter: is it really only about dirty power, which I can fix by running a star system and putting capacitors, or is it also about crosstalk of signals, needing attention to impedances and wiring/shielding regimes?
My bet is it is all about capacitors.
Erlend
Such kind words will get you a huge following.
Regarding shielding...
In past discussions it has been said that it tends to be unneeded and rather futile to apply if needed.
Clean up the power first, including capacitors.
Then deal with the I2C pull-up resistors.
after than, see what happens.
My own problem with cross-talk may not apply to your project unless it is an asynchronous serial i/o problem. I just separated the Tx and Rx to be away from each other and the problem went away. Originally one was touching the other and crossing at 90 degrees.
It finally sunk in what a GREAT idea this is (to use telephone wire) to interconnect boards. Multiple color coded pairs such that signals/colors can be standardized. Signals (SCL and SDA) can be twisted SCL with GND and SDA with GND to improve signal fidelity. VDD and GND could be another pair and cable ends plug into PCB mounted standard jack. The phone wire I've seen has a nice jacket, 4-8 pairs, cheap wire and cheap crimpers. Imagine little ap boards you can put anywhere and how neat and professional they'd look. CAT5/6 and RJ45 connectors would also be great.
Jon's extender IC could be part of your remote board to increase distance from home. Dom..
Phone wire is also great for connecting power and signal to off board sensors. SDA/Gnd on one pair and SCL/Power on the other has worked reliably for me so far.
PS - Also good for remote actuators.
First I soldered in some more capacitors on both the adc board and on the GPIO board. No change.
Then I twisted-pair'ed the I2C wires going from the GPIO board and to the P Demo board. Hey presto! - no more noise problems.
And the crows lived happily ever after.
Erlend
True, though I do use red and black for power and the other twisted pair for RS-485 but for unbalanced signals it is better to split the signals across the pairs.
Years ago, I had asked about the need for a Faraday cage solution and the response was that it was generally unnecessary and very hard to properly implement as any wires going in or out become antennas. It is mostly useful for high-power RFI problems.