Jump to content

Connecting USB Encoder - rewiring LED buttons


AussieM8

Recommended Posts

My cab is built and now looking at button wiring and I want to use my existing LED buttons  (which are left over from a few Raspberry Pi arcades).   It will be a combined two-player MAME and Virtual Pin so I have a heap of buttons compared to a standard pin, with two joysticks connected via 2 x EG Starts USB controllers.  I want to use the encoders for the "MAME" controls and  VPin input buttons (flipper, magnasave, launch, credit, extra ball, etc) and keep the pinscape for output controls as I'm only using a standalone board.

 

I've had it working with the standard setup (ie. LED's permanently on) but would like to wire the LED's as output devices to the pinscape board for DOF.    The LED buttons are the 3-wire ones with JST connectors and I've worked the pinouts (I think) and concerned that the common appears to be +5V so worried that I will fry the pinscape board if I have it all wrong.   Google has failed to come up with what I'm looking for but perhaps I'm searching the wrong terms.

 

This is what the pinouts seem to be:

 

Pin 1           Pin 2            Pin 3

||                     ||                    ||
||                     ||                    ||
||                     ||                    ||

GND           Switch          +5V

 

Button = Pin 2 + Pin 3

LED = Pin 1 + Pin 3


Can post some pics if needed but the LED buttons are the cheap Chinese kits like this:
https://www.amazon.com.au/EG-STARTS-Stickers-Illuminated-Raspberry/dp/B01N43N0JB/ref=sr_1_35?dchild=1&keywords=eg+starts&qid=1627688400&sr=8-35

 

 Can anyone point me in the right direction on the best way to rewire them to work with the KL25Z?   

Edited by AussieM8
Link to comment
Share on other sites

  • AussieM8 changed the title to Connecting USB Encoder - rewiring LED buttons

I could be wrong- but I think most people wire the LEDs of the buttons via a LEDwiz or iPac device. According to the Pinscape Build Guide:

 

Quote

The GPIO pins on the KL25Z have extremely low power limits, so you can't ever connect a feedback device directly to a GPIO pin. All devices have to be connected through "booster" (amplifier) circuits, which you have to build separately and connect to the KL25Z. You really do need boosters for everything, even small LEDs, because the GPIO power handling limits are simply too low to connect anything directly.

 

See: The Pinscape Build guide chapter 49.

 

It may be easier to get a Pac-Drive and control the LEDs from that device than geting a booster circuit for the KLZ25Z.

Link to comment
Share on other sites

Thanks for the reply and tip re: Pac-Drive.

 

I do have boosters for the Pinscape outputs but my question was more around the physical button wiring when using a 3-pin cable.  I know I can buy standard microswitches with separate switch/LED connectors but would really like to use all my existing surplus buttons. ;)

Link to comment
Share on other sites

Ok, I've made some progress and was able to rewire them but the new issue is that button inputs for each encoder are identical and I can't map them separately  ie. If I map my left flipper which is wired to the left encoder (say button 6) when I hit the right flipper,  it also triggers button 6. 

 

I think the issue is that both encoders have the same name in the controller settings which means I can't assign them as different inputs.   

 

Any ideas?

Link to comment
Share on other sites

For anyone looking at this thread in the future... after many hours researching, I decided to use Joy to Key. 

 

With this,  I could see each encoder and mapped them with the same keyboard shortcuts as VPX which worked perfectly.  I'll probably need to do the same with popper but very happy with the result. 

 

Even though it's shareware,  I felt that the USD 7.00 I paid to register was well worth it.   👍

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...