Teensy 3.5 - WS2812b

Status
Not open for further replies.

KingDanielxD

New member
Hi guys!

So I used to have a Arduino Mega which controlled a 5m long WS2812b strip, but because of performance issues I decided to get a Teensy 3.5.

It always used to work perfectly fine with my Arduino, but when I hooked it up to the Teensy the strip completely stopped working (sometimes however the first led lights up).
I tried it using my code, but also with some example codes provided on the internet.

I connected data to pin 6 on the teensy.
Maybe some issues with the 5 v? Am I missing out on something?

Any idea what could have gone wrong?
Maybe someone of you has also a small code example which I could try out.

Thanks in advance,
Daniel
 
You might need a 3.3V to 5V level shifter between Teensy and the LED strip. Some strips can accept 3.3V signals. Others are more picky and only work with 5V signals. Some of those strips will work with 3.3V if you are able to (just barely) run the strip from 4.5V power.

Unidirectional level shifters like 74HCT245 and 74AHCT125 are superior to the bidirectional ones.
 
How many WS2812's on that strip? 5v is correct, but you may need several amps from a separate power supply. Make sure LED strip and teensy grounds are common.

Also, temporarily modify your code to use only 5 LEDs, and test to see if the first 5 work......

Here is a link to some very simple LED test code, but you will need to #include <Adafruit_NeoPixel.h>

https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-use

Also: What Paul wrote and maybe try this mod:

https://hackaday.com/2017/01/20/cheating-at-5v-ws2812-control-to-use-a-3-3v-data-line/
 
Last edited:
That definitely will not work. You need to connect 5V power to pin 20 of the 74HCT245 chip. In your photo pin 20 connects to pin 1, which is correct, but then neither of those gets 5V power. The 74HCT245 can't work without power!

Your 74HCT245 also does not appear to be properly inserted to the breadboard. You will need to gently bend the pins, so they are straight (at 90 deg angle to the body of the chip). Then plug it into the 2 rows closest to the center.
 
Thanks for the help everyone!
Now it works like a charm. :D

However I have one last question - I use a HC-05 to control the LEDs over bluetooth but it doesn't receive the data. The HC-05 is connected to pin 10 and 11.
Any ideas?


BR Daniel

Update: Just saw that pin 11 is no RX pin. Damn.
 
for the bluetooth module try to use RXTX on pins 0 and 1, and in your setup add Serial1:
Serial1.begin(9600); //rx1 and tx1 = pins 0 and 1 on Teensy 3
a test for receiving and printing it to serial monitor for debug could look like this:
Code:
String receivedText = "";
 
void setup() {
  Serial1.begin(9600); //rx1 and tx1 = pins 0 and 1 on Teensy 3
  delay(200);
}
 
void loop() {
   if (Serial.available()) Serial1.write(Serial.read());
  while(Serial1.available() > 0) { // While there is more to be read, keep reading.
    receivedText += (char)Serial1.read();
    delay(10);  
  }
  if(receivedText != "") Serial.println(receivedText);
  receivedText = "";
}
 
Status
Not open for further replies.
Back
Top