element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Experimenting With a Raspberry Pi Driven Transmission Line
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
GPIO Pinout
Raspberry Pi Wishlist
Comparison Chart
Quiz
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: jc2048
  • Date Created: 18 Mar 2020 8:49 PM Date Created
  • Views 2464 views
  • Likes 10 likes
  • Comments 4 comments
Related
Recommended
  • gpio
  • raspberry pi 3 model b+
  • termination
  • velocity factor
  • coax
  • transmission lines

Experimenting With a Raspberry Pi Driven Transmission Line

jc2048
jc2048
18 Mar 2020

Pi Day has been and gone for this year but I can't resist doing one more very simple electronics

experiment. I'm going to do it quickly, without a great deal of precision, simply to look at the

basic ideas involved. If you want to see it done better, and you have a Pi and a reasonable

oscilloscope, you could try it for yourself. This is a follow-on from my Pi Day blog, which you

can find here Experimenting with a Raspberry Pi GPIO Pin  .

 

OK, what simple experiment can I do with this collection of items? A Raspberry Pi 3 Model B+, a

couple of 1m 50 ohm coax cables [RG58C cable], a 22R resistor, and a SIL connector.

 

image

 

Yes, I'm going to experiment with a transmission line. (Hopefully you already knew that from

reading the title.) There are various ways we can drive a transmission line. One popular way, in

the situation where we have transmission from one output to one input and the input at the end of

the line is a high impedance load, is to series terminate. This has a single resistor at the

transmit end. Here's how my experiment looks on paper:

 

image

 

Having previously determined that each of the pair of MOSFETs in the pin driver has a resistance

of about 30 ohms when turned on, the output will, crudely speaking, look like a voltage source in

series with 30R. To series terminate that to a 50 ohm cable, I'll need about 20 ohms of

additional resistance in series. That's where the 22R resistor comes in.

 

Here's what it looks like connected up to the Pi.

 

image

 

As before, I'm going to use a simple Python program to drive the pin. This time it will take the

pin high, immediately take it low, and then wait for a while. The wait between the high pulses

that I generate is there in case I accidentally short the output after the 22R - it will keep the

average pin driver dissipation down to something fairly safe, even though it would be sourcing

something like 66mA for the short time that the pin was high.

 

This is how the output looks with no coax connected to the BNC socket.

 

image

 

The Python program manages to take the pin high and then low again in about 4uS, though the width

is very variable (which we'd expect as interrupts aren't disabled). It is fine for what I want

here. I'm not interested in the pulse width itself: I'm going to be looking at the start of the

pulse and what happens over the first few tens of nanoseconds.

 

Here's the leading edge in more detail. I'm probing this without the probe's flying ground lead,

using the collar for the ground connection instead. Ideally, I'd use a connector or some handmade

'springy clips', but, being lazy, I'm just precariously holding the probe in place and trying to

operate the 'scope with the other hand. Don't worry, trust me, it'll work! There's a small amount

of ringing evident on the trace, but it's not too bad [this is all going to be less than perfect

because of the signal having to find it's way across the Pi board and through the connector,

before encountering the 22R, but it's good enough for my purposes here].

 

image

 

Now. What I'm going to do is I'm going to connect the two lengths of coax to the output, with a

'T' piece connecting the two together. BTW there's nothing significant about two cables and a 'T'

piece: I just wanted something a bit longer than a metre to work with. The T piece will have very

little effect: it maintains the 50 ohms impedance of the cable nicely through the junction and

the stub it adds is so short that I probably won't even be able to see the effect on the trace.

 

So I have a 2m length of coax on the output, with nothing at the other end. The far end is just

an open circuit.

 

The result is this

 

image

 

Initially, the characteristic impedance of the cable (50R) forms a potential divider with the

series-termination resistance (50R). Since they're equal, the level we see is half of the supply

voltage. The signal propagates along the cable at a steady rate, charging the incremental line

capacitance, as it goes, to half the supply. The charge current is 3.3V/(2 x 50R) = 33mA. The

reason that the voltage doesn't change, like it would with a lumped capacitor is that the

capacitance involved is steadily increasing as the signal propagates along.  When the signal

reaches the other end, it discovers that there's nothing there. But it doesn't stop. Instead it

reflects from the end and propagates back along the cable, now charging the distributed

capacitance to double what it was before which, if we've got it right, will be approximately the

rail voltage. When it gets back to the start, everything finally stops because the series

termination resistor now has no voltage across it, so there's no longer a charging current to

keep everything going. Hope I got that more or less right [please tell me in the comments

if I have it wrong].

 

Note that the characteristic impedance isn't a resistance. The line isn't dissipating power,

instead it has stored the energy in the electric field that's established between the inner and

outer conductors.

 

For a much better treatment, read a text book or look at the Wikipedia article linked below.

 

With cursors measuring the interval between the two edges it's like this

 

image

 

and from that I can see that the 'there and back' time is 25.44ns. The one-way distance is 2.47m

(when I measured them, the cables turned out to be longer than the nominal 1m that they were sold

as), so the time per metre for the signal works out to be 5.15ns. The wave velocity is then

3.333ns[time for photon to travel 1m]/5.15ns x 100% = 64.7%. The value given on a datasheet is

around 66% for RG58C, so I'm in the right sort of area.

 

What else can I work out about the cable? How about the capacitance per unit length? I know the

length, the time, the voltage that we charge to, and the current, so I can work it out from

C = i dt/dV = 33mA x 25.44ns / 3.3V = 254.4pF total or 254.4pf/2.47m = 103pF/m.

I've got a datasheet that gives 101pF/m for RG58C/U, so close enough given a very simple

experiment [hmm, I suspect I was a little bit lucky there].

 

So, what does the signal look like when it reaches the other end? From all of the above, you

might be worrying that it's a mess, but it all works out right. At the far end, when the signal

reaches that point, the signal reflects and immediately doubles, so the waveform seen by anything

with a high impedance (like a CMOS gate input) will look very like the original signal coming

from the IO pin.

 

Here it is. The signal at the start of the line is yellow again, the signal at the other end is

blue. I did that by simply plugging the end of the BNC cable into the second channel connector,

so the termination is 1MEG and 11.5pF.

 

image

 

Um, except that's wrong. The signal is emerging before it should do. [It appears to be getting to

the end faster than a photon in free space could, which is going some! Hang on just a minute

whilst I run off and patent my faster-than-light gadget.] On second thoughts, the reason is

really that the two channels of the scope are only time-balanced if we have similar probes

attached to both channels. Here it is again with the cable output being probed by another 10x

probe, identical to the first.

 

image

 

Now the output is in the right place, halfway along. Whilst not perfect, the signal at the far

end isn't too bad given that it has travelled a couple of metres and the series termination at

the start is far from perfect anyway [ideally, the resistor would be right next to the processor

pin].

 

Update 24th March 2020

 

I found a short length of CAT-5E cable, 2.11m in length [no screen, just the four twisted pairs], so I thought I'd try the same test as I did with the 50R coax on a single pair in the cable.

 

image

 

The characteristic impedance is apparently 100R, so I've used a 68R series resistor for the termination. Here's how it looks at the sending end.

 

image

 

That works out to be a velocity factor of 63.7%, so a little slower than the coax.

 

Here's what emerges at the other end [blue trace].

 

image

 

It's not as nice as the coax: the probe connected at the end seems to be having more effect on the waveshape than what I saw with the coax.

 

I hope that was all of some interest. Not sure the Pi area was quite the right place for it, but

never mind.

 

[1] https://en.wikipedia.org/wiki/Transmission_line
[2] High-Speed Signal Propagation. Johnson and Graham. 2003. Prentice Hall
[3] Transmission Lines for Communications. C. W. Davidson. 2nd Ed. 1989. Macmillan Education.

 

If you found this interesting and would like to see more blogs I've written, a list can be found

here: jc2048 Blog Index

  • Sign in to reply

Top Comments

  • genebren
    genebren over 5 years ago +2
    Very cool experiments! Some very useful stuff here. Thanks for sharing.
  • DAB
    DAB over 5 years ago +2
    Very good experiment. I would be curious as to how far you could drive ribbon cable with the RPi and under what termination options. DAB
  • balearicdynamics
    balearicdynamics over 5 years ago +1
    This sounds a very interesting experiment. I think that just making a better connection, more curated soldering and shortening all that possible (without soldering the resistor on the CPU ) you get better…
  • jc2048
    jc2048 over 5 years ago in reply to DAB

    Ribbon cable works reasonably well as a transmission line for short distances (up to 2 or 3 metres). That's with interleaved ground wires where return currents can flow in the adjacent conductor. Much over that and the loss of frequency response causes the rise-time to slow considerably [so it's then all a matter of what you're trying to do with it].

     

    There will inevitably be some crosstalk between the signals [which may, or may not, be a problem to you depending on what you're doing]. There will also be EMC issues which you might need to consider.

     

    With the limitations of the GPIO pins, I would think that series termination was probably your only option [you could maybe also look at ac-biased end termination].

     

    For series termination, you could try treating the line characteristic impedance as something like 100 ohms to start with (so 68R for the external resistor) and work from there. [Or, maybe, try it with a pot and adjust for best signal at the other end.] If you really want to try it, I'd suggest a separate buffer chip to drive the ribbon. Then you're only sacrificing the driver chip if it all goes horribly wrong.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 5 years ago

    Very good experiment.

     

    I would be curious as to how far you could drive ribbon cable with the RPi and under what termination options.

     

    DAB

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 5 years ago

    Very cool experiments!  Some very useful stuff here.  Thanks for sharing.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 5 years ago

    This sounds a very interesting experiment. I think that just making a better connection, more curated soldering and shortening all that possible (without soldering the resistor on the CPU image ) you get better results. And by your analysis, it seems you are not so far from success. This kind of connection (maybe only for analogies) recall me the Novell Ethernet cable or - better and before - the Apple CORVUS coax network cable. When there was a problem of reachability of the NE2000 Novell boards we were just adding a resistor in series.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube