Thank you for your response. I am new to all this and I am not sure how to deal with timing problems. It will be very helpful if you gave some examples to work with. Also, I will look on to it.OutoftheBOTS_ wrote: ↑Sun Apr 26, 2020 3:43 amI have always been able to get any addressable RGB LED strip to work without needing a 3.3v to 5v level shifter but I haven't used every single LED strip ever made so some out there may have problems with 3.3v.
Every single time I have had trouble with getting an addressable RGB LED strip to work it has always been because of timing problems (it maybe with 5v they r less sensitive to timing problems than at 3.3v). I normally just try all the different timings from all the different datasheets till I find the one that works.
Although sellers of the products all call them by the same thing they are usually selling a clone that can have a different IC on it, if you look under the microscope you can see the different ICs used and they all have different timings.
Here are some of the datasheets that I get timings from:
https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf
https://cdn-shop.adafruit.com/datasheets/WS2812.pdf
http://www.peace-corp.co.jp/data/WS2812 ... 1.0_EN.pdf
https://cdn-shop.adafruit.com/datasheets/WS2811.pdf
https://datasheet.lcsc.com/szlcsc/World ... 114584.pdf
https://cdn-shop.adafruit.com/product-f ... sheet+.pdf
help with WS2812B LED
-
- Posts: 14
- Joined: Wed Mar 25, 2020 12:35 am
Re: help with WS2812B LED
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: help with WS2812B LED
The data (values of Red, green and blue for all LEDs) is sent via a pin where if it is high for a certain length of time followed by low for a certain length of time this will be seen as a binary 1 and if the pin is high for a different length of time followed by low for a different length of time it will be seen as a binary zero.
Each different code of the addressable LEDs has a different needed timing of high and low.
Each different code of the addressable LEDs has a different needed timing of high and low.
- Attachments
-
- Capture2.JPG (21.57 KiB) Viewed 5060 times
-
- Posts: 14
- Joined: Wed Mar 25, 2020 12:35 am
Re: help with WS2812B LED
i made the led works, so i had a timing problems with the code. all i did is follow this code and changed the timing to one that worked with my LED. Thank you for the help
here is the code i followed and all you need to change is line 13 to 16 and 24:
https://gist.github.com/nevercast/9c485 ... 4a22062795
here is the forum that i got my timing from that worked with WS2812B LED. you will find it in page 3:
https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf
here is the code i followed and all you need to change is line 13 to 16 and 24:
https://gist.github.com/nevercast/9c485 ... 4a22062795
here is the forum that i got my timing from that worked with WS2812B LED. you will find it in page 3:
https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: help with WS2812B LED
I would be interested to know if once you got the correct timings do you still need the voltage level shifter or will it work fine running the data pin at 3.3vMohammedabujarad wrote: ↑Tue Apr 28, 2020 7:23 ami made the led works, so i had a timing problems with the code. all i did is follow this code and changed the timing to one that worked with my LED. Thank you for the help
here is the code i followed and all you need to change is line 13 to 16 and 24:
https://gist.github.com/nevercast/9c485 ... 4a22062795
here is the forum that i got my timing from that worked with WS2812B LED. you will find it in page 3:
https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf
-
- Posts: 14
- Joined: Wed Mar 25, 2020 12:35 am
Re: help with WS2812B LED
No you will not need a voltage level shifter, but you have to connect you voltage supply to the VIN Pin which will supply 5V to your LED stripOutoftheBOTS_ wrote: ↑Tue Apr 28, 2020 8:10 amI would be interested to know if once you got the correct timings do you still need the voltage level shifter or will it work fine running the data pin at 3.3vMohammedabujarad wrote: ↑Tue Apr 28, 2020 7:23 ami made the led works, so i had a timing problems with the code. all i did is follow this code and changed the timing to one that worked with my LED. Thank you for the help
here is the code i followed and all you need to change is line 13 to 16 and 24:
https://gist.github.com/nevercast/9c485 ... 4a22062795
here is the forum that i got my timing from that worked with WS2812B LED. you will find it in page 3:
https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: help with WS2812B LED
This is what I found so far with these addressable LEDS. You have to supply the LEDs with 5v but once you get correct timing then they are happy with 3.3v signals on the data pin.Mohammedabujarad wrote: ↑Tue Apr 28, 2020 2:53 pmNo you will not need a voltage level shifter, but you have to connect you voltage supply to the VIN Pin which will supply 5V to your LED stripOutoftheBOTS_ wrote: ↑Tue Apr 28, 2020 8:10 amI would be interested to know if once you got the correct timings do you still need the voltage level shifter or will it work fine running the data pin at 3.3v
Re: help with WS2812B LED
Yup, this has been my finding too. This is also temperature dependent -- I noticed that a micro:bit neopixel board (https://smalldevices.com.au/products/mi ... -micro-bit) became more or less reliable depending on whether I placed it next to the CPU fan exhaust on my laptop.OutoftheBOTS_ wrote: ↑Tue Apr 28, 2020 9:03 pmThis is what I found so far with these addressable LEDS. You have to supply the LEDs with 5v but once you get correct timing then they are happy with 3.3v signals on the data pin.
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: help with WS2812B LED
Does micro bit have a crystal to create a consistent clocking signal??jimmo wrote: ↑Tue Apr 28, 2020 11:55 pmYup, this has been my finding too. This is also temperature dependent -- I noticed that a micro:bit neopixel board (https://smalldevices.com.au/products/mi ... -micro-bit) became more or less reliable depending on whether I placed it next to the CPU fan exhaust on my laptop.OutoftheBOTS_ wrote: ↑Tue Apr 28, 2020 9:03 pmThis is what I found so far with these addressable LEDS. You have to supply the LEDs with 5v but once you get correct timing then they are happy with 3.3v signals on the data pin.
A crystal oscillator will tend to keep a constant freq with change in temp (it is why they use them in watches for keeping time) but if the MCU is just using electrical circuits to create the timing freq then the freq will change with temp.
Re: help with WS2812B LED
Yes the micro:bit does, but the WS2812s do not, so I believe this is why this occurs.OutoftheBOTS_ wrote: ↑Wed Apr 29, 2020 12:20 amDoes micro bit have a crystal to create a consistent clocking signal??
A crystal oscillator will tend to keep a constant freq with change in temp (it is why they use them in watches for keeping time) but if the MCU is just using electrical circuits to create the timing freq then the freq will change with temp.
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: help with WS2812B LED
I would be interested for you to try the timing for the Sk6812 which is the most common clone for the WS2812B(AKA NeoPixel).jimmo wrote: ↑Wed Apr 29, 2020 1:22 amYes the micro:bit does, but the WS2812s do not, so I believe this is why this occurs.OutoftheBOTS_ wrote: ↑Wed Apr 29, 2020 12:20 amDoes micro bit have a crystal to create a consistent clocking signal??
A crystal oscillator will tend to keep a constant freq with change in temp (it is why they use them in watches for keeping time) but if the MCU is just using electrical circuits to create the timing freq then the freq will change with temp.
The timings for SK6812 are quite close to WS2812B and will normally still work when using WS2812B timings but can have intermittent problems.
See the Sk6812 timings here https://cdn-shop.adafruit.com/product-f ... sheet+.pdf
Can you tryu these timing with the same Microbit and put it next to your hot fan and see if you have the same problem.