Main Content

My sons wanted color LED strips to light up their desks, and I didn’t want to use a canned RGB strip controller, because I knew they’d get bored with the fixed patterns these controllers have. I also thought it would be a great opportunity to create a teaching tool for them that they could use to sharpen the programming and electronics skills I’ve been teaching them. This is the result.
I’m going to show you how to build this simple, programmable RGB LED strip controller using an Arduino Uno (or Nano), an Adafruit Trellis, and a handful of other parts.
The Adafruit Trellis is one of my favorite new toys from Lady Ada and crew. First of all, it’s a mere $9.95 for the board, and another $4.95 for the silicone elastomer button pad (prices as of this writing). That’s a great deal for a 16-button 4x4 matrix with LED capability. It doesn’t come with any LEDs mounted, you need to supply them, but that gives you the flexibility to choose the colors you want (and keeps cost and complexity down vs building in addressable LEDs). To build this project like mine, you’ll need a handful of 3mm LEDs. I used 2 red, 2 green, 2 blue, 4 yellow, and 6 white.
The Trellis uses I2C to communicate, so it requires only two I/O pins (data and clock) to control 16 buttons and 16 LEDs.
You can do the hardware part of this project on a small proto board, which is how I did my prototype. I quickly realized that I needed something neater and more contained on their desks (a bare Arduino and proto board banging around would be too fragile), so I made my own shield to drive the LED strips. Instructions and files for building the shield are included in the last step.
The driver uses three IRLB8721 MOSFETs and three resistors. And of course, you’ll need an LED strip to drive; pretty much any plain 12V RGB LED strip will do. These are simple LEDs, like SMD 5050s, not fancy individually-addressable ones (no NeoPixels, etc.)—that’s another project! You also need a 12V power supply large enough to drive the number of LEDs you intend to use.”

Link to article