Rock Band 2 Drum Controller for Wii

DIY Drum Set Controller for the Wii made with AVR

Rock Band 2 (RB2) and Guitar Hero World Tour (GHWT) both work with the drum set controller that is packaged with GHWT. The GHWT drums, unlike the RB2 drums, is plugged into a Wiimote's expansion port. This expansion port is a I2C bus and the drum is a I2C slave device. An AVR microcontroller can be connected on this bus as a I2C slave with the same slave address to trick the Wii into thinking that it's connected to a drum controller.

Link to source code folder, It uses the Wiimote Extension Library


First Hardware Picture

Hardware

Schematic file, must be opened in Eagle.

My hardware setup isn't that great. Although the microcontroller, TWI bus, and power supply are all done fine, the drum sensors and hit detection method is unresponsive sometimes. I used piezoelectric disks and used them as the sensors, and I have a quad comparator chip to proccess the signal from those sensors. This does not work too well. I suggest you go read this for schematics and this for drum pad construction.

Code

Link to source code folder

The code is written in C and compiled with AVR-GCC (WinAVR is used if compiling in Windows). The project file is called "wiidrum.aps" and is opened with AVR Studio. The code is currently configured for use with an ATmega168 AVR microcontroller running on a 8 MHz internal RC oscillator.

main.c

This file handles initialization and everything associated with the interaction with the drum pad sensors. Some configuration is done with pre-processor defines and array tables at the top of the file. If you want to modify the behaviour of the controller, modify this file.

pindef.h

This is where connections on the microcontroller are defined. Change this file to suit your own hardware. Make sure the TWI and UART port are properly defined.