The NEW Build Your Own Arcade Controls

Main => Main Forum => Topic started by: BillytheGoat on July 26, 2018, 03:39:33 pm

Title: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: BillytheGoat on July 26, 2018, 03:39:33 pm
I picked up a 2 player joystick/button kit on amazon an built myself a little console.  It came with the usb to joystick zero delay encoder.   Everything works fine, but just for fun I picked up an illuminated button for the coin button.   I understand how to wire the switch, but is it possible to wire the LED light using this Zero Delay Encoder or by some other simpler method that just taps into the USB? 

Easy Get Classic Arcade Kit
https://www.amazon.com/gp/product/B00WDQWK5M/ref=oh_aui_search_detailpage?ie=UTF8&psc=1 (https://www.amazon.com/gp/product/B00WDQWK5M/ref=oh_aui_search_detailpage?ie=UTF8&psc=1)

Just the Encoder with pics on left via Amazon:
https://www.amazon.com/Easyget-Joystick-Raspberry-Retropie-Projects/dp/B01C5J5AJO/ref=sr_1_1_sspa?s=toys-and-games&ie=UTF8&qid=1532633803&sr=1-1-spons&keywords=Zero+Delay+USB+Encoder&psc=1 (https://www.amazon.com/Easyget-Joystick-Raspberry-Retropie-Projects/dp/B01C5J5AJO/ref=sr_1_1_sspa?s=toys-and-games&ie=UTF8&qid=1532633803&sr=1-1-spons&keywords=Zero+Delay+USB+Encoder&psc=1)

Again, it's the only LED in the console and I do have a few button slots open.  What's the best way to wire it so that it's always on without screwing anything up on the Encoder, or if it's just not possible with this encoder, please let me know.  It's not a big deal.  Just something I wanted to try on a whim.

Thanks!
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: JudgeRob on July 26, 2018, 04:55:48 pm
I assume your LED is rated at 5v or higher.  Just tap into the USB power with a 330 resistor.  If it is too bright, use a bigger resistor.
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: BillytheGoat on July 26, 2018, 06:02:09 pm
JudgeRob,

So wire for the LED the same way I would wire a switch for a button?   I don't have a resistor handy.  What's the harm in running it without one?  Burn out the bulb too fast or be too bright?  Would running without a resistor do any harm to the encoder, cause a safety issue or be a cause of concern for any other reason?

Here's the button on amazon:
https://www.amazon.com/gp/product/B07BNFXLZ1/ref=oh_aui_search_detailpage?ie=UTF8&psc=1 (https://www.amazon.com/gp/product/B07BNFXLZ1/ref=oh_aui_search_detailpage?ie=UTF8&psc=1)

Description:  The led lights have to distinguish between positive and negative interface. If not bright. Please change the LED interface.
Supports DC 12V power.

thanks for the reply!
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: PL1 on July 26, 2018, 08:12:17 pm
So wire for the LED the same way I would wire a switch for a button?   
Close, but not quite.

Wire the LED circuit separate from the switch circuits.

It looks like the ZD encoder circuit board has 5v and ground available based on the red connectors in this pic.
- The boards you linked to don't have the red connectors, but you should be able to solder wires to the through-holes of one connector and use 0.250"/6.3mm Quick Disconnects to attach the wires to the "stirrup" tabs on your LED button.
- Since you're only powering one LED, current draw shouldn't be a problem.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=154794.0;attach=360395;image)

If that doesn't work, keep in mind that ZD encoders are "active high" devices.
- The outer pins are all tied to 5v so you can use one of them for the LED anode. (+)
- The only thing remaining is to find a ground for the LED cathode. (-)
-- The microswitch circuit draws less current than the LED circuit so you do not want to use an input port to ground the LED.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=103207.0;attach=173166;image)

I don't have a resistor handy.  What's the harm in running it without one?  Burn out the bulb too fast or be too bright?  Would running without a resistor do any harm to the encoder, cause a safety issue or be a cause of concern for any other reason?

Here's the button on amazon:
https://www.amazon.com/gp/product/B07BNFXLZ1/ref=oh_aui_search_detailpage?ie=UTF8&psc=1 (https://www.amazon.com/gp/product/B07BNFXLZ1/ref=oh_aui_search_detailpage?ie=UTF8&psc=1)

Description:  The led lights have to distinguish between positive and negative interface. If not bright. Please change the LED interface.
Supports DC 12V power.
No worries.

Good news, part 1:  There is already a current-limiting resistor in the LED holder.
- No need for a second resistor, especially since the LED is rated for 12v.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=132511.0;attach=289941;image)

Good news, part 2:  The 12v LED will also run on 5v. (see pic above)
- Not quite as bright, but the LED will draw less curent and last longer.
- Instead of the LED drawing about 20mA @ 12v, it draws 5.83mA @ 5v.

Good news part 3:  If it isn't as bright as you'd like, you can swap the wedge-base 12v LED for a 5v LED.


Scott
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: Nephasth on July 26, 2018, 11:58:59 pm
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=131366.0;attach=286615)
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: BillytheGoat on July 27, 2018, 01:10:15 pm
So wire for the LED the same way I would wire a switch for a button?   
Close, but not quite.

Wire the LED circuit separate from the switch circuits.

It looks like the ZD encoder circuit board has 5v and ground available based on the red connectors in this pic.
- The boards you linked to don't have the red connectors, but you should be able to solder wires to the through-holes of one connector and use 0.250"/6.3mm Quick Disconnects to attach the wires to the "stirrup" tabs on your LED button.
- Since you're only powering one LED, current draw shouldn't be a problem.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=154794.0;attach=360395;image)

If that doesn't work, keep in mind that ZD encoders are "active high" devices.
- The outer pins are all tied to 5v so you can use one of them for the LED anode. (+)
- The only thing remaining is to find a ground for the LED cathode. (-)
-- The microswitch circuit draws less current than the LED circuit so you do not want to use an input port to ground the LED.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=103207.0;attach=173166;image)

I don't have a resistor handy.  What's the harm in running it without one?  Burn out the bulb too fast or be too bright?  Would running without a resistor do any harm to the encoder, cause a safety issue or be a cause of concern for any other reason?

Here's the button on amazon:
https://www.amazon.com/gp/product/B07BNFXLZ1/ref=oh_aui_search_detailpage?ie=UTF8&psc=1 (https://www.amazon.com/gp/product/B07BNFXLZ1/ref=oh_aui_search_detailpage?ie=UTF8&psc=1)

Description:  The led lights have to distinguish between positive and negative interface. If not bright. Please change the LED interface.
Supports DC 12V power.
No worries.

Good news, part 1:  There is already a current-limiting resistor in the LED holder.
- No need for a second resistor, especially since the LED is rated for 12v.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=132511.0;attach=289941;image)

Good news, part 2:  The 12v LED will also run on 5v. (see pic above)
- Not quite as bright, but the LED will draw less curent and last longer.
- Instead of the LED drawing about 20mA @ 12v, it draws 5.83mA @ 5v.

Good news part 3:  If it isn't as bright as you'd like, you can swap the wedge-base 12v LED for a 5v LED.


Scott

Wow, that you for the thoughtful and time consuming response.   Much appreciated.   I don't have the time or will to drag out the soldering iron right now, but when I do I'll have all the information I need to do the job.  Maybe in a week or so.  I'll post back if I'm able to get it done.  Nephasth offered a reply after yours where he indicates the power/ground on the backside for the USB.  I feel a little more confident about this location because its' more clearly marked as ground and power.   I might just do it that way instead of using the d3 section.  Again this whole thing with the LED is just playing around on a shabby prototype console built, so I'm not afraid to experiment a little.


I believe you when you said I couldn't just use a switch button.  It seems to me this would work to turn on the light, but then mame would think I'm always having one button pushed when it's really just the light, and this would cause further problems with button assignments.  Is that the extent of the problem with using a switch button to wire it, or is there more to it than that? 
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: JudgeRob on July 27, 2018, 04:11:18 pm
Don't pull it through a switch port.  It might be able to handle the LED current but it's unknown unless you have the microprocessor specs.  Neo's pic is what I would do. Pull it straight from the usb power.
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: PL1 on July 27, 2018, 04:32:58 pm
On second thought, Neph's plan to tap in at the USB input is much easier -- unless you get a board with the red connectors already installed.   ;D

I believe you when you said I couldn't just use a switch button.  It seems to me this would work to turn on the light, but then mame would think I'm always having one button pushed when it's really just the light, and this would cause further problems with button assignments.  Is that the extent of the problem with using a switch button to wire it, or is there more to it than that?
Without getting into the math, an LED uses way more current to generate light than an input port uses to determine if a switch is open or closed.

In plumbing terms, picture how little water (current) would flow through a fire hose (LED) connected to a garden hose (input port).

Yes, there's a fire hose in the setup, but there won't be enough water passing through it to fight a house fire.   :lol


Scott
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: BillytheGoat on July 28, 2018, 12:32:43 pm
Okay, thanks for the follow ups and explanations.  I'll dig out my solder gun and give it a try when I get a chance.  :)
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: BillytheGoat on July 31, 2018, 02:02:57 pm
I finally got a chance to solder as Nephasth indicated and it works great. No resistor needed.

Just wanted to say thanks.
 :cheers:
Title: Re: Use Zero Delay Arcade USB Encoder Joystick with ONE illuminated button?
Post by: Nephasth on July 31, 2018, 07:01:27 pm
 :cheers: