how to connect multiple led strips cut from same strip to arduino

Hello
I'm looking into trying to connect several cut strips of leds to my arduino. I've been watching some youtube videos etc. but they all seem to focus on one strip and connecting that and then using fastled to control the individual lights.
I have an arduino mega (as I want about 22 leds and I didn't want mess around with shift registers and I need to turn certain leds on or off depending on values from an RTC) and an led strip: (https://www.amazon.co.uk/gp/product/B01M8QA7VB/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1) although not sure if thats the right kind of strip?
I think I need a WS2812 strip but still not sure how to connect to the arduino after I cut it up?
Can anyone recommend a good video and/or diagram of how to connect things up please.

Multiple WS2812B strips can be connected to a Mega. Each gets own output pin.
For example, here are 4 LED rings, each on its own pin, controlled with FastLed.h library.

Your amazon strip is non-addressable, you will need a MOSFET per strip to sink current from a 12V source to turn it on.
I offer a 8-channel N-channel MOSFET board that can do that. The gates can be controlled by shift register, or driven directly from 5V sources. Here it is setup with a shift register.
And a second picture with screw terminals for driving gates directly.

Single LEDs can just be connected to an output pin with a current limit resistor.

Cool thanks
If I cut down the WS2812 strip into a few leds on each section how can I connect each section to the GPIO pin?

The trickiest part is getting wires attached to the cut end.
I had some LED strips recently with a waterproof covering on them, that was awkward to clean off and then solder wires to. You’ll have to experiment with yours to find the best way to attach wires.

Then using FastLed.h library for example, you’d have this kind of stuff in your sketch, this is from a sketch that had 4 rings of 43 LEDs each.

#include "FastLED.h"


#define NUM_STRIPS 4
#define NUM_LEDS_PER_STRIP 43
CRGB leds[NUM_STRIPS][NUM_LEDS_PER_STRIP];


byte halfBright = 50;
byte fullBright = 255;
unsigned long brakeFlash = 75;


void setup() {
  // tell FastLED there's 43 NEOPIXEL leds on pin 9
  FastLED.addLeds<NEOPIXEL, 9>(leds[0], NUM_LEDS_PER_STRIP);


  // tell FastLED there's 43 NEOPIXEL leds on pin 10
  FastLED.addLeds<NEOPIXEL, 10>(leds[1], NUM_LEDS_PER_STRIP);


  // tell FastLED there's 43 NEOPIXEL leds on pin 11
  FastLED.addLeds<NEOPIXEL, 11>(leds[2], NUM_LEDS_PER_STRIP);


  // tell FastLED there's 43 NEOPIXEL leds on pin 12
  FastLED.addLeds<NEOPIXEL, 12>(leds[3], NUM_LEDS_PER_STRIP);
}


and this kind of stuff in loop, this simple example flashes the Red color on & off:

      //flash 3 times

      for (x = 0; x < 3; x = x + 1) {

        for (int i = 0; i < NUM_LEDS_PER_STRIP; i++) {

          leds[0][i] = CRGB::Red;

          leds[1][i] = CRGB::Red;

          leds[2][i] = CRGB::Red;

          leds[3][i] = CRGB::Red;

        }

        FastLED.setBrightness( fullBright );

        FastLED.show();

        delay(brakeFlash);

        for (int i = 0; i < NUM_LEDS_PER_STRIP; i++) {

          leds[0][i] = CRGB::Black;

          leds[1][i] = CRGB::Black;

          leds[2][i] = CRGB::Black;

          leds[3][i] = CRGB::Black;

        }

        //FastLED.setBrightness( fullBright );

        FastLED.show();

        delay(brakeFlash);

      }

The FastLed.h library can be found in Github.

(I really don’t like how the forum adds extra blank lines in code that is pasted in!)

Awesome thanks
Is there a youtube video you can share that explains how to do the soldering?

I don't know, never looked. I've been soldering since the late 1970s, was taught in person using a soldering gun (big, awkward thing, ). Changed to a Weller Soldering Station in the early 80s, used that until ~ 2008 when I changed to a combo soldering iron/hot air station and started doing more surface mount stuff, an earlier model of this from xtronicusa.com (via Amazon).
Still have the Weller, I just don't use it. Got me thru a lot of projects in college and the years after.

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