|Shopping Cart Checkout Shipping Cost Download Website|
|You are here: Teensy Teensyduino Libraries USBHostShield|
USB Host Shield LibraryThe USB Host Shield, by Oleg Mazurov, allows you to connect other USB devices.
Only one version should be copied to your Arduino libraries folder.
For Teensy 3.6, the USBHost_t36 library allows use of the 2nd port as USB Host.
Hardware RequirementsThe USB Host Shield for Arduino Pro Mini can be used with Teensy running at 3.3 volts.
The USB Host Shield for Arduino Pro Mini connections to Teensy or Teensy++ are:
The SS pin on Teensy is not used, but must remain in output mode.
More hardware details are described below.
Board Test ProgramThe board test program will check if your USB Host Shield is connected correctly. You can open if from the menu, File > Examples > USBHostShield1 > board_test.
Using USB DevicesTODO: a section should describe how to actually use common devices, like keyboards...
The USB specification states USB devices may have a maximum of 10µF directly across their power lines. Any more is supposed to be isolated from the USB power line with a current limiting device. However, this specification is often ignored. Arduino, for example, has a 47µF capacitor.
The USB specification requires USB hosts to have at least 120µF capacitance attached to their power lines. Most USB hosts, especially PC and Macintosh computers, have much more.
One simple solution is to add 100µF or more to the +3.3 volt power line. The MCP1825 regulator on Teensy will help limit the current surge flowing into this capacitor when plugged into a PC, and this capacitor will help provide the current needed when a USB device is plugged into the host shield.
The USB Host Shield has an option to provide separate USB host power. The first step is to cut the USB host power jumper, which separates the USB host power from the 3.3 volt power.
A wire can be soldered to the USB host power pad. Because this pad is so close to the connector, it's a good idea to solder on the bottom side, without extending the wire all the way through the hole.
A 5 volt power supply should be used. However, the USB power provided to Teensy is a convenient source of 5 volts. It's readily available on the 5V pad on the bottom side, which was separated from the power line while adding the MCP1825 voltage regulator.
The final result is a single 5 volt wire running between the bottom side of both boards. All the other connections are available on the normal pins.
Using the USB power, to run Teensy, the USB Host Shield, and another USB device is convenient, but not ideal. The total power may exceed the allowed limits (and the amount of power Teensy reported to the PC). This solution also lacks 120µF; capacitance near the host shield.
Ideally, a proper 5 volt power supply with far more than 120µF capacitance should be used for USB host power.