[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Fun challenge: cat-5 cable tester




On Aug 27, 2006, at 8:22 AM, DJ Delorie wrote:


[I posted this on s.e.design, but all of the people who responded were too stupid to know what "fun challenge" meant, and tried to talk me out of the *design* of the tester, ignoring the purpose of the posting. So, I'm copying it here, because people here tend to be more intelligent than that, and might enjoy a mental challenge without missing the whole point of the posting.]

I had this idea, and toyed with it a while (including some computer
simulations), but didn't go very far with it.  I thought I'd post it
here in case anyone wants a brain teaser for the weekend.

Consider this tool: a cat-5 cable tester.

Goal: To make a tester that works entirely from the user's side,
without needing batteries at the far end.

Circuit:

+-----+
|     | P0/AD0     R1                      R11
|     |----------\/\/\--< <--------> >----\/\/\ ---+
|     | P1/AD0     R2                      R12     |
|     |----------\/\/\--< <--------> >----\/\/\ ---+
|     | P2/AD2     R3                      R13     |
|     |----------\/\/\--< <--------> >----\/\/\ ---+
|     | P3/AD3     R4                      R14     |
|     |----------\/\/\--< <--------> >----\/\/\ ---+
|  uP | P0/AD0     R5                      R15     |
|     |----------\/\/\--< <--------> >----\/\/\ ---+
|     | P1/AD0     R6                      R16     |
|     |----------\/\/\--< <--------> >----\/\/\ ---+
|     | P2/AD2     R7                      R17     |
|     |----------\/\/\--< <--------> >----\/\/\ ---+
|     | P3/AD3     R8                      R18     |
|     |----------\/\/\--< <--------> >----\/\/\ ---+
|     |                     cable
+-----+

The idea is that each GPIO pin can either drive high, drive low, or
measure the voltage present.  I.e. you're creating a programmable
resistor divider network.  So you can set up various combinations of
resistors being driven from various combinations of voltages, and use
the A/D converters to measure the voltage, and compare with what you
"think" it should be.

The challenge: Select values of R1..R18 such that you can accurately
detect the following cable errors:

        * shorts between any N (2..8) conductors.
        * opens in any one or more conductor.
        * swapped (or N>2 miswired) conductors.

Bonus points for minimizing the number of A/D bits you need.

My idea was to provide eight red/green or RGB leds on the uP side to
indicate the status of each conductor (green=OK, other
combinations=various error conditions), with a serial or usb port for
diagnostics to a laptop.  I have a cable tester now, but the battery
is at one end and the lights are at the other.

It's much easier if you put the remote resistors in series (and needs one less, too):


+-----+
|     | P0/AD0     R1                      R11
|     |----------\/\/\--< <--------> >----\/\/\ ---+
|     |                                            |
|     |                                +-----------+
|     | P1/AD1     R2                  |   R12
|     |----------\/\/\--< <--------> >-+--\/\/\ ---+
|     |                                            |
|     |                                +-----------+
|     | P2/AD2     R3                  |   R13
|     |----------\/\/\--< <--------> >-+--\/\/\ ---+
|     |                                            |
|     |                                +-----------+
|     | P3/AD3     R4                  |   R14
|     |----------\/\/\--< <--------> >-+--\/\/\ ---+
|     |                                            |
|     |                                +-----------+
|  uP | P4/AD4     R5                  |   R15
|     |----------\/\/\--< <--------> >-+--\/\/\ ---+
|     |                                            |
|     |                                +-----------+
|     | P5/AD5     R6                  |   R16
|     |----------\/\/\--< <--------> >-+--\/\/\ ---+
|     |                                            |
|     |                                +-----------+
|     | P6/AD6     R7                  |   R17
|     |----------\/\/\--< <--------> >-+--\/\/\ ---+
|     | P7/AD7     R8                              |
|     |----------\/\/\--< <--------> >-------------+
|     |                     cable
+-----+

(When I was finishing up, suddenly I felt remarkably silly for not using gschem for this ;-)

Suppose all resistors are equal, and you drive P0 with 4.5V, P7 with 0V. If all is OK, AD1 will be 3.5V, AD2 will be 3.0, ..., AD6 will be 1V. If AD0>AD1>AD2>AD3>AD4>AD5>AD6>AD7 you know that there are no shorts and that the wires connect through in order. There are only the following issues:

1. If an undriven AD pin can float to a plausible voltage, additional tests are needed. Drive the pin and watch for an undriven neighbor to respond: that will prove it isn't open. On the other hand, if it floats to zero, you don't need this additional check.

2. If the cable is completely reversed (0->7, 2->6, ..., 7->0), it will look OK. Break the symmetry by doubling one of the remote resistors (any but R14), and use the extra drop to identify which end is which.

3. No static tester can detect the case where the pins are connected through properly, but the pairing of the wires in the cable is wrong. Need capacitance or reflectometry measurements for that.

The resistors don't have to be precise, and 6 bits of ADC should be plenty.

John Doty              Noqsi Aerospace, Ltd.
jpd@xxxxxxxxxxxxx




_______________________________________________ geda-user mailing list geda-user@xxxxxxxxxxxxxx http://www.seul.org/cgi-bin/mailman/listinfo/geda-user