Help with WS2812B led strip - Page 1
Forum section: electronics / beginners

author: Gabriel
author_rank: Regular Contributor
timestamp: August 08, 2017, 12:01:34 pm
content: Hi All,I am building a word clock with a WS2812B led strip. I have hooked it up to an arduino as a test and only some of them light up (please see photo). I have also attached the code that the arduino is running. I have made sure that that I am specifying that there are 50 leds in the strip (till the cut). I have also done continuity tests on the data, GND and +5V lines and they are fine. Please tell me what troubleshooting steps you would take or if you have had the same problem what fixed it? (Sorry can't post .ide files so posted a .txt file instead. Maybe something to look at for Dave?)Thanks in advance,Gabriel

author: floobydust
author_rank: Super Contributor
timestamp: August 09, 2017, 12:00:44 am
content: Make sure power is clean or you can get random weirdness. At some point the Arduino's 5V regulator is not enough for all these LED's.Follow Adafruit's advice:"IMPORTANT: To reduce NeoPixel burnout risk, add 1,000 uF capacitor across pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input and minimize distance between Arduino and first pixel. Avoid connecting on a live circuit...if you must, connect GND first."Your Arduino code in Setup() has 3 lines for the "Trinket" ATTiny85 which I assume you are not using?"// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket"

author: Gabriel
author_rank: Regular Contributor
timestamp: August 09, 2017, 09:36:13 am
content: Hi floobydust,Yes I am not using a ATTiney85 to drive them I am using a UNO (ATMega328P). I have a 470resistor between the arduino and the first pixel. I will try the 1,000 uF cap across the power. I will also the power ripple with an oscilloscope see if that shows anything. I will report back to see if there is any change!Thank you for your help!Kind Regards,Gabriel

author: apelly
author_rank: Unknown
timestamp: August 09, 2017, 11:48:03 am
content: Edit:Oh crap. Sorry mate.... You're new.The timing on those things is pedantic and poorly documented. But I think they light on power up. Adafruit has a bunch of info about them; check out their github.Bunny interviewed some bird ages ago that was doing very cool things with them... fade-something...Not much help, I know. Start by tracking Bunny down via the amp hour.Mike might have a vid about the timing too...So; the timing matters.Adafruit has an excellent repo on Github. There is much to learn there. Do it.There's a cool-as firmware engineer called Bunny, who has appeared as a guest once or twice on The Amp Hour, a podcast that Dave does with Chris Gammel (sp?) who's also a cool guy. You'll find a link to TAH around here somewhere, and you can search for Bunny from there. I think the bird Bunny interviewed was Micah Scott (look that up too), but I could be wrong.Mike is Mikeselectricstuff. Another interesting dude who spends money to ruin stuff so we can all learn something.After you've looked all those guys up and watched/listened to a few things you will feel very inadequate. But you will be 6 months older, and a better person for it

author: Gabriel
author_rank: Regular Contributor
timestamp: August 10, 2017, 08:56:45 am
content: Hi apelly,Yes I am new to the forum, but I have been watching the EEVBlog for a while now!I am using the neopixel library so timing should not be a problem right?I will look through the repo on Github see if i can find anything helpful.Floobydust, the 1000uf cap did nothing sorry i will put it into the final circuit though!I have also deleted the Trinket code but that did nothing ether.Anyway thank you to both of you I will see what I can do!

author: Buriedcode
author_rank: Super Contributor
timestamp: August 10, 2017, 01:05:31 pm
content: Perhaps I missed it, but what what exactly is your setup in terms of power supply? Sure the UNO can send out the data line, but are these LED's powered by an external 5v power supply? I would also measure the voltage (between +5V and GND) at the last LED/pixel to make sure its > 4.5V.

author: StillTrying
author_rank: Super Contributor
timestamp: August 10, 2017, 03:00:43 pm
content: Does the 4th row up ever light up ?Without thinking too hard, should the 50 be 121 ? ( or 121 - 3 )Adafruit_NeoPixel strip = Adafruit_NeoPixel(50 , PIN, NEO_GRB + NEO_KHZ800);

author: Brumby
author_rank: Unknown
timestamp: August 11, 2017, 12:01:41 am
content: The OP has specified that they have set the string length to 50 -Quote from: Gabriel on August 08, 2017, 12:01:34 pm... so I am expecting this is just a test for the first 4 rows, plus the left had 6 of the 5th.The OP has stated they have tested for continuity - but I would ask if they have checked for a short on the data line between rows 3 and 4, following this same question:Quote from: StillTrying on August 10, 2017, 03:00:43 pmI would also then ask if they can check there is a signal exiting row 3 and appearing on row 4 anywhere.It looks like the signal doesn't make it across the break - so this is where I would suspect an issue.I would be inclined to attach a flying lead to the input of one of the other strings of LEDs that are powered, but don't have a data connection as yet. Call this the "test string". I would then connect the input to the test string to the output of the micro to make sure they lit up as expected (that is - the same as the ones already connected). I would then repeat this and probe a couple of other signal points along the functioning section to make sure the test string lights up appropriately.With this, I would then start tracing the signal to see if it lead anywhere.... or just use a scope.

author: RGB255_0_0
author_rank: Frequent Contributor
timestamp: August 11, 2017, 07:40:28 am
content: From my own experience with these unless you have the number of NPs matched with the numbers in the code you will get weird effects.

author: cowana
author_rank: Frequent Contributor
timestamp: August 11, 2017, 09:21:05 am
content: Quote from: RGB255_0_0 on August 11, 2017, 07:40:28 amWhy would that be?The pixels are daisy-chained without any feedback from further down the chain, so they have no concept of 'knowing' if there are 0 or 1000 LEDs after them in the chain.

author: Gabriel
author_rank: Regular Contributor
timestamp: August 11, 2017, 11:23:00 am
content: Quote from: StillTrying on August 10, 2017, 03:00:43 pmNo I have cut the leds the 50th led. This is because I am doing it in Hungarian an I need an extra led to eliminate the accents. So i only expect it to light up the first 50 leds but this is not what I am getting.Quote from: StillTrying on August 10, 2017, 03:00:43 pmNo. I have not yet succeeded to light it up.Quote from: Brumby on August 11, 2017, 12:01:41 amI just tryed the scope method. No luck. The signal is lost at the last led in the 3rd row, but if I connect the out of the second to last led to the first led in the 4th row there is still no light form there onward. I think it is a problem with the power and the data.Quote from: Brumby on August 11, 2017, 12:01:41 amI will try this method and see if I can get any further with the problem.Thanks for all your help everyone! I really do appreciate it.

author: StillTrying
author_rank: Super Contributor
timestamp: August 11, 2017, 12:45:09 pm
content: There are so many ways to fault-find the 3 connection LED33/LED34 junction, it's difficult to know where to start, it depends on how easy it is to connect and disconnect things, so take your pick.After continuity checks, maybe the easiest would be to isolate the LED33/LED34 junction and temporarily connect a single LED to the end of row3/LED33, then check that the temporary LED34 works, if it does it will prove the fault is on row4.With such a layout I'd be tempted to connect all the 0Vs and 5Vs in parallel at one side, to reduce any volt drop there would be along the 120 LED string. Electrically a Z would still be best for the signal line, easily unraveled in software.

author: Andy Watson
author_rank: Super Contributor
timestamp: August 11, 2017, 12:59:41 pm
content: I would start with the lowest hanging fruit - change the number of LEDs in software to more than 50 - if there is corresponding change in the pattern of lit LEDs it suggests a problem with software and/or timing, however, if the same pattern persists it hints at a hardware problem.

author: tablatronix
author_rank: Regular Contributor
timestamp: August 11, 2017, 01:13:18 pm
content: Are you getting the same number of leds lit every time you reset it, you have to remove power to the leds entirely then test.Could be a timing issue and they are latching, or could be a bad led not reading passing din/dout or of course a wiring issue

author: Brumby
author_rank: Unknown
timestamp: August 11, 2017, 04:08:16 pm
content: First, I would just double check the voltage and polarity of the supply to the 4th row. This may sound crazy, but we've all made some silly mistakes. I'm only asking so that it can be set aside as a possibility.Also, put a scope on it to see if it's clean.Then:Quote from: Gabriel on August 11, 2017, 11:23:00 amIf you can, disconnect anything and everything from the output of the last LED on the 3rd row - and then check if there is a signal coming out at that point from the chip itself. If you find a signal, then something you had connected to that point was shorting it out. If so, look for shorts - and remember they could be hiding. If you DON'T find a signal then I would suspect an open circuit somewhere - or possibly the signal output of that last functioning LED has been killed somehow.Clutching at straws - you could then try disconnecting anything and everything from the input to the first LED of the 4th row and then try feeding it with a known good signal.At this point, I think I would use the scope as a first line of signal detection. Once you get positive indications, then I would start using LEDs.Or maybe you will work it out yourself. Many a time I (and I'm sure others here) have worked out the answer to a problem by trying to describe it to someone else.

author: Gabriel
author_rank: Regular Contributor
timestamp: August 13, 2017, 08:27:44 am
content: Hi All,I have managed to solve the problem!!! Don't ask how though. I re-soldered the connection between the 3rd and 4th row and also used a different power supply. I have no clue which one of these fixed the problem. Thank you for all your help with this. I will post some picture of the finished product (if I remember).Thank you all again,Gabriel

author: Brumby
author_rank: Unknown
timestamp: August 13, 2017, 08:50:39 am
content: Since the problem was all good on the 3rd row and a complete 'no show' on the 4th row, I doubt the power supply would be the culprit. (Easy enough to check - just try the old supply).I'll go for a short on the signal out to one of the power rails. Maybe a solder bridge or whisker of a wire - but we''ll never know.Glad it's sorted ... and, yes - piccies, please!

author: StillTrying
author_rank: Super Contributor
timestamp: August 14, 2017, 11:23:39 am
content: Depending on how you're going to mount or diffuse them, you'll should check that havingevery other rowof LEDs upside down doesn't causeevery other rowto look different, because each RGB LED colour is beamed slightly differently.