V-USB development board

Objective Development's V-USB is a firmware implementation of USB for AVR microcontrollers, which means that it doesn't require the chip you're using to have USB support. This can be useful if all you have is an Arduino (or even just a lone ATmega328) and you'd like to use it as a low-speed USB device.

V-USB requires several components between the USB connector and the microcontroller pins. When prototyping on a breadboard, the connections between these get in the way if you're using long jumper wires. It's also a hassle to set them up each time.

My solution is a simple board that contains all the required components and the USB connector itself: Assembled V-USB development board

Motivation

There are a few designs out there for this sort of thing, such as the Metaboard and USnooBie. However, these are too complicated for my needs, with voltage regulators and jumpers. I just need something to do the bare minimum necessary to power an otherwise working AVR microcontroller (with its own auxiliary components) with 5 V and get it talking over USB. Additionally, all the existing designs I've come across hard-wire the D- pull-up resistor, but more on that later.

I also wanted to be able to use the USB connector on its own, so I made the board modular. Here it is in pieces: V-USB development board with USB connector USB connector board

Design

There's not much to say about the connector module, except that the GND pin is on the wrong side. The USB pins have an order: VBUS, D-, D+, GND. I've put GND before VBUS so that the connections could be as simple as possible: USB connector board back side In this photo, the pins are (from right to left): GND, VBUS, D-, D+.

The board itself has almost no surprises (except for a fifth pin labelled PU, which will be explained shortly): V-USB development board schematic This is using the Zener diode design (see the wiki and git repo), because it's simple and allows the microcontroller to run at the higher clock speeds supported with 5 V. The diodes I've got are the 1N5227 type (3.6 V, 500 mW).

The bypass capacitor is a 10 µF electrolytic capacitor, like in the Metaboard. According to the USB 2.0 spec (section 7.2.4.1), that's the maximum allowed in the absence of current limiting. I intended to use 4.7 µF capacitors like in the schematics supplied with V-USB, but I didn't have any on hand.

The 68 Ω resistors are termination resistors for impedance matching. Quite frankly, it's a mystery to me how this value was chosen, but it's present on all the schematics I've seen, so that's what I used. From what I've been able to glean, impedance considerations are largely irrelevant for low-speed devices anyway.

The other resistor is a 1.5 kΩ pull-up resistor, which signals that this is a low-speed USB device. In my opinion, what other schematics get wrong is putting this resistor permanently between D- and VBUS. This causes the host to see the device as soon as it is plugged in and powered on, even if the microcontroller isn't ready to talk to the host yet. This will result in errors on the host as it tries to enumerate the device and fails to get a response. I've intentionally left this resistor unconnected at the device end (instead going to pin PU) to make use of V-USB's USB_CFG_PULLUP_IOPORTNAME and USB_CFG_PULLUP_BIT. If the pull-up resistor is connected to the pin specified in the configuration, the firmware will be able to toggle it at runtime, so the host won't see the USB device until the microcontroller is ready.

It turned out to be possible to place the components in a way that all connections could be made with solder bridges: V-USB development board back side This would never fly for a high-speed device (e.g. see Intel's guidelines, which specify PCB trace requirements down to sub-mm scales)!

Sadly, I neglected to take into account how stiff and heavy USB cables with standard type B connectors are. If the board is plugged into a breadboard, there's a lot of strain: V-USB development board plugged into a breadboard, with a heavy USB cable pulling it down One way around this is to use a female-female coupler (makeshift in this case), bypassing the breadboard entirely: V-USB development board connected to jumper wires via a female-female coupler Then the cable can lay where it wants and the board follows it. Since micro- and mini-USB cables tend to be more lightweight, it might be sufficient to use one of those connectors instead, but all the ones I found were surface-mount, which is not perfboard-friendly.

References