5
\$\begingroup\$

I currently have a very fragile solution to connect my embedded device to a PC's serial port. This is mounted on the PCB: http://www.digikey.com/product-detail/en/DF13A-6P-1.25H(50)/H3384-ND/530681. Its companion must be painstakingly attached to the wires of an existing serial cable, and placing any sort of strain-relieving product takes too much expertise. The wires often break off. Only five pins of the six are used. I may be able to respin the board this connector must be on.

I'd like to replace it with a Micro-USB B receptacle so that I can cut open easily-obtainable Micro USB cables and mate them to a DB9 connector. Is the 5th pin actually wired on most cables? I don't know much about the USB standard. Does this seem like a decent idea?

EDIT: This port is factory accessible only.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ USB is 4 wires. If you can respin the board, you could add an FTDI chip and have it emulate a USB serial port right there on the board? I'm guessing there isn't much space though. \$\endgroup\$
    – pjc50
    Nov 5 '12 at 17:58
  • \$\begingroup\$ What is the 5th pin connected to, then? I don't think CTS and RTS are required, so I could get by with 4 pins. \$\endgroup\$ Nov 5 '12 at 18:20
  • \$\begingroup\$ Why not a more standard DB-9 or 25? Sooner or later someone will plug the device in a USB port. \$\endgroup\$
    – jippie
    Nov 5 '12 at 19:06
  • \$\begingroup\$ There is no room for anything larger than the connector in the URL I posted. \$\endgroup\$ Nov 5 '12 at 19:27
  • 1
    \$\begingroup\$ If your main problem is the wires breaking off your serial cable, some heat shrink tubing or sugru around the connector will likely solve that problem and doesn't take much effort. \$\endgroup\$
    – Grant
    Nov 5 '12 at 20:15
5
\$\begingroup\$

The ominous Pin #5 is usually the ID Pin and does not travel through the cable. If I remember correctly, this pin is usually shorted to ground, indicating a device device or open, indicating a host device. In other words: This pin decides if the device which is connected plays the host or device role.

If you use the other 4 pins, make sure that no user will really use a "normal" USB cable (and they will) as your device will most likely get 5V on the power pin (which is probably not what you want).

PJCs solution is in my opinion a good one (but requires you to change the board)

\$\endgroup\$
1
  • \$\begingroup\$ Thank you for the clarification. This is for factory use only, thankfully. \$\endgroup\$ Nov 5 '12 at 18:50
3
\$\begingroup\$

My recommendation is to find a suitable connector that is NOT a USB connector, unless you want to build a serial-to-usb adapter. The reason for this is one of your failure modes: If you put a USB connector on the thing, somebody will some day plug it into a USB port. When somebody does, they will wonder why it doesn't work, and if the device or their motherboard sees any damage, they will be pretty ticked off-- justifiably.

If you still feel compelled to do this, try to make sure that both the device and motherboard won't be hurt when somebody plugs it in to a USB port.

\$\endgroup\$
1
  • \$\begingroup\$ This is factory accessible only. \$\endgroup\$ Nov 5 '12 at 19:26
1
\$\begingroup\$

For factory debug/program, I like using FFC (flat-flexible cable): http://uk.farnell.com/jsp/displayProduct.jsp?sku=1012182&CMP=e-2072-00001000&gross_price=true (many many variants, that's just an example)

It takes up a fairly small area on the board. You'll want to buy or build a small breakout PCB on the other end of the cable - you can't solder to FFC.

My other solution which Tom L liked is "add an FTDI chip and have it emulate a USB serial port right there on the board": http://www.ftdichip.com/Products/ICs/FT230X.html ; this is very user-friendly but requires adding an IC.

\$\endgroup\$
1
\$\begingroup\$

If you do use a USB connector, it would be wise to make sure that the attached circuit is designed such that no damage will occur if it is connected to a regular USB port. Eventually someone will try it. Ideally though, I'd recommend using a different connector altogether.

Consider using an RJ11 or RJ45 connector. They're not much larger, and they are very commonly used for serial connections, so it will be recognizable, and off-the-shelf cables are available from many sources. Many Cisco routers use this approach for their console connections.

Here's one example of an affordable RJ45-DB9 adapter: https://www.amazon.com/dp/B06XFYYXDF/

\$\endgroup\$

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .