Unexpected digital noise on a linking cable

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
88
I have a project that uses a very low offset voltage op-amp as a preamplifier and the buffered output from this is passed to an ADS1230 AD converter chip.
Currently I'm using 16 bits of the 20 bit output and passing the digital stream via an 8 bit SPI to a 16 bit controller chip. The SPI is running at 615KHz.

The digital link between the AD converter and the computer board is done with a flexible unshielded multi-stranded cable 10 cm long.

I don't come from a digital background so I was shocked to find that I get noise when I wiggle the cable - I am stuck with the arrangement but I would like advice on the best configuration for the cable - obviously I can shield it but would there be a benefit in using a USB type cable for the clock and the data line? Or having them in a shielded twisted pair? Obviously I'd like to use the full 20 bits.
 
Last edited:

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
88
I have a project that uses a very low offset voltage op-amp as a preamplifier and the buffered output from this is passed to an ADS1230 AD converter chip.
Currently I'm using 16 bits of the 20 bit output and passing the digital stream via an 8 bit SPI to a 16 bit controller chip. The SPI is running at 615KHz.

The digital link between the AD converter and the computer board is done with a flexible unshielded multi-stranded cable 10 cm long.

I don't come from a digital background so I was shocked to find that I get noise when I wiggle the cable - I am stuck with the arrangement but I would like advice on the best configuration for the cable - obviously I can shield it but would there be a benefit in using a USB type cable for the clock and the data line? Or having them in a shielded twisted pair? Obviously I'd like to use the full 20 bits.
I took a length of braided copper sheath off a piece of co-ax, cut the SCK and DO lines at one end and twisted them (just as Alexander Graham Bell did!), threaded them through the sheath and grounded this at both ends; rejoined the two lines and put a shrink over the joins. I had a thicker shrink over the braided section too. I find a big improvement; almost perfect.
But I want to leave the question on the table - why did jiggling the original cable cause "noise"? Flexible USB links operate at far greater speeds yet we seldom get data corruption - note: "jiggling", rather than RFI which would be more easily explained.
 
Last edited:

Deleted member 115935

Joined Dec 31, 1969
0
a good find and solution,
as to original problem, could be anything,
top of my list would be a bad connection / lead
second guess would be earthing,

digital is both very resilient, and also very good at noise generation,
The resilience comes from the thresholds the receiver needs to get over / under to be a 1/0.
the noise comes from the digital edges, they are very fast rise / fall times,
The edge leads to a few problems on cables, reflections due to bad impedance matching lead to big over / undershoot,
the edges have frequency content that couples fantastically well inductively and capacitively. Two long wires close together make a good transformer inductively and capacitively,

wiggling the cable could have caused better coupling, leading to more interference on adjacent lines.

You ask about USB.
USB is a differential pair, low voltage , controlled edges and impedance matched, and normally screened.
The low voltage causes less interference, differential helps cancel the interference, and makes any interference picked up on both lines less of a problem, being matched and controlled edge rates lowers the over / undershoot, and being screened gives a much better controlled impedance of the cable, as well as shielding,

Might be of interest, once upon a time , I had to debug a system that had terrible reliability.
turned out that a ribbon cable of about 30 cm was being used, to send 5V single ended TTL signals. no termination.
At the far end, the receiver was seeing a signal with almost 20v over / undershoot . I'm amazed the system worked at all, just goes to show how robust the old 74 series TTL was. Big silicon ..
 

Ian0

Joined Aug 7, 2020
9,668
Just checking . . .
Was the noise on the digital or the analogue part? Was the noise in the SPI data/clock signals? or was it errors in the digital data?
 

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
88
andrewmm
Thank you for your interesting and informative reply. Most definitely earthing is now enormously improved - so that could have been it. This is "noise eradication week" for me but what remains is mostly analogue (for now). Robust is right, the dawn of digital image transmission happened on one of the early Mars probes (Mariner I think) when we were astounded at the quality of the images sent back over 40 million miles - we hadn't seen nothing yet! Data rate was pretty slow. Now data comes back from outside the solar system, intact.

Ian0
I machined a box with multi-compartments and the analog and digital ones are adjacent - only digital comes out in that cable.
 
A few comments:

twisting "helps" eliminate EMI (electromagnetic)
Shielding "helps" eliminate RFI (RF)

Shields should be connected at only one end. The best end is the signal source.

hence, twisted-pair shielded cable is very common.

Twisting doesn't work really great unless the transmitters and receivers are differential.

Whatever interference is induced in one wire is induced in the other out of phase. the twisting couples the wires together, so in theory, they cancel.

Every connection that uses dissimilar metals and are at different temperatures is a thermocouple.

There is also the triboelectric effect where motion (in the earth's magnetic field induces a voltage).

Insulated wires that are rubbing against one another also generate small voltages. there are coax cables that add graphite to reduce the friction between the conductors of a coax cable.

You can deform a Teflon insulator and that will generate a voltage.

The basic laws of physics start to apply, and not the simple rules.

High power RF is best conducted by a silver plated copper tube and not a wire. Silver because of it's resistivity and RF is carried on the surface of the conductor.

You need to learn that components are not ideal. They have parasitic inductances and capacitances including just a piece of wire. They have temperature dependencies.

I challenged my answer on an exam and won. Teach said, your "not supposed" to know that yet.

Measuring 1e-12 Amps (picoamps) or lower is not an easy task.

A simple "fingerprint" matters. It also matters in a ultra-high vacuum system. Screws have to be "vented screws". They have a hole in the center.

There are times where three 1K resistors in series will do the job, but a 3K resistor won't.
 

Ian0

Joined Aug 7, 2020
9,668
Just to get this clear in my mind, you touch the cable with the SPI data, and does it corrupt the data, or does it cause the A/D to send erroneous data?
My first thoughts is that Q=CV and Q has to be conserved, so that if you change C by distorting the cable then It changes V. Guitar leads are a perfect demonstration of this effect!
But that would only seem to apply if the cable were carrying he analogue signal.
 

Lo_volt

Joined Apr 3, 2014
316
I've had issues with particular brands of USB cables where the shield was poorly crimped. It was bad enough to reset our device intermittently. Interestingly enough, when we rearranged the cable the problem sometimes got worse or better.

Dissecting the cables revealed that the shields at either end were "crimped" directly over the foil shield. In attempting to crimp directly over the shield in that manner, the manufacturer would never be able to use enough force to create a reliable crimp. If they did it would crush the conductors inside.

Our solution was to vet incoming cables to find vendors who made reliable cables. Any new vendor's product was cut open to check the shield crimp and spot tested during the product lifespan. By far the best ones we found had a drain wire from the shield that was soldered to the shield shell at either end.
 

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
88
Shields should be connected at only one end. The best end is the signal source.
Twisting doesn't work really great unless the transmitters and receivers are differential.
Measuring 1e-12 Amps (picoamps) or lower is not an easy task.
Thanks for the interesting observations - obviously the result of long and hard experience.
Seeing a healthy picoamp would make me very happy - that's where I'm heading.
 
Seeing a healthy picoamp would make me very happy - that's where I'm heading.

That's funny. When I was measuring extremely low currents, I used coulombs mode. I reset the instrument and counted for 30 seconds and divided by 30 to get amps.

So, setting up instruments to measure low currents is diffferent. I built a system to do I-V-T measurements on 4 samples. i.e I-V (current as a function of V) curves at 10 different temperatures ranging from -80 to 190C. The harder part was the probes.
 

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
88
That's funny. When I was measuring extremely low currents, I used coulombs mode. I reset the instrument and counted for 30 seconds and divided by 30 to get amps.

So, setting up instruments to measure low currents is different. I built a system to do I-V-T measurements on 4 samples. i.e I-V (current as a function of V) curves at 10 different temperatures ranging from -80 to 190C. The harder part was the probes.
Now, and yes, coulombs are a big part of my picture because, unlike those who usually think in terms of op amps and voltages, I am measuring tiny currents (ion currents) and if, for example I hook my "infinite impedance to ground" capture electrode to the "infinite impedance to ground" (+) input of the LMP7721 (connecting the (-) directly to output), will I just get the coulombs building up or must I ensure there sufficient leakage for them to gracefully disperse, following fluctuations within maybe 10Hz?

This is the wrong forum for this question and, anyway, I haven't done it yet - the present setup grounds (+) and has very high value resistors for unity gain on (-). A bit noisy I think.

Just to get this clear in my mind, you touch the cable with the SPI data, and does it corrupt the data, or does it cause the A/D to send erroneous data?
My first thoughts is that Q=CV and Q has to be conserved, so that if you change C by distorting the cable then It changes V. Guitar leads are a perfect demonstration of this effect!
But that would only seem to apply if the cable were carrying he analogue signal.
I have gone to a lot of trouble to isolate the two functions and am certain there is absolutely no way touching those leads could reach back into the analog stage - for me this is a purely digital phenomenon.
 

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
88
I've had issues with particular brands of USB cables where the shield was poorly crimped. It was bad enough to reset our device intermittently. Interestingly enough, when we rearranged the cable the problem sometimes got worse or better.

Dissecting the cables revealed that the shields at either end were "crimped" directly over the foil shield. In attempting to crimp directly over the shield in that manner, the manufacturer would never be able to use enough force to create a reliable crimp. If they did it would crush the conductors inside.

Our solution was to vet incoming cables to find vendors who made reliable cables. Any new vendor's product was cut open to check the shield crimp and spot tested during the product lifespan. By far the best ones we found had a drain wire from the shield that was soldered to the shield shell at either end.
Was this USB3? Interesting about the drain wires soldered at either end - but I assume the longitudinal current between them would be pretty small - I have a pretty long USB cable to my printer and, of course the limit is, what, 5-8m?
 

Ian0

Joined Aug 7, 2020
9,668
I'm presuming that you are still using the unscreened cable, although much has been said about USB.
This isn't USB, it's SPI, which is not a differential signal, it's three (Clock, data and chip-select) separate single ended signals, and at 600kHz, it's not THAT fast.
Putting two different single-ended signals down a twisted pair isn't going to help. Separate single screened cables would be better, but probably even better would be to terminate the signals to avoid ground bounce or reflections.
Having said that, I would be very surprised that touching the cable would cause enough interference to cause errors in the digital signal.
I suspect that one of two things could be happening:
1) less likely - touching the cable causes an interference signal which (somehow) couples to the input to the A/D and the A/D is measuring it. This is most likely to cause small errors in the data, in the least significant bits only.
2) most likely - you have the SPI interface configured wrongly, so that the data changes on the wrong clock edge, thus a little extra capacitance on one signal could delay clock with respect to data so that the edges occur in the wrong order - a race hazard (but not "race" in the "black lives matter" context!) This would give errors which could show up in any bit of the datastream, so could potentially be in the most significant bits.

Does varying the clock frequency make any difference?
 

crutschow

Joined Mar 14, 2008
34,283
a ribbon cable of about 30 cm was being used, to send 5V single ended TTL signals. no termination.
At the far end, the receiver was seeing a signal with almost 20v over / undershoot .
Don't see how you can get 20V over/undershoot from a 5V signal source(?).
Normally 10V would be the max.
 

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
88
I'm presuming that you are still using the unscreened cable, although much has been said about USB.
This isn't USB, it's SPI, which is not a differential signal, it's three (Clock, data and chip-select) separate single ended signals, and at 600kHz, it's not THAT fast.
Putting two different single-ended signals down a twisted pair isn't going to help. Separate single screened cables would be better, but probably even better would be to terminate the signals to avoid ground bounce or reflections.
Having said that, I would be very surprised that touching the cable would cause enough interference to cause errors in the digital signal.
I suspect that one of two things could be happening:
1) less likely - touching the cable causes an interference signal which (somehow) couples to the input to the A/D and the A/D is measuring it. This is most likely to cause small errors in the data, in the least significant bits only.
2) most likely - you have the SPI interface configured wrongly, so that the data changes on the wrong clock edge, thus a little extra capacitance on one signal could delay clock with respect to data so that the edges occur in the wrong order - a race hazard (but not "race" in the "black lives matter" context!) This would give errors which could show up in any bit of the datastream, so could potentially be in the most significant bits.

Does varying the clock frequency make any difference?
I appreciate your interest and response - actually I followed up my original post (at that point nobody had replied) and, as I said, twisted SCK and DO along their length and slipped a grounded/earthed copper braid over the pair and, after that, my residual noise was predominantly analog and I am now chasing that (no more mechanical sensitivity). I think the grounding being improved overall was the major benefit. Thank you though, for the nugget about the wrong clock edge - I was pretty careful but it bears checking too.
 

Ian0

Joined Aug 7, 2020
9,668
AS you don't come from a digital background, I presume that analogue must be your forté, so my mentioning the 1/f noise of your op amp wouldn't be helpful?
Do you read the A/D synchronous to its sampling? The SPI signal will produce a small DC shift, and if it is send when the A/D isn't sampling, it will cancel out.
 

Deleted member 115935

Joined Dec 31, 1969
0
Don't see how you can get 20V over/undershoot from a 5V signal source(?).
Normally 10V would be the max.

It was long time ago, but I assume it was inductance / capacitance / resonance / reflections based due to the frequency,

but I am old, and things are not a clear in the brain cell as they used to be , and I agree with your thought , but back in the 80's we just wanted to get it to work, not worry about why , Hopefully now days I'd have a bit more time to follow up more.
 

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
88
AS you don't come from a digital background, I presume that analogue must be your forté, so my mentioning the 1/f noise of your op amp wouldn't be helpful?
Do you read the A/D synchronous to its sampling? The SPI signal will produce a small DC shift, and if it is send when the A/D isn't sampling, it will cancel out.
 

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
88
I actually have neither a profound digital nor analogue background. Apart from my Physics degree (too many years ago alas) I am self-taught and tend to try and do everything myself. The ADS1230 is almost the only such device I have ever had my hands on and I picked it because of the sample rate and the delta-sigma conversion. It also has a handy front end amplifier.

Anyhow, I mention the above because I don't quite understand what you mean by reading the A/D synchronous to sampling: as I read the data sheet, the thing samples at its own speed (80 or 10 sps) and you're obliged to wait for it to issue a ready signal before you read it. Therefore I do my SPI read triggered by this and, before the next cycle, I write the data to an SD card and also send it as a 16 bit SPI to a 32 bit controller that handles the display screen and plots the result. I may say that the played-back recording is a perfect match to the original transmission.

The project is to build a small gas chromatograph which detects tiny amounts of organic chemical in the air using my own home made photoionization detector. For your possible interest you can see the noise levels here although they aren't quantified yet and the data shown on the display screen at the end isn't valid. As you can see, there's no point in grabbing the four LSbs yet.
 
Last edited:

Ian0

Joined Aug 7, 2020
9,668
That’s exactly what I meant by synchronous sampling. I used a similar device from Microchip with an I2C interface, which can be read any time.
I recognise the output from the gas chromatogram, but I‘m not sure I know what should be there and what shouldn’t.
What did you use for the front end amplifier?
 
Top