Colour-changing Arcade Buttons using PL9823 LEDs (Patreon)
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!