TTL UART - Community Recommended Pinout DRAFT 4th Feb 2015

TTL UART, are serial plugs that are used to communicate to devices and micro controllers using inexpensive hardware (or via bitbanging).


    TTL UART general wiring between Device A and B

             | TX  :_____      ___: TX  |
             |           \    /         |
             |          ..\../          |
    DEVICE A |         /   \            |  DEVICE B
             | RX  :__/     \_____: RX  |
             |                          |
             | GND :______________: GND |


    Flow control:

    | Output  |  Input |
      RTS -------> CTS
      DTR -------> DSR 

Header Pins

3 Pins : Un-Powered (Reversible)

[TXD][GND][RXD]

4 Pins : Powered (Not Reversible)


[TXD][GND][RXD][VCC]

5 Pins : Powered (Reversible)


[VCC][TXD][GND][RXD][VCC]

6 Pins : Powered (Not Reversible)


[TXD][GND][RXD][VCC][DSR][DTR]

7 Pins : Full Flow control (Reversible)


[RTS][DTR][VCC][TXD][GND][RXD][VCC][DSR][CTS]

Justification/Reasoning

The benefit to this pattern, is that it would be possible to have a cable that can easily swap the TXD and RXD around (like a cross over cable). This allows for swapping TXD and RXD, in a painless manner.


TRRS


TTL UART via TRS plug (Master):
( On the master device e.g. USB to Serial adaptor )

TIP    : master RX (to slave TX)
RING1  : VCC & (optional low pulsed reset)
RING2  : master TX (to slave RX)
SLEEVE : Ground 0V


TTL UART via TRS Receptacle ( slave ):
( E.g. UV-3R UHF radio TRRS port ) 

TIP    : slave  TX
RING1  : VCC & (optional low pulsed reset)
RING2  : slave  RX 
SLEEVE : Ground 0V

Performing A Reset:
    For devices that requires a reset pulse from master to client. (e.g. arduino)
    A reset command is done by pulsing the VCC power output to ground from the master side. 
    This could be done by a mosfet switch on the VCC pin on/off, and a LED+resistor to pull the VCC pin down to ground.
        (LED+resistor should pull down strong enough to trigger the reset pin in the target device)

    The VCC pin is connected to the device power rail by a diode,
    and the device has some capacitance to power the device during the low pulse.
    VCC is then connected to the reset (reset on low) pin (might need a series capacitor).



Justification/Reasoning

Based pinout to UV-3R, due to popularity of the device, and thus the abundance of programming cables for UV-3R.

Edits:

  • Jan 2015: Switched the order of the device to match the popular UV-3R programming cable (Since it be easier to source such cables as well)

TRS

Recommended to use TRRS version instead, even if unpowered.


TTL UART via TRS plug:

TIP    : master RX to slave TX
RING   : master TX to slave RX
SLEEVE : Ground 0V

Note: master device are the plug, and slave are the Receptacle. 

Justification/Reasoning

You'll need to make it clear that you cannot plug a TRRS plug in.


6 pin modular connector (Telephone Plug Style)

    TTL UART 6P6C PORT (Telephone. Pretty rare):
    (6 Possible Contacts, 6 Pin Contacts Used)
            _____
          _|     |_
     ____|         |____
    |                   |
    |                   |
    |                   |
    |_   6 5 4 3 2 1   _|

    Device:
    1: DSR
    2: RxD
    3: VCC
    4: GND
    5: TxD
    6: DTR

    Cable Wiring:

        To connect two device together, 
        you'll need to modify the telephone cable
        to take this arrangement for all the pins 
        (or at least 4, if supporting only RX/TX).

    Plug1     |     Plug2
    6:DTR    -->    1:DSR
    5:TxD    -->    2:RxD
    3:VCC    -->    3:VCC
    4:GND    -->    4:GND
    2:RxD    -->    5:TxD
    1:DSR    -->    6:DTR

    Extra notes:
    http://en.wikipedia.org/wiki/Registered_jack#Registered_jack_types

Justification / Reasoning

Since telephone cables are typically untwisted, bundled together and unshielded. There is no real point to any particular arrangement of pins. Still since some are flat flexed, it would be a good idea to at least keep the RX/TX separate from each other. Typically you can easily source 4 conductors telephone cable, which will give you at least the Tx and Rx and power (excluding RTS/CTS flow control).

This mandates a custom cable (or a modified telephone cable), since we are crossing over connections. This would allow for connecting TTL serial devices in any combinations we want.

This has all the pins of a standard FTDI USB to Serial adapter for devices like arduino.


RJ45 Style Plug (Full Flow Control)

This uses the same plug as an ethernet cable. However the cable used is untwisted.

You will need to make your own custom cable for this method.

diagrams


    8P8C TTL UART PORT:
    (8 Possible Contacts, 8 Pin Contacts Used)
            _____
          _|     |_
     ____|         |____
    |                   |
    |                   |
    |                   |
    |_ 8 7 6 5 4 3 2 1 _|

    http://en.wikipedia.org/wiki/TIA/EIA-568#Wiring

    Device port:
    1: CTS   - Clear To Send
    2: DCD   - Data Carrier Detect
    3: Rx    - UART Receive
    4: VCC   - Voltage Power Input ( Can be omitted if not powered through cable)
    5: GND   - Ground Power Input 
    6: Tx    - UART Transmit
    7: DTR   - Data Terminal Ready
    8: RTS   - Request To Send

    Cable Wiring:

        To connect two device together, 
        you'll need to modify the RJ45 cable
        to take this arrangement for all the pins.

    Plug1     |     Plug2
    8:RTS    -->    1:CTS
    7:DTR    -->    2:DCD
    6:Tx     -->    3:Rx
    4:VCC    -->    4:VCC
    5:GND    -->    5:GND
    3:Rx     -->    6:Tx
    2:DCD    -->    7:DTR
    1:CTS    -->    8:RTS

Master Port

If you don't want to create a custom crossover cable...

For a device that will only act as a master, and uses the easy to source unmodified 4 pin telephone cable. You can use this port arrangement instead. E.g. you are making a serial to USB cable. But generally this is not recommended, as you might as well just solder the cable directly to the pcb.

    Master/Computer port:
    1: RTS   - Request To Send
    2: DTR   - Data Terminal Ready
    3: Tx    - UART Transmit
    4: VCC   - Voltage Power Input ( Can be omitted if not powered through cable)
    5: GND   - Ground Power Input 
    6: Rx    - UART Receive
    7: DCD   - Data Carrier Detect
    8: CTS   - Clear To Send

Justification / Reasoning

This wiring standard is inspired by the YOST RS232 wiring standard. The main difference is that unlike the YOST cable, pin 5 and 4 is untwisted. But incidentally since the YOST cabling standard designate both 5&4 as GND, this cable will be backwards compatible with YOST ports.

If you use cat5 cables, you should ensure that the Tx and Rx pins are not twisted together. (e.g. make pin 6:5 and 4:3 a pair). Since VCC is not always powered, you should add some capacitance on both ends of the port for pin 5 & 4.

If you need all the flow control pins that you find in a rs232 device, you should give YOST SERIAL Standard a shot. Be mindful that Yost Serial is an rs232 voltage level signalling standard, so level conversion is required (+-12V).

Do note that naturally, since this is TTL signalling rather than RS232 signals, the maximum cable length is going to be drastically smaller than rs232 cables.

Still the typical use case of this device is short range connection between a computer to an embedded serial console.


micro USB non standard usage


    TTL UART via Nonstandard microusb plug (aka: uUART):

    USB Mini-A (PLUG/MALE) Front View
    _________________________________________
    | __] 5 [__] 4 [__] 3 [__] 2 [__] 1 [__ |
    ||    v      v      v      v      v    ||
     \                                     /
      \___________________________________/

    1 : VBUS | Red/Orange | 5V (Pulsed To Ground For Reset Signal)
    2 : Rx   | White/Gold | Device Receive Pin
    3 : Tx   | Green      | Device Transmit Pin
    4 : DTR/OWD  |        | DTR pin Or One-Wire signal ( Optional )
    5 : GND  | Black/Blue | Ground

    Input voltage of VBUS is always 5V, no exceptions.

    Signalling level is always at 5V, unless stated otherwise
    by the device port label (e.g. uUART_TTL3.3v).

    RESET on VBUS, is performed by pulling VBUS low temporarily.
        - Device Side: VBUS is connected directly to RESET (resets on low),
                        and VBUS is connected to device VCC by a high impedance pullup 
                                                (to keep the reset pin normally high),
                        as well as a diode. Device VCC has enough capacitance/power 
                        to survive a temporary power loss due to VBUS pulldown.
        - Computer Side: a transistor that short circuits VBUS to gnd temporarily would work 
                        (And if possible shut off the power input while pulling to ground. )

Justification / Reasoning

As long as it it labelled correctly, and not used for devices that will be used by non-technical users. This would be a handy way to insert a low profile serial input.

OWD would be handy for extending the DTR and RTS etc... kinds of flow control. Will need to work out if that needs to be standardized somewhat. Alternatively, could use it

Either-way, DTR/OWD pin is treated as optional. Since most salvaged microusb will only contain 4 lines (USB: VBUS, D+, D-, GND ) . So it is important to at least at minimum, provide bidirectional serial signalling. And if possible a method for remote reset (if required)


Links