Warning indicator LED

With little basic Arduino and Electronics knowledge, I want to build this circuit to display faults or warnings on a WS2811 LED strip (1.5m total length).
Haven't even thought about coding yet, and was hoping someone would be able to point me in the right direction to maybe sample code close to what I need that I can play with to get this project going.
I'm not even sure if the circuit is correct as I've drawn it ...
The 24v comes from a CNC controller relay output
I would require a separate 12v for the LED strip
and the usual 5v to run the Arduino mini
My idea was that each input source into the Analog input of Arduino would trigger a different color as per the notes next to the source.
I think I have enough knowledge to be able to somehow make this work if the electronics are correct the way I've drawn them.

Hello @novastargx , welcome.
Thank you for posting a schematic, of only all new people here did that...

You should put a capacitor across the supply to the LED strip, maybe 100μF.

You need resistors in series with the LEDs for the opto-couplers, otherwise you'll get a satisfying pop from them the first time you connect 24V to them.... Maybe 10mA for each LED, so 24/0.01 = 2400 Ohms or so.

You have two part numbers on the strip in you schematic.

The WS2812b needs 5 volt power. I am not familiar with the WS2820b, and it does not turn up with as much googling as I will bother doing.

The 5 volts for the LEDs has to supply enough current. Estimates can vary widely, if you want all LEDs all RGB full blast you'll get some maximum. But you may not ever do that. In general a nice display of less-than-fully bright not all on at once might be only 1/3 of that.

Here's one strongly held set of opinions:

Haven't even thought about coding yet,

There's a crap-ton of smart LED (neopixels) demo code all over the internets. It really comes down to what you want to do on them.


Thanks PerryBebbington
Does this now look more electronically correct?
I had overlooked the LED strip part number as Alto777 mentioned. Now I'm looking at the WS2812b which operates from 5v source, which will simplify power distribution as well.
I know there are a ton of Neopixle sketches out there. The hiccup I may have would be to tell Arduino which colors to illuminate depending on where the source signal is coming from.
Basically 3 colors;
Source 1 - Normal Condition - all LEDs steady WHITE
Source 2 - Caution Condition - all LEDs slow fade in/out ORANGE
Source 3 - Fault Condition - all LEDs flashing RED

1 Like

Why would that be a hiccup? It's a straightforward programming task.

Hi aarg
In theory I know what I want , and loosely know that it see a signal on one of the inputs and output the corresponding digital output .... What I don't know is how to write it in a sketch ... so I presume I need 2 blocks of sample sketches, 1 for looking for a input, another using any Neopixel sample to light the strip up .. I don't have the programming knowledge to gel it all together and make it work..

I'm the type that knows little about a lot of stuff, but knows nothing in detail about one thing

First Google link to come up when I input your number "WS2812b Arduino"


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.