This guide will show you how to add an IR receiver to a Teensy 3.1 to play patterns on a 32x32 Pixel RGB LED Matrix Panel. The Teensy 3.1 runs an Arduino sketch that draws to the display, listens for IR remote commands, and refreshes the display at a high frame rate with good color depth. The SmartMatrix Shield makes it easy to connect everything together.
* This guide can be used in combination with the SmartMatrix Animated GIF Player guide. Adding a microSD card adds support for playing animated GIF files in addition to patterns in the Arduino Sketch.

We will explain the basic soldering and wiring to connect the IR receiver to the SmartMatrix Shield, and how to load the Arduino sketch that controls everything onto the Teensy 3.1.

The demo video shows the display mounted in a shadow box display with frosted acrylic diffuser (1/4" gap between LEDs and diffuser on the right, 1/2" gap on the left).  The LEDs look better when diffused, whether its through a piece of copy paper or through specialty lighting acrylic.  The frame is a subject for a future tutorial.

Major Components

32x32 RGB LED Matrix Panel

A 32x32 RGB LED Matrix Panel is an affordable way to add over a thousand bright pixels to your project.  Compared to a Neopixel matrix, these panels use smaller LEDs which are bright but not as blinding, and have a higher pixel density.  Unlike a Neopixel matrix, the panel requires a microcontroller to refresh the LEDs continuously to display an image.  It takes about 40% of the CPU time and most of the memory of an Arduino Uno just to refresh a panel, and that's with a low refresh rate and a limited 12-bit color palette.  To get a better image quality, we will use a more powerful microcontroller.

Teensy 3.1

Despite its small size, the Teensy 3.1 packs a lot of horsepower as it uses an ARM Cortex M4 CPU that runs at 72MHz and has 64kB of RAM.  This is more than enough power and memory to refresh the display with a high refresh rate and full color palette.  Even better, the processor in the Teensy 3.1 comes with a DMA engine that can move data from memory to pins to allow refreshing the display in the background, so the main program can run without as many interruptions.  The Teensy 3.1 is programmable using a modified Arduino IDE, and uses many of the same libraries as normal Arduino boards, so it should be familiar to program for anyone that has written an Arduino sketch before.

SmartMatrix Shield and Library

The SmartMatrix Shield is the best way to connect the Teensy 3.1 to the RGB LED Matrix Panel.  The shield takes care of routing the 13 signals needed to refresh the display, adds convenient connectors for power, and brings the unused signals out to a convenient expansion header.  The SmartMatrix Library includes code that refreshes the display in the background, and provides functions that make it easy to draw to the display and scroll text on top of the drawing.

Aurora Arduino Sketch

Aurora is an Arduino Sketch designed to give a lot of options for displaying customizable content on a 32x32 RGB Matrix Panel, with an easy to use interface controllable through an IR remote control.  Using the remote you can choose a pattern or animation to display, change the brightness to match ambient light, sleep the display when you are not using it, and enable autoplay to rotate through content automatically.

IR Sensor, Remote, Arduino Library

To remotely control the Arduino sketch we will add an IR Sensor to the SmartMatrix Shield, and use a compatible remote control.  The Arduino-IRremote library decodes the signal coming from the IR sensor.

FastLED Library

From the project's homepage: "FastLED is a fast, efficient, easy-to-use Arduino library for programming addressable LED strips and pixels such as WS2810, WS2811, LPD8806, Neopixel and more. FastLED is used by thousands of developers, in countless art and hobby projects, and in numerous commercial products."

We use FastLED's helper functions to efficiently generate patterns and work with color palettes.  FastLED has a great community, and many of the patterns in our Arduino sketch have been contributed by the FastLED community.

Parts List for Guide

This guide was first published on Nov 19, 2014. It was last updated on Nov 19, 2014.

This page (Overview) was last updated on Nov 13, 2014.

Text editor powered by tinymce.