Hello guys: I have been working on a basic music to led strip setup

Hello guys:

I have been working on a basic music to led strip setup for shelves in my dads basement. The goal is to get an IR sensor and 472 leds to work with different settings, speeds, etc. However, I am encountering a weird flickering issue. when I run a data wire (we used an Ethernet cable) about 3 meters to the beginning of the first two strips, the leds start to flicker or give a very weird color order/RGB offset (were pushing 10 ‘red’ leds produces one yellow(ish) and 9 off-hue greenish blue). If the data wire is run only 20 cm to the start of the strips, the flickering and/or color offset disappears.

I apologize for not having any good photos of the problem, only just a basic one of the left side of the room. Is there a way to combat this ‘data corruption’ problem? Is there an obvious solution that I failed to notice? I looked through the FAQ and couldn’t find anything particular to the WS2812b strips.

The hardware I am using is a teensy LC, and 3 WS2812B 5050 RGB 5M LED Strips.

My suggestion is to make sure you have power injected in at minimum 2 places for a strip this big (safety note - one power supply only, multiple injections). As the voltage drops down the line, the WS chip no longer gets the 5V it needs to operate causing data noise freakout.

One way to test if power is the issue is to cut back the number of LEDs in your Arduino sketch and see if you can run your animation without flickering then. Play with that variable (NUM_LEDS) until you get a sense for about where you need to drop the power in.

Another thing you can do is add a 1000uF capacitor and 470 ohm resistor “buffer” circuit. See Adafruit Neopixel guide. Really helps reduce data noise particularly in reactive circuits.

Interrupts from the IR library are probably causing this problem. If you search this group, you’ll see how others have solved this problem. Don’t remember off the top of my head.

How are things wired up on the Ethernet cable?

@Evan_L_Fishbein I ran power extra power to the outer strips, with at most 3 meters without power injection. I don’t believe power is the issue because in both cases (with short data wire and long data wire) the strips had the same starting voltage from the external power supply (5.1 - 5.2 volts), but the change in data wire length caused the freakout. I will make sure to check out the buffer circuit though for sure, that sounds like a good place to start. Also, I will try to get more detailed voltages for different spots in the strip next weekend if that works… I am back at college now so it will be more difficult to test stuff for a while.

@Dushyant_Ahuja I went and disabled the IR to see if it was an interrupt issue a few weeks back. The IR library and IR sensor are no longer hooked up, with no difference in behavior unfortunately. I also disabled the entire sound input circuit and all associated code.

@marmil As for the Ethernet cable, I used the blue and white pairing for the left side data, and green and white for the right side data. I was hoping that this would help reduce cross talk because my dad said that the spiraling between the 4 sets of wire in the cable was specifically designed to reduce cross talk.

Another note, before the Ethernet I tried just plain 21 gauge wire and made sure they were ran way away from each other and the power wire, but that didn’t work either.

When you used the CAT5, for the wire you picked for your Data line, did you connect it’s twisted pair to Ground? Like this:

[edit: We posted at the same time. Try it this way.]

The Teensy is 3.3v and the LEDs expect 5V logic. With the distance run and (possibly) no resistor in the first leg, you may not be sending a clean signal.

@Mike_Dodds True, but the Teensy LC does have one pin that outputs 5V. Jordan, are you using that pin for the data signal?

@marmil Okay I will give that a shot. FYI the WS2812B does not have a clock pin, its just the 3 pin leds.

@marmil I don’t think I’m using the 5 volt pins. I am on pins 17 and 21 right now, as i read that they can output 20 mA instead of 5 mA, so I was going to see if that worked, but as with all of my other fixes, it made no difference. What pins on the Teensy are the 5 volt outputs? Is there a way to identify it from the diagram shown below?

I just want to thank you guys for all of your help so far, its been very constructive. I apologize for my lack of knowledge and experience, this is my first year messing with leds at all, and I’ve never had any electrical engineering classes or anything covering these topics.
missing/deleted image from Google+

[I have not personally used the Teensy LC, but here as how I understand it to work]

Pin 17 on the top row of the board in your attached photo is 3.3V output. In your photo the pin on the left side of the board labeled 17-5V (8ma 17) will send out the same signal as pin 17 on the top. But it can output that signal at 5V (instead of 3.3V) if 5V power is supplied to the board through the Vin pin. [ @PaulStoffregen do I understand that correctly? ]
Note If the Teensy board is powered through the Vin pin then you must also cut the little trace between VIN and VUSB on the bottom of the board (as pointed out in the photo you attached).

With all that said, it sounds like you are using two pins to output data to two separate strips so the above probably it’s the solution for you, unless you rework your layout so all the LEDs are wired as a single string.
In your case the best solution would probably be to run your two data signals (3.3V) into a level shifter and then send the output (which will be 5V) on to your strips. The recommended shifter to use is the 74HCT245 and it would be wired like this:

@marmil I will probably be buying a teensy 3.2 from PRJC now anyway because I didn’t cut the pads before using an external power supply. I am guessing this fried it, as it no longer interfaces with a PC. I thought that the teensy would have been fine without cutting the pads as long as I didnt plug in a usb that also supplied power, but this must have been wrong LOL.

I am assuming a teensy 3.2 is different in terms of voltage output?Support and documentation should be easier to find anyway. I will place a 74HCT245 on order. Probably I will end up pushing a pin on digitalWrite(PIN, HIGH); then use a voltage tester to see if i need the shifter.

Again, thanks guys for all of your help. I ended up running 12 gauge speaker wire for my data wires, as well as the 5 volt pins from my new teensy 3.2.

I appreciate all of the suggestions, they were very helpful for pinpointing the issue in my project.

Cheers!
Jordan