Documentation

ShillehTek Mini USB Host Shield 2.0 ADK Module MAX3421E for Arduino Pro Mini | ShillehTek Product Manual
Documentation / ShillehTek Mini USB Host Shield 2.0 ADK Module MAX3421E for Arduino Pro Mini | ShillehTek Product Manual

ShillehTek Mini USB Host Shield 2.0 ADK Module MAX3421E for Arduino Pro Mini | ShillehTek Product Manual

shillehtek

Overview

The Mini USB Host Shield is a compact 5V tolerant breakout for the MAX3421E — a USB host controller chip that lets a microcontroller act as the "host" side of a USB connection. Plug a USB device (keyboard, mouse, gamepad, barcode scanner, ADK Android phone, etc.) into the on-board Type-A jack and your MCU can read keystrokes, joystick reports, or whatever the device sends over USB, even if the MCU itself has no native USB host hardware.

The board is sized to sit on top of an Arduino Pro Mini, but it works equally well wired up to any 5V Arduino, ESP32 (with level shifting), or STM32. It speaks SPI to the host MCU and exposes the four standard SPI lines plus SS, INT, RESET, and a few optional GPIO pads (GPIN/GPOUT 7654/3210) for peripheral I/O on the MAX3421E itself.

The most common application is the Arduino USB Host Shield Library by felis (also known as "USB Host Shield 2.0"), which provides drivers for HID keyboards/mice, PS3/PS4/Xbox One controllers, MIDI devices, FTDI/CDC serial adapters, mass-storage thumb drives, and Android phones in ADK mode.

At a Glance

Type
USB Host controller breakout (MAX3421E)
Operating Voltage
5V (logic 3.3V; not 3.3V tolerant out of the box)
USB Speed
Full Speed 12 Mbps / Low Speed 1.5 Mbps
Interface
SPI (MOSI / MISO / SCK / SS) + INT
USB Connector
USB-A host (downstream) jack
Form Factor
Pro Mini stack-on, ~38 x 23 mm

Specifications

Parameter Value
Controller IC MAX3421E (USB host / peripheral)
Operating Voltage 5V (Vbus); logic levels 3.3V (level shifters present)
USB Standard USB 2.0 Full Speed (12 Mbps) and Low Speed (1.5 Mbps)
Host Interface SPI, up to 26 MHz
Required Pins MOSI, MISO, SCK, SS (D10), INT (D9), 5V, GND
VBUS Output to USB Device 5V at up to 500 mA (limited by upstream supply)
GPIO on MAX3421E 8 x GPIN, 8 x GPOUT (broken out as GPIN/GPOUT 7654/3210)
USB Connector Type-A (host)
Operating Temperature 0 degC to +70 degC
Dimensions ~38 x 23 mm (Pro Mini compatible)

Pinout Diagram

MAX3421E mini USB Host Shield pinout diagram showing the SPI lines (MOSI, MISO, SCK, SS/D10), interrupt INT/D9, RESET, power pins (RAW, GND, 3.3V), VBUS jumper, INT and SS jumpers/pads, GPX pad, and the GPOUT 7654/3210 and GPIN 7654/3210 GPIO header rows

Wiring Guide

Arduino UNO / Pro Mini Wiring

The board is designed for an Arduino Pro Mini stack — power its RAW pin from 5V and the SPI pins line up directly. On a UNO, wire SPI to D11/D12/D13 and use D10 for SS, D9 for INT.

Shield Pin Arduino UNO Pin
RAW 5V (or VIN if >5V regulated supply)
GND GND
3.3V (no connection — generated on-board)
MOSI D11 (MOSI)
MISO D12 (MISO)
SCK D13 (SCK)
SS (D10) D10
INT (D9) D9
RESET RESET (optional, tied for safe reset)
Tip: Many MAX3421E mini boards ship with the VBUS jumper open. If your USB device doesn't get power, solder the VBUS pad/jumper closed so 5V reaches the USB-A connector's VBUS pin.

ESP32 Wiring

The ESP32 is 3.3V logic, but the MAX3421E mini has on-board level shifters and works fine driven from 3.3V signals. Power the RAW pin from a clean 5V source so VBUS to the USB device is correct.

Shield Pin ESP32 Pin
RAW 5V (USB / VIN)
GND GND
MOSI GPIO 23
MISO GPIO 19
SCK GPIO 18
SS (D10) GPIO 5
INT (D9) GPIO 17
Info: The Arduino USB Host Shield 2.0 library has community ESP32 forks. Use one that explicitly supports your ESP32 core; vanilla AVR forks won't compile.

Raspberry Pi (using Pi as SPI host)

You usually don't need this shield on a full Raspberry Pi — the Pi already has native USB host. But if you want the MAX3421E on Pi (e.g., for embedded Linux USB host on a custom port), it can be driven via the kernel's MAX3421E driver over SPI.

Shield Pin Raspberry Pi Pin (BCM)
RAW Pin 2 (5V)
GND Pin 6 (GND)
MOSI Pin 19 (GPIO 10)
MISO Pin 21 (GPIO 9)
SCK Pin 23 (GPIO 11)
SS (D10) Pin 24 (GPIO 8 / CE0)
INT (D9) Pin 22 (GPIO 25)
Tip: Most projects keep this shield on an Arduino/ESP32 and use the Pi only as a USB-serial bridge. Native Pi USB ports give you far more bandwidth.

Raspberry Pi Pico Wiring

The Pico has native USB but only as device by default. You can pair it with the MAX3421E to add a second host port, or use TinyUSB's host mode if your firmware supports it.

Shield Pin Pico Pin
RAW VBUS (or external 5V)
GND GND
MOSI GP19 (SPI0 TX)
MISO GP16 (SPI0 RX)
SCK GP18 (SPI0 SCK)
SS (D10) GP17
INT (D9) GP20

Code Examples

Arduino - Detect USB Device (USB_desc example)

max3421e_desc.ino
// Install "USB Host Shield Library 2.0" by felis
// File > Examples > USB Host Shield Library 2.0 > USB_desc

#include <usbhub.h>

USB     Usb;
USBHub  Hub(&Usb);

void setup() {
  Serial.begin(115200);
  while (!Serial);
  if (Usb.Init() == -1) {
    Serial.println("MAX3421E NOT FOUND - check wiring");
    while (1);
  }
  Serial.println("USB Host ready. Plug in a device...");
}

void loop() {
  Usb.Task();
}

Arduino - Read a USB Keyboard

max3421e_keyboard.ino
#include <hidboot.h>
#include <usbhub.h>

class KbdRptParser : public KeyboardReportParser {
  void OnKeyDown(uint8_t mod, uint8_t key) override {
    uint8_t c = OemToAscii(mod, key);
    if (c) Serial.write(c);
  }
};

USB              Usb;
USBHub           Hub(&Usb);
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> Keyboard(&Usb);
KbdRptParser     Prs;

void setup() {
  Serial.begin(115200);
  if (Usb.Init() == -1) { Serial.println("Init failed"); while (1); }
  delay(200);
  Keyboard.SetReportParser(0, &Prs);
}

void loop() {
  Usb.Task();
}

Arduino - Read a PS3 / PS4 Gamepad

max3421e_ps4.ino
// Bluetooth via the same library, or wired USB.
// This sketch shows wired PS4 over USB.

#include <PS4USB.h>

USB     Usb;
PS4USB  PS4(&Usb);

void setup() {
  Serial.begin(115200);
  if (Usb.Init() == -1) { Serial.println("Init failed"); while (1); }
}

void loop() {
  Usb.Task();
  if (PS4.connected()) {
    Serial.print("LX="); Serial.print(PS4.getAnalogHat(LeftHatX));
    Serial.print(" LY="); Serial.print(PS4.getAnalogHat(LeftHatY));
    Serial.print(" X="); Serial.println(PS4.getButtonClick(CROSS));
  }
}

Frequently Asked Questions

"OSC did not start" or Init returns -1 — what do I check?
In order: (1) wiring of MOSI/MISO/SCK/SS — easy to swap MOSI and MISO; (2) SS is on D10 (or whichever pin you set in UsbCore.h); (3) the board is getting clean 5V on RAW; (4) the on-board 12 MHz crystal isn't damaged. A working board reports a non-zero revision in the USB_desc example.
My USB device is detected but doesn't power on / works on PC.
The VBUS jumper on the mini board is often left open from the factory. With it open, the USB-A connector's 5V pin is disconnected, so the device gets no power. Solder the jumper / VBUS pad closed to feed 5V to the USB connector. Also make sure your supply can deliver enough current — keyboards need ~100 mA, hubs and thumb drives can pull 500 mA.
Can I use this with a 3.3V Arduino like the Pro Mini 3.3V?
Yes — the MAX3421E is 3.3V logic internally. The mini board has level shifters that work both ways. Just supply 5V to RAW so VBUS for the USB device is correct, and connect the SPI lines to your 3.3V MCU.
Does it support USB hubs?
Yes — the USB Host Shield 2.0 library includes USBHub. Declare a USBHub Hub(&Usb); in your sketch and the library will enumerate downstream devices through a powered hub. Make sure the hub is self-powered if you're attaching multiple high-current devices, otherwise total VBUS current will exceed the MAX3421E's 500 mA limit.
What's the difference between this and a USB OTG cable on a Pi / Pico?
A Pi or ESP32-S2/S3 already has native USB host hardware — no extra chip needed. The MAX3421E shield is for boards that lack USB host capability (classic Arduino UNO/Mega/Pro Mini, classic ESP32 with no USB peripheral, STM32 boards without OTG). On boards that already have USB host, this shield is redundant.
What's the GPX, INT, SS jumper pad for?
Those are solder-bridge jumpers that route the MAX3421E's INT, GPX, and SS pins to either the Arduino headers (default) or to break-out pads. They're for advanced users who want to remap which Arduino pin handles INT/SS. Leave them at default unless you specifically need to free up D9/D10.
What are the GPIN/GPOUT pins for?
The MAX3421E has 8 general-purpose inputs and 8 general-purpose outputs of its own, addressable over the same SPI bus. They're broken out as GPIN 7654/3210 and GPOUT 7654/3210. Useful when you've already used most of your MCU's GPIOs and want a few more I/Os "for free" on the host shield.