URI:
   DIR Return Create A Forum - Home
       ---------------------------------------------------------
       Micro-Cap EDA Users
  HTML https://mc12.createaforum.com
       ---------------------------------------------------------
       *****************************************************
   DIR Return to: Micro-Cap 12 Discussion
       *****************************************************
       #Post#: 124--------------------------------------------------
       [solved] Coax cable length
   DIR By: Robert
       Date: December 16, 2025, 6:17 pm
       ---------------------------------------------------------
       I wanted to veryfy the length of a coax cable type RG-58C/U.
       The physical length of the cable is Lp = 5.43 m
       Several sources state the velocity factor VF = 0.66
       The MC12 simulation shows for the wave travel time to the open
       end and return to the source Δt = 16.77 ns
       Please find the simulation file attached (change extension txt
       to cir prior to opening).
       Measuring the same cable with a digital storage oscilloscope
       results in Δt = 56 ns (screenshot attached).
       [attach=2]
       Cable lenght calculus:
       Length =(Δt*c*VF)/2 = (56ns * 0.3 m/ns * 0.66)/2 = 5.54 m
       Length difference = 5.54 m - 5.43 m = 0.11 m = 11 cm (4.33
       inches)
       What is the reason for the discrepancy between the MC12 and the
       measurement result respectivelly?
       Thanks for any reply.
       Robert
       Admin: Edited to correct the image attachment
       #Post#: 125--------------------------------------------------
       Re: Coax cable length
   DIR By: MC12
       Date: December 20, 2025, 3:25 am
       ---------------------------------------------------------
       Rule-of-thumb mental calculation for there-and-back flight time
       over 6m cable (12m total distance) is approx 60ns, so your
       'scope measurement seems about right.  (When conducting
       experiments, it's always best to have a good idea of what the
       outcome should be, to avoid taking erroneous results as valid.)
       I'm not in a position to check your simulation at the moment
       (away from home), but a few thoughts:
       if you are modelling the cable as a transmission line of L and
       C, that won't have any factor in it for the distance, and the
       delay through the LC network will need the speed-of-light flight
       time added to it.
       5.43m x 2 / c = 36.22ns
       36.22 (speed of light time) + 16.77 (simulation result) =
       52.99ns (which is remarkably close to your experimental result)
       #Post#: 126--------------------------------------------------
       Re: Coax cable length
   DIR By: Robert
       Date: December 20, 2025, 9:45 am
       ---------------------------------------------------------
       I thought the macro for the RG58CU coax would contain all
       relevant parameters of the cable.
       I am too familiar with MC12 macros, but if I use the model of a
       speciific device from the library, e.g. a transistor, diode,
       etc. the simulation results are very satisfactory.
       I wonder why should I bother with all the specific parameters
       (L, C, R, etc.) of a cable if ther is also a macro that can be
       used.
       Anyway, your comments are much appreciated.
       In the meantime I made some more tests with the scope and they
       give the same trustworthy results for two types of cable.
       Robert
       #Post#: 127--------------------------------------------------
       Re: Coax cable length
   DIR By: MC12
       Date: December 20, 2025, 10:40 am
       ---------------------------------------------------------
       --- Quote from: Robert link ---
       >
       > I thought the macro for the RG58CU coax would contain all
       relevant parameters of the cable.
       --- End Quote ---
       Like I said before, I can only look at this in detail once I'm
       back at base (and have some free time when I'm not being pursued
       to do something else!).  I was only suggesting a path of
       enquiry, for investigation.
       --- Quote ---
       > I am too familiar with MC12 macros
       --- End Quote ---
       I'll read that as "I am not too familiar..."!  Neither am I.
       --- Quote ---
       > I wonder why should I bother with all the specific parameters
       (L, C, R, etc.) of a cable if ther is also a macro that can be
       used.
       --- End Quote ---
       Isn't the macro* just building an equivalent LCR network from
       your cable spec?  If so, then I'm guessing the circuit will
       simulate as an LCR network – without distance being a factor and
       therefore with no light-time.
       Perhaps [member=6]Rohit[/member] can enlighten us whether signal
       delays due to distance travelled are included in the simulation
       parameters.
       * NB: It's not a macro, it is a library Spice model the same as
       any other – so no, it is not an LCR equivalent network.  I
       interpreted "macro" to mean a sub-circuit.
       #Post#: 131--------------------------------------------------
       Re: Coax cable length
   DIR By: MC12
       Date: December 23, 2025, 12:49 pm
       ---------------------------------------------------------
       OK, so for anybody else reading this, here are the circuit and
       simulation results in MC12 (would have been handy if the OP had
       done this so I didn't have to, and that would have saved me
       wasting time on guesses which are now obviously incorrect, but
       hey ho...):
       [attachimg=1]
       [attachimg=2]
       The simulation Transient run (like a 'scope) shows the voltage
       at the battery in blue and the voltage at point A in red, with
       the switch closing at T=50ns.  The R and C are to replicate the
       input impedance of a connected 'scope probe, as per the IRL (In
       Real Life) results the OP posted.
       What is shown is the initial voltage transient to half the
       battery voltage when the switch closes (as per the timing
       parameters on the circuit diagram), then the second transient to
       the full battery voltage when the refection gets back from the
       open end of the coax about 17ns later.  There are then further
       ripples every 17ns each time the transients reflect back.  This
       is the basis of Time Domain Reflectometry.
       Given that the speed of light is 3x10^8 m/s, 5.43 m of cable
       with a velocity factor 0.66, the expected round-trip time should
       be 54.3ns, as the OP verified IRL.
       The problem is... WHY DOES THE SIMULATION PRODUCE ~17ns NOT
       ~55ns?
       #Post#: 132--------------------------------------------------
       Re: Coax cable length
   DIR By: MC12
       Date: December 23, 2025, 1:17 pm
       ---------------------------------------------------------
       Well, I think I might have an answer.
       I was trying to get some inspiration from looking at the actual
       device model file, which in this case is in
       C:\MC12\LIBRARY\trans.lib (transmission lines).  The relevant
       section is here:
       --- Code ---
       * RG-58C/U cable type: 50ohms, 66% velocity of propogation
       * default 4.9dB/100ft @ 100MHz
       .subckt RG58CU AP AN BP BN
       + params: freq=100MEG length=1
       + atten={table(freq, 10Meg,.014, 50Meg,.033, 100Meg,.049,
       +        200Meg,.073, 400Meg,.11, 1G,.2)}
       
       T1 AP AN BP BN RG58C
       
       .model RG58C TRN (len={length} r={(atten/8.686)*2*50}
       +                c=30.9p     l=77.0n)
       .ends
       
       --- End Code ---
       OK, I thought, what's this "length=1"?  What would happen if
       that were overriding the demand for 5.43m?  That would reduce
       the echo delay to about 10ns, so that's not the answer, and in
       any case, in the local model file for the simulation, the OP has
       substituted "length=5.43".
       Then I had a look at the introductory comments in the file:
       --- Code ---
       * This library consists of lossy transmission line models.
       *
       * These models are mainly for transient analysis as they
       * don't represent the frequency dependence that is needed for
       * the attenuation vs. frequency characteristic. They may still
       be
       * used in AC analysis, but won't realistically predict the
       attenuation
       * except at one frequency.
       *
       * The input parameters for these models is the frequency in Hz
       * and the actual length of the wire that is desired.
       * The default for attenuation is shown below with each model
       and includes
       * the unit of length used, and the default length is equal to
       1.
       *
       * These parameters were taken from the "Handbook of
       Electronics
       * Calculations For Engineers and Technicians" by Kaufman and
       * Seidman, Second Edition, McGraw Hill.
       
       --- End Code ---
       We're using transient analysis, so that's OK.  But then:
       --- Code ---
       * The calculations below are in feet, so the velocity is taken
       as 9.82e8ft/s
       
       --- End Code ---
       In feet?!!  That would explain it.
       5.43 ft = 1.66m.  Round-trip for 1.66m would be 16.6ns (as per
       the original simulation).  So instead of specifying 5.43m of
       cable, it should be 17.8 ft.
       So, here's the simulation run for 17.8 ft:
       [attachimg=1]
       #Post#: 133--------------------------------------------------
       Re: Coax cable length
   DIR By: Robert
       Date: December 23, 2025, 2:54 pm
       ---------------------------------------------------------
       Thank you for your explanations!
       I could kick myself, why didn't I think of trying to enter the
       cable length in feet?!
       I veryfied the simulation, the result is 5.4252 m = 17.799 ft.
       Cheers,
       Robert
       #Post#: 134--------------------------------------------------
       Re: [solved] Coax cable length
   DIR By: MC12
       Date: December 23, 2025, 3:59 pm
       ---------------------------------------------------------
       No need to kick yourself too hard, I was scratching my head as
       well.  Feet is not at all obvious unless you happen to read the
       notes in the .lib file, although I was looking for a reason for
       roughly a factor of 3 difference, and when I saw that...
       Blame the Americans for not using SI.  If I remember correctly,
       confusion between Imperial and Metric has been the cause of more
       than one high-profile ****-up.  [Redacted by forum software (not
       me)!  "c o c k - u p" doesn't strike me as particularly rude
       (sigh).]
       #Post#: 135--------------------------------------------------
       Shorted Co-ax Simulation
   DIR By: MC12
       Date: January 7, 2026, 10:49 am
       ---------------------------------------------------------
       Out of curiosity, I shorted the far end of the cable (in the
       schematic) and re-ran the simulation.  As expected:
       [attachimg=1]
       However, further to the right, at 200ns, this happens!:
       [attachimg=2]
       I assume the negative excursion is caused by the inductance of
       the cable (and the subsequent square-wave oscillation is the
       end-to-end echo).  The parameters for the switch say "50n,200n"
       which I guess (with no degree of authority) means "close at 50ns
       and open again at 200ns", which is fine... except the original
       simulation shows no discontinuity at 200ns.  I don't immediately
       understand why not.
       #Post#: 136--------------------------------------------------
       Re: Shorted Co-ax Simulation
   DIR By: MC12
       Date: January 7, 2026, 10:53 am
       ---------------------------------------------------------
       --- Quote from: MC12 link ---
       >
       > except the original simulation shows no discontinuity at
       200ns.  I don't immediately understand why not.
       >
       --- End Quote ---
       Ah, I do now (by deleting the co-ax and re-running).  C1 holds
       the voltage at point A up, and when the switch opens there is a
       slow discharge through R2, therefore no discontinuity.  In the
       shorted case, there is a sudden discontinuity in current rather
       than voltage, which reacts with the inductance.
       *****************************************************
       Page 1 of 1