fastled with Teensy 3.2

Status
Not open for further replies.
Hello. This is my first project with the Teensy (Using arduino for about a year). I'm making 5 small infinity mirrors with the letters to my niece's name inside. 170 LED's. I have pin 6 of the teensy connected directly to the LED strip WS2812. Does it matter which pin I use? This setup works great with the adafruit neopixel library. The problem is that I want to use the fastled library. When I use the DemoReel100, it really doesn't work. It looks choppy and barely works, if at all. Only one of the "demo's" really works.

I am not currently using a resistor on the data line. The idea (in my head) was the 3.3v of teensy might work with the 5v lights with no resister. Is this safe for long term? If the neopixel library works fine, I'm guessing this isn't the problem I'm getting for fastled.

Any thoughts or criticism greatly appreciated. Thank you.
 
I've gotten the rough build complete. I need to level the letters, maybe remake the L and E. I still need to get the neopixels to stick better. But here it is.

Does anyone have or know of example neopixel library sketches? I didn't find what I was looking for on github. I don't have a good grasp on the library using the few examples that come with it.

20181117_080644.jpg
 
looking good. re neopixel sketches, you can swap the neopixel calls into sketched for fastled lib. The maths in the loops can be used. Depends on what type of lightshow effect you would like. you should be able to use the fasted example code and choose WS2812 or ws2811. Why did you swap from fasted to neopixel lib?
 
That's a good idea about using the math, thank you. The demo reel of fastled doesn't animate right. It's very choppy, and runs as if it's going super slow. One part of the reel works correctly. When I run it on the arduino mega, it's all good. I just can't get the mega to physically fit anywhere.
I really want to use the HSV commands of fastled. Maybe if I try a different pin on the teensy?
 
I don't have a good grasp on the library using the few examples that come with it.

Did you see the FastLED documentation? That is the link to the overview. Other topics are on the right side.

This is my first project with the Teensy (Using arduino for about a year).

You will learn some new things and have a lot of fun. Please read the FastLED documentation first (except ESP8266 notes). Then come back and let us discuss the details of your project. Good news is that this type of project (Teensy 3.x + RGB LEDs) is pretty popular and well understood. So, you can potentially get lots of help here. However, each project has many tiny differences. Those differences can matter a lot. So, the more project details are revealed, the better.

Some advice:
1. Post your code. Best is the simplest possible sketch that demonstrates the issue.
2. Show us your circuit. A circuit diagram, pictures of the actual wiring. A diagram of the physical layout of the project: location, general dimensions and sizes of things: LEDs, power supply, Teensy 3.2, other components.
3. Read the FastLED Documentation.
4. Use a level-shifter. If you have room for one, consider one of the existing adapter boards that would provide this. Or maybe you prefer to roll your own.

Best regards.
 
Thank you for the response. I've been over documentation. Right now, I'm just comparing the demo reel of both libraries. (adafruit / fastled). I only modified the number of led's and pin number.
For the circuit, it's pretty simple. At this stage, I'm using a 60 amp switching 5v power supply(Vin of teensy). The teensy (data line) is probably about 1.5 feet wire length away from the LED strip. The finished location will be a lot closer. I also have no resister on the data line right now. (2 things not ideal right there) The power to each letter is parallel. The start and stop of each letter is in the top left corner.
My thought was if one library works flawlessly, why doesn't the other one(as connected, no resistor at 3.3v). I have the octows2811 but it won't fit in the current desired location. It sounds like the lack of level-shifter is my problem. With that said, I have a few solutions. 1)make room for the large octows2811, 2)roll my own level-convertor, 3)use the adafruit library, 4) use an arduino nano.

I ran out of memory on a previous project for my niece with the nano. That's why I'm trying the teensy, but I fear I set myself up for failure.

Current desired location for controller.
20181117_215017_resized.jpg

Previous project with nano and apa-106 LED's. Video is here https://www.youtube.com/watch?v=CGcTEpCWUaM
20180520_113011.jpg
 
Last edited:
looking good. re neopixel sketches, you can swap the neopixel calls into sketched for fastled lib. The maths in the loops can be used. Depends on what type of lightshow effect you would like. you should be able to use the fasted example code and choose WS2812 or ws2811. Why did you swap from fasted to neopixel lib?

The fastled library isn't working correctly. Actually, I don't doubt the library, I question my application. I have no resistor on data line going straight to LED's from Teensy. If the adafruit library works flawlessly, why doesn't the fastled as well?
 
I think there are multiple ways to go here.

I suggest you make a small, simple prototype with just a Teensy 3.2 and a few (say, 6 or so) pixels. No resister needed. No level-shifter needed. Use a short wire for LED Data. This should absolutely work and, if it doesn't, then it is the easiest case to debug.

How are you powering the Teensy? Have you cut the "5V" Pads?

I can't see your code or your circuit. I can't do much more without these.
 
FYI, the Teensy LC is a ARM Cortex-M0+ processor at 48 MHz, 62K Flash, 8K RAM. It includes a 1 channel level-shifter that can "directly drive WS2812/NeoPixel LEDs". Takes up the same space as a Teensy 3.2. It's also inexpensive. It might be an option for you. You could save the 3.2 for another project.
 
IMG_1068.jpg

My sketch is here:
View attachment Cylon.zip

I changed it to use pin 6. I also changed the number of LEDs to 8.

I didn't have a Teensy 3.2 handy so I used a Teensy 3.0. For our purposes, they are the same.

Does this sketch work for you?
 
Thank you. I changed to pin 5 and it works with the 8 LEDs. I then changed it to my 170 LEDs and your cyclone code worked great. I put the fastled demo reel on 60 LEDs and it works good. Once I go to 65 LEDs, the LEDs after 65 do some goofy stuff but the first 65 work pretty good. Using 70+ LEDs and nothing works right. I put the fastled demo reel on an arduino mega at 170 LEDs and it works great.
I was hoping to use some of the demo reel code, that's why I keep bringing that up. So far, everything except the demo reel works on the teensy. Demo reel works on arduino. I might have to upload a video to show what is going on.

Cyclone code working on 8 LEDs on Teensy
20181119_192956_resized.jpg

Fastled demo reel working well on the Arduino.
20181119_195421_resized.jpg
 
I attached a picture of what fastled is doing with 170 LEDs. This pictures shows the same thing a video would. It just hangs like this. If I just leave it run, one function does work correctly. After that function, it goes back to being frozen.
20181119_200956_resized.jpg
 
Should I test with the DemoReel100 example? It has a default of 64 LEDs. Is that example with the NUM_LEDS set to 170 enough to reproduce this problem? How long do I need to leave it running to see the issue?

Or should I try running your code? I see the code on msg #10, but it has NUM_LEDS defined as only 8.

Please tell me any details I need to know to recreate the problem. Please be specific. Often when I try to recreate a problem things work because some small but important detail was missing.
 
The DemoReel100 is all you need. After about 70 LEDs, things get goofy. The first time I tried it with 170 LEDs, it was real choppy and seemed to be slow motion. Today it is just frozen until it gets to the working function. It happens right away.

Details= teensy 3.2, Aclorol WS2812B LEDs 300 pixel strip, Teensy has data pin on 5 and 170 LEDs. Actually... It was slow motion choppy on pin 6, frozen on 5
 
Status
Not open for further replies.
Back
Top