Controlling ws2813 - Proof of concept

I've got a ws2813 strip and I've cut off only 3 LEDs to test / figure out code before I move on to a separate strip which would be controlled by an external power supply

Since its a 5v LED I'd imagine it could be powered by the Arduino [Uno] itself/FastLED Library but I can't find any schematics on how it should actually be wired to the chip itself.

Anyone have experience with this / could lead me in the right direction as to not fry my chip / do these strips always need a dedicated power supply?

the Strip has 4 connections, 5v +, G R B

This image shows a non addressable RGB LED strip.

You might be able to power three LEDs from the Arduino.

FastLed is for WS2812B LEDs.

Since the strip needs 5v the strip is ‘common anode’.

See image below, ‘use 5v’ not the 12v as in the image:

Note, the 3 resistors (97, 98, 99) and 3 LEDS (46, 47, 48) are on your strip.

Thanks! I mis-understood addressable as controlling the individual RGB colors vs each individual LED - Got it hooked up with a modified Blink code. 3 LEDs worked no problem :slight_smile: thanks again!

larryd:
This image shows a non addressable RGB LED strip.

You might be able to power three LEDs from the Arduino.

FastLed is for WS2812B LEDs.

Since the strip needs 5v the strip is ‘common anode’.

See image below, ‘use 5v’ not the 12v as in the image:

Note, the 3 resistors (97, 98, 99) and 3 LEDS (46, 47, 48) are on your strip.

A follow up question if you don't mind my ignorance becoming even more apparent-

I was able to hook this up - one pin in 5v, through a 220 resistor, to the +5v, 3 separate pins 10/11/12 to the G R B - Would i need resistors for each ? Does each pin give 5v / what exactly am I sending through the digital pins? I didn't notice any dimming as the colors turned off (Did 10 HIGH, 11, HIGH, 12 HIGH, 10 LOW, 11 LOW, 12 LOW in a loop)

If each LED is grabbing 20mA, I'm only sending .22 through the 5v line (if i understand I=V/R right)

is each LED color grabbing the full 5v to actually power the light? If i had an external power source, with a strip of 100 lights the G R B definitely couldn't be powered by the board, does it just grab whatever power it needs off the 5v line?

Sorry for the novice questions

'Do not' try to power too many LEDs from the Arduino 5V header, maybe for testing just use one.

What numbers do you see written on the 3 small black resistors of each pixel section on your LED srtip?

You need a LOW (0V) on the R, G 'or' B terminals of the LED strip 'and' the Arduino +5V to the strip 5V terminal.

It is a LOW that will turn on the strip LED.

To power the whole strip you will need a 'Logic Level' MOSFET.

larryd:
'Do not' try to power too many LEDs from the Arduino 5V header, maybe for testing just use one.

What numbers do you see written on the 3 small black resistors of each pixel section on your LED srtip?

You need a LOW (0V) on the R, G 'or' B terminals of the LED strip 'and' the Arduino +5V to the strip 5V terminal.

It is a LOW that will turn on the strip LED.

To power the whole strip you will need a 'Logic Level' MOSFET.

Yeah for testing I just had a strip of three connected, seemed to work fine - is this still not advisable ?

R says 151, B/G are marked 101.

To clarify even with an external powersource, I'd need a MOSFET, I couldn't just pin directly to RGB (Because the power coming through the 5v line to power for example 100 RGB LEDs is too high, and whatever is left would fry the board?)

Yes you need MOSFETs for more than one RGB pixel; note, one pixel can take up to 3*20mA=60mA.

An external 5V power supply 'will be necessary' when you want to power the whole strip.
You will need to connect the Arduino GND to the external power supply GND.

You would be safe to drive one pixel directly with the Arduino.

larryd:
Yes you need MOSFETs for more than one RGB pixel; note, one pixel can take up to 3*20mA=60mA.

An external 5V power supply 'will be necessary' when you want to power the whole strip.
You will need to connect the Arduino GND to the external power supply GND.

You would be safe to drive one pixel directly with the Arduino.

Thanks for the info and warnings! So after some reading the purpose of the MOFSET is to take the current thats coming out of the RGB lines, and turn that energy into heat, so that no current is coming back to the board? When we have an LOW signal from digital pins, the current is allowed to flow from 5v-> through resistors on LED -> Through MOFSET (now we've got 0v/0a) back to Arduino. When we've got a HIGH signal, some current is flowing up to the MOFSET?

No

The MOSFET allows or disallows current flow in a LED.

We do not want heat; heat is wasted energy when it comes to switch circuits.

When we drive the gate ‘HIGH/5v’ on a N channel MOSFET, current can flow through it i.e. drain to source. Current can flow through the LED.

When we drive the gate ‘LOW/0v’ the MOSFET turns OFF i.e. no current flows through it. No current flows through the LED.

The WS2813 is a "smart" RGD LED, with a built in current limiting to each of the R,G,B LEDs in the package.
So it wouldn't need external current limit resistors.
If you connect 5V to the strip, and individually connect each of the R, G, or B to Gnd, do all 3 LED of one color turn on?
If so, you do not have WS2813, but instead have a 'dumb' RGB LED strip that needs a MOSFET to sink up to 20mA of current from each color to turn that color on full bright.

larryd:
No

The MOSFET allows or disallows current flow in a LED.

We do not want heat; heat is wasted energy when it comes to switch circuits.

When we drive the gate ‘HIGH/5v’ on a N channel MOSFET, current can flow through it i.e. drain to source. Current can flow through the LED.

When we drive the gate ‘LOW/0v’ the MOSFET turns OFF i.e. no current flows through it. No current flows through the LED.

Oh okay so it acts as a 'gate' for energy to flow though - why is it that needed as more LEDs are added? (Since current would be flowing 5v->LED->Pin anwyays?) IE: I have a strip of 100 LEDs , at 60 mA each, thats 6 amps, how does adding a MOFSET change the scenario here, if its just enabling the current to flow to pin? Inherent resistance of the MOFSET?[Doesn't this mean heat generation? The current has to be dissipated somehow]

Electricity is definitely new to me so i appreciate your help - if you can point me to a good Youtube vid/reading material I'd appreciate it - I know I'm asking a lot of questions lol

CrossRoads:
https://www.elecrow.com/download/WS2813_LED_Datasheet.pdf

The WS2813 is a "smart" RGD LED, with a built in current limiting to each of the R,G,B LEDs in the package.
So it wouldn't need external current limit resistors.
If you connect 5V to the strip, and individually connect each of the R, G, or B to Gnd, do all 3 LED of one color turn on?
If so, you do not have WS2813, but instead have a 'dumb' RGB LED strip that needs a MOSFET to sink up to 20mA of current from each color to turn that color on full bright.

Think there is a failure in communications here.

The OPs image shows no GND on the strip, looks like a common RGB LED strip.

@Staccado, does this make any sense to you?

See this video on MOSFETs: