This board features a WS2812 integrated RGB LED and controller IC. The pins of the WS2812 are broken out to 0.1"-spaced headers for easy use. The WS2812 operates on 4V to 7V DC and communicates via a unique one-wire interface. It's chainable, so the output of one LED can be connected to the input of another to create strips of hundreds of LEDs. You can chain together several of these boards to form a display or an addressable string. Each LED at full brightness can pull about 60mA, so bear in mind that means 10 LEDs can require up to 600mA. The brightness of each color can be adjusted using pulse-width modulation to one of 256 different levels. That means there are 16,777,216 (256³) possible combinations of colors. You can produce any color from white to black (off), or salmon to sienna. The board's pins are as follows: - 5V is the power input. Technically it can be between 4V and 7V DC. Typical use is with a regulated 5V supply.
- GND is the common ground 0V reference.
- DI is Data In from a microcontroller or another WS2812.
- DO is Data Out to be connected to the DI pin of another WS2812, or left floating on the last board in a chain.
There are two 5V and GND pins on the board — one each on opposite sides — making it easy to chain multiple boards together from left to right. You can think of the right-side 5V and GND pins as output to be connected to the left-side pins on the next board in the chain. The figure below shows an example connection of five of these boards to an Arduino Uno, controlled via the Arduino's I/O pin 4: Data Transmission Interface The communication interface between a microcontroller and the WS2812 is unusual. It's one wire, but it's not like a standard UART serial interface. This interface is very time-specific. Both a logic 0 and a logic 1 require a square pulse; it's the length of the pulse that defines which it is. See the timing diagram below: The data are sent in a sequence containing 24 of those bits — 8 bits for each color — followed by a low Reset pulse of at least 50µs. The channels are in the order Green, Red, Blue. The larger the value of a specific color is, the brighter it will be. If every color is set to 0, the LED will be off. If every color is set to max (255) the LED will be brightest white. Because the interface is so time-specific, you will need a real-time processor like an Arduino or Propeller to run the LEDs. Microprocessors like those on the Raspberry Pi or pcDuino can't give you a reliably-timed pulse; even if one bit is less than a microsecond off, that could mean the difference between purple and maroon. WS2812 RGB LED Breakout Board Resources
Optional Recommended Products for this Item
|