# What would cause a square wave to become rounded?

I have a square wave going through a thousand feet of cable. The cable has $$\120 \,\Omega\$$ characteristic impedance. I measured the capacitance and inductance of the cable and they are pretty close to the spec sheet.

According to PSpice, the signal I should be getting out the other end of this cable is attenuated but still very much a square wave, only with very minor distortion. What I'm actually seeing is more like a sine wave, it's really rounded and spread out. And it takes a long time for the signal to completely return to zero.

If the cable matches what the spec sheet says, how can it be distorting the signal so much? The cable is twisted shielded pair and I have a $$\120 \,\Omega\$$ termination. The signal is differential square wave $$\\pm 0.8 \,\rm{V}\$$ with pulse width of about $$\1.4\,\mu \rm{s}\$$. Also the cable is currently wrapped on a reel, could that be making a difference? The shield is grounded.

The signal is coming from a MAX942.

EDIT: Thanks for the very detailed responses. I have some more investigating to do.

I'm having trouble commenting on individual answers for some reason, so I am replying in the edit. I have 1000 ft of cable but the goal was 4000 ft and I have been playing with both. 4000 ft of cable is 5.8E-8 Farads. With 120 ohms, the corner frequency is 22 KHZ! Great reply thank you.

I was using the tline lossy in pspice.

• What does the signal look like at the sending end? Might be loading down your source. – Marla Dec 24 '19 at 19:24
• All practical cables have dispersion and variable attenuation with frequency. – Kevin White Dec 24 '19 at 20:36
• The reason that your simulation and your actual setup do not match is because your simulation is too simplistic. The loss in a cable is a function of cable length and also of signal frequency. Higher frequencies necessary to maintain sharp edges in a square wave (per Fourier analysis) are attenuated much more than the fundamental and first few harmonics. Thus, your cable functions as a low-pass filter. – mkeith Dec 24 '19 at 23:08
• " I measured the capacitance and inductance of the cable and they are pretty close to the spec sheet." - Can you share the spec sheet? – Bruce Abbott Dec 25 '19 at 5:42
• "so I am replying in the edit" -- as you should anyway. The comments are for other people to ask for clarifications. The actual clarifications belong in your post, not the comments. People shouldn't have to read through the comments to understand your question. – Peter Duniho Dec 25 '19 at 9:55

What you are seeing are several harmonics of the square wave being attenuated. As you know, a square wave can be represented by an infinite series of sine waves whose frequencies are multiples of the square wave's fundamental.

Image source: Fourier sine series: square wave, Math 331, Fall 2017, Lecture 1, (c) Victor Matveev

In real life there is no such thing as a true square wave. Every "square wave" is actually closer to a trapezoid in shape with sloped edges. The slope of these edges can be used to determine how high up the frequency content of your "square" wave goes. For example, if you have a square wave with edges that move from 0V to 3.3V in 1ns, you probably have some frequency content all the way up around 1GHz. As you lose frequency content transmitting the square wave, it starts to become closer and closer to a sine wave.

The next question is, what causes you to lose frequency content:

• The cable might have a relatively "lossy" material as its dielectric. It has more impedance at higher frequencies and therefore attenuates harmonics of the signal more at those frequencies, forming a low-pass filter after a long enough distance. 1000ft is a very long distance. P-spice likely won't take this into account unless you have an S-parameter model of your cable or a lossy transmission line model of the cable.
• The cable has some capacitance between the conductors and the outer shield (and between the conductors themselves). It is likely in the low fF or pF per foot, but after 1000 feet that's not a trivial amount of capacitance. The combination of the cable capacitance and your driver's output impedance (120 ohms) will create a low-pass filter. The cable manufacturer should give you the cable capacitance in the cable datasheet. Calculate the corner frequency (120Ohms * The total cable capacitance) of the resulting low-pass filter with 1000ft of cable and you might find something interesting. Is P-Spice taking this into account?

In my opinion, it is probably more likely you have a cable capacitance problem, especially since you say that it takes a while for the signal to return back to 0V.

Additional information that would be useful:

• What is the rise and fall time of your signal? That tells us the frequency content of your signal.
• A scope shot of your signal at the input and signal at the output of your cable.
• The part number of the cable you are using.

You didn't follow the right test procedure.

Length*BW product = 4000'*0.4Mbps =1.6 Gbit-foot/s

What this chart does not show is the jitter due to InterSymbol Interference (ISI) starts 1 freq. decade before the breakpoint and the 3rd harmonic is already down -6*2=-12dB below the fundamental f/2 bit rate of 010101... so not only is it sinusoidal but has too much jitter unless you use a phase shift compensation filter in the last decade.

4x as much with pre-emphasis

RS-485 communications (Figure 6). RS-485 transceivers without driver preemphasis or receiver equalization generally acquire 10% jitter across 1700 feet of cable when operating at a fixed data rate of 1Mbps. Adding driver preemphasis at that rate doubles the distance to 3400ft without increasing the jitter. As an alternative, preemphasis can increase the data rate for a given distance. Drivers operating at 400kbps without preemphasis generally acquire 10% jitter over 4000ft. Adding preemphasis lets you transmit up to 800kbps for that distance. Another way to calculate maximum cable length for reliable transmissions is to use the attenuation vs. frequency table supplied by the manufacturer for Cat5 cable. A general rule for allowable attenuation is -6dBV over the run of cable. That value can be combined with the manufacturer's attenuation data to calculate maximum cable length for a given frequency.

Every cable with any significant length is treated as a transmission line with the following inevitable real-world characteristics per unit of length (eg per meter):

• Series resistance

• Series Inductance

• Parallel Resistance

• Parallel Capacitance

These characteristics introduce an LC filter to any input signal. LC filters effectively turn square waves into sine waves. If you want to learn more about the math involved, I would suggest studying transmission line theory, first and second order filters, and the harmonic composition of a square wave.

• The lumped model with the L and C would have been taken into account with P-Spice, which the OP said they used. And I think it did show the distortion (at least that's what they said). In addition, there should be very little distortion on a cable represented by the lumped model in simulation so long as the frequency of interest is far enough away from the LC. – Los Frijoles Dec 24 '19 at 19:46
• @LosFrijoles True. Do you think that the fact that the cable is wrapped around a reel could increase the inductance significantly? That would attenuate more of the higher frequency harmonics in the square wave, which would make the output look more and more like a sine wave. – Sean Dever Dec 24 '19 at 19:52
• I don't think it would unless it was bent so far that it distorted the twist of the conductors (usually that's quite a tight radius: 1cm to 5cm depending on the cable gauge). And if it's wrapped on a spool, then it would only be distorted for the first couple (or final) feet of cable. The fact that the cable is shielded would also help keep the conductors together so their lumped model doesn't distort. However, I doubt the p-spice model has the capacitance against the conductors which the shield imparts (requiring a 6-terminal instead of a 4-terminal model) and that might be a problem. – Los Frijoles Dec 24 '19 at 19:57