Go Down

Topic: WS2811 LED Strip with Nano Clone and Fastled only lighting up white. Help plz (Read 2321 times) previous topic - next topic

PaulRB

OK, I got it working now.

Video2

This is how I did it:



I used 1 channel of a 4 channel logic level converter module. You can buy these very cheaply on eBay etc.

LV --> 5V
GND --> Arduino GND
LV2 --> D2 on Nano (or any pin you like)
HV --> 12V
GND --> GND (surprisingly, it seems to be important that both GND pins on these modules are connected UPDATE: this was because I stupidly missed connection on my breadboard circuit!)
HV2 --> 330R --> Strip data input

1Pats

Caught by the same, had the same symphtoms, re-soldered connections, changed several libraries, changed pins, swapped Uno to Mega and back,  even did rollback to Arduino IDE version to try Kevin Daren approach... studded a lot of sources over internet..The same. Initially had 240 leds with external power source. Decided to simplify, cut to 16 without external source. Verified resistor several times.. wires. The same. All day. Almost gave up. But recalled "most difficult issues are most stupid issues..". Connected to other end..and. it works. Now understood- this is a chain. With input and output. No marked, no different look, but ends are not the same.., If you are connected to output, chain is powered (lightening white), but logic is not working..

PaulRB

this is a chain. With input and output. No marked, no different look, but ends are not the same.
I don't think that is the OP's problem. His strip is marked clearly:


1Pats

For me it was, Stupid, of course!  This is my first time dealing with LED strips, Bought from ALI, both ends are with wires... This is my five cents, hopefully others are not so stupid, but anyway...
In my case no arrows or smth..
At least symptoms were same..

PartayPat

What a hero. I have ordered a few of these and will let you know how it goes.

Why does dropping the voltage down to 3V make it happy though? (I assume that's what it's doing)

Thank you.

PaulRB

Why does dropping the voltage down to 3V make it happy though? (I assume that's what it's doing)
Quite the opposite. It's boosting the 5V data signal up to 12V. As the only data sheet I could find is in Chinese, I can't be sure this is safe, but I left the strip running for 24hrs with no apparent ill effects.

frankvnz

Thanks for this thread... I was tearing my hair out over the same issue, using and ESP8266 Wemos D1 mini. Sometimes it would work, and sometimes not. I'm guessing that noise + overshoot of the data signal would sometimes get above the threshold, so that sometimes it would work, and sometimes not.

For my contribution, here's a link to an English (probably translated from Chinese) datasheet. https://cdn-shop.adafruit.com/datasheets/WS2811.pdf

I'm not an electronics engineer, but worked with some for long enough to pick up a bit of knowledge. So take what's below with a grain of salt. Hopefully someone who knows more will contribute.

From the datasheet, it appears that the WS2811 chip supply voltage is 6-7V. Presumably there's some kind of voltage converter in the strip? And, assuming there's no similar voltage conversion on the DIN line, the threshold for the DIN line is 0.7*VDD = 4.2-4.9V.

I suspect that level-shifting the DIN up to 12V would be bad, because that would make it higher than VDD which usually kills the chip. But maybe it *is* level-shifted down?

I'm guessing that the best thing to do would be to use a transistor controlled by the Arduino pin, switching between 5V and 0V. I'd appreciate it if someone could post a circuit. But 5V seems perilously close to the 4.9V threshold.

Or could you use a voltage divider made up of a couple of resistors... say R1 = 10K and R2 = 8K resistors...

 12V --- R1 ---+--- R2 --- Arduino output pin
                     |
                     |
                    DIN WS2811

When the ESP8266 pin is high, the output to the WS2811 is (12+3.3)*8/18 = 6.66V
                                 low,                                          (12+0)*8/18 = 5.3V

Or would that destroy the ESP8266?

frankvnz

OK... I've done a bit of Googling.
The WS2811 chip actually operates at 5V, so there's some step-down conversion going on in the strip. The DIN pin is also a 0-5V signal, not 0-12V. From the data sheet, the DIN threshold is 0.7*VDD = 3.5V, so a 3.3V output just doesn't quite cut it.

A MOSFET is probably the right device to switch the DIN line between 5V and GND.

PaulRB

Hi @franknvz. The chips on the OP's strip are not ws2811. They are gs1903. Similar idea and pinout, but not identical.

If you read the thread from the start, in particular reply #9, you will see that the OP is also in possession of some ws2811 strip and found this to work well with the 5V data signal from the Nano, but the gs1903 strip did not.

But I do share your concern that a 12V data signal might not be good for the gs1903 chips in the long term. I think it might be a good idea for the OP to experiment using a voltage divider to reduce this down to the 6~7V mentioned in one of the tables in the gs1903 data sheet.

What we really need is a forum member who can read a Chineese data sheet to help us out.

Your voltage divider idea for esp is not a good idea. You would be exposing the esp pin to 12V, which could damage it, even though there would be two resistors to limit the current.

If you are attempting to drive a genuine ws2811 strip with esp, I recently overcame that problem with help from forum member grumpy_mike. Use a 74hc14. Use two of the chip's 6 inverter gates in series, powering the chip with 5V.

Paul__B

If you are attempting to drive a genuine ws2811 strip with esp, I recently overcame that problem with help from forum member grumpy_mike. Use a 74hc14. Use two of the chip's 6 inverter gates in series, powering the chip with 5V.
Strictly speaking, 3.3 V is running a bit close to the maximum threshold voltage, though the "typical" is quite comfortable.

A 74HCT14 would be perfect if available - this is after all, exactly what its purpose is.  

frankvnz

OK, I have mine running now. Well, nearly. I have it working on an Arduino Uno (i.e. with 5V output).

At first it didn't work even then, just going all white and not responding to data. I verified that the software and port were working by using a 5V strip. So I figured that somewhere along the line I'd killed the first WS2811 chip in the strip. Hoping that it was only the first chip, I cut off the first 3 LEDs and soldered on a connector. Upshot is that the strip is now working. :) :) :)  Probably that 470ohm resistor really is needed in the data line to protect the WS2811 as much as the Arduino.

NB: 74HCT14 is an *inverting* device, hence the need to use two of its gates in series. Also, that's a 14-pin chip with 6 channels... wondering if there's something smaller since I really only want one channel? e.g. would this device work? http://pdf1.alldatasheet.com/datasheet-pdf/view/3041/MOTOROLA/H11L1.html





Paul__B

Probably that 470ohm resistor really is needed in the data line to protect the WS2811 as much as the Arduino.
OK, let's get this straight.  The 470 Ohm resistor is not in any way there to protect the Arduino proper.  It is not even there in case of a wiring mistake as it is to be connected in series, at the input of the LED strip.

NB: 74HCT14 is an *inverting* device, hence the need to use two of its gates in series. Also, that's a 14-pin chip with 6 channels... wondering if there's something smaller since I really only want one channel? e.g. would this device work?
That device is an opto-coupler, not a level converter.

No, not fast enough.   :smiley-eek:

PartayPat

*sigh*

I've wired in the logic level converter as you described but the only difference is that now the first set of LEDs are flashy, then the next THREE sets are black with all subsequent ones going white. No idea why this change from one black to three black would occur.

My strip is split into lengths of 2's with connectors on each end so I can swap the order around but there is no change to this pattern, so it seems to be more general than a single faulty chip.

I've also tried it on a full uncut 5m strip to the same effect, so it also looks like it's not a connector problem.

One thing to note is that the strip with no data input is white by default which might suggest that the trailing LEDs aren't getting anything sent to them. Not sure what this says for the black ones though.


PaulRB

So even with one strip of 6 leds/2 chips connected, the first chip + 3 leds flash correctly, but the second chip + 3 leds are black?

Can you reproduce my circuit as close as you can to my picture & video from post #15, and post pics of your circuit?

PartayPat


Go Up