Unable to get the Teensy/Octows2812 hardware to light Leds.

Status
Not open for further replies.

johnwatterson

Well-known member
No lights. The connections have continuity from the Teensy down so the solder job is OK. I do not have a scope. Are there some test points for me to check with a meter? I do have external 5Vs on the input. I also get a message to "Press Button on Teensy to manually enter Program mode, and at the bottom of that window is "Basic test.ino 5% used, if that helps.
My setup is as simple as I can make it - one 300 leds strip of lights, external 5v supply and the Teensy combo powered by my laptop.
 
300 leds seems like an awful lot if you are only powering the strip from one end. Posting the code with some photos would help everyone a lot.
 
Teensy.... lights

300 leds seems like an awful lot if you are only powering the strip from one end. Posting the code with some photos would help everyone a lot.

Sorry, I have a whole panel of leds but when nothing lit up, I took a new string of lights (300 WS2812B) and tried to reduce the number of elements I am dealing with. My understanding is that I can light 300 leds with each of the 8 output drives on the Teensy/Octows2812 setup. However the software is the Basicstest.ino from pjrc without changes so the num of leds is 64 on pin 1. This is my first led project so I am trying to start simple using the tools that I know work before going off on my own.
 
Last edited:
Sorry, I have a whole panel of leds but when nothing lit up, I took a new string of lights (300 WS2812B) and tried to reduce the number of elements I am dealing with. My understanding is that I can light 300 leds with each of the 8 output drives on the Teensy/Octows2812 setup. However the software is the Basicstest.ino from pjrc without changes so the num of leds is 64 on pin 1. This is my first led project so I am trying to start simple using the tools that I know work before going off on my own.

Try cutting it down to like 60. My first try that worked was I cut a meter of lights off (60) and then just hooked the orange and orange/white wires coming from OCTO as well as a power supply to the + and _ terminals. The orange/white wire should be connected to ground. The orange wire should be connected to DATA. It should look similar to this:
 
Last edited:
Try cutting it down to like 60. My first try that worked was I cut a meter of lights off (60) and then just hooked the orange and orange/white wires coming from OCTO as well as a power supply to the + and _ terminals. The orange/white wire should be connected to ground. The orange wire should be connected to DATA. It should look similar to this:

Thank you for your attention in this matter. I have been out of town so did not reply earlier. I am trying to set up a hotspot in my studio so I do not have to run back and forth to communicate. If possible, I am going to try your suggestion today. Tomorrow at the latest and will tell you how that worked out for me. I do have one question for you. It looks like you have the 5V power supply going directly to Octo2812 board and well and the USB cable to the Teensy. the question is did you make any modification like cutting the land to Vin and the USBV?
 
Yes, if using External power, you MUST cut the connection between VIN and VUSB. I wouldn't try any led projects without an external supply, but that's on you. You probably don't have enough amperage to use a USB port, even for a small amount of LED's.
 
I have a couple of pictures.
One is using the Teensy -OctoWS2812 which lites a few LEDS.
The other is just a Teensy which did not lite any lites. The program is the same and loaded without problems.
I have not yet cut the lan between the VUSB and Vin but can do that tomorrow.
Any suggestions? Teensy-OctoWS2812.jpgTeensy only.jpg
 
Teensy problem with Leds string

Not sure what happened with the attachments so just to be sure you see them.
 

Attachments

  • Teensy only.jpg
    Teensy only.jpg
    113.3 KB · Views: 90
  • Teensy-OctoWS2812.jpg
    Teensy-OctoWS2812.jpg
    93.4 KB · Views: 108
I have not yet cut the lan between the VUSB and Vin but can do that tomorrow.

Don't cut the VUSB-VIN pads apart yet. Focus on solving this problem first. Use the power supply to power the LEDs and USB power for Teensy. That combination works well, as long as a GND wire is used between Teensy and the power supply. No +5V wire should be connected between them, only GND.

I see a pot between the Teensy and LEDs. What is it? Can you measure the resistance with a multimeter? Do the measurement with the LEDs disconnected.
 
The pot is 100 ohm resistor as suggested. I had already soldered the Teensy and Octo boards together so impossible to cut lan on the combo.
 
basictest code

Could you post the code you are using?

Basic Test code

/* WS2812Serial BasicTest Example

Test LEDs by turning then 7 different colors.

This example code is in the public domain. */

#include <WS2812Serial.h>

const int numled = 64;
const int pin = 1;

// Usable pins:
// Teensy LC: 1, 4, 5, 24
// Teensy 3.2: 1, 5, 8, 10, 20, 31
// Teensy 3.5: 1, 5, 8, 10, 20, 26, 32, 33, 48
// Teensy 3.6: 1, 5, 8, 10, 20, 26, 32, 33

byte drawingMemory[numled*3]; // 3 bytes per LED
DMAMEM byte displayMemory[numled*12]; // 12 bytes per LED

WS2812Serial leds(numled, displayMemory, drawingMemory, pin, WS2812_GRB);

#define RED 0xFF0000
#define GREEN 0x00FF00
#define BLUE 0x0000FF
#define YELLOW 0xFFFF00
#define PINK 0xFF1088
#define ORANGE 0xE05800
#define WHITE 0xFFFFFF

// Less intense...
/*
#define RED 0x160000
#define GREEN 0x001600
#define BLUE 0x000016
#define YELLOW 0x101400
#define PINK 0x120009
#define ORANGE 0x100400
#define WHITE 0x101010
*/

void setup() {
leds.begin();
}

void loop() {
// change all the LEDs in 1.5 seconds
int microsec = 1500000 / leds.numPixels();

colorWipe(RED, microsec);
colorWipe(GREEN, microsec);
colorWipe(BLUE, microsec);
colorWipe(YELLOW, microsec);
colorWipe(PINK, microsec);
colorWipe(ORANGE, microsec);
colorWipe(WHITE, microsec);
}

void colorWipe(int color, int wait) {
for (int i=0; i < leds.numPixels(); i++) {
leds.setPixel(i, color);
leds.show();
delayMicroseconds(wait);
}
}
 
Help, I do not seem to be making any headway here. Maybe I can just buy the Teensy-OctoWs2812 assembled? Or does anyone have any suggestions as to how to proceed? I do have a hotspot setup in my studio now so could work email one on one with someone and pay for their time. I do have an electronic back gound and worked for years in the computer industry but many years ago.
 
Teensy log for Basic Test

Help, I do not seem to be making any headway here. Maybe I can just buy the Teensy-OctoWs2812 assembled? Or does anyone have any suggestions as to how to proceed? I do have a hotspot setup in my studio now so could work email one on one with someone and pay for their time. I do have an electronic back gound and worked for years in the computer industry but many years ago.
I get a box saying: Press Button on Teensy to manually enter program mode. I assume this is normal. Here is log from program load:14:59:10.611 (ports 2): usb_add: usb:0/100000/0/3 [no_device] (Teensy 3.2) Bootloader
14:59:10.614 (loader): Device came online, code_size = 262144
14:59:10.614 (loader): Board is: Teensy 3.2 (MK20DX256), version 1.03
14:59:10.614 (loader): File "BasicTest.ino.hex". 13104 bytes, 5% used
14:59:10.629 (loader): set background IMG_ONLINE
14:59:10.634 (loader): File "BasicTest.ino.hex". 13104 bytes, 5% used
14:59:10.634 (loader): elf size appears to be 262144
14:59:10.634 (loader): elf binary data matches hex file
14:59:10.634 (loader): Code size from .elf file = 262144
14:59:10.634 (loader): begin operation
14:59:10.658 (loader): flash, block=0, bs=1024, auto=1
14:59:10.664 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
14:59:10.665 (ports 2): hid, found devinst=00000007
14:59:10.665 (ports 2): hid, path=\\?\hid#vid_16c0&pid_0478#6&4500926&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
14:59:10.665 (ports 2): hid, opened handle
14:59:10.665 (ports 2): devinst=00000007, location=usb:0/100000/0/3
14:59:10.665 (ports 2): vid=16C0, pid=0478, ver=0103, usepage=FF9C, use=0021
14:59:10.665 (ports 2): devpath=\\?\hid#vid_16c0&pid_0478#6&4500926&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
14:59:10.666 (ports 2): usb_add: usb:0/100000/0/3 \\?\hid#vid_16c0&pid_0478#6&4500926&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} (Teensy 3.2) Bootloader
14:59:10.687 (loader): flash, block=1, bs=1024, auto=1
14:59:10.708 (loader): flash, block=2, bs=1024, auto=1
14:59:10.722 (loader): flash, block=3, bs=1024, auto=1
14:59:10.782 (loader): flash, block=4, bs=1024, auto=1
14:59:10.803 (loader): flash, block=5, bs=1024, auto=1
14:59:10.823 (loader): flash, block=6, bs=1024, auto=1
14:59:10.844 (loader): flash, block=7, bs=1024, auto=1
14:59:10.859 (loader): flash, block=8, bs=1024, auto=1
14:59:10.864 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
14:59:10.865 (ports 2): nothing new, skipping HID & Ports enum
14:59:10.880 (loader): flash, block=9, bs=1024, auto=1
14:59:10.901 (loader): flash, block=10, bs=1024, auto=1
14:59:10.915 (loader): flash, block=11, bs=1024, auto=1
14:59:10.935 (loader): flash, block=12, bs=1024, auto=1
14:59:10.960 (loader): sending reboot
14:59:10.974 (loader): begin wait_until_offline
14:59:11.041 (ports 2): WM_DEVICECHANGE DBT_DEVICEREMOVECOMPLETE
14:59:11.041 (ports 2): remove: loc=usb:0/100000/0/3
14:59:11.041 (ports 2): usb_remove: usb:0/100000/0/3
14:59:11.041 (ports 2): nothing new, skipping HID & Ports enum
14:59:11.094 (loader): offline, waited 2
14:59:11.094 (loader): end operation, total time = 0.460 seconds
14:59:11.094 (loader): set background IMG_REBOOT_OK
14:59:11.098 (loader): redraw timer set, image 14 to show for 1200 ms
14:59:11.105 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
14:59:11.106 (ports 2): nothing new, skipping HID & Ports enum
14:59:11.389 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
14:59:11.390 (ports 2): nothing new, skipping HID & Ports enum
14:59:11.393 (ports 2): WM_DEVICECHANGE DBT_DEVICEARRIVAL
14:59:11.394 (ports 2): found_usb_device, id=\\?\usb#vid_16c0&pid_0486#4707770#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
14:59:11.394 (ports 2): found_usb_device, loc=usb:0/100000/0/3 Port_#0003.Hub_#0005
14:59:11.394 (ports 2): found_usb_device, hwid=USB\VID_16C0&PID_0486&REV_0275
14:59:11.394 (ports 2): found_usb_device, devinst=00000009
14:59:11.394 (ports 2): add: loc=usb:0/100000/0/3, class=USB, vid=16C0, pid=0486, ver=0275, serial=470, dev=\\?\usb#vid_16c0&pid_0486#4707770#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
14:59:11.394 (ports 2): hiddev_from_devinst_list: iface=1
14:59:11.394 (ports 2): found_usb_device complete
14:59:11.395 (ports 2): usb_add: usb:0/100000/0/3 [no_device] (Teensy 3.2) RawHID
14:59:11.409 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
14:59:11.410 (ports 2): update_usb_device, devinst list change, old had 1, new has 3
14:59:11.410 (ports 2): hiddev_from_devinst_list: iface=1
14:59:11.411 (ports 2): usb_add: usb:0/100000/0/3 [no_device] (Teensy 3.2) RawHID
14:59:11.436 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
14:59:11.441 (ports 2): update_usb_device, devinst list change, old had 3, new has 5
14:59:11.441 (ports 2): hiddev_from_devinst_list: iface=1
14:59:11.442 (ports 2): 0000000D: path=\\?\hid#vid_16c0&pid_0486&mi_01#7&112d2f1e&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
14:59:11.442 (ports 2): hid, found devinst=0000000B
14:59:11.442 (ports 2): hid, found devinst=0000000D
14:59:11.442 (ports 2): usb_add: usb:0/100000/0/3 \\?\hid#vid_16c0&pid_0486&mi_01#7&112d2f1e&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} (Teensy 3.2) RawHID
14:59:11.465 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
14:59:11.466 (ports 2): nothing new, skipping HID & Ports enum
14:59:11.478 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
14:59:11.479 (ports 2): nothing new, skipping HID & Ports enum
14:59:12.303 (loader): redraw, image 9
15:00:25.318 (ports 2): WM_DEVICECHANGE DBT_DEVICEREMOVECOMPLETE
15:00:25.319 (ports 2): remove: loc=usb:0/100000/0/3
15:00:25.319 (ports 2): usb_remove: usb:0/100000/0/3
15:00:25.319 (ports 2): nothing new, skipping HID & Ports enum
15:00:26.064 (ports 2): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
15:00:26.064 (ports 2): nothing new, skipping HID & Ports enum
15:00:26.071 (ports 2): WM_DEVICECHANGE DBT_DEVICEARRIVAL
15:00:26.072 (ports 2): found_usb_device, id=\\?\usb#vid_16c0&pid_0478#00072ef9#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
15:00:26.072 (ports 2): found_usb_device, loc=usb:0/100000/0/3 Port_#0003.Hub_#0005
15:00:26.072 (ports 2): found_usb_device, hwid=USB\VID_16C0&PID_0478&REV_0103
15:00:26.072 (ports 2): found_usb_device, devinst=00000002
15:00:26.072 (ports 2): add: loc=usb:0/100000/0/3, class=HID, vid=16C0, pid=0478, ver=0103, serial=000, dev=\\?\usb#vid_16c0&pid_0478#00072ef9#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
15:00:26.072 (ports 2): hiddev_from_devinst_list: iface=0
15:00:26.072 (ports 2): found_usb_device complete
15:00:26.073 (ports 2): hid, found devinst=00000007
15:00:26.073 (ports 2): hid, path=\\?\hid#vid_16c0&pid_0478#6&4500926&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
15:00:26.073 (ports 2): hid, opened handle
15:00:26.073 (ports 2): devinst=00000007, location=usb:0/100000/0/3
15:00:26.073 (ports 2): vid=16C0, pid=0478, ver=0103, usepage=FF9C, use=0021
15:00:26.073 (ports 2): devpath=\\?\hid#vid_16c0&pid_0478#6&4500926&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
15:00:26.073 (ports 2): usb_add: usb:0/100000/0/3 \\?\hid#vid_16c0&pid_0478#6&4500926&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} (Teensy 3.2) Bootloader
 
Did you try uploading one of the examples in the Arduino software that is specifically for the OCTO WS2811? (teensy examples, under examples) Since you are close with the OCTO, I would try one of those, instead. The programming method seems weird to me as well. I feel like I always end up programming it twice... But it works either way for me.
 
In the photo where the LEDs aren't working, are the wires on the Teensy (GND and pin 1) soldered? Actually, I can't quite tell if you have the wire to pin 1 or not??? The example sketch requires pin 1.

Unsurprisingly, that example sketch works for me on T3.2 with GND, pin 1, and teensy 3.3v powering an 8 neopixel stick.

Since you don't have scope or analyzer, you could jumper pin 1 to pin 12 on the teensy and add attachInterrupt(12, isr, RISING), and count pin 1 transitions in the isr(), printing and zeroing count each time through the loop(). You should get about numleds*numleds*7*24 counts per loop

Code:
volatile  uint32_t cnt;
void isr() {
  cnt++;
}

EDIT: Your photo of the operational LEDs suggests you are using the prop shield. The prop shield LED DATA pin (11) and SCK pin (13) are shifted to 5v. That might be a clue. I recall that some LED strings won't operate with a 3.3v data line (as in your non-working setup). The few WS2812B LED strings I have all operate OK with 3.3v logic, even with the LEDs powered at 5v.

You'd need to use FastLED lib with the prop shield DATA pin (and pull pin 7 HIGH). Your BasicTest sketch from WS2812Serial lib (UARTs) wouldn't work with the shield DATA pin (11). Note: the attachInterrupt cnt won't work with FastLED lib because it disables interrupts during data transfer.
 
Last edited:
Thank you for your attention with this problem. Believe me I appreciate it. I really thought it was a quick fix with the hardware. Just something I was over looking like wrong pin. l will have to slow down and test some other software. Will try some new ideas on Monday. Thanks again.
 
Thank you for your help with this project. I did check the pin and my guide says the first line of LEDs used pin 2. So there maybe a conflict there. I have an article that shows the Teensy wired up to several strings of 2811 LEDs with 100 ohm resistors in line with the data line. Anyway I will revisit that before I try you suggestion. It may make sense for me to make up a short test strip to check all the outputs on the Teensy. Thanks again for the ideas. Sooner of later, I will get it done.
 
The WS2812Serial lib and its BasicTest sketch that you used in your post #13 can only use a limited set of the Teensy pins (see comments in sketch). You should use the FastLED lib which is not as restrictive in pin usage for WS2812 LEDs, see
File > Example > FastLED > Blink
You may still have an issue with using 3.3v data pin with 5v LED strings -- you would need a level-shifter or opamp to get 5v on data pin. The teensy prop shield page has a FastLED example using the shield's 5v data pins. The alternate pin 17 on Teensy LC also provides 5v output for controlling LEDs.

(Note my attachInterrupt counter in post #17 won't work with FastLED lib, because FastLED disables interrupts on data transfers. You'd need a scope or analyzer to observe the 800 khz pin transitions.)
 
Last edited:
Maybe try setting up a simpler test, and try to show us better photos.

I know you posted 2 photos in msg #8. While we can see only some of the LEDs are working, these pictures aren't very useful for figuring out what's wrong. We also can't see *everything* involved, particularly the power supply for the LEDs.

Also, make sure to give us the code actually used during the test. For example, in the photo on msg #8 where a single LED strip is connected (though that pot) the LED signal appears to be connected to digital pin #2. Even that is not easy to see, but with a little squinting at the photo it really does look like 2 unused placed between GND and where the red wire is soldered, which would be pin #2.

But then in msg #11, when asked about the code you were running, I see the WS2812Serial test program which transmits on pin #1. If you really were running that program, it would certainly explain why none of the LEDs work, since it's sending on the adjacent pin where no wire is connected. However, the rest of this thread talks about OctoWS2811, which does send on pin #2.

My point is we can help you much better if you give us a clear picture of *exactly* what you're doing. There's probably some small detail or misunderstanding, so it's critically important that you actually show us in detail what you're doing without assuming which parts may not matter. More photos which clearly show *all* the parts and close up so we can really see how it's wired, and the *exact* program which was really running in the test at the moment the photos were taken are all important details.
 
Yes, you are absolutely right. I was confusing the the two - Teensy and Octows2812. Once I switched to pin #1 from pin #2 everything came to life. Thank you. Now that I have the teensy working I can go back to work on the Octows2812 which is the hardware I need for this project. Hopefully by the end of the week I will have something to report. Thanks again you guys. I do know the value in taking your time and doing it right.
 
Status
Not open for further replies.
Back
Top