FinleyOderSo
Member
Hello,
recently I soldered my teensy 4.0 and ws2812b LED strip setup together with a new thicker cable for better electricity flow.
Before that it worked quite well, but now it is acting weird and whenever I power the LED strip it just shows a few frames and then gets stuck. Sometimes even only a couple of the 144 LEDs update and then it freezes.
Maybe this helps you to understand the problem: When I'm plugging in and unplugging the power cord for the LED strip really fast and repetitive I can actually see some motion happening on the LEDs because then they acutally update a couple of times.
Unfortunately this is a bit exhausting, so I would like to know what's the issue.
The only things I can think of that changed after soldering are that the cable is thicker now and I am using a logic level converter (https://eckstein-shop.de/SparkFun-Logic-Level-Converter-Bi-Directiona-Shifter-Pegelwandler) because I was told that the 3V data signal of the Teensy has to be converted to a 5V signal in order for the LED strip to work correctly. Which is weird because before I wasn't using one and it worked fine. I also tried the new setup without the logic level converter but I ran into the same problem. I tried a lot of different Arduino sketches but none of them worked as they should.
I used this code for example (It was recommended to me by a different user on Reddit I guess):
I also tried the default blink sketch of FastLED as well as the OctoWS2811 library, but that didn't get me any further to solving the problem.
Using an Arduino Uno it works perfectly, so I don't think I did something wrong at soldering the components.
If I am missing out something really important, please tell me.
Does it maybe have to do with teensy's clock or something like that?
recently I soldered my teensy 4.0 and ws2812b LED strip setup together with a new thicker cable for better electricity flow.
Before that it worked quite well, but now it is acting weird and whenever I power the LED strip it just shows a few frames and then gets stuck. Sometimes even only a couple of the 144 LEDs update and then it freezes.
Maybe this helps you to understand the problem: When I'm plugging in and unplugging the power cord for the LED strip really fast and repetitive I can actually see some motion happening on the LEDs because then they acutally update a couple of times.
Unfortunately this is a bit exhausting, so I would like to know what's the issue.
The only things I can think of that changed after soldering are that the cable is thicker now and I am using a logic level converter (https://eckstein-shop.de/SparkFun-Logic-Level-Converter-Bi-Directiona-Shifter-Pegelwandler) because I was told that the 3V data signal of the Teensy has to be converted to a 5V signal in order for the LED strip to work correctly. Which is weird because before I wasn't using one and it worked fine. I also tried the new setup without the logic level converter but I ran into the same problem. I tried a lot of different Arduino sketches but none of them worked as they should.
I used this code for example (It was recommended to me by a different user on Reddit I guess):
Code:
/* New Product Test Sketch by Chemdoc77
used to test new RGB LED strips and Matrix that I purchase.
Note: Uses FastLED's Parallel Output procedure to work with a Teensy 4.0
*/
#include <FastLED.h>
#define DATA_PIN 7
int brightness = 40;
// Teensy 4.0 Stuff ================
#define NUM_LEDS_PER_STRIP 144
#define NUM_STRIPS 1
#define NUM_LEDS NUM_LEDS_PER_STRIP
CRGB leds[NUM_LEDS_PER_STRIP * NUM_STRIPS];
void setup() {
delay(1000);
// Teensy 4.0 Stuff ==============
FastLED.addLeds<NUM_STRIPS, WS2812B,DATA_PIN,GRB>(leds, NUM_LEDS_PER_STRIP);
//USE for WS2811:
// FastLED.addLeds<NUM_STRIPS, WS2811, DATA_PIN >(leds, NUM_LEDS_PER_STRIP);
FastLED.setBrightness(brightness);
FastLED.setMaxPowerInVoltsAndMilliamps(5, 1500);
set_max_power_indicator_LED(13);
fill_solid(leds, NUM_LEDS, CRGB::Black);
FastLED.show();
}
void loop() {
fill_solid( leds, NUM_LEDS, CRGB::Red);
FastLED.delay(500);
fill_solid( leds, NUM_LEDS, CRGB::Black);
FastLED.delay(500);
fill_solid( leds, NUM_LEDS, CRGB::Blue);
FastLED.delay(500);
fill_solid( leds, NUM_LEDS, CRGB::Black);
FastLED.delay(500);
fill_solid( leds, NUM_LEDS, CRGB::Green);
FastLED.delay(500);
fill_solid( leds, NUM_LEDS, CRGB::Black);
FastLED.delay(500);
fill_solid( leds, NUM_LEDS, CRGB::Yellow);
FastLED.delay(500);
fill_solid( leds, NUM_LEDS, CRGB::Black);
FastLED.delay(500);
cd77_colorwipe_dot(CRGB::Red, 0, NUM_LEDS, 40);
cd77_colorwipe_dot(CRGB::Blue, 0, NUM_LEDS, 40);
cd77_colorwipe_dot(CRGB::Green, 0, NUM_LEDS, 40);
}
//==================== Functions ===============================
void cd77_colorwipe(CRGB color, uint16_t to, uint16_t wait) {
for (uint16_t i = 0; i <to; i++) {
leds[i] = color;
FastLED.delay(500);
}
}
void cd77_colorwipe_line2(CRGB color, uint16_t wait) {
for (uint16_t i = 0; i <NUM_LEDS; i++) {
leds[i] = color;
FastLED.show();
}
}
void cd77_colorwipe_line(CRGB color, uint16_t wait) {
for (uint16_t i = 0; i <NUM_LEDS; i++) {
leds[i] = color;
FastLED.delay(wait);
}
}
void cd77_colorwipe_dot(CRGB color,uint16_t from, uint16_t to, uint16_t wait) {
for (uint16_t i = from; i <to; i++) {
leds[i] = color;
FastLED.delay(wait);
leds[i] = CRGB::Black;
FastLED.show();
}
}
void cd77_colorwipe_dot_fast(CRGB color) {
for (uint16_t i = 0; i <NUM_LEDS; i++) {
leds[i] = color;
FastLED.show();
leds[i] = CRGB::Black;
FastLED.show();
}
}
I also tried the default blink sketch of FastLED as well as the OctoWS2811 library, but that didn't get me any further to solving the problem.
Using an Arduino Uno it works perfectly, so I don't think I did something wrong at soldering the components.
If I am missing out something really important, please tell me.
Does it maybe have to do with teensy's clock or something like that?