Cable length measurements with "cable_length.py"

Applications, development tools, FPGA, C, WEB
Post Reply
Drachenfrucht
Posts: 34
Joined: Fri Mar 18, 2016 12:18 am

Cable length measurements with "cable_length.py"

Post by Drachenfrucht » Mon Apr 04, 2016 4:10 pm

Hi all,

I was impressed by Cable length measurements & Reflectometry and made the same setup.

At RedPitayas' IN2 and OUT2 port I connected a T-adapter.

On the T-adapter at IN2 port I connected: the first end of this T-adapter is connected with a 50Ohm resistor. On the other end of this T-adapter I connected a 50 Ohm coaxial cable (20cm length).

On the T-adapter at OUT2 port I connected: the first end of this T-adapter is connected with the previous mentioned 20cm coaxial cable. The other end of this T-adapter is connected with an adapter SMA<-->Coaxial<-->SO232 so I can connect a standard coaxial cable with SO232.

I hope my connection schema is correct, isn't it? I did et exactly as shown on the presentation video on 05:08min

Then I ssh into RP and run

Code: Select all

systemctl start redpitaya_scpi
to start the SCPI server which is needed for the python script to run successfully.

Then I run "python Cable_length.py". I press 'm' for measuring cable length and on the next question "Is your cable longer than 10m?" I press "n" for NO. On the first run is asks me to create a .CSV file and to disconnect my cable first. I do so: I disconnect the coaxial cable that I want measure and press ENTER. The program then creates a new file called "no_cable_response.csv". Then is asks me to reconnect the coaxial cable. I have tried connecting various coaxial cables (RG58, RG213) in different lengths <10m. My tested cables are open circuit, the other end is OPEN. But whatever cable I measure, I get the answer ==> IMPEDANCE MATCHED TERMINATION. which looks like shown in following screenshot:
16-04-04-165611.png
I do not understand that. Even when I unplug the coaxial cable I want to measure from the T-adapter at OUT2 the python script "Cable_length.py" return the same output.

Why is the impedance matched whereas the end is OPEN in real?? Any help really appreciated, I'm kinda clueless :?

Thanks to @ll

Even when I disconnect
You do not have the required permissions to view the files attached to this post.

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Cable length measurements with "cable_length.py"

Post by Nils Roos » Mon Apr 04, 2016 7:52 pm

I haven't tried the cable length measurements myself, but in the documentation there is a mention of "With Red Pitaya's sample rate, we can estimate cable's length with resolution of 80cm." Your 20cm cable is indistinguishable from an open circuit for the time resolution possible with the Red Pitaya.

Drachenfrucht
Posts: 34
Joined: Fri Mar 18, 2016 12:18 am

Re: Cable length measurements with "cable_length.py"

Post by Drachenfrucht » Tue Apr 05, 2016 1:53 am

Hi Nils,

I have tried measuring:

- a 20cm coaxial cable
- a 300cm coaxial cable
-a 500cm coaxiabl cable
- no cable at all

at all cirumstances I get "MATCHED IMPEDANCE" and this is weird :)

User avatar
redpitaya
Site Admin
Posts: 912
Joined: Wed Mar 26, 2014 7:04 pm

Re: Cable length measurements with "cable_length.py"

Post by redpitaya » Wed Apr 06, 2016 12:13 pm

Hi guys,

If you are using OUT1 and IN1 instead OUT2 and IN2 you should change that in the code.
But think that issue is in this line in Cable_length.py

Code: Select all

 rp_s.rp_write('ACQ:TRIG:LEV 0.5')  # trigger level set to 500 mV
In original version it is "500" instead of "0.5".
Our developers have changed trigger level settings from mV to V in the latest SCPI server release.

So try to change that and run the code.
- Use OUT2 and IN2
- Make connections as is described in video
- Delete your old "No cable response.csv" and start the code.

Minimum length of the measured cable is 80cm.
Resolution should be around 8cm.

All Best, RP

Drachenfrucht
Posts: 34
Joined: Fri Mar 18, 2016 12:18 am

Re: Cable length measurements with "cable_length.py"

Post by Drachenfrucht » Sat Apr 09, 2016 12:11 am

Thanks a lot for this helpful information. You guys should change the code and upload it to your webserver, so the latest code is downloadable for the users ;)

Cheers 8-)

Drachenfrucht
Posts: 34
Joined: Fri Mar 18, 2016 12:18 am

Re: Cable length measurements with "cable_length.py"

Post by Drachenfrucht » Sun May 01, 2016 11:09 pm

Unfortunately I realized you still are offering the faulty version on your web page Cable length measurements & Reflectometry.

The download link in line 105 says:

Code: Select all

   rp_s.rp_write('ACQ:TRIG:LEV 500')  # trigger level set to 500 mV
which is WRONG!

The program code in line 105 should look like that:

Code: Select all

   rp_s.rp_write('ACQ:TRIG:LEV 0.5')  # trigger level set to 500 mV
What do you think about fixing the download link with a correct working program version? Thanks a lot in advance for your help and support.

Best regards

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 104 guests