Output - NeoPixel (Basic)

.

Plugin details

Type: Output

Name: NeoPixel (Basic)

Status: NORMAL NEOPIXEL

GitHub: P038_NeoPixel.ino

Maintainer: .

Used libraries: .

Supported hardware

NeoPixel RGB and RGBW LEDs and LED Strips

A few examples of NeoPixel LEDs and strips

A few examples of NeoPixel LEDs and strips (Image sourced from Aliexpress)

Power consumption

By the physical design of these modules, using NeoPixel leds for display that can consume up to 60 mA each, the power consumption is dependent on the number of neopixels that are activated and the brightness that is set. On a set of NeoPixels, like consisting of 64 pixels, the max. power used 60 mA * 64 = 3840 mA @ 5V = 19.2 watt with all leds on at max brightness (255), so it requires an adequate power supply, preferably separate from the power supply used to power the ESP.

When reducing the brightness to 40% (0.4 * 255 = 102), that power is reduced to ca. 1.5 A @ 5V = ca. 7.5 watt. 40% is usually enough during daylight conditions, at night the brightness can often be reduced to 20%.

For a set of 300 pixels, the max. power would count up to 300 * 60 mA @ 5V = 90 W. At 40% brightness, that is reduced to 36 W.

Reasoning back from the available power supply max. load (f.e. 30 W), the max. allowed brightness can be calculated by dividing the max. load by the voltage (5V) and the number of pixels (300) = 20 mA, 60 / 20 = 3 = ~33% brightness = 85. That will still be bright enough, but will put quite a strain at the power supply.

Configuration

Device configuration
  • Name A unique name should be entered here.

  • Enabled The device can be disabled or enabled. When not enabled the device should not use any resources.

  • GPIO -> DIN: Select the GPIO pin that the LED stripe is connected to.

  • Led Count: The number of LEDs available. This is the amount of LEDs that will be allowed for the NeoPixel* commands to be set, and that will be set using the NeoPixelAll* commands.

  • Strip Type: Select the type of the LEDs mounted on the strip:

The Strip type options

GRB : Most commonly, the LEDs are of GRB type.

GRBW : If the LEDs also support Brightness control, then the GRBW type should be selected, and the Brightness can be added in the NeoPixel* commands.

Command Syntax

Extra information

NeoPixel,<led nr>,<red>,<green>,<blue>[,<brightness>]
Set the LED to the provided R/G/B[/W] color value.
led nr: 1..<Led Count>
red: 0..255
green: 0..255
blue: 0..255
brightness: 0..255 (only applicable when using GRBW LEDs)
NeoPixelAll,<red>,<green>,<blue>[,<brightness>]
Set all LEDs to the provided R/G/B[/W] color value.
NeoPixelLine,<start led nr>,<stop led nr>,<red>,<green>,<blue>[,<brightness>]
Set a group of LEDs to the provided R/G/B[/W] color value.
Start LED nr and Stop LED nr should be within range 1..<Led Count>.
NeoPixelHSV,<led nr>,<hue>,<saturation>,<value>
Set the LED to the provided H/S/V color value.
led nr: 1..<Led Count>
hue: 0..255
saturation: 0..255
value: 0..255
NeoPixelAllHSV,<hue>,<saturation>,<value>
Set all LEDs to the provided H/S/V color value.
NeoPixelLineHSV,<start led nr>,<stop led nr>,<hue>,<saturation>,<value>
Set a group of LEDs to the provided H/S/V color value.
Start LED nr and Stop LED nr should be within range 1..<Led Count>.

Change log

Changed in version 2.0:

improved 2022-01: Make plugin multi-instance compatible, improve/fix pin selection, allow RGBW color selection for NeoPixelLine* commands.

added Major overhaul for 2.0 release.

New in version 1.0:

added Initial release version.