Dual UART/I2C Breakout Goes Both Ways

[Jesus Echavarria] sent us a link to this cute little tool that he’s built. It’s a dual USB-to-I2C-or-UART adapter, with a few more oddball features thrown in for good measure. If you were electronics Batman, you’d have this on your utility belt.

[Jesus] originally designed the board because he wanted to sniff a bi-directional UART conversation using his computer, and get it all done in inexpensive hardware with minimal fuss. So he looked to the Microchip MCP2221 chip, which is an inexpensive USB to serial and I2C chip, but with some extras. In particular, it’s got four GPIOs, a ten-bit ADC and a five-bit DAC with selectable reference voltage, and it’s all controllable over USB. And [Jesus]’s board has two of them.

Implementing USB on a microcontroller isn’t always that much fun, so we can see why he took the straight-ahead hardware approach. And as a side benefit, he gets all the other kooky functionalities that the chip brings. And we have been introduced to what looks like a neat chip to use in USB and microcontroller projects. We’re going to put one in our next random chip order.

30 thoughts on “Dual UART/I2C Breakout Goes Both Ways

  1. if all he wanted to do was sniff a (bidirectional) uart, why not just use a logic analyzer or modern scope. Or one of the many Windows drivers that let you spy on any comport ..

    Jesus knows ..

    1. Hi! Besides playing with the MCP2221 and design a new board, this solution is cheaper than buying a scope. To sniffer both RX and TX signals on serial communications, you need at least two RX pins. This board just mount two MCP2221 for this reason, and also allows you play with I2C devices!

      1. A logic analyser would be much better and easier to use. If cost is an issue, pick up a Saleae clone on eBay and use it with sigrok software.

        Also (not knocking Jesus here, just the journalism) how is buying an IC and using it for its intended purpose anything with worth writing an article about?

          1. I don’t think that this little board will cause those comments. Sure there’re many better options to do the same or similar. I only want to share the board because I think it will be usefull for the community, nothing more. Also, many thanks to Elliot to write about it, his interest on the board and the enthusiasm in his article, thanks!!!

        1. The article doesn’t mention it and Jesus only mentions it briefly on his webpage but the converter can also communicate with other devices on the I2C bus which makes it handier than a logic analyzer (atleast in the case of debugging an I2C bus).

          I agree that using an IC for it’s intended purpose is not perse newsworthy but this is something that’s really handy and I’d like to have in my debugging toolkit, which makes it newsworthy in my eyes. Without this article I probably wouldn’t have known of it’s existence.

          1. Prodigy, thanks for your comment! I’m also agree, it’s more than a logic sniffer. Besides listening RX lines on serial communications, you also can transmit using the TX lines (in both 3.3V or 5V), so you can use like many of the serial USB-converters that there’re on the market. It also has the I2C features, that allow you debugging code with I2C devices on the bus. You have reason about this point, I’ll review the post to explain a bit better this I2C feature. And finally, there’s one GPIO pin available on the board (GPIO2), so you can program it as a DAC, ADC or general purpose pin. Although the first idea is just monitoring a serial port, I think this board is more powerfull that just a logic analyser tool.

      1. If you’re going the FT2232H route, which I both practice and recommend, just buy one of the modules that implement the 2232 reference design with a bit of EEPROM on board — the chip can use it for configuration storage and it opens up loads of possibilities.

        An FTDI2232H module + AVRDUDE + OpenOCD is my swiss army knife at the moment. In one board you get a JTAG, I2C, UART, SPI, SWD, bitbanging, etc… — pick any two of them. It’s like the bus pirate but two of them and at high speed. It’s a lot more hassle to configure right, though.

        I understand peoples’ problems with FTDI, but the 2232 chip is just sooooo gooood.

        1. First I like the USB to I2C.
          I make Nusbio USB to gpio/I2C/SPI for Windows and .NET programming languages.
          I use the FTDI FT231X for Nusbio G1 and for Nusbio G2 I use the FT232H to provide an SPI bus up to 3M byte/s.
          FTDI chip makes my life easier.

  2. Poor guy with the puns on his name…Oy!

    I like the concept and deployment. There are times I need to sniff out a protocol but can’t get a logic analyzer in place to do so, I’ve done my share of dodgy serial sniffer designs using opto isolation and some remote com ports so this design speaks to me.

    And just to show I’m in on the fun….

    Jesus’ design spoke to me….can I get an Amen?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s