[GUIDE]Arcade Stick custom RGB-LED Mod

By Daora

https://discord.gg/XqU7RCVwhw

Join the Discord Server if you have questions

Fight Lights Pico - Add motion inputs and Animations

Check out the website: https://fight-lights.com/

Hello, in this guide I would like to explain to you how to install your custom RGB LEDs for your Arcade Stick which can react to button inputs.

To give you an idea how it might look in the end :

Arcade Stick custom LED mod

Qanba Obsidian LED MOD : r/fightsticks

Qanba Obsidian - Custom LED Mod with fade.

  1. What you will need:

It is not required to do it with a brook board, but in this guide I will only explain it with a brook board, since it has all the necessary pins for an easy to follow guide. If you can find a way to power the Raspberry pi pico and the LEDs with the pcb of your arcade stick, a brook board is not required.

They need to be able to be powered by 5V. They come in Strips of like 60 LED’s and you will only need 1 per button, so you will have plenty of spare and lots of room for mistakes. They are also very cheap. A strip of 60 goes for less than 10$ on Amazon.

The LEDs should look something like this:

with 2 GND contacts, 1 DIN, 1 DO and 2 5V

Alternatively you can also use LED-Chips like these. They have a different form factor and may suit your buttons better. They do have all the same connections a LED strip does, so everything in this tutorial applies to them as well. They may also be easier to solder.

 They are needed to connect the pins of the fighting board to the pins of the raspberry pi pico. If the header pins on your pico are female, get female to male jumper wires. You will only need like 20, but it is recommended to have at least 30 (you never know)

It is easier to work with slim wires. I used 22AWG and they were slightly annoying to work with. If you have lots of spare jumper wires you can also just cut the ends off and use them as regular wires.

These are used for pull-ups on the pico pins which are connected to the mode select pins on the Brook board.

This might also occur on other Brook boards like the Zero Pi, but I will explain it only for the UFB, but the method can be used for both boards. Check out the blue section below for more details

To make things more durable and avoid shorting some circuits on your LEDs, 100% optional though.

Any cheap soldering iron and solder will do. You don’t need to solder anything fancy or fragile, so you don’t need to be very skilled at all (I am horrible at soldering myself). The hardest thing you need to solder is connecting the LEDs with wires.

Assuming that you already own a brook fighting board and a soldering iron, everything else together might cost you less that 25$

(~5$ for the pico, 10$ for wires and ~10$ for the LEDs)

  1. Setting up your Pico:

We will be using MicroPython to control the LEDs and Thonny to flash the Program to the Pico. There are plenty of guides on the Internet on how to set up your Raspberry pi pico and Thonny, so I won’t explain it here. Here is an easy to follow video guide:

https://www.youtube.com/watch?v=_ouzuI_ZPLs

After you have your pico up and running with MicroPython and Thonny, we need to flash the program on the pico. First download the code from here:

https://github.com/DaoraDio/Fightstick-LED-Code.git

Click on code and Download ZIP

(this screenshot is of older code, so don’t get confused)

After you have downloaded the code you will find a zip file. Extract the zip file on your Desktop or anywhere you prefer. In there you will find 7 *.py files a README file and a folder named Configurator. You can delete the README file.

Now open Thonny, go to View and click on Files

It should open a File Manager on the left side. Browse to the location where you saved the Code, select all 7 *.py Files with shift+left mouse button, press the right mouse button and select “Upload to Raspberry Pi Pico”

(this screenshot is of older code, so don’t get confused)

Below the Files tab there should be your 7 Files uploaded to the Pico. doubleclick on the main.py and press the green ‘Play’ button. This will load the Program onto your pico. The onboard LED of your Pico should

now light up.

(this screenshot is of older code, so don’t get confused)

This is it for now with Software. Your pico is now ready to display the LEDs. We will later need to revisit Thonny though to configure the LEDs with the buttons. And to customize the code to your liking.

  1. The Neopixel LEDs

The LEDs on the LED-Strip are too close and too rigid to be used like that in an Arcade Stick, so we need to cut them, as shown in the picture below. Cut out as many as you want to use in your Project. I want to use 8 LEDs, for the 8 front buttons only. You are not limited on how many LEDs you use per button, you could also use 2 or 4 LEDs per button. And don’t worry about damaging the LED Strip when cutting, they are meant to be cut!

Important!

Plan how you want to place the LEDs in your arcade stick. How much space you need between each LED and how to attach them to your buttons. Where you want to place your Pico in your arcade stick and how long your wires need to be. Where your LEDs need to curve etc. So take your time and consider everything carefully!

It will look something like this in the end.

Now it's time to solder the LEDs. The LEDs have 6 connections, 2 for GND(ground), 2 for +5V and one Data in (DIN->) and one Data out (DO).

The LEDs need to be soldered into a continuous strip, because the incoming data from the Raspberry pi pico needs to be passed down through every LED.

Just as they are on the LED Strip, that's how you have to Solder them back together. Be careful to always solder a DO of an LED to a DIN of the other LED. +5V to +5V and GND to GND

The first LED that you should solder is the one that connects to the Pico. Get 3 jumper wires and cut off one of the ends and strip off some of the insulation to expose some of the copper. Also get 3 normal wires, cut them to length, strip off some of the insulation on both sides to expose the copper.  Solder the exposed wire copper ends of the jumper cables with the ‘normal’ wires and solder the other end of the ‘normal’ wire to the LED. It should look something like this

(optional) if you have some heat shrinking tube insulate the exposed copper/solder in the middle

Now we can test if we have done everything right so far. Connect the GND wire to one of the GND pins on the pico, pin 38 for example. Connect the DIN wire to GP0 (pin1) of the pico and the +5V wire to VBUS (pin40). If you now connect the pico to your PC the LED should light up! After roughly 30 seconds it should also display some colors.

Now for the rest of the strip:

Cut your wires to length, take off some of the insulation on the ends to expose the copper and solder the ends to the LEDs to establish a connection. If done correctly it should look something like this:

(as you can see I kind of burned the plastic on the left LED a little bit while soldering but the LEDs still work flawlessly, so no need to be delicate with them, they are very durable)

After soldering a new LED, always check if they are working. So connect them to your pico, plug it in and see if they light up. If they don’t light up somewhere, some of the solder or copper might be touching.

If only the first 8 LEDs light up and nothing further then it's probably because of code and not because of your wiring. To fix that, go to the config.py and change the variable led_count from an 8 to whatever the amount of LEDs you have. More details in the section “Modifying the code”

Do this with all your LEDs. If you are done, you are basically finished. Plug them in one last time to see if they all light up properly and wait 30 seconds for the colors to change. If they do, they work and communicate properly with each other.

  1. Connecting everything together

On the bottom left of the board marked with (J4) you can see the 20 Pin connector of the Brook PS4+ Fighting board (most Brook boards have them). Every time you press a button they send a signal. We direct that signal to the Raspberry pi pico and tell the pico to light up the LED on position X (the LED that is under the button we pressed)

So first we need to position the LEDs. Attach your LED-Strip to your buttons by whatever means work for you. I simply used Electric tape to tape the LEDs to the buttons. In the end it should look something like this:

So if I press R2 i want the LED on position 1 to light up, or if I press Triangle i want the LED on position 6 to light up. The first LED that is connected to your Pico is LED 1, the one connected to that is LED 2 and so on.

Again: Connect the GND wire of your LED-Strip with one of the GND pins on the Pico and connect the DIN wire to GP0 (pin1) on the Pico. You can take off the VBUS connection.

Below you see the 20 pin connector diagram of the brook fighting board. Be aware of the orientation of this diagram and the real pins on your board. Always check where the ‘20’, ‘19’ and ‘1’, ‘2’ markings on your board are

We want the Pico to get its power from the fighting board instead of the usb port, so when we plug the Stick in, the Pico should start simultaneously and light up the LEDs. To do that, use the jumper wires to connect one of the VCC pins on the brook board to VSYS(pin39) on the Pico. Connect one of the GND pins of the fightingboard to one of the GND pins of the Pico. Now connect the other VCC pin of the fightingboard to the +5V wire of your LED strip.

(complete wiring diagram below)

Connect the pins with the button names on the brook board to the GPIO pins of the pico according to this:

up - gp1

down - gp2

right - gp3

left - gp4

select - gp5

ps - gp6

start - gp7

square - gp8

triangle - gp9

r1 - gp10

l1 - gp11

circle - gp12

X -  gp13

L2 - gp14

R2 - gp15

I would recommend connecting all the pins from the brook board to the pico. This way you can control your leds indirectly with buttons which don’t have LEDs underneath them. E.g. light up all of your LEDs when you press start or light up leds with your lever, even though the lever doesn’t light up itself, you can light up different portions of the LEDs corresponding to the direction you pressed.

-------------------------------------------------------------------------

This step is only needed when using a Brook Universal Fighting Board, skip this blue section if you use another board

Since the Pico has its Pins on LOW when resetting, and the UFB detects an input when a Pin is pulled LOW, on startup, the UFB thinks that all buttons are pressed and changes its input mode, to something like a classic PS-Controller, which is not a behavior that is wanted. Sadly software is not fast enough to set the Pins to HIGH at startup, that's why we have to do it with Hardware.

Solder one side of each resistor to the 3V3(OUT) of the Pico, solder the other side to these pins on the Pico:

It is best to do it on the side of the pico where the jumper wires are not connected.

ps/xb/home - gp6

1p - square - gp8

2p - tri - gp9

3p - r1 - gp10

4p - l1 - gp11

2k - circle - gp12

1k - x - gp13

3k - r2 - gp15

These pins, when held down, and then connecting the brook board to the PC, change the input mode for different consoles of the brook board:

If you are using a different brook board, and it shows as a different input on your PC  when the LEDs are connected, check out the Brook website which Pins are used to change the input, and connect those pins on your Pico with 10k Ohm resistors to the 3v3(out) line. It should look like this in the end:

—--------------------------------------------------------------------------------------------

If you have wired everything, We are basically done at this point. Now plug in your fighting board and see if it powers the pico and the LEDs. If it does, press some buttons and see if the LEDs light up. Some LEDs might light up in the wrong position, that's ok, we will fix that next.

(don’t close your case just yet we will need to plug in the micro usb one last time)

  1. Modifying the code

Now that the pico is up and running and the LEDs are connected we can fix the positions of the LEDs.

Go to the folder where you extracted the files. Open the Configurator folder and open the index.html with any browser.

It should open a page like this:

Here you can create and edit config files with the help of an user interface. Click the blue space on the top left and open the config.py file you saved.

The page should now fill up with the configurations of that config.py file.

Again, set the number of LEDs to the amount of LEDs you have in your

LED chain. Since we use 8 LEDs we keep it at 8.

 

The middle section is what we need to change for the wrong LED positions:

Here the buttons are defined. The name of the button, the LEDs which light up when pressing that button, the color the LEDs take, whether the button has fade or not  and the GPIO pin and the brightness of the color when pressed.

What we need to change are the LED positions.

My LED chain was wired like this:

That's what the LED positions are. R2 is our first LED, hence it has LED position 1, Triangle LED 6 etc. If you need to change the position of a button, click on the row of that button and click “Set LEDs”

It should open a small window where you can set the LED positions:

Tick the LED positions for your button and click save. Checking boxes LED 5 and LED 8 would make LED 5 and 8 light up when pressing square.

Set the button colors and fade however you like and press the Download code button on the top right. It should download a config.py.

 Upload this config file via Thonny onto your pico.

Open Thonny. And click the red stop button.

If you get a message saying ‘Device is Busy’ do this:

  1. Unplug your Pico
  2. Press the red stop button in Thonny
  3. Plug in your Pico again
  4. Press the Red stop button again
  5. You should now be able to access the files on your Pico

(this screenshot is of older code, so don’t get confused)

Either delete the config.py file and replace it with the one you downloaded (be careful that the file is named config.py) or just replace the content of the one on your pico with the one you downloaded. Click the save icon.

Now switch back to the main.py and press the green button. The program should run again and your buttons should light up at the correct positions.

Congrats! You are done!

If you want to make other changes here are some explanations:

These are the colors your pico knows. If a button color is set to random it will randomly choose one of those colors. Add or update colors however you like.

This is the leniency control. When your button colors are set to random and you press 2 or more buttons at the same time they will all get a single color indicating that you correctly pressed them simultaneously. This variable controls how lenient the recognition is, the higher the value the easier it will be to get the same color when pressing buttons at once.

Check the box to disable this feature.

This is the profile color. During ‘LED_options mode’, this will let you help recognize the profile during selection.

This is the brightness the LEDs start at when plugging the stick in.

In ‘LED_options mode’, this controls how much the brightness increases or decreases. At 10 Steps it takes 10 steps to go from 100% brightness to 0% for example.

The LEDs go into an idle_mode after a certain amount of seconds.

There are 3 types of idle modes as of now. Breathing mode, color palette and lights out (leds turn off when entering idle mode). Breathing mode can be configured further by clicking the ‘cog’ button on the left. Disable Idle Mode altogether by checking the checkbox.

This controls how long it takes after your last button press to enter Idle Mode

In LED option mode you can increase the brightness of your stick and change profiles during play. Click the ‘Configure LED Option Mode’ button to change button bindings.

It should open a popup like this:

Here you can configure which buttons we have to press to enter led options mode, how long to press them and which buttons increase/decrease the brightness and which ones select the profiles. In this example I would need to hold the start+select button for 3 seconds to enter LED Options mode.

The up button would increase the brightness of the LEDs and the down button would decrease them. Left and right select the profiles and x to confirm.

This controls whether the background gets turned off temporarily, while a button is pressed. Check if you want to clear the background on button press else uncheck.

Click the ‘Set Background Colors’ to set the background colors of your LEDs.

Background colors are the default colors the LEDs take when nothing else lights up that LED.

Pressing it will open this popup window where you can set the brightness and the color for the LEDs. Here when nothing else lights up those LEDs, LEDs 1-4 will be blue with 5% brightness and LEDs 5-8 will be red with 10% brightness. The colors are taken from the color table. The option ‘Rainbow’ will circle the LEDs color through the RGB spectrum.

This controls the speed at which the LEDs fade. The higher the value the faster the fade effect.

The Fade out Speed is the fade when the button is released.

Fade in speed is the fade while a button is pressed. The LEDs will slowly fade into the selected color of the button.

These variables can also be floating point numbers. For example 0.1 would be a really slow fade. At 100 or above the fade is instant.

It can currently be only changed by code alone.

This controls the leniency for motion input recognition, more about that here: Fight Lights Pico - Add motion inputs and Animations

The pico creates a File which logs the number of button presses you have done for each button and the runtime of the pico. If you do not want the stats logged, uncheck it.

After you are done with your changes, download the code by clicking Save Code and replace the content of the config.py with the one you downloaded.

Always save (Disc Icon), then switch to the main.py and press the green play button.

Creating new profiles

Profiles are just alternative config.py files which you can load during play They are created by the configurator just as any other config.py file.

The file name needs to be config1.py if it's your first profile (after the config.py), config2.py for the second etc.

The numbers need to be in ascending order and cannot have gaps.

The config.py is the profile that gets loaded on bootup; When changing profiles via LED options mode, the profile will become the config.py and your original config.py will take its name and place.

In the end it may look something like this:

In this example I have 4 profiles in total that I can choose between. I can now change between those profiles by entering LED Options mode. By default pressing left/right will select profiles and x will load the selected profile.