I'm currently working as a CIO at a very small company,

I’m currently working as a CIO at a very small company, my background is that of a Java developer. A few years before I did some (for my levels) low level hacking on PalmOS (cotoGPS). Just a few months ago a got infected by the Arduino virus… so please forgive my ridiculous errors. :slight_smile:

After seeing LED strip examples on YouTube I thought, that this would be a nice project for my daughters cosy place underneath her loft bed.

After getting things running on my Seeeduino and a breadboard I wanted to make the stuff smaller. An Adafruit Trinket (ATtiny85 based) seemed to be the perfect hardware. Quickly I realized, that the RAM limits the amount of pixels to 107 (depending on my own softwares RAM usage), while I had 120 pixels in my 2 m WS2812B strip. So I upgraded to a Pro Trinket (ATmega328 based), which is almost identical to the Seeeduino. Okay, that works, but changing some parameters like actual pattern/visualization modes or brightness during the operation would be nice. Let’s include some IR remote to the setup!

As you all know (and I do so now too), driving WS2812B LEDs and IR doesn’t work well. I tried disabling the interrupts, but that didn’t yield a result. So, let’s add a second Arduino that does the IR stuff and talks to the LED driving Arduino. That one could as well drive the Adafruit 8x8 LED matrix display for displaying things like current pattern and brightness.

Communication with the matrix works using I2C, so I could as well connect the other Arduino to that setup. As I still had the Trinket lying around, this one should be used.

The IRremote library was too big for the Trinket, but there still is IRLremote which fits nicely. Unfortunately, the IRLremote library needs an interrupt PIN, which on the Trinket is the same as for SCL, which is in use for the LED matrix and the communication to the other Arduino.

Sigh. I switched the LED matrix over to the LED driving Pro Trinket where it’s better suited, but still have the communication problem. So, lets replace the Trinket with another Pro Trinket and here we are.

The software is based on FastLED 3.1 and the DemoReel100 example with some additions for a few more pattern (mainly some great stuff from Andrew Tuline, https://github.com/atuline/FastLED-Demos) and the IR decoder (https://github.com/NicoHood/IRLremote).

You can see it working in the video.

You can find the source code, the Fritzing! sketch and some pictures on the projects temporary homepage: http://coto.dlinkddns.com/projects/clara_led/ (This currently runs on my Banana PI at home connected to the Internet via a slow uplink cable connection. Be patient! :-> )

Thank you very much for your great work on FastLED and this great Google+ group!
http://www.youtube.com/watch?v=jGvMS9RyAyA

Impressive! I highly recommend the Teensy 3.1 (https://www.pjrc.com/store/teensy31.html) for future projects. It’s $20, Arduino-compatible, much faster, much more RAM and flash, and (most importantly) FastLED compatible. I’ve made several projects driving APA102 LED strips, controlled via IR remote.

A Teensy 3.1 costs almost as much as two Pro Trinkets. And iirc its 3 V, so you have a problem with 5 V strips. How do you solve that? An extra voltage regulator?

Fantastic project, in concept, execution, and learnings-along-the-way! Thank you for sharing the project and the story of how it evolved.

What’s next? :slight_smile:

I haven’t had to use a logic level converter yet (fingers crossed). The APA102 strips I’ve used seem to work just fine with the Teensy. Paul’s also working on a slightly lower spec $12 Teensy LC.

I would definitely recommend 5V logic shifters to help with noise. The difference with and without is night and day.

Great project @Thomas_Runge . I can see it was definitely a learning experience. Thanks for sharing.
What version of Fritzing are you using? I tried out that file but Fritzing didn’t seem to display it very well for me. I have the current version installed. What I believe are the two Pro Trinket 5V components are just displaying large green rectangles with all wires going to a single point. Was that a custom made component?

I though @Jason_Coon was going to mention the 5V output on the new Teensy LC. From the page: http://www.pjrc.com/teensy/teensyLC.html

“5 Volt Buffer For WS2812/Neopixel LED Projects
Teensy-LC provides a 5V output to directly drive WS2812/Neopixel LEDs.
A 74LV1T125 buffer is connected to pin 17, with the increased output voltage available on another pin.”

Maybe someone can clarify, am I correct in guessing this 5V output pin is for use as the Data line, since a WS2812 or Neopixel would need (or typically prefer) a 5V Data signal?

This was Fritzing 0.8.7 (on a Mac if that counts on a cross platform software), including some parts from Adafruit. I’ll try soon with an actual version. For now I added a PNG to the projects page.

One thing you will very quickly learn, as you tackle more and more led projects. The controller, and even your leds quickly become the smallest cost component of your projects (who cares about the difference between a $7 controller and a $21 controller when you’re throwing down $500 on acrylic?)

@marmil I downloaded and installed the current Fritzing version, which is 0.9.1 and it opens my Fritzing sketch without problems. It looks like on the image I put on the projects webpage.

@Thomas_Runge , it might be the Windows version of Fritzing then that’s causing it to not display correctly. Thanks for checking, and posting the PNG.

Turns out I needed to download the current Adafruit Fritzing library. Displays fine now.

Okay, as the Teensy seems to be the choice of the heart of quite a few FastLEDers, I checked some technical details.

The Teensy is a 3.3V device. The LED strips are typically 5V devices. Regarding this page: https://learn.sparkfun.com/tutorials/logic-levels it should be okay to drive the LEDs with a Teensy without a logic shifter (the minimum output level of a Teensy shoud be higher then the minimum input level of the strip, correct?). And as we talk about digital stuff, it should either work or not. “Work better” or “worse” does not make sense here, doesn’t it?

On the other side… why does the Teensy LC get an extra port for 5V devices, if that wouldn’t be required?

Would you Teensiers please share your experiences regarding the voltage level?

Thomas checkout this post. https://plus.google.com/107667934109068193427/posts/KPzibaQij8F I highly recommend level shifters. You can get away without them, but at 3.3V you are very susceptible to noise.

In a number of projects I get away without using level shifters - the trick is to make sure the voltage going into the LEDs VCC is under 5.1-5.2v (surprise! Most 5v power supplies out there actually push 5.3v!).

When I’m going to have long wire runs then I use level shifters.

Would using one of the 8 pins on a OctoWS2811 board to fan out as a clock pin and the other 7 as data pins for up to 7 APA102 strips make sense? I’d bridge over the series resistor on the OCTO CLK pin to better match the parallel impedance and capacitance of 7 strips CK inputs. That would get you your level shifting for a Teensy 3.x

No, the cost of doing the bit/byte rotation necessary for parallel output would pull your aggregate data rate to below the 24mbps that you can get using the spi hardware, so I’m unlikely to do it unless I find a faster way to do that work.

Ah, OK, I was thinking of the DMA method used by the OCTOWS2811 .lib,. FastLED works using SPI resources.

Even the DMA method used by octows2811 requires rotating the bit/byte data before writing it out, and that’s the expensive part, here. (In an absolutely perfect world I could get a 2.3x performance improvement by parallelizing 7-way - and that would be assuming the only cost was going to be the bit/byte rotation, and that leaves out the scaling/dithering, even if I was using DMA to push out the bits. And the real world is far from perfect or ideal).

Once I finish all the arm ports, and lay down a roadmap for 16bit color support, I may revisit this, but the gain for the amount of work I’d have to put into it is minimal.

Beautiful project! Is your projects temporary homepage (http://coto.dlinkddns.com/projects/clara_led) still active? I can not reach it.