====== lamaPLC Communication: WS2812 ====== {{ :com:ws2812_7.png?150|WS2812}} WS2812 is a intelligent control LED light source that the control circuit and **RGB chip** are integrated in a package of **4020**, **2020**, **3535**, **5050** components. It internal include intelligent digital port data latch and signal reshaping amplif ication drive circuit. Also include a precision internal oscillator and a 12V voltage programmable constant curre-nt control part, effectively ensuring the pixel point light color height consistent. The data transfer protocol use single **NZR** communication mode. After the pixel power-on reset, the DIN port receive data from controller, the first pixel collect initial 24bit data then sent to the internal data latch, the other data which reshaping by the internal signal reshaping amplification circuit sent to the next cascade pixel through the DO port. After transmission for each pixel,the signal to reduce 24bit. Pixel adopt auto resha-ping transmit technology, making the pixel cascade number is not limited the signal transmission, only depend on the speed of signal transmission. LED with low driving voltage, environmental protection and energy saving, high brightness, scattering angl e is large, good consistency, low power, long life and other advantages. The control chip integrated in LED above becoming more simple circuit, small volume, convenient installation. ===== WS2812B ===== **WS2812B** is the development and new generation of product based on WS2812. It not only inherited all the good qualities of WS2812 but also improved the IC from mechanical arrangement outside to the structure inside, further enhance the stability and efficiency. An extrude advantage of is that the RGB chip on WS2812B has a higher brightness and color uniformity than WS2812. Despite its similar size, the WS2812B strip contains four pins as opposed to six pins on the WS2812. {{ :com:ws2812_8.png?400 |WS2812 vs. WS2812B}} ==== WS2812B Hardware Overview ==== At first glance, the WS2812B LED may appear to be a standard 5050-sized (5x5mm) SMD RGB LED, but it is much more than that. It actually contains an integrated circuit inside. Below is a zoomed-in image of the WS2812B. {{ :com:ws2812_9.png |WS2812B LED strip}} ===== PIN configuration ===== {{ :com:ws2812_1.png |WS2812 PIN configuration}} |< 100%>| ^PIN^Symbol^Function description| |1|DOUT|control data signal output| |2|DIN|control data signal input| |3|Vcc|power supply control unit| |4|NC|-| |5|Vdd|power supply LED| |6|Vss|Ground| ===== Technical description ===== |< 100%>| ^Parameter^Symbol^Ratings^Unit| |Power supply voltage|VCC|+6.0 .. +7.0|V| |Power supply voltage|VDD|+6.0 .. +7.0|V| |Input voltage|VI|-0.5 .. VDD+0.5|V| |Operation junction temperature|Topt|-25 .. +80|℃| |Storage temperature range|Tstg|-55 .. +150|℃| ===== LED characteristic parameter ===== |< 100%>| ^Emitting color^Wavelength (nm)^Luminous intensity (mcd)^Current (mA)^Voltage (V)| |Red|620-630|550-700|20|1.8-2.2| |Green|515-530|1100-1400|20|3.0-3.2| |Blue|465-475|200-400|20|3.2-3.4| ===== Data transfer time ===== TH + TL = 1.25 µs ± 600 ns \\ |< 100%>| |T0H|0 code, high voltage time|0.35us|±150ns| |T1H|1 code, high voltage time|0.7us|±150ns| |T0L|0 code, low voltage time|0.8us|±150ns| |T1L|1 code, low voltage time|0.6us|±150ns| |RES|low voltage time|Above 50µs|| **Sequence chart:**\\ {{:com:ws2812_2.png|WS2812 sequence chart}} **Cascade method:**\\ {{:com:ws2812_3.png|WS2812 cascade method}} **Data transmission method:**\\ {{:com:ws2812_4.png|WS2812 data transmission method}} Note:The data of D1 is send by MCU, and D2, D3, D4 through pixel internal reshaping amplification to transmit. \\ **Composition of 24 bit data:**\\ {{:com:ws2812_5.png|WS2812 composition of 24 bit data}} Note: Follow the order of GRB to sent data and the high bit sent at first. \\ **Typical application circuit:**\\ {{:com:ws2812_6.png|WS2812 typical application circuit}} ===== WS2812 / WS2812B with Arduino ===== [[https://docs.arduino.cc/libraries/ws2812fx/|WS2812 FX Library for Arduino]] and ESP microprocessors. \\ This library features a variety of blinken effects for WS2811/WS2812/NeoPixel LEDs. \\ {{ :com:ws2812_10.png?400 |WS2812 / WS2812B with Arduino}} ===== Sources ===== Wikipedia ([[https://cdn-shop.adafruit.com/datasheets/WS2812.pdf|Adafruit WS2813 pdf]]) \\ ===== WS2812 topics on lamaPLC ===== {{topic>WS2812}} \\ {{tag>bus communication WS2812 WS2812B WS_2812 WS_2812_B 5050SMD 4020 2020 3535 5050 NZR RGB_chip LED Arduino RGB}} \\ This page has been accessed for: Today: {{counter|today}}, Until now: {{counter|total}}