Home :: Projects :: Homemade Wii Controller
The project information and schematics are available as a pdf.
This was the final project for an embedded systems engineering class I took with a buddy of mine. The goal was to design and "almost" build a 4-layer printed circuit board for a Wii-like controller. That is, all the design files and notes were supposed to be ready for assembly and fabrication. It features the expected directional keypad and a trigger key on the bottom, and an SPI-based 3-axis accelerometer for orientation detection. The controller communicates with a base station (such as a PC) with a wireless serial link over Bluetooth. Note that the camera tracking was not implemented, though I am sure that inertial navigation with the accelerometer can emulate at least some of that functionality.
The raw parts cost is about $77, not including the PCB fabrication and shipping. We have not built or tested this device.
![]()
View as
pdf.
System always held in power-on state (/RESET disasserted with 10k pull-up). External power switch will take care of full system reset.
3.6864MHz clock rate picked because:
The A/D converter is not needed, so AREF is left disconnected. The alternative is putting a bypass capacitor there, but this increases component count unnecessarily. AVCC needs to be connected to power despite that the A/D converter is not used.

The board and all the devices run at 3.3V, stepped down from from a voltage through a 2-pin input header on the bottom. Input and output capacitors to the voltage regulator are larger than specified in the datasheet because design will be driving LED and needing a lot of current.
The brown-out RESET functionality is not used. The reason is that the controller is a non-critical device. It is most likely powered by a battery, so if the battery voltage drops or the device starts to use a lot of power (e.g. if all the LED's are on), then the user would much rather see a device that barely works and yet gives feedback, even if the functionality is hindered, than a non-responsive device that is in constant RESET mode.

Accelerometer connected to an interrupt line in case that functionality is ever used in firmware. Reserved pins: choose no-connect if possible (less to route). Datasheet says pin 20 must be connected to Vdd. Accelerometer to be used in SPI slave mode. No external clocking is necessary, so CK is grounded to avoid ambient noise clocking the system (The alternative is no-connect on CK). Note that /ACC_CS is not connected to the /SS pin (PB4). This pin acts like a slave select if the microprocessor is acting like a slave; we will make the microprocessor the SPI master here.

Note that the TX/RX lines are crossed to enable communication between the BT module and the processor.
PIO3 connected to an interrupt pin; it might be useful to interrupt processor when BT connection was established. This pin is active high. PIO2 also connected - processor will need to ask module to establish communication. Flow control connected to ports on the microcontroller in such a way as to make PORTC moostly an output port and PORTD mostly an input port. This should simplify firmware development by minimizing the complexity of masks.
It is assumed that handshaking will not be implemented, so lines PIO 4-7 are left disconnected.
All the same color (green). Placed in lower nibble of PORTB for simplicity. These LEDs have typical forward voltage 2.1 V at 20 mA. This dictates the current limiting resistor value of 60 ohms. This resistor will be dissipating 0.024 W. A 60.4 ohm, 1/10 watt resistor will do just fine to light up the LED's in active low configuration (easier to sink than to source current).
CSM7 type crystal chosen for small surface-mount profile, availability in the needed frequency and cheap price. 20pF capacitor values required for proper crystal operation.
Active-low configuration. Allows use of internal pull-up resistors to decrease component count.
In accordance with Atmel's AVR910 App-note, resistors are added on the SPI lines in case there is contention between an SPI device and the in-system programmer. At 1kohms, these should handle greater than 1/10 W of power (meaning 1/5 or 1/4 watt resistors should be used to keep them from getting hot in the worst case).
![]()
View Gerbers as pdf, Download Gerbers as zip.
| Common Name | Designators | Price (qty 1) | Quantity | Price |
|---|---|---|---|---|
| CAP .1UF 16V CERAMIC Y5V 0603 | C1,C4,C5,C8,C9,C10,C11,C12,C13 | $0.03 | 9 | $0.27 |
| CAP TANTALUM 100UF 4.0V 20% SMD | C2 | $3.83 | 1 | $3.83 |
| CAP TANT 220UF 4.0V 20% SMD | C3 | $3.10 | 1 | $3.10 |
| CAP CER 20PF 50V 5% C0G 0603 | C6,C7 | $0.05 | 2 | $0.10 |
| LED GREEN CLEAR 0603 SMD | D1,D2,D3,D4 | $0.09 | 4 | $0.36 |
| CONN HEADER 4POS .100 R/A TIN | J1,J3 | $0.50 | 2 | $1.00 |
| CONN HEADER 6POS DUAL VERT PCB | J2 | $0.88 | 1 | $0.88 |
| CONN HEADER 2POS .100 VERT TIN | J4 | $0.18 | 1 | $0.18 |
| RES 1.0K OHM 1/5W 5% 0603 SMD | R1,R2,R3 | $0.14 | 3 | $0.43 |
| RES 10K OHM 1/10W 5% 0603 SMD | R4 | $0.07 | 1 | $0.07 |
| RES 60.4 OHM 1/10W 1% 0603 SMD | R5,R6,R7,R8 | $0.07 | 4 | $0.29 |
| SWITCH TACT SEAL 4.7MM SMT 300GF | SW1,SW2,SW3,SW4,SW5,SW6 | $0.99 | 6 | $5.94 |
| IC 3.3V 500MA LDO REG 8-SOIC | U1 | $2.48 | 1 | $2.48 |
| IC MCU AVR 64K FLASH 44-QFN | U2 | $7.76 | 1 | $7.76 |
| MOD BLUETOOTH V2.0+EDR SPP W/ANT | U3 | $36.54 | 1 | $36.54 |
| ACCELEROMETER TRPL AXIS 28QFPN | U4 | $13.00 | 1 | $13.00 |
| CRYSTAL 3.6864MHZ 20PF SMD | Y1 | $0.73 | 1 | $0.73 |
Total |
$76.96 |