Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: BlueScreenJunky on October 21, 2010, 12:55:06 pm

Title: How to wire Illuminated buttons so that they light up when pressed ?
Post by: BlueScreenJunky on October 21, 2010, 12:55:06 pm
Hi everyone !
I'm in the process of building a Beatmania IIDX controler similar to this one :  (http://www.youtube.com/watch?v=OByuRbdbLe4#) so I would like the LEDs (5V) to light up when the buttons are pressed. I have a mini-PAC from ultimarc which works great, I took the 5V from a USB port to test the LEDs and it works just fine, so all I need now is to link the two ^^
the switch has 3 pins (Common, Open and closed) and the button itself has two pins (+ and -) to feed the LED.
I've been searching for a guide but I couldn't find any, so could anyone explain how I can do that ?

Thanx !

PS : I think You've guessed it by now, but I have absolutely no experience in electronics, so try to explain as if you were talking to a 3 years old ;-)
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: saloonstudios on October 21, 2010, 02:41:39 pm
I was looking for this too, this is the only method I've been able to find on the net-

http://shoryuken.com/content/light-up-activation-button-mod-tutorial-61/ (http://shoryuken.com/content/light-up-activation-button-mod-tutorial-61/)
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: BlueScreenJunky on October 22, 2010, 01:06:16 am
Oh wow ! I didn't expect it to be that complicated. Well I'll probably do it eventually, but in the meantime if someone has something a little simpler that would be appreciated ^^

Thanx for the link though, bookmarked !
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: drventure on October 22, 2010, 07:29:16 am
Nice link. That's not too bad a circuit, and you can hook up 6 buttons to one inverter chip. You could even hook the inverter up to you 5v usb power line for power and ditch the battery.

Bookmarked here too!
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: DaOld Man on October 22, 2010, 09:12:22 am
Wouldnt something like this work?
Of course if youhave more than one or two buttons you may want to get the 5 vdc for the LEDs from the computer power supply. USB is limited to half a amp in best scenario, Im sure.
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: BobA on October 22, 2010, 09:41:31 am
Looks workable but would depend on any problem it caused with the input circuitry of the keyboard encoder.  Maybe Andy at Ultimarc would be able to best say if this will work.
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: BadMouth on October 22, 2010, 10:02:24 am
I tried something similar when trying to trigger a relay, but the voltage droped in half when the button was pressed.  (below the 3v needed to trigger the relay)  :banghead:
I stopped messing around with it at that point for fear of frying something.
I shouldn't have dropped out of electronics class.  :'(

EDIT: nevermind, I see your circuit is using external power

Would this be simple to set up with an LedWiz or UHID?

Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: :oj on October 22, 2010, 01:39:24 pm
Wouldnt something like this work?
Of course if youhave more than one or two buttons you may want to get the 5 vdc for the LEDs from the computer power supply. USB is limited to half a amp in best scenario, Im sure.

Yes, it should work. Here are another similar examples:
http://bencao74.blogspot.com/2009/07/light-up-button-mod-schematic.html (http://bencao74.blogspot.com/2009/07/light-up-button-mod-schematic.html)
and
http://bencao74.blogspot.com/2009/08/button-led-on-press-mod-for-toodles.html (http://bencao74.blogspot.com/2009/08/button-led-on-press-mod-for-toodles.html)
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: AndyWarne on October 22, 2010, 04:57:24 pm
Looks workable but would depend on any problem it caused with the input circuitry of the keyboard encoder.  Maybe Andy at Ultimarc would be able to best say if this will work.


Yes that will work fine.

The other circuit with the inverter is the worst piece of over-engineering I have ever seen!

Andy
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: BobA on October 22, 2010, 06:31:02 pm
Thanks Andy, good to get a professional opinion.

Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: MonMotha on October 22, 2010, 06:33:04 pm
Yegads, there's a few simple ways of doing this, and that circuit with the inverter is something of a wtf of overengineering, like Andy said.

If you've got LEDs without integral resistors or resistors sized for close to the pull-up voltage of whatever encoder/controller input you're using, you're in luck.  The circuit BobA posted should work fine.  Just be sure you measure the pull-up voltage on your encoder/controller input (hit it with a multimeter on voltage test with no button pressed).  It's probably 5V or 3.3V. Use that as the supply voltage for your LED, and size the resistor accordingly.

If you want to use a different voltage for your lamps than your encoder/controller uses (e.g. you've got 12V lamps or LEDs with integral resistors sized for 12V that you can't replace), the best approach is a couple MOSFETs, but a bunch of diodes also works.

All that said, I'm betting the mini-PAC is 5V, and since your LEDs are also 5V, you should be good to go with that circuit BobA posted.  Just confirm the voltage of the miniPAC first.  Most 3.3V devices don't take too kindly to having 5V dumped on their inputs (though you're unlikely to damage things - you'll just end up with an LED that's bright/dim instead of on/off).
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: drventure on October 22, 2010, 06:56:19 pm
hehe. I always sucked at EE..

DaOldman's circuit is far simpler. So what I said still stands. I'm Bookmarking this thread!  ;)
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: MonMotha on October 22, 2010, 07:00:16 pm
I'm sorry, I meant DaOldman's circuit, not BobA's.  Unfortunately image attachments don't show up in the summary while you're typing a post :)
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: BlueScreenJunky on October 24, 2010, 01:46:09 am
Wouldnt something like this work?
Of course if youhave more than one or two buttons you may want to get the 5 vdc for the LEDs from the computer power supply. USB is limited to half a amp in best scenario, Im sure.

Thank you !
That's more like what I was thinking about, and thank you Andy for confirming since my main concern was to fry my brand new mini PAC.
I will probably try that today and tell you how it went.

And yes I think USB from a computer is 500mA max, but the controller in the video is actually using USB to light the 7 buttons and the LEDs from the turntable so I guess it could work ? I have no idea how much the LEDs need.

All that said, I'm betting the mini-PAC is 5V, and since your LEDs are also 5V, you should be good to go with that circuit BobA posted.  Just confirm the voltage of the miniPAC first.  Most 3.3V devices don't take too kindly to having 5V dumped on their inputs (though you're unlikely to damage things - you'll just end up with an LED that's bright/dim instead of on/off).
Assuming I'm using my multimeter correctly (yes, I'm that bad with electronics  ;) ) the miniPAC is indeed 5V. Thanx for the heads up !
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: saloonstudios on October 25, 2010, 12:33:04 pm
hehe. I always sucked at EE..

DaOldman's circuit is far simpler. So what I said still stands. I'm Bookmarking this thread!  ;)

Yeah me too. I'm glad there was an easier way-
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: DaOld Man on October 26, 2010, 05:47:08 pm

Thank you !
That's more like what I was thinking about, and thank you Andy for confirming since my main concern was to fry my brand new mini PAC.
I will probably try that today and tell you how it went.

And yes I think USB from a computer is 500mA max, but the controller in the video is actually using USB to light the 7 buttons and the LEDs from the turntable so I guess it could work ? I have no idea how much the LEDs need.

You are quite welcome my friend.

Have you tried it yet? If so, how did it go?

Leds will draw around 20 ma each (0.020 amp)
The current is decided by what resistor you use, but there is a minimum and a maximum current limit on the LED.
Simple (and pretty accurate) formula to use to find resistor needed for LED:
RESISTOR SIZE (in ohms) = SUPPLY VOLTAGE - LED DROPPING VOLTAGE divided by LED CURRENT

An example using a LED that has a dropping voltage of 2 volts, with Current of 20 ma, and supply voltage of 5 VDC

SUPPLY VOLTAGE - LED DROP VOLTAGE= 5-2 = 3
RESISTOR SIZE= 3 / 0.020
RESISTOR SIZE = 150 ohms
To find what wattage the resistor needs to be, multiply current by voltage, or in this example 3 X 0.020= 0.06 watts.
Just use next common higher wattage, in this case 1/8 watt or higher. (0.125 watts)

To find the dropping voltage of your led, either look up the data sheet on the web, or use a digital multimeter with a diode check function. The meter will dimly light the led, and the voltage drop will be displayed on the meter. (may have to reverse meter leads if you dont get a reading).

To find current draw, look up the data sheet on the web, consult manufacturer, or a good rule of thumb is 20 ma.
Using the formula above, lowering the LED current will make the LED glow dimmer, raising the current will make the LED glow brighter, but remember that the led may burn out when it crosses over its maximum current limit. And running the current higher tends to shorten the life span of the led.

Good luck with your project and keep us informed!
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: MonMotha on October 26, 2010, 07:07:52 pm
To find what wattage the resistor needs to be, multiply current by voltage, or in this example 3 X 0.020= 0.06 watts.
Just use next common higher wattage, in this case 1/8 watt or higher. (0.125 watts)

To be clear, it's voltage across the resistor, not total voltage (supply) or LED.  You can also take the current, square it, and multiply by the resistor value, if that's easier.

Good practice is to make sure your resistor power rating is at least double that of what you're actually asking it to handle.  The reason is that they get VERY hot if you run them right at the rating (so hot you'll burn yourself if you touch them) and fail more quickly, but doubling the rating provides so much margin that you don't have to worry.  1/4W and 1/2W resistors are readily available at retail such as Fry's or Radio Shack.  1/8W and 1W+ less so, but they're out there.
Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: DeLuSioNal29 on October 26, 2010, 07:18:31 pm
Hori Real Arcade Pro 2 Light-up on press mod demonstration (http://www.youtube.com/watch?v=KgF1KIIpjDU#)

GIGAS SNAP-IN MOD (http://www.youtube.com/watch?v=_lasHw9yljQ#)

Title: Re: How to wire Illuminated buttons so that they light up when pressed ?
Post by: DaOld Man on October 26, 2010, 07:23:35 pm

To be clear, it's voltage across the resistor, not total voltage (supply) or LED.  You can also take the current, square it, and multiply by the resistor value, if that's easier.


MonMotha is absolutely correct, it is the voltage across the resistor (3 in my example), you use to figure resistor wattage.
Thanks MonMotha, sometimes I get in a hurry and leave out the small details. (You should see my life LOL)