2

I bought these rgb's from Sparkfun, however I have no idea how to hook them up or how to program them. Obviously the data sheet was somewhat helpful, however I have no idea how the IC's in the LED's work themselves or how to control them separately, or even how to string them together. My best guess is currently going for what the led's appear as in the example picture by connecting the first and last pins and putting the respective Vcc and ground pins to Vcc and ground.

Is there any good examples for hooking these up and coding them, or a basic understandable explanation for how they work?

Thanks, I can't find a great resource yet.

1 Answers1

3

These are much different than "normal" RGB LED: they use the WS2812 chip, which is the same as the chip used in famous Adafruit "neopixels" strips, rings...

Wiring is simple. For all LEDs:

  • GND to 0V
  • VDD to 5V

For the first LED (connected to Arduino):

  • DIN to any Arduino logical output pin
  • DOUT to the 2nd LED you want to address (on its DIN pin)

For all but the first LED:

  • DIN to the previous LED DOUT
  • DOUT to the next LED DIN (or left floating for the last LED)

Programming neopixel is quite hard because timing of sent commands must be very precise.

I highly suggest to use Adafruit libraries for that.

jfpoilpret
  • 9,132
  • 7
  • 37
  • 54
  • Wiring is not the same. RGB addressable LEDs will need 12V, they draw some "extra" power over what the LED would draw by itself. See this: https://www.youtube.com/watch?v=h_GXhJeCDD0 – Jasmine Jan 12 '15 at 18:04
  • I don't see anywhere in the datasheet mentioned the need for 12V: datasheet says 4.5V~6V. Personally, I have used neopixels rings with 5V without any issue. – jfpoilpret Jan 12 '15 at 18:12
  • The WS2812 itself can run on lower voltage, but the LEDs won't. EDIT: oh, you're right - that one from Sparkfun is special. – Jasmine Jan 12 '15 at 18:16
  • @Jasmine that's why it is always important to refer to the datasheet when you have it, that must be THE reference. No hard feelings though, your work on neopixels is interesting, thanks for sharing. – jfpoilpret Jan 12 '15 at 22:04
  • Does neopixel use either I2C or SPI? Or is it something else entirely? We're just learning about communication interfaces in my current classes. – Perplexing Pies Jan 12 '15 at 23:40
  • No they use their own protocol. – jfpoilpret Jan 13 '15 at 05:18
  • It just uses "clocked" serial data. I didn't check the link at first, I just assumed he was using the same RGB strips everyone uses. Those individual ones are a major pain :) – Jasmine Jan 13 '15 at 16:12