> **Source:** Core Electronics is an Australian maker-electronics retailer and manufacturer based in Newcastle, NSW, run by a team of makers and educators. We design and manufacture our own product lines (PiicoDev, CE originals) and are official retailers for iconic maker and industrial brands including Raspberry Pi, Arduino, Adafruit, SparkFun and DFRobot. Orders ship Australia-wide from our Newcastle warehouse. Prices are in AUD and include GST. Pricing, stock and dispatch on this page are generated from the store's live catalog. Full machine-readable index: https://core-electronics.com.au/llms.txt

# Addressable Through-Hole 5mm RGB LED with Diffused Lens, WS2811 Driver (10-Pack)

**Type:** Product page · **SKU:** POLOLU-2535 · **Brand:** [Pololu](https://core-electronics.com.au/brands/pololu-australia)
**Page:** https://core-electronics.com.au/addressable-through-hole-5mm-rgb-led-with-diffused-lens-ws2811-driver-10-pack.html ([markdown](https://core-electronics.com.au/addressable-through-hole-5mm-rgb-led-with-diffused-lens-ws2811-driver-10-pack.html.md))

This 10-pack of 5 mm through-hole RGB LEDs offers an easy way to add colorful and complex lighting effects to a project. Each diffused LED features an integrated WS2811 driver that operates at 5 V and is controlled through a high-speed one-wire digital interface that allows multiple LEDs to be connected together to form a chain of addressable RGB LEDs.

## Pricing

- **Price:** $12.55 (inc GST) — $11.41 AUD, exc GST
- **Quantity discounts:** 10+ $10.95 (exc GST) · 25+ $10.61 (exc GST)

## Availability & dispatch

- Available with a lead time — expect dispatch between Aug 18 and Aug 21.

## How to buy

- **Build a cart:** compose `https://core-electronics.com.au/cart/link?items=POLOLU-2535:1` (comma-separated SKU:qty pairs) and share the link. Opening it shows a confirmation page with live pricing and stock before anything is added to the cart.
- **Verify the cart first:** fetch `https://core-electronics.com.au/cart/link/POLOLU-2535:1.md` for live line prices (inc & exc GST, quantity discounts applied), stock and dispatch estimates, and totals. Append `/to/{AU-postcode}` (or `/to/{country-code}:{postcode}`) before `.md` for delivery options and prices to that destination. Unknown, retired, or out-of-stock SKUs are flagged. (Query form `cart/link.md?items=...` also works but some robots parsers refuse query strings here.)
- **Checkout** is completed on-site and includes a captcha at the payment step. Share the cart link; checkout takes it from there.
- **Search the catalogue:** `https://core-electronics.com.au/search/{query}.md` (URL-encode the query; pages 2-3 at `search/{query}/{page}.md`; `search.md?q=` also works)
- **Payment methods, purchase orders, policies and contact details:** https://core-electronics.com.au/llms.txt
## Description

| [![](https://core-electronics.com.au/attachments/localcontent/0J5432_2247014f7af.jpg)](https://core-electronics.com.au/attachments/localcontent/0J5432_576693c832a.jpg) |
|---|

These LED 10-packs are an easy way to add colorful and complex lighting effects to a project. Each RGB LED contains an integrated WS2811 driver that allows it to be controlled with a high-speed one-wire interface (see the bottom of this page for sample code, including an Arduino library for controlling these LEDs). Multiple LEDs can be connected together to form a chain of RGB LEDs, and the entire chain can be controlled from a single microcontroller pin. These are very similar to the LEDs in Pololu's [addressable RGB LED strips](https://core-electronics.com.au/category/151/addressable-rgb-leds-based-on-the-sk6812-ws281x), but with these discrete LEDs you have far more flexibility in how they are arranged. The picture on the right shows a chain of 10 LEDs in a breadboard controlled by an [A-Star 32U4 Micro](https://core-electronics.com.au/a-star-32u4-micro.html).

Pololu offer these LEDs in two different sizes: [5 mm](https://core-electronics.com.au/addressable-through-hole-5mm-rgb-led-with-diffused-lens-ws2811-driver-10-pack.html) and [8 mm](https://core-electronics.com.au/addressable-through-hole-8mm-rgb-led-with-diffused-lens-ws2811-driver-10-pack.html).

**Features and specifications**

- One-wire digital control interface
- Can form a chain of individually-addressable RGB LEDs
- 24-bit color control (8-bit PWM per channel); 16.8 million colors per pixel
- 5 V operating voltage
- Draws approximately 50 mA at 5 V with red, green, and blue at full brightness
- Color ordering: red, green, blue
- Example code available for Arduino, AVR, and mbed

**Using the LED**

**Pinout**

The LED has 4 pins, as shown in the diagram below:

| [![](https://core-electronics.com.au/attachments/localcontent/0J5433_19549980d15.jpg)](https://core-electronics.com.au/attachments/localcontent/0J5433_42610a112e0.jpg) |
|---|

The pins can be identified by the length of the leads or by looking for the flat side of the LED.

**Connecting the LEDs**

The **DIN** pin is the input signal pin. The DIN pin of the first LED in the chain should be connected to an I/O line of a microcontroller.

The **5V** pin supplies power to the LED, and should be connected to a suitable 5 V power supply. The power supply should be capable of supplying enough current for all the LEDs it is powering. Each LED draws approximately 50 mA with all three channels at full brightness.

The **GND** pin should be connected to the ground pin of the microcontroller that is controlling the LEDs and also the negative terminal of the power supply.

The **DOUT** pin is optional and allows you to chain multiple LEDs together. It can be connected directly to the **DIN** pin of the next LED in the chain.

Pololu recommend taking several precautions to protect these LEDs from damage:

- Never supply more than 5 V to the LED.
- Connect a capacitor of at least 10 µF between the ground and power lines.
- Avoid making or changing connections while the circuit is powered.
- Minimize the length of the wires connecting your microcontroller to the LED.
- Follow generally good engineering practices, such as taking precautions against electrostatic discharge (ESD).
- Consider adding a 100 O to 1000 O resistor between your microcontroller’s data output and the LED to reduce the noise on that line and to avoid accidentally powering the LED through its data input.

**Warning:** These LEDs can explode if they are pushed beyond their limits. For example, Pololu were able to make an 8 mm LED explode by powering at 6 V and setting it to full brightness for about a minute (though Pololu could not subsequently replicate that result). Pololu strongly recommend you avoid powering these LEDs at voltages over 5 V.

**Default Color**

After power is applied to these LEDs, they will emit bright blue light until the first color command is received.

**Chaining**

These LEDs can be chained with each other and also with other LED products that have a similar protocol. In particular, they can be chained with any of Pololu's [SK6812/WS281x-Based Addressable RGB LEDs](https://core-electronics.com.au/category/151/addressable-rgb-leds-based-on-the-sk6812-ws281x). Even though these LEDs use a different color ordering than the WS2812B (RGB instead of GRB), they can still be chained to WS2812B-based products.

**Protocol**

These LEDs are controlled by a simple, high-speed one-wire protocol on the input signal line. The protocol is documented below.

The default, idle state of the signal line is low. To update the LED colors, you need to transmit a series of high pulses on the signal line. Each high pulse encodes one bit: a short pulse (0.35 µs) represents a zero, while a long pulse (0.9 µs) represents a one. The time between consecutive rising edges should be 1.25µs. After the bits are sent, the signal line should be held low for 50 µs to send a reset command, which makes the new color data take effect.

| ![](https://core-electronics.com.au/attachments/localcontent/0J5006_928862a725.png) |
|---|
| SK6812/WS281x RGB data timing diagram. |

The color of each LED is encoded as three LED brightness values, which must be sent in RGB (red-green-blue) order. Each brightness value is encoded as a series of 8 bits, with the most significant bit being transmitted first, so each LED color takes 24 bits. The first color transmitted applies to the LED that is closest to the control source, while the second color transmitted applies to the next LED in the chain, and so on.

| [![](https://core-electronics.com.au/attachments/localcontent/0J3886_272079ee548.jpg)](https://core-electronics.com.au/attachments/localcontent/0J3886_3377143e75b.png) |
|---|
| 24 bits in RGB order represent the color of one LED. |

To update all the LEDs in the chain, you should send all the colors at once with no pauses. If you send fewer colors than the number of LEDs in the chain, then some LEDs near the end will not be updated. For example, to update 10 LEDs wired in a chain, you would send 240 bits encoded as high pulses and then hold the signal line low for 50 µs.

The high-speed protocol of the driver allows for fast updates; Pololu's library for the Arduino below takes about 1.1 ms to update 30 LEDs. However, constant updates are not necessary; the LED can hold its state indefinitely as long as power remains connected.

**Implementing the protocol on a microcontroller**

| [![](https://core-electronics.com.au/attachments/localcontent/0J5430_16128d54790.jpg)](https://core-electronics.com.au/attachments/localcontent/0J5430_4392809aba3.jpg) |
|---|

Since this LED does **not** use a standard protocol, a software bit-banging approach is usually needed to control it from a microcontroller. Because of the sub-microsecond timing, the bit-banging code generally needs to be written in assembly or very carefully optimized C, and interrupts will need to be disabled while sending data to the LEDs. If the interrupts in your code are fast enough, they can be enabled during periods where the signal line is low. It is generally not possible to generate the required control signals directly from older, slower microcontroller boards, like the Basic Stamp, or from processors that run full operating systems and can experience multithreading delays, like the Raspberry Pi.

**Sample code**

To help you get started quickly, Pololu provide sample code for these microcontroller platforms:

- [PololuLedStrip Arduino library](https://github.com/pololu/pololu-led-strip-arduino) (also works with Pololu's Arduino-compatible [A-star modules](https://core-electronics.com.au/search/?q=a+star+controller))
- [Example AVR C code](https://github.com/pololu/pololu-led-strip-avr)
- [PololuLedStrip mbed library](https://os.mbed.com/users/DavidEGrayson/code/PololuLedStrip/)

Additionally, the [Adafruit NeoPixel library](https://github.com/adafruit/Adafruit_NeoPixel) for Arduino should work with these LEDs since the NeoPixels are based on the similar WS2812B driver.

**People often buy this product together with:**

| [![Addressable Through-Hole 8mm RGB LED with Diffused Lens, WS2811 Driver (10-Pack)](https://core-electronics.com.au/attachments/localcontent/0J5428_266877d47c.jpg)](https://core-electronics.com.au/addressable-through-hole-8mm-rgb-led-with-diffused-lens-ws2811-driver-10-pack.html) | [Addressable Through-Hole 8mm RGB LED with Diffused Lens, WS2811 Driver (10-Pack)](https://core-electronics.com.au/addressable-through-hole-8mm-rgb-led-with-diffused-lens-ws2811-driver-10-pack.html) |
|---|---|

| [![A-Star 32U4 Micro](https://core-electronics.com.au/attachments/localcontent/0J5274_4990d36c1e.jpg)](https://core-electronics.com.au/a-star-32u4-micro.html) | [A-Star 32U4 Micro](https://core-electronics.com.au/a-star-32u4-micro.html) |
|---|---|

**Dimensions**

 | LED diameter: | 5 mm |
|---|---|

**General specifications**

 | Typical operating voltage: | 5 V |
|---|---|
| LEDs: | 10 |
| Color: | RGB |
| Maximum current draw: | 50 mA[1](https://core-electronics.com.au/#note1) |

**Notes:**

1Measured at 5 V with all three channels at maximum brightness (i.e. full white). Can vary some from unit to unit. **Recommended links**

- **[Arduino library for addressable RGB LED strips from Pololu](https://github.com/pololu/pololu-led-strip-arduino)**
    
    This library allows you to control an arbitrary number of [SK6812/WS281x-Based Addressable RGB LEDs](https://core-electronics.com.au/category/151/addressable-rgb-leds-based-on-the-sk6812-ws281x) from an Arduino.
- **[Adafruit NeoPixel library](https://github.com/adafruit/Adafruit_NeoPixel)**
    
    This Arduino library from Adafruit is as an alternative to [Pololu's library](https://github.com/pololu/pololu-led-strip-arduino) and should work for controlling Pololu's [SK6812/WS281x-Based Addressable RGB LEDs](https://core-electronics.com.au/category/151/addressable-rgb-leds-based-on-the-sk6812-ws281x).
- **[Adafruit NeoMatrix library](https://github.com/adafruit/Adafruit_NeoMatrix)**
    
    This Arduino library from Adafruit makes it easy to control matrices of NeoPixels and should also work with any chain of [SK6812/WS281x-Based Addressable RGB LEDs](https://core-electronics.com.au/category/151/addressable-rgb-leds-based-on-the-sk6812-ws281x) arranged in the correct grid pattern. Note that this library requires the [Adafruit NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel) and [Adafruit GFX libraries](https://github.com/adafruit/Adafruit-GFX-Library).
- **[Example AVR code for addressable RGB LED strips from Pololu](https://github.com/pololu/pololu-led-strip-avr)**
    
    This example AVR C code allows you to control [SK6812/WS281x-Based Addressable RGB LEDs](https://core-electronics.com.au/category/151/addressable-rgb-leds-based-on-the-sk6812-ws281x) with an AVR microcontroller.
- **[PololuLedStrip mbed library](https://os.mbed.com/users/DavidEGrayson/code/PololuLedStrip/)**
    
    This library lets you control Pololu's [SK6812/WS281x-Based Addressable RGB LEDs](https://core-electronics.com.au/category/151/addressable-rgb-leds-based-on-the-sk6812-ws281x) from an mbed microcontroller board.

## Images

- [Product image 1](https://core-electronics.com.au/media/catalog/product/a/d/addressable_through_hole_5mm_rgb_led_with_diffused_lens_ws2811_driver__10_pack___pololu_2535__00.jpg)
