Fitting Picade Plasma Buttons

Picade Plasma Buttons are addressable RGB LED buttons that add technicolour brilliance to your Picade or Picade Console. You'll learn here how to open up your Picade, remove the existing buttons, fit your new Picade Plasma Buttons, and install and run the Plasma Button software.

The six-button kit is intended to replace the 6 buttons on the control panel next to the joystick, and the ten-button kit is intended to replace those 6 plus the 4 black buttons on the sides and front.

How Plasma Buttons work

Your Plasma Button Kit includes Picade Plasma PCBs, clear push-fit arcade buttons, and cables to connect them together and to your Picade X HAT. The PCBs in each button have data in and data out connectors and connect together in a chain with the red cables (in 10cm and 30cm lengths). The first PCB in the chain connects to your Picade X HAT with the black cable with male Dupont connectors.

Each Plasma PCB has 4 tiny APA102 RGB LEDs on. These are addressable LEDs, similar to NeoPixels, although APA102 pixels have the advantage that they can be controlled much more easily and reliably with a Raspberry Pi than can NeoPixels. When you chain together the Plasma PCBs, all of the LEDs on the Plasma PCBs form a continuous chain and each LED can be addressed (controlled) individually.

The clear buttons that come with your Picade Plasma Kit have a recess underneath where the switch and spades sit. The Plasma PCB has two small slots cutout in the middle that sit over the spades and when the spade connectors are attached to the spades the PCB is held in place. The LEDs are positioned so that they shine up through the clear button, and the white PCB bounces any spilled light from the LEDs to give them extra glow.

The data and clock pins from your Picade Plasma Button cable connect to the BTN7 and BTN8 pins on the Hack Header on Picade X HAT, and the 5V and ground pins also connect to the Hack Header.

Opening your Picade or Picade Console to fit the buttons

Open the back panel of your Picade or Picade Console, and then remove the screws holding the control panel on, so that you can lift it off. This is the only part of the cabinet that you'll have to dismantle.

Remove the spade connectors from all of the buttons that you'll be replacing, and pop all of the buttons out from the cabinet. The spade connectors on the buttons can be really hard to get back off once fitted. Whatever you do, don't pull the wires themselves, as they'll snap! You can slide a small, flat-head screwdriver into the spade connector to loosen it slightly, which should help to get them off.

You're now ready to begin fitting the new clear buttons and Plasma PCBs.

Fitting the Picade Plasma PCBs and clear buttons

One by one, pop a clear button into each button hole in your cabinet.

Read the whole of the next part before you start wiring things up!

Adding the Picade Plasma PCBs and additional wires can make things a little crowded inside your Picade and moreso if you have a Picade Console, so wiring everything up might take a little trial and error, patience, and a nice cup of tea or coffee every now and again.

If you're wiring up all ten buttons, then we'd recommend wiring the Plasma PCBs in the following order (when looking at your Picade / Picade Console from the front):

  • left side button
  • front left button
  • front right button
  • right side button
  • top right control panel button
  • top middle control panel button
  • top left control panel button
  • bottom left control panel button
  • bottom middle control panel button
  • bottom right control panel button

(If you have the six-button kit, then just wire up the latter six as suggested)

Each time, you'll be connecting a cable from the OUT of one PCB to the IN of the next. This is really important to get right. Remember that your first PCB in the chain won't have it's IN connector wired up yet, and the OUT of the last PCB in the chain won't be connected at all.

If you have a ten-button kit, then use the longer cables to go between the side and front buttons and then to the first of buttons on the control panel, and use the shorter cables to connect between the control panel buttons.

We'd recommend chaining all of the PCBs together with wires before fitting them to the buttons, as above.

Now you can go back and start connecting things up!

Once you've chained them all together, start fitting them to the buttons. Slot the Plasma PCB over the spades on the back of the button, with the plastic connectors on the Plasma PCB facing outwards, then connect the spade connectors for the button to the spades to hold the PCB in place. If the spade connector isn't gripping well, then rotate it 180 degrees and it should grip better and if it still isn't gripping then give the spade connector a gentle squeeze with some pliers before fitting it.

You'll probably need to hold the button in place from the outside of the cabinet while you're doing this, to stop them from popping out. You might also need to flip some of the buttons round if you find the wires aren't routing as well as they could.

Don't worry too much if the wires cause the Plasma PCBs to not sit completely flat on the back of the button. Even if they're at a little bit of an angle, they'll still shine all of their light through the button.

Connecting your Plasma Button chain to Picade X HAT

The black cable in your Plasma Button Kit connects from the IN connector on the first button in your chain to the Hack Header on Picade X HAT. Plug it into the first Plasma PCB now.

You'll see the pins marked on the Plasma PCB, 5V, GND, CLK, and DATA. Following the wires from the Plasma PCB connector to the other end with the male pins on, connect the 5V and GND pins to the 5V and GND (it doesn't matter which) terminals on the EXPAND side of the Hack Header on Picade X HAT. Connect the CLK wire to the terminal marked BTN8 on the Hack Header, and the DATA wire to the terminal marked BTN7 on the Hack header.

Picade Plasma software

Installation

To make your Plasma Buttons GLOW, you'll need to install our Picade Plasma software. Like many of our other bits of software, we've got a handy one-line-installer that will set the software up for you.

Assuming you're using RetroPie, press F4 to exit EmulationStation and drop into the terminal. Type the following to run the installer for the Picade Plasma software:

curl https://get.pimoroni.com/plasma | bash

The Picade Plasma software consists of two parts: the plasma plugin itself that runs the lights, and plasmactl which allows you to set different patterns for the lights, and tweak a few things. By default, when you install the Plasma software, it'll run the rainbow animation pattern.

Starting and stopping the lights

Let's look at how to do a few things with plasmactl. You'll need to do this in the terminal.

First, we'll stop the lights, and there's a couple of different ways to do that. The first is just to set them all to black. Doing it that way means that the daemon (the plasma program that runs the lights) is still running, so you don't have to worry about restarting it again. Type the following:

plasmactl 0 0 0

If you want to stop it altogether, then you can type sudo systemctl stop plasma to stop the daemon, and sudo systemctl start plasma to start it up again.

Setting solid colours

You can set solid colours in the same way that we set all of the lights to black, i.e. by passing an RGB colour to plasmactl. Let's try setting the lights to cyan. Type the following:

plasmactl 0 255 255

Try a few other colours, like magenta (255 0 255), red (255 0 0), blue (0 0 255), and so on.

Animations

There's a nifty way to set animations on your Plasma buttons. You can create a 24-bit png image that will be cycled through from top to bottom at 30FPS. The horizontal size of the image controls how the animation is applied to the buttons, as follows:

  • 1 pixel - will be duplicated to every LED
  • 4 pixels - will be duplicated to every button
  • 36 pixels - individual LED values for 6 buttons
  • 40 pixels - individual LED values for 10 buttons

The vertical size of the image determines how long each cycle of the animation will take, e.g. a 30 pixel tall image will cycle every second, since the frame rate is 30fps, and 300 pixel tall image will cycle every 10 seconds, and so on...

You can see some examples of png files here.

To list all of the installed patterns, you can type:

plasmactl --list

And to change to a new pattern, you can type:

plasmactl rainbow-cycle

If you want to design and add your own animations, then you can copy the image across to your Picade, then do the following to install and start it:

plasmactl --install my-animation.png
plasmactl my-animation

Note that the name of the animation is just the image filename without the .png on the end.

Shopping basket

Need something for this project? You can use the links below to add products to your Pimoroni Shop basket for easy checkout.

Picade Plasma Kit - Illuminated Arcade Buttons
6-button kit £35.00
Picade Plasma Kit - Illuminated Arcade Buttons
10-button kit £50.00
Picade
£150.00
Picade Console
£60.00
Raspberry Pi 3 B+
£34.00
Official Raspberry Pi Universal Power Supply
£8.00
NOOBS 16GB microSD card (2.8)
£9.00
Want to checkout or change something? Click here to view your cart.

Tutorial
Intermediate
Raspberry Pi

Sandy Macdonald

sandy@pimoroni.com
@sandyjmacdonald
http://sandyjmacdonald.github.io
Formerly, Sandy worked at the University of York, in the biology department, analysing data and telling people that they should have used more replicates. Now a fully-fledged crew member at Pimoroni - head of digital content - working on learning materials and digital chunterings. Find him on Twitter and most everywhere else, as sandyjmacdonald.