Offline
Full Member
Karma: 0
Posts: 112
|
 |
« on: June 05, 2012, 12:22:56 pm » |
Hi all, I'm interfacing an Arduino to an AD7714 via SPI and an AD5175 via I2C. I have a custom PCB that I designed and had printed to hold all the extra electronics. The strange thing is, when I connect the microcontroller and board with solid wire like from a jumper kit, everything works wonderfully. When I sub in a ribbon cable (smaller gauge wire, stranded), nothing works. I get error codes from the AD7714 and the Ardi won't even see the AD5175. I should note that the ribbon cable is able to power everything sufficiently. The particular ribbon cable is this: http://www.sparkfun.com/products/10647However, I've also had this problem with stranded ribbon cable salvaged from an old computer. So what's going on?
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 45
Posts: 2251
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #1 on: June 05, 2012, 12:39:32 pm » |
How long a piece of ribbon cable are you using?
In general, ribbon cable used for digital communication should be alternately signal and ground (i.e., something like SCK,GND,MISO,GND,MOSI,GND,SS) so that the ground lines reduce crosstalk between the wires.
I think the problem is probably that it's ribbon cable, not that it's stranded wire.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 27
|
 |
« Reply #2 on: June 05, 2012, 05:37:29 pm » |
I am in no way an expert with these two modes of communication, but from what I do understand about them I'm going to blame crosstalk as the reason the ribbon cable isn't working. What are the data rates you're using? I know that ribbon cable has minimal insulation and minimal distance between wires - which would only make crosstalk more of an issue for you. Crosstalk issues would get much worse with higher data rates.
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 73
Posts: 6839
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #3 on: June 05, 2012, 06:12:51 pm » |
Easy to test, split some wires from the ribbon and see if the problem persists.
______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3462
|
 |
« Reply #4 on: June 05, 2012, 06:51:55 pm » |
Maybe he should just go out and buy some of that $5 per foot Monster cable.
Don
|
|
|
|
|
Logged
|
|
|
|
|
Arkansas, US
Offline
Jr. Member
Karma: 0
Posts: 86
I only ever use XAND and XNAND gates.
|
 |
« Reply #5 on: June 05, 2012, 07:57:29 pm » |
Maybe he should just go out and buy some of that $5 per foot Monster cable.
Don
But buy 2 and Wrap one around the other to get double the speed
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3462
|
 |
« Reply #6 on: June 05, 2012, 09:14:13 pm » |
Imagine how fast it would be if he used cat5 cables from Monster.
Don
|
|
|
|
|
Logged
|
|
|
|
|
Anaheim CA.
Offline
Edison Member
Karma: 31
Posts: 2311
Experienced old Whitebeard with a Full head of Hair...
|
 |
« Reply #7 on: June 05, 2012, 10:28:20 pm » |
Naaah I think he needs Magic Bullets... By Pass Caps... IMO
Doc
|
|
|
|
|
Logged
|
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 112
|
 |
« Reply #8 on: June 07, 2012, 10:56:36 am » |
How long a piece of ribbon cable are you using?
In general, ribbon cable used for digital communication should be alternately signal and ground (i.e., something like SCK,GND,MISO,GND,MOSI,GND,SS) so that the ground lines reduce crosstalk between the wires.
I think the problem is probably that it's ribbon cable, not that it's stranded wire.
It's about 4 inches long. I have two cables, set up as (GND,+5V,AnalogRead,GND,SDA,SCL) and (SCK,MISO,MOSI,DRDY,RESET,CS). So it's probably the alternating ground absence that's leading to problems. I am in no way an expert with these two modes of communication, but from what I do understand about them I'm going to blame crosstalk as the reason the ribbon cable isn't working. What are the data rates you're using? I know that ribbon cable has minimal insulation and minimal distance between wires - which would only make crosstalk more of an issue for you. Crosstalk issues would get much worse with higher data rates.
It's probably crosstalk. I'm using standard SPI and I2C data rates, not scaling anything. Easy to test, split some wires from the ribbon and see if the problem persists.
______ Rob
The crazy thing is after I did that, the problem persisted. Only when I switched to short jumper wire did the problem vanish. Maybe he should just go out and buy some of that $5 per foot Monster cable.
Don
What about this? http://www.amazon.com/Diamond-Digital-Audio-Ethernet-Connection/dp/B003CT2A6I
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 45
Posts: 2251
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #9 on: June 07, 2012, 11:02:27 am » |
One question nobody has thought to ask before now...
How are you connecting the ribbon cable? Are you using connectors of some form? If so, what are they?
|
|
|
|
|
Logged
|
|
|
|
|
Canada
Offline
Full Member
Karma: 0
Posts: 246
Code Monkey
|
 |
« Reply #10 on: June 07, 2012, 11:42:56 am » |
How long a piece of ribbon cable are you using?
In general, ribbon cable used for digital communication should be alternately signal and ground (i.e., something like SCK,GND,MISO,GND,MOSI,GND,SS) so that the ground lines reduce crosstalk between the wires.
I think the problem is probably that it's ribbon cable, not that it's stranded wire.
It's about 4 inches long. I have two cables, set up as (GND,+5V,AnalogRead,GND,SDA,SCL) and (SCK,MISO,MOSI,DRDY,RESET,CS). So it's probably the alternating ground absence that's leading to problems. I am in no way an expert with these two modes of communication, but from what I do understand about them I'm going to blame crosstalk as the reason the ribbon cable isn't working. What are the data rates you're using? I know that ribbon cable has minimal insulation and minimal distance between wires - which would only make crosstalk more of an issue for you. Crosstalk issues would get much worse with higher data rates.
It's probably crosstalk. I'm using standard SPI and I2C data rates, not scaling anything. Ribbon cable is electrically much longer because of the parasitics from the other conductors, and impedance of the wires carrying the signal becomes significant. Normally, it is enough to split out and twist the conductors carrying the signal once or twice in the middle before binding them to the plug. This used to be common in PCs back in the day. But it depends on the frequency. Also, cross-talk is a very complex thing in practice. You also have to look how and where you headers are, and how the traces react overall. Basically, you have created an array of little antennas. The trick is to make these antennas more inefficient. Are you terminating any unused conductors properly? There are ribbon cables that are rate for this sort of work, but the problem could be in your other circuitry, and the ribbon will always interact poorly with that. You could look for multi-conductor twisted bundles (or, as suggested earlier, use ethernet cable if that has enough conductors.
|
|
|
|
|
Logged
|
I yield() for co-routines.
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3462
|
 |
« Reply #11 on: June 07, 2012, 12:07:48 pm » |
What about this? http://www.amazon.com/Diamond-Digital-Audio-Ethernet-Connection/dp/B003CT2A6I Anybody who has not yet followed this link should do so as soon as possible. Be sure to scroll down and read the customer reviews, it will be worth your time.Don
|
|
|
|
« Last Edit: June 07, 2012, 12:10:54 pm by floresta »
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 45
Posts: 2251
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #12 on: June 07, 2012, 12:15:38 pm » |
Anybody who has not yet followed this link should do so as soon as possible. Be sure to scroll down and read the customer reviews, it will be worth your time.Don Oh, they are PRICELESS ... Especially the bacon!
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 73
Posts: 6839
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #13 on: June 07, 2012, 04:55:46 pm » |
That's funny.
Surely the price can't be for real.
______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 45
Posts: 2251
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #14 on: June 07, 2012, 05:03:49 pm » |
Surely the price can't be for real. It can, and it is. Die-hard videophiles (the ones that can see artifacts where they don't exist) and audiophiles (the ones that think they can hear things that aren't there) are suckers for gimmicks like this.
|
|
|
|
|
Logged
|
|
|
|
|
|