Building an LED matrix hat

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Little_Jack
 
Posts: 2
Joined: Mon Jun 04, 2018 8:20 pm

Building an LED matrix hat

Post by Little_Jack »

I want to build a top hat with an LED matrix on it. Ideally I'd like to have a bunch of animations stored on an SD card that I could switch between on the fly.

I'm thinking about a 30x8 matrix of NeoPixels - a 4 meter roll of 60 per meter cut into 8 strips of 30 each, or a 32x8 using the flexible matrix (https://www.adafruit.com/product/2294). I've read the Gugenhat article (https://learn.adafruit.com/guggenhat-bl ... y?view=all) and I love the idea of a spiral as well, so I might go that route.

My 2 questions are about power and microcontroller.

Obviously, an Arduino doesn't have enough memory to either store or send a bunch of 256 pixel animations (I did think about the MicroSD breakout board (https://www.adafruit.com/product/254) for storage, but that still doesn't help with the RAM issue for the animations), so I'm thinking perhaps the Teensy 3.5 with the SmartMatrix SmartLED Shield.

Is there a way to create sequences in Glediator (or Jinx) and store those on an SD card for the reader that's already built into the Teensy? In addition, is there a way to select a particular sequence? I'm thinking like a button that would cycle through them.

As for power, I'm thinking of using a Lithium Ion battery pack like https://www.adafruit.com/product/353, which I'd run through a PowerBoost 1000 (https://www.adafruit.com/product/2030) for a nice clean 5V that would power both the Teensy and the LED matrix. I'd make sure that none of my animations / sequences would be full brightness, and of course I'd never turn all the lights white. Besides being ugly, it would be blinding even at half power.

So, am I on the right track? Any insights and help with the code? Any other insights or ideas? I'm much better with a soldering iron than I am with writing code.

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Building an LED matrix hat

Post by adafruit_support_bill »

Obviously, an Arduino doesn't have enough memory to either store or send a bunch of 256 pixel animations
An UNO has enough RAM for up to around 500 pixels. And any of the M0-based Arduinos or compatibles has enough RAM to store multiple frames of 256 pixel animation.
As for power, I'm thinking of using a Lithium Ion battery pack like https://www.adafruit.com/product/353, which I'd run through a PowerBoost 1000 (https://www.adafruit.com/product/2030) for a nice clean 5V that would power both the Teensy and the LED matrix.
There is no need for a PowerBoost - or the associated conversion losses. The Teensy (and all of the M0 processors too) are 3.3v devices. The Pixels will work fine on the 3.7v direct from the LiPo. The most efficient approach is to power it all directly from the LiPo.

For more tips on efficient use of battery power, see this guide: https://learn.adafruit.com/sipping-powe ... s/overview

User avatar
Little_Jack
 
Posts: 2
Joined: Mon Jun 04, 2018 8:20 pm

Re: Building an LED matrix hat

Post by Little_Jack »

Thanks! Great news that I can run it all off 3.7V, that simplifies things.

You note that an M0 based Arduino has enough RAM for several frames of animation. Using all (or most) of the pixels, any idea what "several" might look like? I'd like to do some pretty complex patterns if possible.

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Building an LED matrix hat

Post by adafruit_support_bill »

Each RGB pixel requires 3 bytes of RAM. RGBW pixels require 4. So a 256 pixel array would require 768 or 1024 bytes - depending on the type of LED.

You also need some RAM for stack, heap and local variables. How much will depend on the complexity of your code. An M0 has 32K of SRAM. Allowing a few K for stack, heap and other variables, plus 512 bytes for your SD card buffer, you could probably buffer 20-25 frames.

Locked
Please be positive and constructive with your questions and comments.

Return to “Wearables”