Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Raspberry Pi controlled NeoPixels / WS28xx RGB LEDs

NeoPixels from AdaFruit are individually addressable multicoloured LEDs. They are also available from other supplies under different names such as RGB LEDs. In particular look for a reference to WS2811 or WS2812 in the product description. In he rest of this article I will refer to them as NeoPixels which is a brand name, but this guide will also work for the other makes.

Solderless through-hole NeoPixels controlled by a Raspberry Pi

The NeoPixels work have four connections. Two of these are for the supply voltage (+5V and ground) and then the others are for data-in and data-out. A signal is sent from the controller (in this case from the Raspberry Pi), the NeoPixel receives it's colour information from the data-in port and then forwards the rest of the information through the data-out on to the next NeoPixel. Using this technique it's possible to connect over 100 NeoPixels to a single pin of the Raspberry Pi (the most I have on a single string is 150, but it is possible to connect more if you have a suitable power supply).

The NeoPixels are designed to take a 5V input, but the output from the Raspberry Pi only provides 3.3V, so a level shifter is required. It is also neccessary for the Raspberry Pi to manipulate the PWM signal using an appropriate software library. This is all explained further in the following two worksheets. If you don't mind a bit of soldering then I suggest the first worksheet (which can then be used for a much larger range of NeoPixel strips, circles or matrix displays). If you want to have a try without any soldering then the second worksheet uses through-hole NeoPixel LEDs which don't require any soldering.

  • NeoPixel Breadboard worksheet
  • Through-hole NeoPixel worksheet (no soldering required)
  • The worksheet was used at the Raspberry Pi birthday party 2017

    Previous RPi Robot
    RPi Robot
    Next Raspberry Pi and Arduino communications
    Raspberry Pi and Arduino communications