USB Host Shield

Replacement:DEV-09947. The new version corrects the pin outs and correctly routs the GPX and RESET pins. This page is for reference only.

The USB Host Shield contains all of the digital logic and analog circuitry necessary to implement a full-speed USB peripheral/host controller with your Arduino. This means you could use your Arduino to interface with and control any USB slave device - thumbdrives, digital cameras, bluetooth dongles, and much more!

A four-wire serial interface is used to communicate with the host controller chip, so the shield connects the Arduino's hardware SPI pins (D10-13) to the MAX3421E. A USB type A female connector is wired up to the IC, and it also supplies 5V as any normal USB port would.

The Host Shield takes its power from the 'Vin' pin on your Arduino. Power from that pin is regulated to both 5V and 3.3V on the shield. All SPI signals are sent through a hex converter to step them down to 3.3V.

Note: If you are using the example code by Oleg, you will need to edit the max3421e_constsnts.h file to have:

#define MAX_GPX 7
#define MAX_RESET 8

**Note: **There is a new revision of this shield available, however, we've found a handful of these in stock and will be selling them for a limited time at a reduced price. Get them while you can!

Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • hurley_108 / about 14 years ago / 4

    So if an Arduino, with 32k program space and 2k RAM can have a USB port, why can't an iPad? ;)

    • Member #211635 / about 12 years ago / 1

      An iPad can. You need the camera kit, and then you can use a USB keyboard with it.

  • ribbotson / about 14 years ago / 2

    The USB Host software uses the SPI library from the Arduino playground. Download here:
    http://www.arduino.cc/playground/uploads/Code/Spi.zip

  • Tim / about 14 years ago / 2

    IF YOU ARE USING OLEG'S CODE THE PINS ARE WRONG!!!!!
    The reset and GPX pins are switched on this board with Oleg's code, at least they were in my version, You need to open Max3421e_constants.h and change those two pins. The device may still work yet it will be really buggy and drive you crazy like it did to me.

    • PostmasterSteve / about 14 years ago / 1

      I received my USB Host Shield this weekend, and I can confirm this comment. Now the question is whether or not the PCB layout should change to match Oleg's code, or if we should all just 'deal with it.' I sure wasted a lot of time wondering what the heck was wrong with my board! It seems that if Sparkfun is going to link off to his code, that the board would at least be compatible...

      • ribbotson: _The Sparkfun usb host shield pcb has the two pins for GPX and RESET swapped from the original board by Oleg.
        You simply need to edit the max3421e_constsnts.h file to have.

        define MAX_GPX 7

        define MAX_RESET 8

        Then all code works the same as on the shield from Oleg.
        Power supply on the Sparkfun board is also different to Oleg. Sparkfun is powered from Vin.
        I have both boards and they work fine. Post here or on circuitsathome if you have any specific problems later._
        Thanks everyone for the comments! In the next revision I will be sure to change the pin assignments to match Oleg's code.
        -Aaron

      • Does the shield work with a change in the code? Changing code is always easier to do than a hardware revision.

  • SlyVixsky / about 14 years ago / 2

    can the usb shield support 255 divices as a desktop usb can? i didnt find that information in the datasheet

  • Richard Hart / about 14 years ago / 2

    Typo -- in "The Host Shield takes it's power from", the "it's" should be "its". "it's" is a contraction for "it is". "Its" is the possessive form of it, no apostrophe required.

  • salsa / about 14 years ago / 2

    How this would work if the Arduino's Vin is 5V? Haven't used LM317s myself...

    • SlyVixsky / about 14 years ago / 1

      last paragraph in the description states the "Vin" power is regulated to 5 and 3.3 volts, thus the necessary power converter is on board already.

  • Member #456934 / about 9 years ago / 1

    ciao nei link postati su questo video http://youtu.be/onm9Xb4o8So ci sono le librerie modificate per sparkfun usb host shield e file d'esempio per controller ps3 funzionanti ciao e spolliciate

  • Member #456934 / about 9 years ago * / 1

    libreria modificata e file per ps3 in questo video http://youtu.be/onm9Xb4o8So ci sono i link per sparkfun usb host shield ciao spoliciate grazie

  • Member #363870 / about 12 years ago / 1

    Hi all. Recently working on usb shield and I had problems to work, you must make a bridge between pin 7 and pin reset. Only in this way can make it work. There is a manual or datashet about? thanks all

  • matheosmc2 / about 12 years ago / 1

    Hello, could I use this shield to keep data in a pendrive, as in the micro-sd shield? greetings.

    • MikeGrusin / about 12 years ago / 1

      I believe that they're working on the capability to access mass storage devices, but aren't quite there yet (anyone please correct me if I'm wrong!). Keep an eye on the circuits@home web site for progress.

  • bastenhoor / about 12 years ago / 1

    Hi, I'm using the Arduino 1.0 IDE and there is a new version of the USB library (#2) with does not have the max3421e_constants.h file to edit. I found 'MAX_GPX' in the 'max3421e.h'-file, but no 'MAX_RESET'. Is it possible to use version 2 of the USB library with arduino 1.0 IDE? If yes, what should I change? Thanks, Bas

    • To use this shield with v2.0 of the library, you have to connect a small jumper cable between pin D7 and RESET. Also you should use an external power supply.

      I have written a small tutorial to show how you can use this shield with various versions of the library.

  • rzo / about 13 years ago / 1

    USB shield overheats ?
    Hello,
    I have a 12V power supply on the arduino uno external power supply. According to arduino uno data sheet this should be ok.
    However the USB host shield board gets extremely hot.
    Is this normal ?
    What is the recommended power supply ?

  • I'm considering to get this shield for my Arduino, but I noticed this shield has some pins named 'GPIN' and 'GPOUT' in the schematic. My question is what are they for? Are these additional I/O pins?

    • I'm just being silly (it's late)...
      I've looked up the datasheet for the MAX3421E chip. The GPIN/GPOUT pins are 8 digital inputs and 8 output pins.

  • Jeremy01 / about 14 years ago / 1

    Has anyone had any success using this shield with a USB modem, or customizing GSM Playground's GSM library to talk to a modem attached through this shield?
    Thanks,
    Jeremy

  • ilukester / about 14 years ago / 1

    So are the pin headers included with this shield. Doesn't say that they are or arn't.

  • ThinkerT / about 14 years ago / 1

    Could this be used to get images from a camera or webcam?

  • ThinkerT / about 14 years ago / 1

    Could you guys make a tutorial for this?

  • NewsparkFunCusty / about 14 years ago / 1

    I copied all code directly from the usb code/library site and I compile and I get this. EVEN THOUGH IT IS DECLARED AT THE TOP of that file as follows...

    include

    C:\arduino\arduino-0018\libraries\Usb\Max3421e.cpp:90: error: 'Spi' was not declared in this scope

  • ribbotson / about 14 years ago / 1

    The Sparkfun usb host shield pcb has the two pins for GPX and RESET swapped from the original board by Oleg.
    You simply need to edit the max3421e_constsnts.h file to have.

    define MAX_GPX 7

    define MAX_RESET 8

    Then all code works the same as on the shield from Oleg.
    Power supply on the Sparkfun board is also different to Oleg. Sparkfun is powered from Vin.
    I have both boards and they work fine. Post here or on circuitsathome if you have any specific problems later.

    • Omi-kun / about 14 years ago / 1

      Just got the board and changed reset pin. The MAX_GPX define in the constants.h was commented out for some reason. Even when I uncomment it and change it to 7, I still get the following:
      Error: OSCOKIRQ failed to assert
      Circuits At Home 2010
      USB Host Shield QC test routine
      Press any key to continue...
      Reading REVISION register...Die revision invalid. Value returned: 00
      Test FAILED!!!
      Test Halted.
      0x55 pattern is being transmitted via SPI to aid in troubleshooting
      Press RESET to restart test
      I get the same thing again after a reset. Is my board defective? On Oleg's blog it says it might be the oscillator that is giving the problem.

      • Omi-kun / about 14 years ago / 1

        My bad. For some reason I thought Vin would supply power under USB power but it turns out that only works from an external power source. I'm using a Seeeduino.

        • wisnu198 / about 13 years ago / 1

          ok, let me get this straight:
          1. swap pin 7 & 8 in max3421e_constants.h
          2. plug in external power source
          then the board would run normally, right?

  • tiagofumo / about 14 years ago / 1

    so this shield works or not? people talking about unknown erros...

  • yashar / about 14 years ago / 1

    Hi guys,
    I got the board and then i tried to run the Oleg's code on the board but it seems that i get error message in Ma3421E::poweron() function which says "Error: OSCOKIRQ failed to assert" and i think there is something wrong with reseting!!! and then i noticed that GPX is on pin 7 of arduino but where is reset pin???
    please help
    thanks
    yashar

    • This happens when you did not plug in an external power supply to the Arduino. The board is powered by Vin, which means it bypasses the USB connector power.

  • ribbotson / about 14 years ago / 1

    I think it is unlikely you will see a large library of device drivers. They take a significant time to create, and there is usually no support from the USB device manufacturer.
    The arduino is memory challenged, which makes drivers for memory sticks and cameras most difficult.
    I personally use the USB Host shield, when other solutions are not available to support a specific device or interface. As a first choice I avoid USB completely, because it does put constraints on the whole arduino code operation to be non blocking, so for bluetooth serial profile, would still use a bluetooth serial module. When USB Host is needed, I still look if Vinculum or GHI, can already do what I need already. then I use the shield.
    With more chips having USB Host ports (PIC32, AVR8, AVR32, ARM, ..) more drivers will come available and easier to port to arduino. Especially when free stacks like the ones from Igor and LUFA are available.

  • what about drivers for the devices, is there a library yet?

  • ribbotson / about 14 years ago / 1

    If an iPad had a USB port, you could plug a 3G dongle into it. Where are the Job$ in that ?
    Arduino is about doing stuff, not perfect, not always pretty, no big marketing budget, lots of fun and lol !

  • ribbotson / about 14 years ago / 1

    If you want to support multiple devices , you would need to write hub libraries. Maybe your expectations of the Arduino platform are a bit high !

  • SlyVixsky / about 14 years ago / 1

    omg, i am so glad you finally got ahold of these, cant wait to get it in the mail

Customer Reviews

No reviews yet.