WS2812

From Hackerspace ACKspace
(Redirected from Ws2812)
Jump to: navigation, search

These LEDs are also known by Adafruit as NeoPixels.


different types

Most of these LEDs come in a 5050 housing (5x5mm SMD) and have a WS2811 controller chip in them. There are also some other versions. Here we describe some of them.

WS2812 / WS2812S

This is the first version of the integrated WS2811 IC into the LED (as far as xopr knows). It has six pins (see the ASCII LED diagram): (top N/C, middle VDD, bottom VSS) ⋮[ #]⋮ (top VCC, middle DI, bottom DO: notch)

WS2812B

This is the improved version with only four pins (see the ASCII LED diagram): (top VCC, bottom DO) :[ #]: (top DI, bottom, GND: notch) (top view, the # is where the chip is)

APA102

Also known by Adafruit as DotStars.

Currently, we haven't played with it yet.


extra information

interfacing with 3.3v logic

The 5V logic doesn't accept 3.3v signals by default; there are two ways to get around this:

  1. under-volt your LEDs (tested with about 3.75v, and the input logic accepts 3.3v
  2. add a level converter.
You will often see a mosfet (BSS138 or 2N7000, which work bidirectional) or TTL logic (like the 74LS245 octal bus transceiver, or just an AND or OR gate), but since we only need a 5v output connected to a high impedance input, we can use an NPN transistor for this. (reference: [1], [2] and [3])
Connect the:
  • collector of a bc547 via a 4k7 resistor to 5v
  • same collector to the DI of the LED
  • base of the transistor via a 10k resistor to 3.3v
  • emitter to your 3v3 output

references