Using a USB circuit is the most common method for communicating between devices and computers.
In the old days usually people used the parallel port or the serial port. But these ports are becoming more and more rare. And on laptops they are almost non-existent.
But all computers have USB ports.
Yeah, and USB stands for Universal Serial Bus just in case you didn’t know ;)
Is It Hard To Develop A USB Circuit?
If you start reading about the USB technology, you might get the feeling that it is reaaaaally hard to make a circuit with USB.
And it is hard if you want to make it from scratch.
That’s way people don’t make USB circuits from scratch ;)
But it doesn’t have to be that hard if you just make use of some tools.
How To Make a USB Circuit
I am going to share with you a component that will make your life in the USB world much easier.
It’s the ATmega32u4 microcontroller from Atmel.
It has a USB interface that makes it easy to program and easy to develop into any USB device. That’s why it is used in many of the Arduino boards.
Combine this microcontroller with the LUFA library and you have a powerful combination!
By using the LUFA library, you can easily develop any USB device you like.
If you are starting out, you might find it a bit confusing with all the descriptors and whatnot. A great book to learn about this stuff is USB Complete: The Developer’s Guide. I really recommend it.
I recently needed to learn this stuff in order to develop a USB multi-touch device for the Manga Screen that we are developing in Intelligent Agent.
It took some time to really understand the descriptors and how they worked. But by lots of trial and error and at the same time reading from the book, I managed to understand it and get the multi-touch device working.
The LUFA library contains many examples that you can just compile and use right away. Play around with it. It’s the best way to learn.
Using the USB chip
There are two ways to use the chip. Well, actually there are many. But there are two ways I’m going to mention here.
- Using the ATmega32u4 chip in a circuit
- Using an ATmega32u4 breakout board
Using ATmega32u4 In A Circuit
To use the chip in a circuit, there are only a few components that are necessary to make it work.
Check out this USB circuit diagram designed by Sparkfun if you want an example of how to use it.
Using an ATmega32u4 Breakout Board
The easiest way is to just use a breakout board.
For example the breakout board from Sparkfun.
Here you get the chip with all the necessary components to make it work. Just plug and play =)