6

I am not alone, I experienced a similar problem as:

Having hours of problem and doubts, I found out that my adafruit cable had mixed wire connections. Uhm.

In theory, the cable should be as in A, but turns out to be like B:

              A     APurpose  |     B  BPurpose
Wire color   red      5v      |        5v
             black   GND      |        GND 
             white   TXD      |        RXD
             green   RXD      |        TXD

In fact, the only working setup looked like this: Setup of working console cable

When it is specified (here) to connect the white and the green wires like this: enter image description here

I wish to avoid using bad cables on my hardware (raspberryPi, Laptop) and burn my equipment.

So, based on the following usb pin layout: USB internal pin out

How should I validate each wire's purpose ?

With an independent tester (ohmmeter, voltmeter, ...):

  1. How can I validate each wire and
  2. What should be the correspondence between the colored cable and their usb pinout ?

For example what this correspondence table of the usb console cable should look like:

Usb console cable

   Red wire (5v):     Usb pin#1 ?
   Black wire (gnd):  Usb pin#4 ?
   White wire (txd):  pin#?
   Green wire (rxd):  pin#?

Thanks

  • I don't understand the problem. You connect TXD to the other ends RXD, and RXD to the other ends TXD. Why do you think there is an error? – joan May 9 '14 at 19:51
  • To make it work, I had to switch the TXD and RXD as opposed to the described setup on adafruit learn pages. I will add the original setup described by adafruit. – Alain May 9 '14 at 20:59
  • 2
    USB connector is NOT directly connected to serial cable leads, there's no one-to-one relationship. it's like trying to find a relationship between the power plug and HDMI cable, blindly forgetting there's a DVD player between them =) – lenik May 10 '14 at 0:48
  • @lenik, you understood what I was looking for. From the crowd, my question seems confused, although. I am still wondering if there is a way to test these cables. On 3 cables purchased, all have the same 'anomaly'. I wish I could close that question as it cannot be really answered. – Alain May 10 '14 at 2:06
  • There is a chip inside the usb plug. The fact the that there are 4-pins on both the usb and output is just a coincidence . – Gerben May 10 '14 at 10:06
7

If we accept the Adafruit technical specs, and you bought the dongle from Adafruit.

  1. Leave the red (5V) lead unconnected.

  2. Connect the black (ground) lead to P1-6 (Pi ground).

  3. Connect the green (TX) lead to P1-10 (Pi RXD)

  4. Connect the white (RX) lead to P1-8 (Pi TXD)

http://elinux.org/RPi_Low-level_peripherals for Pi pin numbering.

Even if TX/RX are mislabelled you won't harm the Pi. I've often connected them the wrong way around. It just doesn't work.

Don't try to power the Pi with the dongle. It won't be reliable even if it works at all.

  • 1
    Second that. Don't connect the 5V pin!!! – Gerben May 10 '14 at 10:03
2

if you want to be able to find where is +5V, GND, TX and RX pins, you need a multimeter (a voltmeter basically), 1kOhm resistor and a simple LED.

first you need to find the GND and +5V, most probably these are BLACK and RED, however might be any colour. connect multimeter to the GND and touch other pins starting from RED, once you see 5V on your multimeter, you've found the power pins. if you don't see 5V on the multimeter, choose another pin as GND, and measure voltage between the selected pin and other pins. repeat as necessary.

then you may try to find the TX pin. make a probe, according to the picture:

GND ]----[==1k==]---|<|-------->
         resistor   LED      probe

touch +5V with the probe end, the LED should become ON, otherwise you either missed the GND and +5V or the LED polarity (the longer lead should connect to the probe).

from now on, you may safely ignore +5V pin, because it's not required for a proper operation of the serial port, unless you're going to power RasPi from USB port, that's generally not recommended and will eventually fail.

if everything works so far, connect the probe to the probable candidate to TX pin and type something into the terminal window (choose lower baud rate in the terminal settings, something like 2400, 4800 or 9600), connected to USB tty port on your PC. see if the LED will flash when you type. if nothing happens, try another possible TX candidate pin. at least one of them will make the LED flash, and the other will be RX pin.

ps. I have mistaken TX and RX pins many times in the past, with TTL serial levels it's quite difficult to do any damage, you should not worry much about that.

1

The Adafruit "Technical Details" are quite clear. There are four wires: red power, black ground, white RX into USB port, and green TX out of the USB port.

0

This is a confusing situation, as you have shown by including the USB pinout in your question.

Compounding the confusion is the use of the same colours that USB uses, but for completely different functions.

There is a chip buried inside the USB plug that is doing the USB-UART conversion.

There is no standard for what white/green means in this situation. There is also no standard that they even use white/green.

You may improve your situation by making sure you buy the same part number from the same manufacturer every time.

If you need to find out which is which, you can try connecting each wire to an LED first. Transmitting at 9600 baud will cause the LED on the TXD line to flash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.