Cable Butchering For Logic-Level Serial

Early PCs and other computers had serial ports, sometimes as their main interfaces for peripherals. Serial ports still survive, but these days they are more likely to have a USB connection into the main computer. However, when you are working with a microcontroller, you probably don’t want a proper RS232 port with its plus and minus 12 volt signals.

You can get converters that specifically output logic-level signals but you probably can’t pick one up at the local office supply store. They might, though, have a normal USB to serial cable. [Aaron] had the same problem so he hacked into a cable to pull out the logic level signals.

On the one hand, hacks like this are a good inspiration for when you have a similar problem. On the other hand, you probably won’t wind up with the same cable as [Aaron]. He got lucky since the board inside his cable was clearly marked. Just to be sure, he shorted the transmit and receive lines to see that he did get an echo back from a terminal program.

Unsurprisingly, you can also repurpose an ESP8266 to perform this same task. Or, you can use a cable as an I/O device.

24 thoughts on “Cable Butchering For Logic-Level Serial

  1. Hmmmm…

    I don’t want to be “that guy”, and I totally understand Aaron’s hacker ethos, I have done things exactly like this myself, pretty much just because I could.

    But… that being said, the engineer in me would be remiss if I didn’t point out that FTDI already makes a cable that does this, p/n TTL-232R-5V-WE, for 5 V logic, adn TTL-232R-3.3V-WE for 3v logic, available for $20 from the usual suspects, like Digikey and Mouser

    1. Or a USB-Serial TTL breakout board on Ebay for $1.50.

      But that said, when you have time constraints a hacked $10 cable can still beat 3 weeks postage from china.

    2. Why I buy FTDI and clone based boards by the (almost) bucket load. Get them cheap enough to build it directly in.
      Have a couple of NAS boxes with DE9 “proper” RS232. On one I took apart and soldered wires to the logic level side to hook to the adapter. Now both options are available. Not that id ever use the D9

      1. Buy ’em and build ’em in! That’s not a hack!

        Seriously, though, it’s a great solution. Gives you a USB port for power as well, if you choose to go that route. And if you’ve got a serial bootloader installed, it’s a programming port. All for a few bucks. We live in good times.

    3. Man I wasn’t looking forward to the comments :) I do mention in the article that boards are available cheaply, but then you have to wait for postage and I was impatient. I’ll keep a stock of them in for the future though!

      1. I was going to go one step further, and criticize you for wanting to program a micro-controller.

        Most anything you could want to use one for has already been done, so you could just buy the final thing you want off e-bay for 75 cents and save yourself all the trouble of making it yourself.

  2. I sell a TTL level USB-to-serial I call “FTDI-be-gone,” because it’s based on the Cypress Semi CY7C65213, so it uses class-level drivers rather than proprietary ones.

    I also put a MOSFET in to switch the target power off prior to enumeration and during USB suspend, which makes it more compliant with the USB spec. There’s also a jumper to choose between 3.3v and 5v logic and output power. Lastly, there’s a current limiting switch to protect the host from inrush.

    https://hackaday.io/project/9659-ftdi-be-gone

  3. I just avoid anything with “FTDI” with it. Been doing since last year’s debacle. Why would I want to support a company that bricks other people’s hardware? If they did not want their drivers to support clones, fine… they could disable support in the drivers. But hell, they went and zero’d the device IDs making them unusable. F**K them.

    1. If you leave the level converter in place it will still be driving the tx and rx lines with opposite levels (-10 to -12V for a TTL high and +10 to +12V for a TTL low) since RS232 drivers are inverters.

  4. Last time I got a TTL level RS232-to-USB converter I did indeed not buy it at an office supply shop but at a phone accessories shop instead.

    FYI: they don’t sell them at the bakery either, and most butcher shops also show low availability.

  5. I used a cheapy on a project – it bit me. I was seeing a 100v swing on the TX line that would (mostly) settle down with a load on it. POS.

    I have a couple from http://www.accesio.com/ – they are solid. No, I am only a customer. Their stuff is solid. The cheapy ones can easily start dropping bits even at 9600. I have used mine to 19.2 with zero problems.

    There are times to go cheap. There are times to get pro tools..

    Nice hack, BTW. I will use it in an emergency.

  6. I avoid using Prolific chips, they show problems working with the serial bootloaders of my favourite ARM Cortex controllers. I guess there are some timing issues either with the chip itself or the drivers for Prolific converters, but i’ve had to test about 20 different adapters for our company a few years ago, and every single adapter with Prolific inside showed problems when trying to download firmware from the PC into the controller. All FTDI based adapters just worked. Unfortunately i did not get the time to do a deeper analysis on why the Prolific chips fail at that task.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.