Introduction: USB SNES Controller

First instructable. Let me know what it needs and fixes.

I did not make the circuit or program. I am just making a guide that shows step by step assembly of how to make the USB SNES controller. The original page is here:
www.raphnet.net/electronique/snes_nes_usb/index_en.php

This guide will convert a regular snes controller into a usb gamepad. It is tested working on XP, Vista, 7, and PS3. It should work on mac and linux but I have not tested them. The device is recognized as a standard HID device.

-You do not need to program anything for this guide. The program is already compiled and ready to be flashed to your chip.
-You do need basic soldering skills.
-Basic schematic reading skills helps, but I will try to explain every step.

Step 1: Parts Needed

Parts List:
----------------------------------------
-Atmega8 DIP microcontroller
-AVR programmer (usb, parallell or serial. I use usb.)
-12MHz Crystal osscilator
-[2] 3.6 volt zener diode
-1.5K Resistor (anywhere from 1.3K to 1.7K should work)
-[2] 68ohm resistor (anywhere from 60 to 75 should work)
-USB male cable
-SNES controller (first party works better. wires colors match guide.)
-Small wire.
-PCB - www.radioshack.com/product/index.jsp - $2
-Breadboard. This makes it much easier to test before putting into a controller.
www.radioshack.com/product/index.jsp - $9

Tools:
-----------------------------------------
-Wire Stripper
-Wire Cutter
-Soldering Iron
-Solder
-Needle nose pliers (makes it alot easier to place and move wires on breadboard)
-Dremmel or cutting tool. (chip will not fit into unmodified controller.

Step 2: Prepare Wires

-Take a usb cable and cut off the non male end. You only need the cable and male usb.
-Strip the USB cable and all 4 connections inside. (some usb cables have 5 wires. This guide does not need the 5th wire, so it can be cut off.

-Open the SNES controller. Cut the connection wires close to the board, but leave enough wire so they can be solderd to a pcb. Better to leave too much wire and cut it off if you don't need it.


Step 3: Flashing the Hex File to the Atmega8

I used a usb programmer to flash my chip. This means that a compiled hex file is sent from the computer to the chip. No actual programming needs to be done. Serial and parallel will work to, but the programmer software will be a little different from mine.

The HEX file be downloaded here: (right click save target as...)
www.raphnet.net/electronique/snes_nes_usb/releases/nes_snes_db9_usb-1.7.hex
This is a firmware that will tell the chip how to handle all signals.

All Atmega chips need fuse bytes. Don't worry about what they do, just know that this design needs:
high byte = 0xc9
low byte = 0x9f

Your chip flashing program should have an option to set these fuses. I used ProgISP on my system.

When you have it flashed, you are ready to start bread boarding.

Step 4: Breadboarding

I will assume you know the basics of using a breadboard. If not, there are many guides for that.
I will also assume that you know how to solder wires.

If you can not read the picture, go here:
www.raphnet.net/electronique/snes_nes_usb/sch-revD.png

Start by solding each of the 4 usb wires and each of the 5 snes wires. Solder the ends so that they can be plugged into the breadboard.

Attach the programmed microcontroller and start to wire the components.


Step 5: Oscillator + SNES

The oscillator connects to pins 9 and 10. It can be rotated either way and work.
SNES Clock connects to pin 28.
SNES Latch connects to pin 27.
SNES Data connects to pin 26.
SNES 5V power connects to both 5V on the chip and usb 5V.
SNES ground connects to both grounds on chip and usb ground.

Step 6: USB Data and Power

This part is very tricky to wire correctly. Pay close attention to the schematic.
USB 5V goes to both 5V pins and SNES 5V
USB Ground goes to both ground pins and SNES ground
USB2 is data - . It goes:
     through a 3.6v zener diode to ground
     through a 68ohm resistor to pin 2 and 3
     to usb 5V through a 1.5k resistor.
USB3 is data +. it goes:
     through a 3.6v zener diode  to ground
     through a 68ohm resistor to pin 4

Step 7: Testing the Controller

With all parts in place, plug in the usb port into your computer and it should come up with found new hardware. You can test all the buttons in the control panel under game controllers.

If it works, you are ready to transfer it to a pcb and put it in the controller.

Step 8: Breadboard to PCB

I used the board below to make my design. I put the chip in place and used a dremmel to cut all unneeded areas off the board. You need to make it as small as possible to fit in the controller.

Note that all the solder spots near the pins connect 3 holes. This allows 2 wires per pin to be used on this board.

Note. The solder must be on the bottom of the board. Put it on the wrong side and the pins won't make any connections.

Step 9: Modifying the Controller

I had to cut the casing a little to fit everything inside. I put my circuit under the abxy buttons. The picture shows what I did. Fit it in anyway you want as long as it closes.

Step 10: Final Testing + Notes

Test it and see if it works. If it does, you're done. If not check common errors.

Common Errors:
--------------------------
Check that power and ground are connected properly
Check the direction on the zener diodes. They do not work both ways.
Is the oscillator connected?
Did you program the right program and the fuse bytes?
Are snes data, latch, and clock hooked up to the right pins?
Do you have a solder bridge anywhere?

NOTES:
---------------------------
This controller does work on a PS3, but the buttons do not map very nicely. The start and select buttons do not map to ps3 start and select. This can be usable on some fighter games that allow you to remap the buttons.

Let me know what I can do to improve this Instructable.