Shop OBEX P1 Docs P2 Docs Learn Events
Too noisy in the crow's nest — Parallax Forums

Too noisy in the crow's nest

ErlendErlend Posts: 612
edited 2014-12-15 10:43 in Propeller 1
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
crow_s_nest.jpg
616 x 462 - 158K

Comments

  • pik33pik33 Posts: 2,366
    edited 2014-11-30 09:47
    These wires are way too long.
  • localrogerlocalroger Posts: 3,451
    edited 2014-11-30 09:54
    Yep. Shorten and dress those wires and it should help a lot.
  • JonnyMacJonnyMac Posts: 9,105
    edited 2014-11-30 11:06
    I'd thought that the i2c was a more robust signal.


    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
  • ErNaErNa Posts: 1,752
    edited 2014-11-30 11:19
    I was just fighting also with such a problem and in the end it turned out: just a capacitor was missing IN THE RIGHT PLACE. I had to move it 2 inches around the protoboard. So, when working with long lines, a good idea is: bring power to the subsystem with a twisted pair of wires, have a ceramic C on both sides, never create loops in wires, as changing magnetic fields will induce voltages.
  • DomanikDomanik Posts: 233
    edited 2014-11-30 12:11
    ErNa wrote: »
    I was just fighting also with such a problem and in the end it turned out: just a capacitor was missing IN THE RIGHT PLACE. I had to move it 2 inches around the protoboard. So, when working with long lines, a good idea is: bring power to the subsystem with a twisted pair of wires, have a ceramic C on both sides, never create loops in wires, as changing magnetic fields will induce voltages.
    +1
    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..
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-11-30 14:50
    How do you work in such a rat's nest? The ground wires are the most important and you should try to keep them short and never daisy chain them, run them back individually to a common ground. The I2C or IIC bus as it was originally known before was designed for operation within a TV chassis between ICs that could be on seperate modules, so there was never a problem with having wires run off-board but I'm sure they had proper grounds and decoupling etc.

    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.
  • ErlendErlend Posts: 612
    edited 2014-12-02 11:34
    I knew I would have to take a beating when I posted my crow's nest picture : )
    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.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2014-12-03 00:20
    AAAAAARRRRRRRGGGGGHHHHHHHH, matey. !!!!! 'At's not a crows nest, 'at's a rats nest. and there ain't no lookouts standin' watch in there........
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-12-03 00:39
    I tend to work are far simpler DIY projects with a combination of a circuit board and just a few wires onto and of of the board.

    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
  • ErlendErlend Posts: 612
    edited 2014-12-03 09:31
    AAAAAARRRRRRRGGGGGHHHHHHHH, matey. !!!!! 'At's not a crows nest, 'at's a rats nest. and there ain't no lookouts standin' watch in there........

    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
  • ErlendErlend Posts: 612
    edited 2014-12-03 09:32
    Minimum effort strategy = minimum successful outcomes

    Minimum effort strategy = minimum forum recognition

    Erlend
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-12-03 10:05
    Don't let the naysayers get to you, Erlend: you're in good company. The great Bob Pease was famous for his rat's nest breadboarding:

    -Phil
  • PublisonPublison Posts: 12,366
    edited 2014-12-03 10:13
    Don't let the naysayers get to you, Erlend: you're in good company. The great Bob Pease was famous for his rat's nest breadboarding:

    -Phil

    Classic!
  • Heater.Heater. Posts: 21,230
    edited 2014-12-03 10:36
    Phil,
    The great Bob Pease was famous for his rat's nest breadboarding:
    On the other hand Bob's friend, the equally famous Jim Williams, had this to say about such breadboarding techniques: "No", "No", and "No".

    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 Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-12-03 10:58
    With apologies to the pontificators here, I do not think the length and messiness of Erlend's wires are the source of his troubles. I2C should work at a meter's distance, after all. The problems are more likely due to daisy-chaining the power lines, inadequate filtering and bypassing, non-optimal placement of the I2C pull-ups, and perhaps lack of termination on other signal lines that span a couple boards. But wire length and general ratsnestiness? No, I don't believe it.

    -Phil
  • ErlendErlend Posts: 612
    edited 2014-12-03 12:51
    [Erlend looks up from his workbench, red-eyed from intense soldering and minute wiring work...]

    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 Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-12-03 13:06
    Erlend wrote:
    Where exactly is the best place to put the pull-up resistors - at the far end?
    For SDA, I'd put 10K at each end of the bus. For SCL, 4.7K on the far (slave) end. Once you've got everything on one board, just 4.7K for SDA, and it doesn't much matter where. Same for SCL, unless you're driving it both high and low, in which case no pull-up is needed.

    -Phil
  • DomanikDomanik Posts: 233
    edited 2014-12-03 13:17
    With apologies to the pontificators here, I do not think the length and messiness of Erlend's wires are the source of his troubles. I2C should work at a meter's distance, after all. The problems are more likely due to daisy-chaining the power lines, inadequate filtering and bypassing, non-optimal placement of the I2C pull-ups, and perhaps lack of termination on other signal lines that span a couple boards. But wire length and general ratsnestiness? No, I don't believe it.

    -Phil
    Strongly agree that rats nest doesn't matter except when:
    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..
  • edited 2014-12-03 14:06
    Chaos is just a higher form of order.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-12-04 08:10
    Erlend wrote: »
    Minimum effort strategy = minimum forum recognition

    Erlend

    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.
  • ErlendErlend Posts: 612
    edited 2014-12-04 10:52
    Loopy and all,

    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
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-12-04 11:42
    Erlend wrote: »
    .... this forum is unbelievably good-hearted...

    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.
  • DomanikDomanik Posts: 233
    edited 2014-12-04 22:59
    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.

    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.
    JonnyMac wrote: »
    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
    Dom..
  • TorTor Posts: 2,010
    edited 2014-12-05 03:46
    Domanik wrote: »
    It finally sunk in what a GREAT idea this is (to use telephone wire) to interconnect boards.
    Indeed it is. I have a whole drum of telephone cable.. I hadn't thought of using it for this (glaring at the bundles of breadboard wire). The telephone cable will do nicely for interconnects I believe.
  • kwinnkwinn Posts: 8,697
    edited 2014-12-05 05:28
    Domanik wrote: »
    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.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-12-06 09:03
    An added note, re: cables that do not have twisted pairs. For example, flat telephone cable has wire colors black-red-green-yellow, in that order. It is a temptation when hooking it up, to an I2C device say, to use red/black for power and green/white for sda/scl. That scheme is bad for crosstalk though. It is better to keep the digital signal lines separated with at least one power line in between. Say, black/green for power and red/yellow for signals. The same thing is true for control cables, such as Belden 8444 or Carol 4063, 4 cores in basically a square, same idea, use diagonally opposite cores rather than neighboring cores for the signal.
  • ErlendErlend Posts: 612
    edited 2014-12-15 01:08
    Noise research completed:
    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
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-12-15 01:31
    An added note, re: cables that do not have twisted pairs. For example, flat telephone cable has wire colors red-black-green-white, in that order. It is a color-coded temptation when hooking it up, to an I2C device say, to use red and black for power and green and white for sda and scl. That is bad for crosstalk though. It is better to keep the digital signal lines separated with at least one power line in between. Say, black and white for power and green and red for signals. The same thing is true for control cables, such as Belden 8444, 4 cores, red-black-green-white in that order, same idea, use diagonally opposite cores rather than neighboring cores for the signal.

    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.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-12-15 10:43
    Happy to hear of success. Twisted pairs is a rather painless solution.

    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.
Sign In or Register to comment.