Evil Genius Labs
Custom Electronic Art
Custom Electronic Art
Having already built an educational project for Maker Faire Kansas City 2017, I wanted something a little more fun and interactive. So I picked up some LED Arcade buttons and built a little LED strip control box with them, using a Teensy 3.2.
I plan to mount the control box to a table, and mount the LED strip a few feet away. The wooden box is pretty solid, and I’m hoping it can survive a weekend of constant abuse.
Name | Qty | Price | Total | Supplier |
---|---|---|---|---|
Teensy 3.2 | 1 | $19.80 | $19.80 | PJRC |
Perma-Proto Half-sized Breadboard PCB | 1 | $12.50 | $12.50 | Adafruit |
NeoPixel 144 RGB LED Strip - 1m | 1 | $59.95 | $59.95 | Adafruit |
LED Arcade Buttons | 1 | $12.88 | $12.88 | Amazon |
Wooden Box | 1 | $5.99 | $5.99 | Michaels |
SN74HCT245N Level Shifter | 1 | $0.58 | $0.58 | Digi-Key |
1000µF Capacitor | 1 | $0.62 | $0.62 | Digi-Key |
0.10µF Capacitor | 1 | $0.30 | $0.30 | Digi-Key |
330 Ohm resistor | 1 | $0.10 | $0.10 | Digi-Key |
Also needed:
Some of these parts can, of course, be obtained for less at other suppliers.
I’ll try to provide more details later, but the biggest difference with this project (compared to my other projects), was the LED illuminated arcade buttons. Five pins on the Teensy are used to read the button states and determine when they are pressed. Another five pins are used to control the button LEDs. I could have just wired the button LEDs to power and ground and kept them illuminated, but I wanted to be able to control them for more interactivity, for games, animations, etc. I tried driving them directly from pins on the Teensy, but they output 3.3V which made the LEDs very dim. I also worried about drawing too much current through the Teensy, since each LED can draw 10mA. Since I had a lot of 74HCT245 level shifter chips on hand, and planned to use one to drive the LED strip anyway, I tried driving the button LEDs through it and it worked great. The datasheet says not to exceed 35mA per output and 70mA total.
Five Teensy pins are wired to the 74HCT245 level shifter inputs, and then each button LED is wired to a level shifter output and ground. The button states can be read with digitalRead, and the LEDs can be turned on and off with digitalWrite.
I quickly got a couple of different interactive modes working:
The games took a bit longer to implement, but I was able to reuse some code from my React lamp.