+ Post New Thread
Results 1 to 15 of 15
  1. #1
    Full Member level 6
    Points: 1,285, Level: 8

    Join Date
    May 2014
    Posts
    378
    Helped
    1 / 1
    Points
    1,285
    Level
    8

    Ohms/distance cable length project

    Hello

    I hope to built a circuit based on PIC18F4520 that executes the following:

    Whenever connected a telephone twisted pair line of 0.4mm thickness (only), an LCD tells its distance after ohm to length conversion.

    The idea principle is based on Ohm's law.

    I've seen similar projects, using a voltage divider, whereas the line can be considered as pull down to ground resistance, then Vcc is sensed via PORTA, and after math conversion one can know the value of the resistance (in this case, a copper line), therefore can know its length. What I don't like in this project is one must connect the two terminals of the line, to be able to know its resistance hence length. The problem is that there are cases where one cannot reach the other terminal of the line (maybe it is underground buried somewhere).

    What I want to make is to design a circuit, where one can connect twisted pair two terminals to PIC, then length is shown on LCD. It is similar to the functioning of 3M Dynatel 965 in its open circuit function (tells where the line is open).

    Any thoughts please?

    Thanks in advance
    Always strive for perfection but have the humility to know you will never achieve it.

  2. #2
    Super Moderator
    Points: 44,897, Level: 51
    Awards:
    Most Frequent Poster

    Join Date
    Apr 2014
    Posts
    9,187
    Helped
    2212 / 2212
    Points
    44,897
    Level
    51

    Re: Ohms/distance cable length project

    Hi,

    I´m pretty sure, that the §M tool doesn´t calculate the length with Ohm´s law.
    I rather think it uses signal runtime of reflected signal method to determine the cable length.

    Klaus


    1 members found this post helpful.

  3. #3
    Full Member level 6
    Points: 1,285, Level: 8

    Join Date
    May 2014
    Posts
    378
    Helped
    1 / 1
    Points
    1,285
    Level
    8

    Re: Ohms/distance cable length project

    Hi Klaus

    I didn't say want to make it function just like the 3M does.
    I want to achieve the same results.

    Any suggestions?

    Thank you
    Always strive for perfection but have the humility to know you will never achieve it.



    •   Alt20th March 2017, 18:52

      advertising

        
       

  4. #4
    Super Moderator
    Points: 26,615, Level: 39
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,048
    Helped
    1482 / 1482
    Points
    26,615
    Level
    39

    Re: Ohms/distance cable length project

    If it uses only one end of a line then it probably works using TDR as KlausST suggests.

    You might also be interested in this too.


    1 members found this post helpful.

  5. #5
    Full Member level 6
    Points: 1,285, Level: 8

    Join Date
    May 2014
    Posts
    378
    Helped
    1 / 1
    Points
    1,285
    Level
    8

    Re: Ohms/distance cable length project

    Hi ads

    So to know length using only one side of the cable, is only possible using TDR. Any suggestions to the previous method, where connecting two sides of the line to know its length and maybe some adjustment to it?

    Thanks
    Always strive for perfection but have the humility to know you will never achieve it.



  6. #6
    Super Moderator
    Points: 26,615, Level: 39
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,048
    Helped
    1482 / 1482
    Points
    26,615
    Level
    39

    Re: Ohms/distance cable length project

    Quote Originally Posted by KhaledOsmani View Post
    I didn't say want to make it function just like the 3M does.
    I want to achieve the same results.

    Any suggestions?
    Well you're not going to be able to directly measure the resistance if you can't access the other end of the cable, so your choice is limited to reflectometry. Even then you'll need to know the inductance and capacitance of the cable pretty accurately to get a good length measurement as the propagation delay (or this) is dependent on them.

    - - - Updated - - -

    To get something accurate with a resistance measurement you might need to resort to some sort of wheatstone bridge topology, even then you might get inaccurate results unless you have really good connections to the tester as small variations in the resistance will result in gross changes in the length (wire resistance is in the order of hundreds of micro-ohms per ft.)



    •   Alt20th March 2017, 19:08

      advertising

        
       

  7. #7
    Full Member level 6
    Points: 1,285, Level: 8

    Join Date
    May 2014
    Posts
    378
    Helped
    1 / 1
    Points
    1,285
    Level
    8

    Re: Ohms/distance cable length project

    Is reflectometry achievable with PIC?

    For the other choice, are you saying I must make a voltage divider test to know R, and two other tests remains to get L and C?

    Thanks
    Always strive for perfection but have the humility to know you will never achieve it.



    •   Alt20th March 2017, 19:09

      advertising

        
       

  8. #8
    Super Moderator
    Points: 26,615, Level: 39
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,048
    Helped
    1482 / 1482
    Points
    26,615
    Level
    39

    Re: Ohms/distance cable length project

    Quote Originally Posted by KhaledOsmani View Post
    Is reflectometry achievable with PIC?
    no clue if it's possible with a PIC, I'm a hardware guy.

    For the other choice, are you saying I must make a voltage divider test to know R, and two other tests remains to get L and C?
    not sure you need the L and C if you are just getting an accurate resistance as the currents through a wheatstone bridge aren't supposed to be varying.



  9. #9
    Super Moderator
    Points: 64,679, Level: 62
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,700
    Helped
    3478 / 3478
    Points
    64,679
    Level
    62

    Re: Ohms/distance cable length project

    TDR should be possible with a PIC although I've never tried it.
    I would suggest a step generator that triggers the PIC and sends the signal simultaneously and using the fastest counting speed to time the relection. So the PIC is used as a period counter to measure the length. It can then do the calculations and return a meaningful length on a display or serial link.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  10. #10
    Advanced Member level 3
    Points: 5,599, Level: 17

    Join Date
    Jun 2015
    Posts
    997
    Helped
    241 / 241
    Points
    5,599
    Level
    17

    Re: Ohms/distance cable length project

    Hi,

    I saw somewhere that a device measures length with capacitance in nF for phone lines (pairs), the person who showed me it in action said it's a good approximate measurement from client's home to the exchange, besides fault-finding, not sure if that's any use to you.



  11. #11
    Super Moderator
    Points: 64,679, Level: 62
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,700
    Helped
    3478 / 3478
    Points
    64,679
    Level
    62

    Re: Ohms/distance cable length project

    That can be very unreliable, the capacitance depends on other factors and whether there are extensions or spurs off the line. It can also be influenced by other telecoms equipment sharing the line and things like ADSL filters. TDR is more predictable and, if enough care is taken, tell you not only the line length but also the distance to other devices or connections along the way.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

    •   Alt20th March 2017, 22:34

      advertising

        
       

  12. #12
    Full Member level 4
    Points: 2,713, Level: 12
    Achievements:
    7 years registered

    Join Date
    Nov 2009
    Location
    United States
    Posts
    234
    Helped
    68 / 68
    Points
    2,713
    Level
    12

    Re: Ohms/distance cable length project

    I have not done it with a PIC, but have done it with HCS08 family microcontrollers. To do this with much accuracy, you will probably want to use a part with at least (2) timer input capture channels, with a timer clock running at at least 8MHz. If you add in fast external comparator with a D/A conencted to one of its inputs and the cable connected to the other, then you can adjust the trip point and be better able to select/detect the intermediate levels of the reflected waveform. As has been indicated, you can assume a certain velocity of propagation for the wire, or allow the user to enter it from the cable manufacturers data, and have the calculated length use the value to display the result..

    If you want to use loop resistance and either access the other end of the wire or have an ability to tie the far end of the wire pair together, this method can work but you will ideally need to make a constant current source and use 3 terminal or 4 terminal wire resistance measurement techniques. Depending on the A/D resolution and scaling, you may need to use a current source of significant output. I would not recommend trying to use anything below 20mA.



  13. #13
    Super Moderator
    Points: 44,897, Level: 51
    Awards:
    Most Frequent Poster

    Join Date
    Apr 2014
    Posts
    9,187
    Helped
    2212 / 2212
    Points
    44,897
    Level
    51

    Re: Ohms/distance cable length project

    Hi,

    assuming a cable signal velocity of 80% of c then the resolution with an 8 MHz counter is about 15m.

    But I´d say this is more reliable than capacitive or ohmic measurement method.

    Klaus



  14. #14
    Super Moderator
    Points: 64,679, Level: 62
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,700
    Helped
    3478 / 3478
    Points
    64,679
    Level
    62

    Re: Ohms/distance cable length project

    The specified PIC18F4520 can run with a 16-bit counter running at 10MHz (= 12m resolution) or with an external clock source at the timer input, up to about 50MHz (=2.4m resolution). Using the standard 10MHz clock, the longest length measurable (if actually possible) is around 1Km.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  15. #15
    Full Member level 4
    Points: 2,713, Level: 12
    Achievements:
    7 years registered

    Join Date
    Nov 2009
    Location
    United States
    Posts
    234
    Helped
    68 / 68
    Points
    2,713
    Level
    12

    Re: Ohms/distance cable length project

    Generally, you do want to use a clock rate of higher frequency to achieve your best resolution. If you can efficiently do so in the microcontroller of your choice and code efficiently, one can also cascade timers to be able to work with longer lengths (either gating the start of the second timer or using the rollover interrupt to start a 2nd timer). Interrupt latency of the system can introduce error which may or may not be acceptable in the rollover method. You also want to do a series of pulses/measurements, collect the data and average or filter them and use the filtered result as your estimated length because a single measurement can still have alot of noise/error.

    Depending upon your circuit sophistication and coding ability, you can detect shorts or impedance changes along the wire as well.



--[[ ]]--