Teensy 4.0 Minimalist USB Host Shield

When the Teensy 4.0 development board hit the market in late 2019 it blew the doors off the place. Sporting a blazing fast 600 MHz ARM processor, 2 megabytes of flash memory, and over 40 I/O pins, at only an inch and a half long it packs a serious punch in a (Teensy) tiny package.

One of the awesome features of this board is its built-in USB host capability. This allows the microcontroller to talk to other USB devices such as human interface devices (mice, keyboards, joysticks), MIDI controllers, and even other development boards over USB serial. While some previous boards such as the Teensy 3.6 had this feature, this is the first Teensy board to include USB host functionality in a small format package.

To take advantage of this awesome new feature, I decided to design a minimalist USB host shield for the Teensy 4.0.

(more…)

Understanding the Xbox 360 Wired Controller’s USB Data

One of my recent projects has been trying to modify some microcontrollers to function as XInput devices, emulating an Xbox controller. The first step in this process is to fetch and then break down the device’s “USB descriptors”. These descriptors are a hierarchy of standardized reports that describe features of the device including who makes it, what version of USB it supports, how it’s powered, and more. By copying the Xbox controller’s descriptors onto my own device, I can convince the computer that my device is also an Xbox controller and will behave like one, and therefore use the Xbox controller’s driver to easily interface with games.

But rather than just copying and pasting the descriptor from one place to another, I want to try and understand exactly what’s going on behind the scenes. I want to understand how the information in these descriptors translates into features of the device’s behavior.

(more…)

DIY Media Key Footswitch for PC

I spend a fair amount of time down in my garage working on things, and while I’m doing that I like to listen to music. I set up an old computer that runs Spotify and sends the audio to a pair of bookshelf speakers. This setup works great, but it requires using a keyboard and mouse to control it. Often times my hands will be gloved and coated with something nasty: grease, epoxy resin, paint, you name it. So I wanted to come up with some sort of method to control my music when my hands were unavailable.

This is what I came up with: a two button footswitch controller that connects with USB and handles play / pause, next track, previous track, and volume.
(more…)