WS2812B LED light strips not working

Hi, I recently bought WS2812 LED strips, but I'm unable to get them to work properly; only some of the lights are lit up, but even then, when i program the code for the working led to change colour, nothing changes.

I'm using Arduino NANO, 5V WS2812 LED Strip, two 3.7V Lipo-ion batteries connected in series, 300-ohm resistor and 1000uF capacitor.

Here's my connections:

First few LED:

Codes to change colour of the first few LED:
"#include <FastLED.h>

#define NUM_LEDS 60
#define LED_PIN 2

CRGB leds [NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds,NUM_LEDS);
FastLED.setBrightness(50);
}

void loop() {
leds [4] = CRGB::Red;
leds [5] = CRGB::Green;
leds [6] = CRGB::Blue;
FastLED.show();

}"

Thank you

2 X 3.7V = 7.4V = Damage.

1 Like

The 5V regulator cannot supply enough current for more than a few pixels. An external 5V supply is required.

1 Like

But I connected it to 5V on the Arduino board, so only 5V would be supplied, right?

Show us a schematic how things are exactly connected ?

Two 3.7V Lipo-ion batteries connected to 5v on the Arduino board = DAMAGE of Arduino

sorry, i meant i connected 7.4V to Vin of arduino board, 5V to VCC of LED strips

sry for poorly drawn schematic but smt like this

sry for poorly drawn schematic but smt like this

The 5v pin on the Arduino cannot power 60 pixels.

ahhhh, so i hv to connect directly from VIN using 5V supply?

Use an external 5v power supply for pixel power.

so read the post#3

No. Vin will have the 7.2V. You need an external 5V supply capable of supplying the required current. Each pixel (3 LEDs) needs about 60mA so 60 pixels needs 3.6A to light all 60, white.

i tried it using a 5V DC from power supply earlier today but same problem. ill try again tmr and get back to you


w

Make sure that the power supply current limit is set high enough.

2 Likes

and that you connect all GNDs - at arduino, led strip and power supply

3 Likes

would it be possible to light the led strip with the lithium batteries, though?
im working on a project-smart water bottle holder project whr the led strip would light up to remind users to drink and i kinda need it to be portable

also, i wouldn't need 1m of led strip, probably ard 15cm would be enough to wrap ard the holder

I've done a similar circuit, and it worked

yes, but you will need the voltage regulator from 7.4v to 5v

You may be able to power a short strip from a single 3.7V battery. The blue LEDs might give up before the green, but the red will continue to work until the battery is pretty much flat. Switch out the Nano for a 3.3V Pro Micro/Mini to maximise battery life.

Alternatively use a DC-DC buck converter to make 5V from the 7.2V from both batteries. Buck converters are not the best thing for battery powered circuits, but they sure beat a linear regulator when it comes to the higher currents needed for LEDs.

Something like these converters. They take 6.5V, minimum for 5V out, (5V + 1.5V drop out voltage) and convert to 5V 3A. They need a one time adjustment to set the output voltage. Use the 5V out to power the LED strip and the Arduino (connect to 5V pin). Take the 3A with a grain of salt, though. Keep under 80% to be on the safe side.