Trouble with Octows2811 and Adafruit NeoPixels

Status
Not open for further replies.

djcali

Member
Hello,

I have begun working on a project using the Octows2811 Library and Adafruit Neopixels . I'm a noob with leds but not basic circuitry, as far as I can tell I followed Paul's instructions for the Octows2811 Library. I was testing my strip out with BasicTest sketch, setting only the ledsPerStrip = 30 but all I get is flickering on the first 15 leds. The 2nd 15 do not light at all. I ruled out power because I get around 5 - 5.19 volts at the end of the strip when the leds are running. I'm using 18awg wire throughout the project except the connections in the breadboard. I have uploaded pictures of the project, can't figure out what I'm doing wrong. Here's a quick video showing the flicker >> http://www.youtube.com/watch?v=-nRXylM7kfI&feature=youtu.be

Any help would be appreciated!!

Thanks!
 

Attachments

  • IMG_2360.jpg
    IMG_2360.jpg
    135.4 KB · Views: 263
  • IMG_2361.jpg
    IMG_2361.jpg
    129.1 KB · Views: 235
  • IMG_2368.jpg
    IMG_2368.jpg
    141.6 KB · Views: 410
  • IMG_2369.jpg
    IMG_2369.jpg
    100.5 KB · Views: 242
  • IMG_2366.jpg
    IMG_2366.jpg
    156.6 KB · Views: 205
It's best to run the power lines directly from the power supply to the LED strips. Then run the data+ground from Teensy to the LED strips, where the grounds meet at or close to the LEDs.

Looks like you're using the 74HCT245, which is very good. Sometimes the series resistor can cause more trouble than it's worth, especially if using ordinary wire (rather than data cable with specific characteristic impedance) that doesn't closely match the resistor. You might try different resistors, or just connect the signal directly to the '245 output, if the wire is short.
 
Would the series resistor really do much as its placed at the moment? (e.g. it's not in series unless that breadboard is something special)
 
You're missing +5V on the DIR pin of the HCT245 (pin 1). It's also good to ground the GND pin even though you've technically grounded it on the other side @ the OE pin.
 
I am having this exact issue as well. Teensy 3.1. Tried candiate #1 and #2 of teensyduino. I have a 1 meter strip of 60 from sparkfun I am testing with. No 245...but I do have the 100 ohm resistor...15 and 16 connected.

I have noticed the flicker changes dramatically based on the CPU speed setting.
I also noticed that I get different results from different power supplies. One I've measure at 4.6 V gets flickers alot and and at times seems like it is tring to work. My newer one from adafruit I wanted to use for this project which comes in at 5.3 V 10 amps produces no flickering but random and fixed light patterns. (each time a turn on and off the power a new fixed pattern is produced).

From this most recent reply regarding impedance and wire characteristics I am feeling a bit our of my league. My next move is the 245 (which you say is very good) and I am going to hedge that bet by purchasing a 3.0 (because It sounds more rubust? for this library?).

I am clearly just a tinkerer...but can you help me out regarding the following questions:
1.what CPU speed setting should I use.
2. will my woes be simplified with the 3.0?
3. can someone give details/pictures/video of a successful setup using the 3.1?
 
I am clearly just a tinkerer...but can you help me out regarding the following questions:
1.what CPU speed setting should I use.
2. will my woes be simplified with the 3.0?
3. can someone give details/pictures/video of a successful setup using the 3.1?

I still haven't got my 3.1 working solidly with my ws2811 with Octows library, so will stick with the 3.0 for now. I have tried pretty much everything, even reinstalling arduino and teensyduino for the latest. My setup runs seamlessly with 3.0 at fast frame rates without a hitch. Perhaps someone can explain what changed with 3.1 for this flickering to happen. If i do nothing other than swap out the teensy 3.0 for a 3.1, loaded with the same sketch (albeit change the board type), and leave the rig as is, flicker madness. (Arduino 1.0.5, loader 1.18-rc2).
 
Last edited:
EDIT: I just did a reinstall of both arduino 1.0.5 and teensyduino. I checked the arduino version before unsung teensyduino installer and it was 1.0.5 in the right click info, and then checked after installing teensyduino and the info said arduino was 1.0.3.

It might just be me, so I deleted all old versions of arduino and teensyduino (that i could find) and reinstalled freshly downloaded copies, made sure that teensyduino was pointing at the only copy of arduino it could do.
 
Last edited:
I tried basically everything also. I took the latest Adafruit Neopixel library and uploaded it to the teensy 3.1 and all the strand tests are flicker free not changing anything with the above setup. I must add though I do get some noise on the data line because randomly I get speratic pixels. I have to figure that out.
 
You're missing +5V on the DIR pin of the HCT245 (pin 1). It's also good to ground the GND pin even though you've technically grounded it on the other side @ the OE pin.
Pin 19 is Vcc which is connected to Pin 1 internally, why would I need 5v on the DIR PIN also. I'm getting +5v on the output pins of the 245 with the current placement.

Thanks
 
It's best to run the power lines directly from the power supply to the LED strips. Then run the data+ground from Teensy to the LED strips, where the grounds meet at or close to the LEDs

I know it's not pictured but the power lines are going from the supply straight to the LEDs. I do have a question though, I'm going to have 15 x 40 matrix and was going to power them every 4th strip which is 1m. Is that ok? And should I do the same with the GND?

Thanks!
 
Pin 19 is Vcc which is connected to Pin 1 internally, why would I need 5v on the DIR PIN also. I'm getting +5v on the output pins of the 245 with the current placement.

Thanks

pin 19 is OE, not VCC. You may be getting +5V on the output pins at the moment, but I can assure you that w/o +5V on the DIR pin, you're not going to get anything but noise.
 
I'm sorry PIN 20 is VCC which is connected to +5v.

Do I connect 5v to both?

Never mind , I'm going to try +5v on pin 1 and GND On pin 10 when I get home. I think that's what you mean.
 
Last edited:
+5V to pins 1 and 20
GND to pins 10 and 19

On the OctoWS2811 library page, Paul was kind enough to annotate a diagram of the 74HCT245 to indicate where you'll need +5 and GND. It's wired up as a unidirectional buffer:

td_libs_OctoWS2811_19.gif
 
Good News is Making those connections suggested by tetsuo got rid of all my noise problems thanks! Bad news is the octows2811 library is still flickering. Here is a video with the Adafruit library with no flicker issues at all. >> http://www.youtube.com/watch?v=up1_gSocYS4

Here is another video using the Octows2811 library making absolutely no hardware changes. >> http://www.youtube.com/watch?v=DtWqOBIqSkY

I did notice the first and last pixel also do not have the correct colors. The hardware changes that I made since the original posting are making the 220ohm resistor in a series and also connecting pin 1 to +5v and Pin 10 to GND on the HCT245.

Thanks for all the help thus far!
 
djcali, oddly, I too have the first or last leds in my array not behaving well with 3.1. I too have had a very good stable led array with 3.0, and have followed all of the IDE and teensyduino updates, but still have flicker. I have gone back to testing with the BasicTest to be sure that it is not one of my own more involved sketches, but still the issues persist. here is a video:

http://youtu.be/ymfC7QxyIsU

I think that it might be time to ask Paul or others to revisit the changes to the DMA timings as this seems to be a frequent issue that does not seem to be resolved.
 
OctoWS2811 Oscilloscope output

Oscilloscope output images: So, I checked the 3.0 and 3.1 signal on my 'very' old oscilloscope. the signal is very different, both same setup and rig, both running basic test:

Teensy3.0:
teensy3_0 octows2811.jpg

teensy3.1:
Teensy3_1 octows2811_1.jpgTeesny3_1 octows2811_3.jpg
 
Last edited:
I'm having the same issue: My test rig consists of a Teensy 3.0/3.1 with the adafruit 40 LED arduino shield connected to the Teensy via 74HCT245 buffer. I am using Arduino 1.0.5, Teensyduino 1.18 RC 2, BasicTest sample program for OctoWS2811, even did a clean install of Arduino+Teensyduino. I get flicker with Teensy 3.1, no flicker when I use a Teensy 3.0. I examined the waveform on a scope, and 3.1 vs. 3.0 look identical to me, both have quite a bit of overshoot and ringing, but the 3.1 output does not look any worse than the 3.0 output. If I slow the BasicTest down to 1 fps the flicker stops (or more likely, the flicker occurs so infrequently that I just didn't see it). Is something perhaps messing with the timing of the DMA, occasionally causing a glitch or break in the output waveform?
 
Opps, this is probably my fault. I updated OctoWS2811 for Teensy 3.1 in Teensyduino, but until now the OctoWS2811 web page had the original version 1.0 code that only works on Teensy 3.0.

The version 1.1 ZIP file is 21489 bytes.

Please download the new 1.1 version and replace any copies of the older 1.0 version. I'm pretty sure that will fix these problems you're seeing.

I'm running the BasicTest example right now on a Teensy 3.1 with a short LED strip. It's flicker free. This weekend I'm going to rewire my 1920 LED test board with a single Teensy 3.1 and verify it really does work.
 
Last edited:
Yes, actually using version 1.1 helps a lot! :)

I compared my version in /libraries with the 1.1 zip and they were indeed different. Overwrote the files and of course it works now! I am currently testing with 480 leds per strip and no flicker. Getting a respectable 70 fps even with such a ridiculously long strip.

Thanks, Paul!
 
Please download the new 1.1 version and replace any copies of the older 1.0 version. I'm pretty sure that will fix these problems you're seeing.

I'm running the BasicTest example right now on a Teensy 3.1 with a short LED strip. It's flicker free. This weekend I'm going to rewire my 1920 LED test board with a single Teensy 3.1 and verify it really does work.

well, just replace my octows2811 lib, and YES!!! it now works, 40fps for the 34*8 array on the 3.1 and its as smooth as a peach. Now, Paul, if only i can find all of that hair I pulled out ...
 
3.1 and movie2serial

The existing VideoDisplay example program should work with Teensy 3.1, right?
corvusandcolumba, I have just run a test, and yes, 3.1 works with movie2serial processing sketch. Remember to edit the processing sketch if using the most recent release of processing, and also delete all checks to ports other than the one you are using as this causes a hang.

RE changes to processing sketch, this is from another thread:
…. Processing 2.1 does not support readstringuntil, it was omitted for some reason. If updating your processing.org software you will need to use a workaround for movie2serial. I have tested it with the below code on a small single teensy 3 array, and it seems to work.

https://github.com/processing/processing/issues/2191

most likely many of you will already know about this, but I could not find a forum post on this. I have substituted in the following code in the processing sketch to replace the readStringuntil:

byte bytesIn[] = ledSerial[numPorts].readBytesUntil(10);
// Convert the byte array to a String
String line = new String(bytesIn);
 
Status
Not open for further replies.
Back
Top