Driving USB peripherals with Arduino


Circuits@Home have managed to host a USB keyboard with an Arduino and display the keyboard inputs on a character LCD. This uses the USB host shield we covered in August. That host shield includes a MAX3421 which is used here to drive the character LCD.

The control code for the keyboard ends up being fairly simple. The keyboard is polled for entries. The HID input is then examined and converted to ASCII codes for use with the LCD screen. This could make for an excellent controller or debugger for embedded systems. The Arduino, shield, and LCD could be integrated into the keyboard itself with an I/O port for connecting to your project. Commands can be typed out and sent through the I/O port when enter is pressed, with feedback displayed on the screen.

The example code provided with this project lays out the framework for hosting peripherals. We’re looking forward to more projects, and code libraries that take advantage of this new functionality.


  1. mowcius says:

    Yeah that is brilliant. I have been watching that but had not noticed that the keyboard code had appeared.

    A board is on my list. I have 40×4 LCD that I am hopefully going to implement into a keyboard to mimic those extortionately priced gaming ones you can get.

  2. moople says:

    Very nice.

    Oh.. and it’s “the lazy fox” otherwise the sentence won’t fulfil its purpose

  3. mowcius says:

    I normally have it as The quick brown fox jumps over a lazy dog…

  4. Oleg Mazurov says:

    You need more than 32 screen positions to fit the whole “quick brown fox…” phrase :-). 40×4 LCD would be more suitable for it but I decided to go with 2 lines for this project to keep code simple.

  5. DivePeak says:

    @moople is correct – The word “the” provides the only examples of “t” and “h” in the sentence, so at least one of the animals needs to be a definite article for the sentence to fulfill its purpose.

    Oh, and the hack has me thinking… Nice.

  6. Michiel says:

    Guys, what is so great about the Arduino? :?
    Why does a self respecting tweaker\hacker use a “My first Microcontroller” board like the Arduino?

    I really don’t get it… -.-

  7. mansaxel says:

    Extra bonus points for lacing the cable loom between USB board and LCD board.

    Cable ties are so cheap.

  8. Ben says:

    @Michiel. Because people need to… learn stuff… before they… know it..? Is this a serious question?

  9. therian says:

    @Ben exactly, people need to learn, and arduino it far not best road to take, actually it dead end

  10. mazurov1965 says:

    Noticed in my GA log this post still generates hits. The Arduino USB host project is now in rev.2.0, multiple devices are supported via USB hub and supported device list is getting longer every day. Digital cameras, PS3, Xbox and generic game controllers, cell phones, Bluetooth, and more -> http://www.circuitsathome.com/arduino_usb_host_shield_projects

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


Get every new post delivered to your Inbox.

Join 96,598 other followers