Author Topic: Help with WS2812B led strip  (Read 3766 times)

0 Members and 2 Guests are viewing this topic.

Offline GabrielTopic starter

  • Regular Contributor
  • *
  • Posts: 66
  • Country: au
Help with WS2812B led strip
« on: August 08, 2017, 12:01:34 pm »
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
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7328
  • Country: ca
Re: Help with WS2812B led strip
« Reply #1 on: August 09, 2017, 12:00:44 am »
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"

 

Offline GabrielTopic starter

  • Regular Contributor
  • *
  • Posts: 66
  • Country: au
Re: Help with WS2812B led strip
« Reply #2 on: August 09, 2017, 09:36:13 am »
Hi floobydust,

Yes I am not using a ATTiney85 to drive them I am using a UNO (ATMega328P). I have a 470 \$\Omega\$ resistor 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
 

Offline apelly

  • Supporter
  • ****
  • Posts: 1061
  • Country: nz
  • Probe
Re: Help with WS2812B led strip
« Reply #3 on: August 09, 2017, 11:48:03 am »
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 :)
« Last Edit: August 09, 2017, 12:00:39 pm by apelly »
 

Offline GabrielTopic starter

  • Regular Contributor
  • *
  • Posts: 66
  • Country: au
Re: Help with WS2812B led strip
« Reply #4 on: August 10, 2017, 08:56:45 am »
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!
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1662
  • Country: gb
Re: Help with WS2812B led strip
« Reply #5 on: August 10, 2017, 01:05:31 pm »
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.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Help with WS2812B led strip
« Reply #6 on: August 10, 2017, 03:00:43 pm »
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);
« Last Edit: August 10, 2017, 03:07:58 pm by StillTrying »
.  That took much longer than I thought it would.
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12366
  • Country: au
Re: Help with WS2812B led strip
« Reply #7 on: August 11, 2017, 12:01:41 am »
The OP has specified that they have set the string length to 50 -
I have made sure that that I am specifying that there are 50 leds in the strip (till the cut).
... 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:
Does the 4th row up ever light up ?

I 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.
 

Offline RGB255_0_0

  • Frequent Contributor
  • **
  • Posts: 772
  • Country: gb
Re: Help with WS2812B led strip
« Reply #8 on: August 11, 2017, 07:40:28 am »
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.
Your toaster just set fire to an African child over TCP.
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gb
Re: Help with WS2812B led strip
« Reply #9 on: August 11, 2017, 09:21:05 am »
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.

Why 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.
 

Offline GabrielTopic starter

  • Regular Contributor
  • *
  • Posts: 66
  • Country: au
Re: Help with WS2812B led strip
« Reply #10 on: August 11, 2017, 11:23:00 am »
Without thinking too hard, should the 50 be 121 ? ( or 121 - 3 )

No 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.

Does the 4th row up ever light up ?

No. I have not yet succeeded to light it up. :(

... or just use a scope.


I 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. |O

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.

I 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.
 
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Help with WS2812B led strip
« Reply #11 on: August 11, 2017, 12:45:09 pm »
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.
.  That took much longer than I thought it would.
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2110
Re: Help with WS2812B led strip
« Reply #12 on: August 11, 2017, 12:59:41 pm »
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.
 

Offline tablatronix

  • Regular Contributor
  • *
  • Posts: 199
  • Country: us
Re: Help with WS2812B led strip
« Reply #13 on: August 11, 2017, 01:13:18 pm »
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

 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12366
  • Country: au
Re: Help with WS2812B led strip
« Reply #14 on: August 11, 2017, 04:08:16 pm »
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:
I 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. |O

If 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.
 

Offline GabrielTopic starter

  • Regular Contributor
  • *
  • Posts: 66
  • Country: au
Re: Help with WS2812B led strip
« Reply #15 on: August 13, 2017, 08:27:44 am »
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 ;D. I will post some picture of the finished product (if I remember ;)).

Thank you all again,
Gabriel
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12366
  • Country: au
Re: Help with WS2812B led strip
« Reply #16 on: August 13, 2017, 08:50:39 am »
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!
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Help with WS2812B led strip
« Reply #17 on: August 14, 2017, 11:23:39 am »
Depending on how you're going to mount or diffuse them, you'll should check that having every other row of LEDs upside down doesn't cause every other row to look different, because each RGB LED colour is beamed slightly differently.
« Last Edit: August 14, 2017, 11:25:11 am by StillTrying »
.  That took much longer than I thought it would.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf