USB Generic HID Open Source Framework for Atmel AVR and Windows. Part 1 - Reference Hardware
The Atmel AVR range of USB capable devices provides a wide-range of functionality and peripherals to the professional and hobbyist; however the additional complexity of both microcontroller firmware and host PC drivers is a tall barrier to anyone wishing to get started with USB development. Although the firmware is greatly simplified by freely available open-source USB stacks (such as LUFA) there is still the requirement for a base of AVR software, Windows software and physical hardware to support the application. The USB Generic HID Open Source Framework for Atmel AVR and Windows solves this issue by providing a ready-made framework on which to build your applications.
The framework includes a reference hardware design, a reference firmware design and a Windows based DLL library and host-test application. By providing a tested, working base for development, the framework greatly eases the task of both learning USB development and building USB driven devices.
By providing a USB interface based on the Generic HID protocol, the framework provides a highly flexible interface without the requirement for custom USB drivers on the host (since Generic HID is supported natively by Windows, MacOS, Linux, etc. using built-in drivers).
Out of the box the reference firmware should function with any ATmega32U4 based board (however for the demonstration application the LEDs and switches must be mapped correctly). You can see the recommended reference design on this page which shows how to build your own reference hardware.
In order to support the framework the hardware really only needs the minimum number of components to support the USB interface and run the AVR however, for a more useful demonstration, 4 LEDs, 2 switches and a potentiometer is included allowing the demonstration code to show how you use the framework to monitor, set and communicate the state of such peripherals between the AVR and Windows.
As you can see from the diagram all of the on-board peripherals are connected to physical 'jumpers' allowing them to be turned off (except for the switches which are naturally passive when not pressed). The reason for this is that under the development board are 2×22 pin SIL headers which allow you to plug the development board directly into a breadboard to allow rapid prototyping.
You can also select between bus-powered and self-powered using a jumper. The board has a 5V 800mA regulator which can be powered by any generic 9V 1000mA supply (centre-positive jack). Both the regulator and the ATmega32U microcontroller are heavily decoupled to ensure stable operation even on a breadboard. The board can also supply 5Vs to the breadboard (you simply connect the Vdd and Vcc pins from the SIL as appropriate).
Since I wanted the to be able to make the board myself I needed to ensure that the track-width and via sizing was appropriate for making the board at home. Also care was taken to ensure that all soldering of components could be achieved without the use of wave-soldering (i.e. there are no inaccessible top-solder joints for any of the components).
As you can see from the schematic the board contains 2 power status LEDs (showing the presence of VBUS power and local power), 4 LEDs for general use, 2 general use switches, a reset switch and a 10K potentiometer for experimenting with ADC. In addition there is a jumpered 1K resistor on the hardware boot pin to allow better compatibility with the various USB boot-loaders.
For the USB connector I used a full-size type B socket which is a lot more sturdy than the micro and mini B connectors (since the cable gets plugged in and out a lot on a development board).
Here is the resulting PCB artwork for the board:
The ATmega32U4 USB Development Board Eagle CAD files - download
PCB Pricing: https://jlcpcb.com/quote
News on theme: