Introduction: Game Cabinet Lighting With Neopixels

I put together some ikea cube shelving and wanted a place to keep my game consoles while also displaying them. I started with 3d printing some vertical stands for the PS4, WiiU, XboxOne along with some controller hangers and riser shelves. I then added puck lights to the surrounding shelves, but wanted special lighting for the game shelves.

This is how to make color changing lights based on which system or systems are powered.

Note: The octopart links find inventory from multiple distributions. Pick whichever one you like.

Note: We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.

Supplies

Step 1: Solder Backpack PCB

In the schematic you can see three inputs into the Trinket. I use diodes so each input is both isolated and can power the trinket.

  1. Solder the 10k resistors and diodes to the backpack, then wire into the trinket.

I ordered a PCB from oshpark. For a flat $5, OSHPark will sell you three PCBs with free shipping and a turnaround of about 2 weeks. You don't have to order the PCB to make this circuit, but it does makes things cleaner.

Note: On the PCB, there is a RGB LED and three 220 ohm resistors on the backback pcb for debugging and not included in the parts list, leave them unpopulated.

Pin Assignments

Not all pins on the Trinket are equal. Be sure to read Adafruit's help pages https://learn.adafruit.com/introducing-trinket/pinouts Pins 3 and 4 should not be used as inputs and will conflict with talking to a PC for programming.

  • GPIO #0 - Red Input, Attach to +5V wire from the first USB cable
  • GPIO #1 - Blue Input, Attach to +5V wire from the second USB cable
  • GPIO #2 - Green Input, Attach to +5V wire from the third USB cable
  • GPIO #3 - Neopixel Data
  • GPIO #4 - Potentiometer (optional)

Not shown in the schematic is the potentiometer on GPIO #4, that is optional if you want to change the colors after assembling. Is a pretty neat feature, I recommend the potentiometer if you plan on using my arduino code unmodified.

I also added a quick disconnect to Pin 4 so when I wanted to connect to the PC, I could remove the potentiometer without soldering.

Step 2: Wiring Assembly

If you have access to a 3d printer, an enclosure stl is provided. Thread the cables through the enclosure sides before soldering.

  1. Strip the USB cables and identify the 5V and Ground wires. Use a multimeter to be sure, but the 5V and Ground wires can also be identified by thickness. The power wires should be thicker than the data wires.
  2. Take apart the puck light and remove the PCB. Recycling the wiring that came with the puck light to wire into your neopixel rings.
  3. Use hot glue or epoxy to add the neopixel ring behind the puck light's diffuser.

Step 3: Programming

Use the arduino ide and adafruit neopixel library and adafruit trinket board package. Be sure to read Adafruit's help pages for each module.

If you followed my pin assignments, you can use the code without modification. After you get the neopixels to light up and changing based on which USB cable is powered. You can explore modifying the colors and animations.

Step 4: Usage, Testing, and Setting Colors

After initial programming, when you plug in each of the three USB cables you should see the ring light up red or blue or green. Combinations are allowed.

If you installed the optional potentiometer, you can change the color selected by a USB cable without reprogramming using a PC. There are 16 colors preprogrammed to select from.

Changing Color Programming without PC

  1. You will need two USB power ports to plug into.
  2. Connect the Micro USB on the trinket so power remains on while the other USBs are unplugged. Leave this plugged in throughout these steps.
  3. Take the USB cable you want to configure and plug it into your power block.
  4. Wait 5 seconds (or just wait for the animation to complete)
  5. Rapidly unplug and plug the cable in four times, ending with the USB plugged in.
    1. You must complete this four times, before the spinning animation ends.
    2. If you do it right, the animations will stop and you will see a steady light.
    3. If you mess up, wait 5 seconds before trying again.
  6. Slowly rotate the potentiometer to select the color.
  7. Unplug the USB cable to save the color selection.

Step 5: Additional Notes

Cloud Controls

I used the NeoPixel ring and Trinket I listed above because that is what I had extra. If I were to make one from scratch, I would use the RGBW Neopixel Rings and Arduino NANO 33 IoT instead. So I could use the Puck Light for normal lighting with commands to Alexa to change colors too!

More Info: https://blog.arduino.cc/2019/11/12/create-a-voice-controlled-device-with-alexa-and-arduino-iot-cloud-in-7-minutes/

Xbox One needs a workaround

Unlike my PS4 and WiiU that can be configured to turn off USB ports to save power when off, the xbox has no setting. Plugging in the xbox, the light is always green.

The workaround is the same trick I use to switch power lights and amps on/off in my arcade machine builds. I use something called Smart Strip. Capable of auto switching AC outlets off when the main device is off. Credit for the idea here.

Using the smart spike strip, I can power a USB power brick only when the xbox is actually on. Here is the one I am using: https://amzn.to/3lDlC3T #ad