https://docs.duet3d.com/
Help

Revision to Neopixel and DotStar LEDs

David Crocker

+[title|Neopixel and DotStar LEDs]
+
+
+Duet 3 MB6HC supports both DotStar and NeoPixel LED strips. Duet 3 Mini supports NeoPixel only. Duet 2 and Duet Maestro do not support these LED strips directly, but you can use an Arduino to interface them to a Duet.
+
+== Connecting DotStar or NeoPixel strips to Duet 3 MB6HC ==
+
+Connect the LED strips to the 4-pin connector labelled DS_LED.
+
+* Connect the GND pin of the LED strip to the GND pin on the Duet DS_LED connector.
+* Connect the +5V pin of the LED strip either to the 5V pin of the DS_LED connector, or to an external +5V power supply.
+* For DotStar LED strips, connect the DotStar clock line to the DS_CK pin of the Duet and the DotStar data input line to DS_DO pin of the Duet. It's not always clear which way round these lines are on DotStar LED strips. If you swap the clock and data lines over then the LED strip will not work correctly, but no damage will be done.
+* For NeoPixel strips, connect the data input line to the DS_DO pin of the Duet.
+
+The maximum supported number of Neopixel LEDs in a strip is 60.
+
+'''Caution!''' LED strips can draw a considerable amount of power, usually up to 60mA 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.
+
+== Connecting NeoPixel strips to Duet 3 Mini ==
+
+Connect the LED strips to the 3-pin connector labelled NP_LED.
+
+* Connect the GND pin of the LED strip to the GND pin on the Duet NP_LED connector.
+* Connect the +5V pin of the LED strip either to the EXT_5V_IN pin of the NP_LED connector, or to an external +5V power supply.
+* Connect the data input line of the LED strip to the NEOPIXEL_DO pin of the Duet.
+
+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.
+
+The maximum supported number of Neopixel LEDs in a strip is 60.
+
+== Configuring and controlling LED strips ==
+
+The [[Gcode#Section_M150_Set_LED_colours|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 alwaysX1 (Neopixel).