Switch on a NeoMatrix

Hello

I would like to add a on/off switch to a 5V alimentation on my circuit (to cut the power of my servos),
this alimentation is also connected to my neomatrix, and there is a different alimentation for the adruino board :

Before burning anything, I would like to confirm with you that it is ok :
is there a risk to damage the neomatrix if I cut off the power of the neomatrix but leave the data wire connected ?
(the ground is always connected)

I plan to do the on/off switch with a mosfet transistor on the red wire

Thank you !!
Johan

is there a risk to damage the neomatrix if I cut off the power of the neomatrix but leave the data wire connected ?

Yes. See Absolulte Maximum’s on bottom of page 2.
Data line is not to exceed supply by more than 0.5V

WS2812B_preliminary.pdf (347 KB)

Thank you CrossRoads,
but I'm not sure to understand :
How the maximum voltage of the data line is linked to the fact that I turn on or off the power cable ?
My question is about the risk when I unplug the 5V power cable and leave the data cable (connected to the arduino) and the ground connected to the neomatrix...

Thank you !

What CrossRoads is saying is that if you turn off the supply voltage and then put a logic "high" voltage on the data line, that voltage becomes greater than the supply voltage, which is undesirable.

Now whether that is an actual problem is another matter. You can most likely provide some isolation by putting a 1k resistor in series with the data line, physically connected at the first neomatrix device. More importantly would be to arrange your code to ensure that whenever the power to the neomatrix is turned off, the data line is always held LOW, and for good measure, is defined as an input.

The more obvious solution is of course, not to interrupt the power to your neomatrix as there is never any reason to do so. Simply commanding all the LEDs off drops the power consumption to a trivial level.