In this instructable, I will show you how to hook up a Nintendo Entertainment System control pad to an arduino, the arduino is in turn running a special sketch that allows it to show up to a PC as a USB HID joystick!

And if that is not cool enough, I will show you how to shove it all inside the NES controller shell for a simple controller + wire, "plug n play" device!

If you hook this up wrong you can fry your arduino, and or your usb ports, if you choose to biuld this project you assume responsibility for its proper construction

Sofar I have tested this on ... Windows XP pro, Windows 7 64 bit, and Ubuntu 9 32 bit

So far its not tested on Mac, I don't see why it should not work on Mac, but its untested, the only Mac I have in the house is a SE from 1986, I will test it as soon as possible, just gotta sweet talk a co worker into bringing his macbook pro into work :)

Step 1: Parts N Tools

Tools: your usual electronics tools... on this project I used

Soldering Iron

Solder wick


Small phillips (+ shape) screwdriver

razor knife

small needle nose pliers

electrical tape (or proper sized heat shrink, I just happen to be out)



Arduino (with atmega 168 or 328, other chips not tested)

and a EXTRA atmega chip, you dont HAVE to but I installed this inside the controller, so you may want to have an extra chip on hand with a boot loader installed on it to replace the one we will be using (especially for me since I use my arduino AS a avr programmer, I would be kinda stuck)

16mhz crystal (ceramic resonator works fine, but I had the crystal and caps already)

2 * 22pf for the crystal (if your using a resonator then its packaged in for you)

0.1uf cap (code 104)

2 * 68ohm 1/8 watt resistors (or smaller if you want, just not larger, its tight in there)

1k5 ohm resistor

2 * 3.6v zeiner diodes 500mw or smaller

USB cable you dont mind cutting one end off of

NES game pad

thin insulated jumper wire
<p>Hello there and thanks for the Tutorial!</p><p>Do you think this could be applied to a Arduino Nano V3 Clone, too, if it has the bootloader installed? I want to turn my Clones into USB HID for using them as Gamepads. I would appreciate every help i could get.</p>
<div>Forgive-me, i'm very,very late. <br><br>Hello friends ! someone could give me a hand? this is a very good tutorial! but unfortunately there are some things in my opinion, are not very well explained. Would someone help me? <br><p>First, the breadboard layout is impossible to understand why one of Zenners diodes, it's positive rail ! all rectification project with this type of diode, inserts it into the ground rail. And more: one of the diodes you can not see where it fits, if it is on the ground or in the positive rail.</p>Second, despite the high quality of the photos, I can not understand the soldering parameters in a good way. And for now, i'm just wanna test in Arduino.<br><br><p>Third, the issue of 1k5 resistor. I know the tutorial already has a few years, I am Brazilian and in my country everything is &quot;late&quot;, despite the internet (really). More recent projects such as the &quot;V-USB for Arduino&quot; 2K.2 use of resistors for emulation of mouse and keyboard. I myself can successfully tests using 2K.2 resistor. When 1K.5 use, the device is not recognized. Why 1K.5 resistor ?</p>I use an Arduino UNO R3 board, MCU Atmega328p, my IDE is 1.0.5 R2 (tried installing the &quot;0016&quot; Suggested by the author: impossible for me) and my operating system is Windows 7 64-bit. Despite my IDE differ from suggested, it works perfectly with other USB device tests, such as &quot;mouse&quot; and &quot;keyboard&quot; &mdash; remember that I use the resistor 2k.2 and not the 1k.5.<br><br><p>The intention of the author of this post tutorial was great and I thank you very much. But these doubts remained. What I really wish is: someone could send me the schematic right of breadboard with Arduino and if possible, all that is compatible with my IDE? or someone could send me a new USBJoystick library also compatible with my board and IDE, in the case of not being able to meet the first request ?</p><p>My email is audiogamers@gmail.com. </p><p>Thank you all for reading this huge text I wrote and once again, I apologize because i'm very late in this instructable, where everyone seems to have obtained accomplish the project successfully. Forgive me. </p><p>Greetings!</p><br><br> <br></div>
The first link on the software page doesn't seem to work any more. :(
Building an nes multi platform emulator using the nes shell, Need to know if i can drop the Arduino in the nes and plug multiple controllers into the Arduino. I.E. Arduino plugs into mini itx via usb, two nes controllers plug into Arduino via nes controller port. Will this be possible?
Hi ! I've been trying to get this to work for a few days now. I managed to get the code to compile using Arduino 0016, but as some people already pointed out, the schematics doesn't look like the wiring diagram... and none of these are actually working for me. The computer sees an &quot;Unknown USB device&quot; under Windows, and lsusb doesn't return anything on Linux. <br> <br>I've been trying to go back and use the wiring of the UsbKeyboard project, but using the UsbJoystick library with it doesn't work at all. The documentation of the UsbJoystick library doesn't mention the wiring explicitelly, and the originl website seems to be down. <br> <br>I'd love to have some additionnal informations, at least for the wiring.
Tried on windows 8 64 bit. so far only gotten it to show up as an unknown VMWare usb device and on a friends vista 32 bit an unknown usb device. no HID usb joystick yet :(
Awesome tutorial!
1.5k resistor ... 1/8 watt, 1/4 watt, 1/2 watt? 1 watt???
whatever you have, I used 1/8th watt 5% tolerance
Hi! I'm having some trouble understanding the schematics here, it seems to me that they are showing quite different setups? And I can't find an arduino pin 14 either?<br>
I double checked, they are showing the same thing, but the breadboard layout makes it look harder than it is<br><br>also digital pin 14 is analog pin zero (d15 is a1 etc to 19)
I've looked at this as well and agree with kirrebona. In the two schematics arduino pins 2 and 4 are not going to the same place. In the bread board you have pin 2 going to D+ and pin 4 going to D-. In the other pic you have them reversed. I might be wrong but I do not want to follow the wrong one. Some imput would be great thanks.
Yep, the breadoard image and the schematic image apparently have pin 2 and pin 4 reversed. I'm not sure which is correct (or where in the code/library those pins are chosen in the first place). Also, the diode on pin 4 in the breadboard image is connected to power, rather than ground. Please clarify the pin4/pin2 connections.
This is great, but a little out of my comort zone for electronics. Any chance you would be willing to sell one? Thanks!
heare this is beter for you http://www.retrousb.com heare is a you thbe video of it http://www.youtube.com/watch?v=vG_OOV2bBaY
Check E-Bay. They should have some good ones for a low price :)
How much is the cost of this Usb NES controller?
Hey nice Instructable! :)<br>I'm wondering if it's possible to get 2 NES controllers with one Atmega328 via one usb hub?
yea it would be pretty easy if you left the original chip in the nes controller, and chained them together, as the original puts out a easy serial stream
so all I need is a serial to usb converter? :D<br>I though about putting the Atmega chip and the circuit &quot;behind&quot; the original plugs so you can plug in or out the controller, but didn't want to have 2 USB connection :p<br>Thx didn't knew it gives serial signals ^^
its not RS232 like computers use, its (a simplified) SPI protocol at 5 volt levels, which is real easy to read with a microcontroller to read <br><br>it requires 3 lines, a latch line a clock line and a data line<br><br>you toggle the latch and that signals the controller to read the current button state and store that in the shift register, then you send it 8 clock pulses to read each button state one at a time serially <br><br>
cool thx a LOT! :)<br>I thing this would be really helpfull to others to, maybe I'm gonna do a instructable about it ^^
I mean, it would be easy to just add some lines of codes to give the Atmega328 the pins where the second controller is connected to, but to be honest, I'm new into arduino programming and don't get it xP<br>Would be REALLY cool if someone could help me with that! :)
Awesome instructable! Now I wonder if we can figure out how to &quot;theoretically&quot; store an accessible library of games (roms) so that it will be accessible through the controller....
you can get a usb 1, 2-3 port hub chip from TI at most resellers that does not take a bunch to hook up, and strip down a flash drive <br><br>loading it would be slow as crap but running from it once loaded would be fine
Can I use an atmega16 instead?
I dont think you can with the arduino lib that I used, but its made out of VUSB which pretty much runs on any avr with 128bytes of ram and a 1b of storage
Can it be done for the SNES to work?
yes as they are pretty much the same, though the SNES uses 16 bits of data for the 12 buttons instead of 8
hey it looks like you are using V-USB, I've developed a MCU kit that is designed specifically to build stuff like this<br><br>http://www.seeedstudio.com/depot/usnoobie-kit-p-708.html?cPath=104_128
not directly, yes it uses VUSB but I am c-tarded and never really got far with the plain lib<br><br>thanks for the link I will check it out!
Would it be possible to modify this project to make a USB joystick using potentiometers and buttons, but not use an NES gamepad at all? Awesome job BTW!
yes you can pretty much use anything you want, though since I am using a lib for arduino and not directly VUSB, and suck at USB descriptors you will have to do some legwork
Hi you might be interested in my tutorials here<br>http://frank.circleofcurrent.com/index.php?page=hid_tutorial_1<br><br>and this will also help<br>http://frank.circleofcurrent.com/index.php?page=usnoobie_rfid_keyboard
May I humbly suggest: http://denki.world3.net/retro_v2.html<br><br>Cheaper than an Arduino (although you do need an AVR programmer, or you can order programmed chips from me or anyone as it is open source) and designed not to alter the original pad. Well, you can reduce cost a bit by splicing in to the pad or do what I do and add a DB9 near the NES connector so it can be used on USB and a real NES.
this is pretty cool check out this website http://www.retrousb.com/index.php?cPath=25
IVe got some 5v zeners any chance those will work?
no the D lines need to be around 3v, some usb systems are 5v tolerant on those lines but its out of spec and could cause damage to your port
I think it would be a lot less invasive to just tap into the shift register. You could even leave it functional for the NES too that way.
also! I have mangled this NES pad so many times with various fun things I thought its time to place something in it and get a new one before pads start ripping off, or screws strip out
I wanted to use a smaller chip, and I may in the future, with the atmega328 in there it seemed like extra hardware right where it would be &quot;sorta&quot; convenient to place that big chip
(nice instructable by the way)

About This Instructable




More by osgeld:Project Advantage: Install a famiclone into a NES Advantage Joystick Spinner / Jog Wheel Inside of a VCR Head No CPU / MCU led pulse-fade 
Add instructable to: