Home Creators Posts Import Register Favorites Logout

Downloads

Content

This is just a little mini tutorial video about how you can create a colour-changing illuminated arcade button, using a special LED called a PL9823. 

PL9823s work in a very similar way to "Neopixels" (WS2812B) - in that they are individually-addressable RGB LEDs that can be chained together in series and controlled from a single GPIO pin on the Arduino. The main difference is that, instead of flat LEDs supplied on a long strip, they have the same form factor as a regular 5mm LED. Other differences are that they use RGB byte-ordering rather than GRB, they don't require a series resistor on the data line, and when they first startup, they light up while waiting for a valid data signal, whereas Neopixels remain off.

I've placed them in an illuminated arcade button as a way to demonstrate one possible use - extending the functionality of a button from a simple on/off state to a multi-state machine, indicated by red/green/blue, or any number of discernible hues. It would be easy to think of escape room games that could use this kind of technology, requiring players to press an array of buttons to set them to display a particular colour sequence, for example. However, you can basically use them in place of a regular LED in any Arduino-controlled project. 

The trickiest part of using them was working out how to be able to fit the wires needed (DataIn, +5V, GND and, if using more than one LED in a chain, DataOut) into the housing of the LED holder without interfering with the operating of the button microswitch. To do this, I designed a new button holder which fed the wires out of the side of the microswitch support, and I attach a STL file which can be sent to a 3D printer. If you don't have access to a 3D printer, you could probably drill holes in the side of the LED holder that comes with your button!

You can buy PL9823 at e.g. Amazon (https://amzn.to/2MuLYGn) or AliExpress (https://www.aliexpress.com/item/32713415710.html).

You can buy the arcade buttons from BangGood (https://www.banggood.com/12V-25A-Round-Lit-Illuminated-Arcade-Video-Game-Push-Button-Switch-LED-Light-Lamp-p-1044391.html?ID=233&cur_warehouse=CN&p=VP240122576862201806&custlinkid=437467)

I fine Neopixels/WS2812B very useful, and I know they are used for lighting effects in many escape room props, but though you might be interested to know about the PL9823 as a similar alternative, and very useful to replace a regular LED in existing components such as an arcade button. Please ask if any questions about their usage!

Files

Colour-changing RGB Arcade Buttons

In this video, I'll demonstrate how you can use a PL9823 individually-addressable LED to create an illuminated arcade button that changes colour each time you press it. This gives you the capability to create tri-state (or more!) buttons, which toggle through an array of colours with each push. PL9823 work in a similar way to "Neopixel"/WS2812B LED strips, except they come supplied in the same form factor as a regular 5mm LED, thus you can use them in place of a regular LED in any project so long as you accommodate GND, +5V, and a data wire. Like Neopixels, they can be chained together in series and controlled using a single Arduino GPIO pin, which can set different colours, fade brightness, set chase patterns or other animation sequences using a library like FastLED : http://fastled.io/ You can buy PL9823 at e.g. Amazon (https://amzn.to/2MuLYGn) or AliExpress (https://www.aliexpress.com/item/32713415710.html). You can buy the arcade buttons from BangGood (https://www.banggood.com/12V-25A-Round-Lit-Illuminated-Arcade-Video-Game-Push-Button-Switch-LED-Light-Lamp-p-1044391.html?ID=233&cur_warehouse=CN&p=VP240122576862201806&custlinkid=437467) You can view the wiring diagram, Arduino code, and the .STL file for my LED holder from my Github page: https://github.com/playfultechnology/arduino-fruitmachine/tree/master/FruitMachineButtons

Comments

epicescapeltd

Hi Alistair, great idea with this - but can I pick your brains on how to adapt it please! I need 5 LEDs controlled with 5 buttons, and they need to be set to a specific colour sequence to activate a relay. I have got 5 buttons each controlling one LED, but I need them to cycle through a predefined set of RGB or HEX values (rather than just increase hue by xx amount). What is the best way to achieve this? Define the 5 colours in an array and then have each LED cycle through the array, and activate the relay when the correct pattern is achieved? Thanks! Matt

Krista Jones

Hi, Alastair! It seems like the led arcade buttons (including the one linked to in your post) always come with a colored top button...do you just pick the white and the LED shines through enough or did you find one with a clear/translucent top? Thanks!