My completed graduation LED Matrix Gif Hat


I just wanted to show you all my completed graduation cap using the SmartMatrix V.4 with a Teensy 3.6.

Video of a few of the gifs I made (and a couple I did not make)

I’m wearing the hat here.

This was a fun project. I’ve had about 3 different versions and 4 different microcontrollers. I started with an Arduino Mega, but the lack of memory on the Mega limited the number of gifs I could have. Then I bought a SmartMatrix V.3 with Teensy 3.2 which, uh, got thrown away on accident before I ever used it. Next was a Raspberry Pi with RGB matrix hat, which worked pretty well. However, the low profile of the new SmartMatrix V.4 was highly desired, so it was the final and best choice.

The matrix is attached to my hat using magnets and it’s covered in a stretchy black fabric. I used a cell phone battery pack for powering both the matrix and the teensy. The battery lasted all commencement and all of dinner afterwards. Originally, the battery was situated under the matrix on the cap, but it was very heavy, so I had to reroute the battery to a pouch thing I made on my back. Even moving the battery the hat was very heavy. I used 8 clips to keep it in place during the ceremony. It stayed on my head, but was fairly uncomfortable around hour 2.

I had about 40 gifs on the SD card. I made about half of them using Aesprite. The other half I found on the Animated Gif section here and various other places on the internet. I had a small issue with a couple of gifs I made blinking randomly, but running them through the optimizer at ezgif fixed that.

I was using the default animated gif sketch found the library due to time constraints. If I had more time I would have written my own program to have some sort of loop.

Overall, this was a fun project, and I’m definitely going to use this matrix/teensy for something else in the future. I haven’t decided what though.

Feel free to ask me about my build, I’ll be happy to answer any questions.


Your hat looks great!

How was it uncomfortable after 2 hours? Too much weight on your neck, or where the hat makes contact with your head?

Do you have any more details on the black cloth you used to cover the panel? I tried to make a hat like this by opening up the fabric on the graduation hat, and slipping a panel next to the cardboard inside. The cloth used on the hat was very coarse and blocked the lights from shining through clearly, and it didn’t look very good.

Thanks again for posting more details.


Thank you!

The hat was semi-uncomfortable because it would pull backwards. I had it clipped in pretty well, but it could still wiggle a bit and finding a spot where it sat comfortably was difficult. It was tolerable but still a bit uncomfortable. I found myself looking down a lot to keep the hat perfectly balanced on my head. I bet with more tinkering I could distribute the weight of the panel more evenly.

The fabric I used was a very stretchy (in all directions) fabric. I’m not 100% sure what type of fabric it is because it’s left over from another project. I think it’s a costume knit/spandex fabric like this one. I stretched it as far as I could and ‘glued’ it on with brush on nail glue (which is basically superglue) so I can remove it later to use the pixel matrix elsewhere.


Great tips Kati, thanks!