HOME ARTICLES DOWNLOADS CONTACT


Openschemes Feed
Main Menu
Openschemes Articles
Categories
Site Sponsors
Site Hits
Total Hits


Hacking USB Serial Ports

QRCode


Tags: , , , , , ,

Filed under: Hacks | September 17, 2009 @ 5:53 pm (Views: 9096)

Today we’ve got a super-simple gadget hack of a commercial USB serial port adapter.
There are times when you need a low-voltage RS-232 port for interfacing with a microcontroller, some hobby project, or for poking around in some interesting system.  And during many of these times, you may not want to go dig out the Arduino board or can’t find the right capacitors to build a MAX232 board.  Or perhaps you are in a town or even a country without an awesome electronics junk store like Halted - you poor things!  What can you do?

 Enter the hacked USB Serial port:

The Keyspan USB to RS-232 adapter

Fig 1 - Hacked Keyspan USB adapter

At most big-name electronics stores or even amazon, you can get an RS-232 USB adapter for your PC for about $10 bucks.  With a little luck and a steady hand, these devices can easily be hacked to provide all your RS-232 translation needs: USB to 3.3v serial, 12v RS-232 to 3.3v RS-232, and of course their original purpose of USB to 12v RS-232.

How it’s works:The most desirable type of adapter uses at least two chips: a USB controller chip such as a microcontroller and a level translator chip such as a MAX232.  Other types can be hacked but they will probably need you to dump the firmware, rewrite it, and reprogram the device.  That’s fun and all, but for now we’re just looking for a simple and CHEAP way to get a low-voltage USB serial port.  Here’s a simplified diagram of what we’re working with.

USB Serial Port Diagram

Fig 2 - Simplified System Diagram

As you can see, the host controller does all the heavy lifting of talking USB, buffering the data that the PC sent, and retransmitting it as RS-232.  Usually, the micro is running from 3.3v so it’s UART output is 3.3v.  Those signals are then piped into a generic level shifter device to translate the 0-3.3v swing of the micro into a -12v to +12v swing for the DB9 connector.  So by splitting the system at the 3.3v RS-232 point (TxD2, RxD2) you get TWO low-voltage interfaces for the price of one.  On the left side, you get a USB serial port with 3.3v output that you can use to talk to a PIC or something.  And on the right side, you get a free MAX232 interface that you can use on a standard DB9 PC serial port to get a second 3.3v serial interface to talk to that same PIC.

Continued on the next page…

Bookmark and Share

Pages: 1 2 3


Related Posts:
  • Nandoori - SPMP8k Raw USB NAND Dumper (February 16, 2010)
  • SPMP8k FRMorp v1.1 - Improved the Linux side (February 9, 2010)
  • SPMP8k FRMorp - USB IMG dumper (February 8, 2010)
  • SPMP8k Serial Port Pinout (February 4, 2010)
  • SPMP8k NAND Overview and NAND File Dump Tool - beta (January 29, 2010)

  • Metadata:

    2 Comments

    1. Pingback by Hacking USB serial port adapters - Hack a Day:

      […] The folks at Openschemes.com have written up an article on how to convert a USB serial port adapter to a low voltage serial interface for interfacing with microcontrollers. Though you can always just buy one, this is a fairly quick and cheap solution, especially if you are in a pinch or don’t have access to a retailer. The specific models you should watch for, are the two chip ones.They go through the process of finding exactly where to patch in to add an extra interface. It only takes a couple wires and you are ready to go. […]

    2. Comment by lilikindsli:

      I want to say - thank you for this!

    Leave a comment





    Contact Openschemes


    Copyright © 2003 by Openschemes  |   |  Design by 7dana.com