The LilyPad Pixel Board allows you to add color to your e-textiles. It features a WS2812B integrated RGB LED and controller IC that operates on 4V to 7V DC. Be sure to use only a regulated power supply.
The WS2812B 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 has an outer diameter of 20mm. The PCB is only 0.9mm thick. The pins are as follows:
There are two DI and DO pins on the LilyPad Pixel — one each on opposite sides — giving you flexibility in placement within your garment.
- + is the power input. Ideally this should be a regulated 5V supply.
- - 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 WS2812B, or left floating on the last board in a chain.
Data Transmission Interface The communication interface between a microcontroller and the WS2812B 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 with high bit first, i.e. G7, G6, G5, ..., G0, R7, ..., R0, B7, ..., B0.
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, you could end up with a very different color than what you desired.
Note: Earlier LilyPad Pixel Boards, sold as DEV-11891, used a WS2812 which had different timing requirements from the newer WS2812B. If you're working with an existing project created for the WS2812, you may need to adjust your code to support this new version.
LilyPad Overview LilyPad is a wearable e-textile technology developed by Leah Buechley. Each LilyPad is designed to have large connecting pads to allow them to be sewn into clothing. Various input, output, power, and sensor boards are available. Most are even washable.
See our LilyPad category to find more LilyPad components and conductive thread you can use to sew a circuit into clothing.
LilyPad Pixel Board Resources