SNES and NES button press LED controllers

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

User avatar
dude3585
Posts: 39
Joined: Mon Sep 05, 2016 3:33 pm
Location: US

SNES and NES button press LED controllers

Post by dude3585 »

I used this guide http://www.instructables.com/id/NES-PAD-LED-s/ and made my own and is really cool. Might be the controller but I have to press hard for the A and B to register though. Could be the controller(Was dumb didnt test before mod) or the fact that I used longer wires than needed. Possibly in the way of the button being pressed down? Could be wrong so any input would be great. I used 2 LEDs one red and other green and 100 ohm resistors on each. I just ordered 50x 75 ohm resistors for 99 cents from China :lol: . The LEDs Ive had for a decade or so. the package says 3mm but not the voltage or anything. Tried the LEDs on my cheap multimeter and they would be very dim and says 1. 1v then? Just to let everyone know Im new to a lot of this. Learning a lot though.
Here is a short vid I made. LEDs not as bright as my phone picked up. I have to press hard in order for mario to jump but LEDs light up if lightly or hard press though.
I can show the inside If anyone wants. Plan to make another but fully test controller out before the mod this time. Any info on adding a on/off switch for the lights would be cool also.

Short vid of my mod
https://www.youtube.com/watch?v=fDXzB2f2DE8

SNES LED mod:
This has been an issue past few days. Havnt found any tutorial on this so if anyone knows of any press post here. If not thats ok because I bought a lot of 12 or so controllers on Ebay few years ago and dont mind ruining a few to test if it happens. Found this image while searching here for info on all this. Found the image here viewtopic.php?p=78297
I have edited it a little to show where the traces go to the chip. Confused on where Down goes though. Also not sure why near TL(top left?) next to Up is circled red. Just the ground? Any info on the chip be great too. Maybe someone can break this down better for a dummy like me. NES was easy because it had pins for each button. Soldering on that small chip would be a challenge for me I think. Never solder that type of chip before.
So far my test plan is to solder the wires, LED, resistor and try to solder one of the buttons from that tiny chip if that will work. Y for example which will be 8th pin on top if counting from left to right. Just like the NES Ill be soldering the positive wire to the white 5v.
If there is a better idea for this that be great. Not sure if I can solder from a differnt point other than that chip that seems like it could be a pain so any info is great. Ill post progress as I go.

Image
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES and NES button press LED controllers

Post by lidnariq »

dude3585 wrote:Might be the controller but I have to press hard for the A and B to register though.
So, the carbon-infused rubber used in these gamepads are actually force-sensitive. The amount of resistance is a function of amount of pressure.

When a PC keyboard uses these the rubber "spring" is instead designed to have a mechanical hysteresis, while in things like the PS2's DualShock they're designed like an "ordinary" spring such that more pressure → more conduction → different analog value for the game.

But in the NES and SNES, the IC is "just" digital, so it can only detect a logical 0 or 1.

In the NES's controller, the thick black vertical lines covered with darker green are actually resistors. They're the load resistors that pull the inputs to the 4021 shift register to +5V ("whi"). When the buttons themselves are pressed enough, they become smaller resistors, pulling the voltage down to ground, such that the 4021 now reads the signal as "low".


When you add the resistor-and-LED, you're adding an additional pull-up ≈resistor. When a button is pressed, current flows from +5V, through your resistor and LED, then through the button, to ground. And that's why you have to press so hard to get the LED to light up nicely.

You can add an external IC to make them brighter, but that's about it. LEDs just need much more current to light "nicely" than the original system was designed for.
The LEDs Ive had for a decade or so. the package says 3mm but not the voltage or anything. Tried the LEDs on my cheap multimeter and they would be very dim and says 1. 1v then?
You can usually assume that the "desired" voltage of an "old technology" LED (by which I mean, red, orange, yellow, or yellow-green) will be somewhere in the range of 1.5 to 2.2V.
SNES LED mod
[...]I have edited it a little to show where the traces go to the chip. Confused on where Down goes though.
I'd strongly recommend going and buying a multimeter for tracing this sort of thing. It'll make your life easier; doing things from photos is... only sometimes successful.
Also not sure why near TL(top left?) next to Up is circled red. Just the ground?
Well, that is what the legend says...
Any info on the chip be great too.
Nintendo decided to take two 4021s as well as all the pullup resistors and put them inside the epoxy package there. It's a custom part, so I don't think there's going to be any better documentation than what you've reverse-engineered.
Soldering on that small chip would be a challenge for me I think. Never solder that type of chip before.
Soldering to SMDs is ok, if you have a sufficiently fine tip on your iron, have steady hands, and move reasonably quickly and deliberately. Don't linger too long and you won't cook the IC. But also don't go too recklessly or else you'll leave cold solder joints everywhere.


Also note that SNES gamepads are "supposed" to only take 17mA, and any significant number of LEDs lit simultaneously will dramatically exceed that quota. I'm not entirely certain what will happen if you do, but at some point it'll be bad.
User avatar
dude3585
Posts: 39
Joined: Mon Sep 05, 2016 3:33 pm
Location: US

Re: SNES and NES button press LED controllers

Post by dude3585 »

It works! https://www.youtube.com/watch?v=ts4ZiU7W3lE
When you add the resistor-and-LED, you're adding an additional pull-up ≈resistor. When a button is pressed, current flows from +5V, through your resistor and LED, then through the button, to ground. And that's why you have to press so hard to get the LED to light up nicely.
I read to use resistors so the LEDs would overheat and short out. Something along those lines. Should I just not use resistors then?

The led is bright. I did read that if you try to press more than 3 buttons with LEDs at once nothing will light up. Not sure if resistors were used. Maybe I should just not use resistors and test it out for a while and see what happens. Got B button working so now to the other 3. As of now just the 4 buttons are fine. Gotta make sure everything will fit before adding too much. Kinda worried about adding each wire to the 5v. maybe I should carefully twist them together and solder as one to the 5v sense they all need to go there. Makes most sense otherwise each wire I add with unsolder the previous wire unless I tape it down or something.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES and NES button press LED controllers

Post by lidnariq »

dude3585 wrote:I read to use resistors so the LEDs would overheat and short out. Something along those lines.
That's true. An LED can only take a certain amount of current before it dies.
Should I just not use resistors then?
That depends on what the minimum resistance you can get out of the controller's pads are. You almost assuredly want to limit current to ... well, definitely not more than 25mA. 10mA would be safer.

Whatever resistor you add should be enough such that, when you're pressing as hard as you ever will on the buttons, no more than 10 mA flows through the LED.
User avatar
dude3585
Posts: 39
Joined: Mon Sep 05, 2016 3:33 pm
Location: US

Re: SNES and NES button press LED controllers

Post by dude3585 »

Seems like I should get at least a 145 ohm or higher resistor then? I'm worried about button delay. Been up over 20 hours so I should sleep so I can think straight for this lol. I could always test different resistors for the buttons. Used a led calculator but doesn't help much on button delay unless I'm missing something. Thanks for helping.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES and NES button press LED controllers

Post by lidnariq »

I'm not certain what you mean by "button delay" ?

But I'll still be here to answer questions after you've slept, so by all means do that first.
User avatar
dude3585
Posts: 39
Joined: Mon Sep 05, 2016 3:33 pm
Location: US

Re: SNES and NES button press LED controllers

Post by dude3585 »

Forgot it's football time so staying up longer lol.
What I mean is will delay any of the response to say jump in Mario world for example because of the extra current from LEDs. Could have been a bad NES controller. Think more testing I'll know.

Still confused on pin for the down button. Have a multimeter so could probably figure it out that way if I can.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES and NES button press LED controllers

Post by lidnariq »

Oh. Sure, the LED is a stronger pullup than the one that's inside the IC (or the carbon film ones on the NES controller PCB), so it requires more pressure before it reads as a logic low to the IC. Which will be later, because it takes a while for you to apply enough more force.

The "right" solution, as I said, is to add an external IC or transistors that will convert the original voltages into something that can cleanly drive the LEDs.
User avatar
dude3585
Posts: 39
Joined: Mon Sep 05, 2016 3:33 pm
Location: US

Re: SNES and NES button press LED controllers

Post by dude3585 »

I dont know much about transistor. Still reading more on electronics. Not sure what transistor I would need and where to put it. Haven't seen any LED NES tutorial out there talk about this. Making some sense though. Bring volts back up after it reads the LED. Maybe? I'm a visual person so drawing it out for me is always helpful for me to process.
Not sure what a external IC is.
Any suggestions on how to go about this issue? No tutorials used any so kinda confused.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: SNES and NES button press LED controllers

Post by tepples »

For each 4021, you want to put the inputs through a buffer. An "octal buffer" IC has eight amplifiers to turn button presses into a solid on/off signal that can hide the pressure sensitivity before the signals go to the LED and 4021. Others can provide details of how to wire it.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES and NES button press LED controllers

Post by lidnariq »

Here's what the NES input stage looks like:

Code: Select all

+5V ----+
        |
        R
        |
        +---- 4021 input
        |
         /  <- switch
        +
        |
       gnd
R is the carbon film resistor on the PCB.

If you were to use transistors: you'll want a PNP transistor. Specifics basically don't matter, just go for something cheap and small (you explicitly don't want a power transistor here). Something like the BC556 or 2N4403 should be fine for this purpose, but there are quite literally thousands of other options. To use a transistor, add parts so it looks like this:

Code: Select all

+5V ----+------+
        |      |
        |      R  <-- the same carbon film resistor
         ↘|    |
          |-R2-+---- 4021 input
         /|    |
        |       /
        R3     +
       LED     |
        |      |
        +------+ gnd
R2 should somewhere in the range of ~50k to 100k. R3 should be ~330 ohm.


On the SNES, it's basically identical, except that there's no carbon film resistor for you to see.


Using a digital buffer IC like tepples said is another fine option. In that case, you'll want to take the same original circuit (at the top) and add different things:

Code: Select all

+5V ----+
        |
        R +-- to digital buffer input
        | |
        +-+-- 4021 input
        |
         /  <- switch
        +
        |
       gnd


digital buffer output -- R -- LED -- +5V
digital buffer Vcc - +5V
digital buffer gnd - gnd

Any given digital buffer IC will have its inputs and outputs in different places from a different IC. You can also use digital inverters to similar effect, but you'll need to slightly change how things are connected:

Code: Select all

digital inverter output -- R -- LED -- gnd

One final option is to use dramatically higher-efficiency LEDs at very low power. If you can get an LED that is still satisfactorily bright at 100µA (i.e. with a 35kΩ resistor), you can use your current topology and basically not have to worry about anything more complicated.
User avatar
dude3585
Posts: 39
Joined: Mon Sep 05, 2016 3:33 pm
Location: US

Re: SNES and NES button press LED controllers

Post by dude3585 »

Thanks for all this info!
Im looking into it all and gotta say kinda confused. Ive barely learned the basics yet. Just learned Ohms and read resistors within the last few days. Transistors are confusing me a bit. Not sure where I would solder each pin (EBC). Something like this work? http://www.ebay.com/itm/100Pcs-2N4403-P ... XQkN1Rz73E
One final option is to use dramatically higher-efficiency LEDs at very low power. If you can get an LED that is still satisfactorily bright at 100µA (i.e. with a 35kΩ resistor), you can use your current topology and basically not have to worry about anything more complicated.
If any of you guys could point me in the right direction or direct links on Ebay for this that be great. Having issues finding what I need. I dont mind ordering from China as I wanna keep this cheap as I can. Having this mod is great but not looking to spend too much for it.


Was wondering if I didnt add any resistor but just an LED for each of the 4 buttons what would happen? Would they burn out never soon? Over few years? Was thinking of testing without any resistor. I do have 50x 75ohm resistors in the mail. Unfortunately everywhere in my small city I live in has no place that sells any of this stuff. Ive searched and called everywhere. No more Radio Shack either. So Ebay seems the best and for price as well.


Update:
Using my cheap multimeter(So I know numbers arent 100% exact all the time being a cheapo) I get 45.7k ohm (set at 200k ohms) from the 5v to the pin(B button) without controller plugged in or button pressed if that helps in anyway. This is with just the LED no resistor. Maybe I could test with it plugged in if that helps.

Reading this for info on resistors. Transistors still confusing the hell outta me for LEDs. Any tutorial books, vids or anything recommend is always welcome. Thanks again.
http://www.evilmadscientist.com/2012/re ... -for-leds/
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES and NES button press LED controllers

Post by lidnariq »

dude3585 wrote:Just learned Ohms and read resistors within the last few days. Transistors are confusing me a bit.
So, Ohm's law is actually a description of how resistors work: The current through the resistor and the voltage across that resistor are related as a constant factor R, the resistor's resistance.

Transistors are a bit weirder, but they basically work like:
If "x" current is flowing from the base to the emitter, then up to "hFE" times "x" current is allowed to flow from the collector to the emitter.

Not sure where I would solder each pin (EBC). Something like this work? http://www.ebay.com/itm/100Pcs-2N4403-P ... 0768191282
wikipedia:Bipolar junction transistor § PNP.

Why don't you try playing around with Falstad's Circuit simulator and see if it helps with comprehension? (javascript version)
If any of you guys could point me in the right direction or direct links on Ebay for [sufficiently efficient LEDs, that would] be great. Having issues finding what I need. I dont mind ordering from China as I wanna keep this cheap as I can. Having this mod is great but not looking to spend too much for it.
I have no idea how to find parts on Ebay. I ordered things from Sure Electronics a decade ago, but their inventory is only vaguely related to what it was then.

I usually look on places with real inventory search engines, like Digikey. They don't let you search indicator LEDs by efficiency, but you can download the result of a search and then do some math¹ to get the best results.

That math tells me that Cree's green LEDs in the C503B-GCx-CB0C0xxx series are currently the most efficient (at 83 lumen/watt). Digikey is selling these at ≈25¢ per LED, although you'll have to add shipping.

They also have a few other highly efficient options, but all the cheap choices (<40¢/LED) seem to be made by Cree right now.

(The most efficient red LED: CMD333URC-2; 61¢/, 54lum/W;
The most efficient white LED: C503D-WAx-CCBEBxxx; 24¢/, 39lum/W. The most efficient amber LED: C503B-AAx-CA0C0xxx; 16¢/, 22lum/W.)

However, they are standard T-1¾ LEDs (5mm), not the T-1 LEDs (3mm) you've been using, so that may or may not be workable.

¹: The math is:
steradian = 2·π·(1-cos((given_viewing_angle)÷2))
lumen/watt = (given mcd) / steradian / (given test current) / (typical forward voltage)
This isn't exact (the mcd, test current, and forward voltage don't correspond to the exact same measurement), but it's a reasonable proxy value.

EDIT: did the math wrong. Got much lower and more reasonable numbers now.
Was wondering if I didnt add any resistor but just an LED for each of the 4 buttons what would happen? Would they burn out never soon? Over few years? Was thinking of testing without any resistor.
In brief testing on my own controller, the smallest resistance I was ever able to get out of the button was about 200 ohms. At that large of a resistance, your LEDs shouldn't ever be damaged... but... you'll still have that "button delay" problem.
So Ebay seems the best and for price as well.
You should be able to get some resistor assortments from Ebay. Those might be a better choice for experimenting than just buying a new size every time you need to try something else.
I get 45.7k ohm (set at 200k ohms) from the 5v to the pin(B button) without controller plugged in or button pressed if that helps in anyway.
That's about what I expected. Like I said, on the NES it's the external black vertical line; in the SNES they put the resistor inside the IC.
Last edited by lidnariq on Tue Sep 13, 2016 2:18 pm, edited 1 time in total.
User avatar
dude3585
Posts: 39
Joined: Mon Sep 05, 2016 3:33 pm
Location: US

Re: SNES and NES button press LED controllers

Post by dude3585 »

Thanks again! Ill look into this.

Got a problem though. I decided to just connect wire with LED and test it out. The light comes on when I press the B button but doesnt do anything. Strange? Only thing I could think of was its not registering it because its reading the LED instead because of the wiring. Was thinking maybe I need to solder the 5v wire to the backside white wire of the controller instead of directly to the 5v PCB. Might fix the issue? With the NES I soldered it that way. The NES was differnt on back with a solder point already there compared to snes where there is no solder so maybe I just need to expose the white wire and solder to it.
Let me know if that sounds correct or not. Thanks!

Also what is R1,R2,R3 on the PCB if anyone knows? That is still confusing me.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES and NES button press LED controllers

Post by lidnariq »

dude3585 wrote:I decided to just connect wire with LED and test it out. The light comes on when I press the B button but doesnt do anything. Strange? Only thing I could think of was its not registering it because its reading the LED instead because of the wiring. Was thinking maybe I need to solder the 5v wire to the backside white wire of the controller instead of directly to the 5v PCB. Might fix the issue?
Most likely, the LED is now too strong of a pullup, so the button is never a strong enough pulldown for the IC to read the signal as logic low.
Also what is R1,R2,R3 on the PCB if anyone knows?
R1 and R2 are PAL-specific. (Hence the big "Only-P") See this link.

It's some kind of region protection such that imported controllers wouldn't work on PAL SNESes. I'm not certain why they bothered...
Post Reply