Go Down

Topic: WS2812b led strip shut down automatically... (Read 1 time) previous topic - next topic

sblantipodi

Hi,
I am using a ws2812B led strip.

this is how I connected to the D1 Mini ESP8266 chip
https://i.postimg.cc/wM4tStBp/pc.jpg


After some minutes, the strip shutdown randomly. No care about what sketch I load on it.
It shut down randomly.

I needed to remove the resistance because there is no way to turn on the strip with a 470ohm resistance.

Can this be problem?

Thanks

Paul__B



We are seeing this question a lot.

You need to provide a level translation buffer on the output of the WeMOS for the 5 V WS2812 strip.  Two gates in series from a 74HC14 (or preferably, 74HCT14 if available) chip, the inputs of the other gates tied to ground if not used, should be the simplest - and you need the resistor connected at the input to the strip itself.

manveen_singh

#2
Dec 19, 2018, 10:28 am Last Edit: Dec 19, 2018, 10:43 am by manveen_singh
@Paul__B

ESP 32 can directly work with the LED . I have also used the same setup . I did not even required a resistor between DIN and Esp32 pin.

do note that i was using only 12 LED . If you plan to use more then your mileage may vary

BTW how are you able to post pic ? I can only post pics as an attachment.

I was even able to power The led with 3.3v thus i did not require any logic level conversion.

manveen_singh

After some minutes, the strip shutdown randomly. No care about what sketch I load on it.
It shuts down randomly.

Can you tell me exactly after how much time the leds are shutting down ?
like are they shutting down after 10 min ? or  5 min ? or after an hour ?

Please tell me the exact time

Can you also see the the voltage across the vcc and gnd of the strip ?
What is your Serial monitor saying ? Is this a brownout problem ?

Also which library are you using ? Neopixel library or FASTLED library?

Paul__B

ESP 32 can directly work with the LED.  I have also used the same setup.  I did not even required a resistor between DIN and Esp32 pin.
Yes, it can and often will but the specifications say it is not guaranteed at these logic levels so while yours presently works, it may fail with some components or with some supply voltage and/ or thermal conditions.

As Grumpy_Mike has explained, there are a couple of reasons the resistor is used, one is in case the strip is unpowered while the microcontroller is actively driving the input and the other is if there is a significant distance between the two and "ringing" occurs, generating voltages that exceed the supply rails.

The NeoPixel "shield" for the WeMOS D1 Mini for example generally works reliably as there is barely a few cm of trace between the ESP9266 and "pixel" and they share a common power source.  :smiley-lol:

do note that I was using only 12 LED.  If you plan to use more then your mileage may vary
The number of LEDs is rarely related to intermittent behaviour since the "pixels" are designed to regenerate clean waveforms from one to the next.  While this may become a problem when the levels at the input are critically marginal and the pixels are not responding to every command, it is more likely that someone has forgotten to define num_LEDs.  :smiley-roll:

sblantipodi

@Paul__B

ESP 32 can directly work with the LED . I have also used the same setup . I did not even required a resistor between DIN and Esp32 pin.

do note that i was using only 12 LED . If you plan to use more then your mileage may vary

BTW how are you able to post pic ? I can only post pics as an attachment.

I was even able to power The led with 3.3v thus i did not require any logic level conversion.

I use postimage to upload image and than copy and paste the direct url of the image
I'm using a D1 Mini (esp8266) and 95 LED (5V) powered via an external power supply.

sblantipodi

Can you tell me exactly after how much time the leds are shutting down ?
like are they shutting down after 10 min ? or  5 min ? or after an hour ?

Please tell me the exact time

Can you also see the the voltage across the vcc and gnd of the strip ?
What is your Serial monitor saying ? Is this a brownout problem ?

Also which library are you using ? Neopixel library or FASTLED library?

Fastled.
I don't have an exact time since sometimes it happena after 10 minutes, sometimes after an hours, sometimes after 30 minutes, it's completely random.
When the lights turn off, I can simply turn on and they turn on without problem, but I don't understand why they automatically turn off.

manveen_singh

Fastled.
I don't have an exact time since sometimes it happena after 10 minutes, sometimes after an hours, sometimes after 30 minutes, it's completely random.
When the lights turn off, I can simply turn on and they turn on without problem, but I don't understand why they automatically turn off.
Do check your power supply . I think you are getting less current than required.

Are you using also using wifi capability of esp ? cuz during using wifi esp does draw more current than in normal mode?
also at what brightness are you using the led strip as fully bright white colour can draw upto 60mA ? thus use 40% -50% brightness. ?
at that brightness led consume upto 20 mA -30 mA.

I think maybe you have a problem with your power supply .

While this may become a problem when the levels at the input are critically marginal and the pixels are not responding to every command, it is more likely that someone has forgotten to define num_LEDs. 

just post your code also  . maybe there is a problem there also.

sblantipodi

#8
Jan 04, 2019, 02:11 am Last Edit: Jan 04, 2019, 02:12 am by sblantipodi
Do check your power supply . I think you are getting less current than required.

Are you using also using wifi capability of esp ? cuz during using wifi esp does draw more current than in normal mode?
also at what brightness are you using the led strip as fully bright white colour can draw upto 60mA ? thus use 40% -50% brightness. ?
at that brightness led consume upto 20 mA -30 mA.

I think maybe you have a problem with your power supply .

just post your code also  . maybe there is a problem there also.
I power the ESP with the micro USB and the led strip with a 10A power supply, I don't think that is a problem of power supply.
Can it be a problem that I'm not using anyresistance for the Digital PIN?

here my code.

https://pastebin.com/iMeUyj4U

Grumpy_Mike

Quote
Can it be a problem that I'm not using anyresistance for the Digital PIN?
The resistor is there for protection. A strip will work without it but might be damaged if it is being fed a signal when while it is unpowered. That is if you turn on your Arduino before your 10A power supply, something that is easy to do.

Please read this:-
How to use this forum
It will tell you how to post code so everyone can see it. We don't like going off site to look at code.

sblantipodi

The resistor is there for protection. A strip will work without it but might be damaged if it is being fed a signal when while it is unpowered. That is if you turn on your Arduino before your 10A power supply, something that is easy to do.

Please read this:-
How to use this forum
It will tell you how to post code so everyone can see it. We don't like going off site to look at code.
Ok thanks for the answer. Code was too long for the forum so I used a common platform to sharing a snippet.
If it's not a problem of resistance what can it be?


Grumpy_Mike

Quote
Code was too long for the forum
You sure of that? Did you read how to attach code as an attachment?
If the code is too long that could be your problem. Snippets are useless, it is not worth looking at.

No idea what is wrong with so little real information.

sblantipodi

#12
Jan 04, 2019, 06:55 pm Last Edit: Jan 04, 2019, 07:05 pm by sblantipodi
You sure of that? Did you read how to attach code as an attachment?
If the code is too long that could be your problem. Snippets are useless, it is not worth looking at.

No idea what is wrong with so little real information.
here you have the complete code. :)
if you need more info simply ask. thanks

sblantipodi

Ok I solved it. hope that my code could be useful for other people.
when the MQTT broker disconnect it call the setColor(0,0,0) that basically shut down the led.
commented that function call and it's ok now.

Paul__B


Go Up