Duet 3 MB6HC supports both DotStar and NeoPixel LED strips. Duet 3 Mini supports NeoPixel only. Duet 2 WiFi and Ethernet supports NeoPixel from RRF 3.3. You can also use an Arduino to interface LED strips to a Duet.
Connect the LED strips to the 4-pin connector labelled DS_LED.
In firmware versions prior to 3.3 the maximum supported number of Neopixel LEDs in a strip is 60 RGB LEDs. RRF 3.3 supports up to 80 RGBW LEDs or 106 RGB LEDs. In RRF 3.4, this increased to 240 RGBW LEDs or 320 RGB LEDs.
The firmware limit for DotStar LEDs is several thousand.
Caution! LED strips can draw a considerable amount of power, usually up to 60mA per LED (for RGBW Neopixel LEDs, up to 80mA per LED). If you are powering the LED strip from the Duet, make sure that the Duet is able to supply sufficient current (maximum 3A total external load on +5V). In particular, if you are powering a Raspberry Pi or other single board computer from the Duet, then the Duet will not be able to power a LED strip as well.
Connect the LED strips to the 3-pin connector labelled NP_LED.
You will need to supply external 5V power to the adjacent 5V_IN connector, unless you connected the 5V line of your LED strip directly to an external 5V supply. The 5V regulator on the Duet 3 Mini is rated at 1A total and cannot be used to power LED strips.
In firmware versions prior to 3.3 the maximum supported number of Neopixel LEDs in a strip is 60 RGB LEDs. Firmware 3.3 and later support up to 80 RGBW LEDs or 106 RGB LEDs.
Support for NeoPixel strips on Duet 2 WiFi/Ethernet was added in RRF 3.3.
A signal for controlling Neopixel strips can be output on pin 5 of the CONN_LCD connector provided that you do not have external stepper drivers connected to CONN_LCD. The signal level is 3.3V so you need to level shift it to 5V. A non-inverting 74HCT series gate or buffer such as 74HCT08 can be used to do this.
RGB NeoPixels draw up to 60mA per LED. RGBW ones draw up to 80mA per LED. Therefore the Duet cannot provide enough power for an LED strip unless the number of LEDs in the strip is small (for example 16 RGB or 12 RGBW LEDs). For longer strips you must provide external 5V power to the strip.
In firmware 3.3 the maximum supported number of Neopixel LEDs in a strip is 60 RGB LEDs. Firmware 3.4 and later support up to 60 RGBW LEDs or 80 RGB LEDs.
The M150 command is used both to configure and control LED strips.
The X and Q parameters configure them and the remaining parameters set the colours. If the X and Q parameters are not provided, the last values of those parameters specified will be used again, or default parameters if they have never been specified. You do not normally need to specify the Q parameter, but you must specify the X parameter at least once unless the default is acceptable. On the Duet 3 MB6HC, the default is X0 (DotStar) in firmware 3.1.1 and earlier, and X1 in firmware 3.2 and later. On the Duet 3 Mini the default is always X1 (RGB Neopixel).
If the S parameter is ommitted then as many LEDs as can be set in a single chunk will be addressed which depends on the board (e.g. 60 RGBW neopixels on Duet2, many more on Duet 3). We recommend users always explicitly set the number of LEDs to address, rather than rely on this behaviour as the number of LEDs addressed in a single chunk may change in the future.