[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.
Oh Jesus!
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 ..
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!
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?
I for one enjoy reading these posts as much as the ones that are about abused ICs . But to each their own I guess.
If anything, it’s your comment that wasn’t worth writing. Go and submit more suitable hacks, or work on your own project that’s worth submitting.
CRImier, I assume your comment was for me. I’ve never submitted anything to HaD myself but have had a few things that found their way here. Stuff like this:
http://hackaday.com/2012/05/24/fisher-price-record-player-plays-stairway-to-heaven/
Feel free to add your opinion, critical or otherwise.
It’s a cute breakout board for a part that I’d never heard of, but thought might be useful to some.
Thanks for the write up. I enjoy hearing about how others put projects together, and the more content getting out there the better in my opinion.
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!!!
Great article. Informative in every direction. Thanks a bunch
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.
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.
Sorry, it’s Prodigity, I read it too fast. Sorry!!!!
Great work. Just be careful about the MCP, it has a small RX buffer and it might lose data if there is too much too fast.
Not sure why you’d need 2 pins for TXO and RXI signals, but Jesus works in mysterious ways.
I just need 2x RX lines to listen both RX and TX lines on a serial communication. The TXO lines are provided for the MCP2221 and you can use as a normal TX lines when you use as a USB-Serial converter!
+1… :-)
What about FT2232? then you would only need one USB port. they tend to be hard to find with all kinds of gizmos attached to the computer
I don’t know this device! It looks great and also meet the purpose of the board, so maybe I can update the board to this one! The only disadvantage for me is that I can’t mount it by hand (0.5mm pitch)
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.
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.
FTDI is both saboteur and a repeat offender which is why they have been blacklisted.
Jesus forgives all.
+1’d
Yes, way more recommended than the microchip one, especially for the higher RX buffer.
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?
Of course, you’ve got it!! ;-)
Thanks for your comment, I’m happy you like the design and also understand the idea behind.
I made a hardware solution for this a while ago http://www.electrobob.com/ser-show/
Great job, I like it, and thanks for pointing about the small buffer on RX side of the MCP2221!