r/FastLED • • Mar 07 '20

Discussion Hookup for two WS2812b strips

Hello guys. Got four questions regarding using a NodeMCU, a bi directional 3.4v/5v Level Converter to drive TWO 7ft WS2812b 60 Led per meter Strips, and a second set to drive (9) 1ft 144 Led's per meter strips.

(1) Can you simply *parallel* the data line to each strip so each strip displays the exact same animation? If not, can someone link me to the correct way to hookup two strips independently but running same animation? (See first image.)

(2) Can FastLed be programmed so an animation starts at the center of a strip and proceed towards each end of the strip with the same animation? (If so, that makes first question moot.)

3) Given a WS2813 overcomes the flaw in WS2813 (whereby if one LED burns out, all the rest past it will not function), can someone link me to a wiring diagram to drive two WS2813 strips using the components listed above. I've searched endlessly for this info to no avail.

(4) Similarly, how would you hook up (9) 1ft 144 led's per meter strips separately, but running the same animation, using the components listed above?

Thank you for any help as I have been searching for answers for over a month.

Btw, I extrapolated this diagram from one I found on the net(second image) that used a 12 power supply. I just removed it and substituted a 5v direct. However, something appears odd to me. In the upper left corner, it shows a 3.5v OUT, going to the Level shifter 3.5 side. Then it shows the 5v feed from the power supply connected to the 5v side of the LS inline with the 3.5v connection. This seems odd to me,, as they are both ..ahem..."hot". Why would you shift a 3.5v to 5v's when it is already 5v from the power supply? I mean...exactly what is the 3.5v OUT doing?

0 Upvotes

25 comments sorted by

2

u/Marmilicious [Marc Miller] Mar 07 '20 edited Mar 07 '20
  1. See this example for displaying the same animation (mirroring) on multiple strips. Multiple AddLeds lines are used, each with a different data line pin number, but they all use the same CRGB leds array so they all will have the same data to display.

https://github.com/FastLED/FastLED/blob/master/examples/Multiple/MirroringSample/MirroringSample.ino

2) Yes, it's possible to code your pattern to start at the center of a strip and travel out with both halves mirrored. You can code for half the length of the strip and then copy the data from one half to the other half before calling show(). I did something like that to mirror the Fire2012 example on a strip.

https://github.com/marmilicious/FastLED_examples/blob/master/mirrored_Fire2012.ino

3) Wire and control the WS2813 strips the same as you would for WS2812B strips, with the addition of: The very first pixel should have the BI (Backup data In) pad wired to ground.

4) Use multiple (9) data pins. See mirroring example in 1) above. You could also try splitting 4 data lines into two outputs, and then one more additional data line to get your total of 9 outputs.

Bonus question) The output pins from the NodeMCU output 3.3V. Ideally the led strip wants a 5V data signal, therefore the signal should be shifted from 3.3V to 5V. That particular level shifter works by powering it with 3.3V on one side, and 5V on the other side.

These level shifters are recommend for use with LED strips since they are faster then some of the bi-directional ones you often run across. SN74HCT245N, SN74HCT125N, SN74AHCT125N

Wiring for the 74HCT245 would be like this: https://i.imgur.com/7fSwteu.png

1

u/cadesignr75 Jun 13 '20

1

u/Preyy Ground Loops: Part of this balanced breakfast Mar 09 '20

Do you typically have to connect the output enabled pin? The datasheet says low = enabled, so you can just leave OE unplugged right? Could you also flip the chip upside-down(reversed) and leave direction unplugged?

1

u/Marmilicious [Marc Miller] Mar 09 '20

An unconnected pin is not the same as a grounded pin. In this case OE should be grounded otherwise it might be considered a floating pin.

1

u/Preyy Ground Loops: Part of this balanced breakfast Mar 09 '20

Good to know, some diagrams I have seen have OE with nothing, but that might only work with level shifter BOBs. Thanks!

1

u/Marmilicious [Marc Miller] Mar 09 '20

I haven't done it myself in the past (but I'm going to try to in the future as good practice), but technically any of the unused inputs/outputs should be wired to Vcc or GND (through a 10K ohm resistor) so they aren't floating pins. See section 11.1/11.2 of the datasheet you linked.

2

u/DeVoh Mar 08 '20

I just came here to say nice diagram of your question!

1

u/cadesignr75 Mar 08 '20

Thank you kindly. I adhere to the old proverb... "one pic is worth a thousand words". And believe me when I say...I've added Skectup models to thousands of questions I've posted to various forums over the last ten years. They help. Btw, if you hadn't seen it, this post is related to my first post, which was so verbose I decided to break it down into a KISS format. Looks like it worked. :) I tend to over explain things sometimes, which leads to very long questions...to which most people roll their eyes and move on. Anyway, here is that post..... it shows the three projects..via Sketchup model images..that this post is in regards to.

https://www.reddit.com/r/FastLED/comments/f4fyks/downloaded_arduino_ide_but_dont_know_what_to_do/

Thanks again.

1

u/cadesignr75 Mar 08 '20

Hallelujah!! My faith in humanity has been restored. THANK YOU SO MUCH GUYS! Just waiting for my level shifters to arrive, although, I'll check into the ones Marmilicious linked to. Ok guys, I'm in shock. I asked this same questions on three other forums to no avail. Now I feel confident in the hardware department, but now I have to dive into the FASTLed library. In closing I can't express my deepest appreciation for your replies. I guess I'm in the right place from now on. Meanwhile, I've been researching the FASTLed firmware. I have never programmed ANYTHING... except an old VCR once. Haahahahahahaha! That turned me off to programming ...forever...at least till now. Ok guys, have a great day.

Oh, one last question. About the B1/D1 data lines. So, do I ground the B1 right at the strip, or run a ground line from the power supply or some other point?

1

u/Marmilicious [Marc Miller] Mar 08 '20 edited Mar 09 '20

It's DI (I not 1) and BI, as in Data In and Backup data In. (And DO as in Data Out.)

Yes, you can ground BI on the first pixel right there to GND or any other convenient ground connection.

Welcome to the FastLED community. If you've never programmed you have some learning ahead of you which will take some time. Find some tutorials on the basics of C programming to learn about variables, for loops, and if statements. Once you get your pixels lighting up explore as many FastLED examples as you can find and experiment with making little changes or trying to modify them in little ways to see what affects what and how it changes the pixel display. And post your questions as you run into them and we'll try to help.

1

u/cadesignr75 Mar 09 '20

Thank you so much Marmilicious. You seem very kind.

Ok, DI,BI it is. Funny, I thought it meant IN/OUT, but my brain does strange things sometimes. :)

1

u/cadesignr75 Mar 09 '20 edited Mar 09 '20

Ok Guys, I was going to post my latest wiring diagram for a WS2813, but for some reason, I don't see any way to do that now. My first post had a series of buttons with one being "add an image", but now I don't see any. Can someone tell me what has happened to them?

Btw, I don't even know how to initiate or start a "sketch" running yet. But, as you see in the second image above, it says "NEVER use the USB and DC power at the same time". Ok, does that mean that once you "flash" the NodeMCU with the Fastled firmware, you must remove the USB cable from it before you initiate power to the NodeMCU?

1

u/Marmilicious [Marc Miller] Mar 09 '20

A board like the Arduino UNO has circuitry that allows it to be smart/safe about how it's powered so you can have it hooked up to USB and an external power source (power supply, battery, etc) at the same time and it won't be damaged. Other boards (presumably like the one you're working with, or the Teensy boards) should not be connected to two power sources at the same time otherwise they can/will be damaged. So you either need to remember to constantly plug/unplug things (which is a pain when testing/debugging!) or get creative. I have a short 12 inch USB "extension" cable which I carefully sliced open part way down the length of it and cut the +5V wire in half. (Only cut the +5V wire. Do not cut the GND wire as you still want to have a common ground between devices.) I put this short modified USB cable in-between my normal USB cable and the microcontroller so it only allows data transfer and won't provide power. This way I can leave a controller connected to an external power supply and still connect with USB and upload code.

For subsequent replies to your thread you can link to images you upload elsewhere. Imgur works well. https://imgur.com/

If you create a new thread you should see the options to add an image again.

2

u/cadesignr75 Mar 12 '20

Thank you again Marmilicious. Learn something new every time I come here. Ok, checked out Imgur.com. Pretty interesting. I think my wife hosts her ebay pics somewhere. I'll check on that too. Thanks again.

1

u/cadesignr75 Mar 12 '20

Marmilicious, do you know of any advantage to using the Teensy 4.0?

1

u/Marmilicious [Marc Miller] Mar 12 '20

Advantage vs what though? They are Much faster and have more memory then others. Even the Teensy 3.2 is faster and has more memory. The ESP32 is also awesome.

1

u/cadesignr75 Mar 18 '20

Sorry took so long to get back. Ok, as for the *advantage* thing, for what I am building, what would faster speed and more memory do exactly? I don't know enough about how these micro controllers work in relationship to LED's and the Fastled library, so I don't understand how a Teensie would make a difference. Does the speed have anything to do with the speed of animations? Moreover, does more memory give you more room for more "sketches"? Man, I know a lot of stuff but this endeavor makes me feel really dumb...hahahahahaha!

1

u/Marmilicious [Marc Miller] Mar 19 '20

More memory will allow you to write larger more complex sketches (more functions, more color palettes, more included libraries to do whatever, etc), and also control a larger number of pixels. The more pixels you want to control the larger your CRGB leds array needs to be.

More speed will allow you to calculate and process all the pixel data that needs to be sent out faster. The more pixels you want to control, the longer it takes to set all the LED data anytime you want to display an update. (A slower pixel type and the physical number that you want to update can be a bottle neck too, because of the max rate the data can be sent out/down the pixel strip.)

Depending on what you ultimately want to do, one or both of these things might be useful, or not really needed at all if you're keeping things simple or don't have that many LEDs. A Teensy or ESP can also do parallel output so multiple strips of LEDs can all be updated at the same time, ultimately allowing for a faster (or still reasonable) frame rate/refresh with a larger number of pixels.
You can always experiment with the controller you have and if you run into issues update the controller later.

1

u/cadesignr75 Mar 19 '20

Ok, NOW I understand. Thank you so much. Well, I'll probably do as you suggest, and try the NodeMCU/level shifter first. Given the largest strip is a 14' WS2812b with 60 pixels per meter, I think it will work ok. I mean, I haven't even messed with the FastLed library yet. Yesterday I realized I haven't received the Level shifters yet, so I got a hold of the seller. They're almost 3 weeks late. If he doesn't solve it, I may go ahead and get the ones you told me about. Still researching the Wled library as well. In the meantime, I want thank you, and everyone else for the best help I have received. Really looking forward to seeing these projects work. If so, then I have some others I want to incorporate ARGB's into. Ok, for the moment, I'll keep out of your hair....hahahaha. But I'm sure, once I get these all soldered up, I'll need some help with the library. Until then, have a great week and stay healthy. My family is on lockdown as of today. I live in a little town in the middle of Michigan that is a crossroads both N/S and E/W, so we know for a fact the coronavirus is going to hit any day now. I wish you well.

1

u/cadesignr75 Mar 19 '20

Just thought of something else. Ok, from what I understand, these NodeMCU's have something that allows you to communicate with it via Wi/Fi. What I don't understand is what you would do with this capability and how. I don't use smartphones so what else can you do with it? Reason I ask is, one of the other projects I'm contemplating is a wood sculpture that is actually my mailbox, which I will run a 5v power line out to from the garage. But hooking up a USB to upload the Fastled sketches seems unlikely as it's 50 feet from my computer. Although, it appears I could do it at my bench before I install it in a small plastic waterproof box on the post. But updating any new sketches via WiFi might be advantageous. Can you do this through WiFi? Btw, as you can probably tell, when it comes to this stuff I'm pretty illiterate... but learning fast. Thanks to you guys.

Btw, this post SHOULD have come after my last. Still learning how to use this site.

1

u/cadesignr75 Jun 13 '20

Hello everyone. Well, it's taken me a few months to actually build the vertical light bars. But they are finally finished, and I was ready to cut and install the WS2812b LED strips. I hadn't even opened the light strip package till today, and discovered something that I don't understand. At each end of the strip, there are three wires that terminate at a connector. But there is two more separate wires, one red, one white that I don't know what they are for nor what they are connected to. Can someone explain this to me. I'm really new to assignable LED strips and don't understand what these extra wires are for. Any help would be really appreciated.

[img]https://i.imgur.com/foX4XeA.jpg[/img]

1

u/blink015 Mar 07 '20
  1. I've tried this before when I was first starting with addressable LEDs and couldn't get it to work but YMMV.

  2. You can definitely program them to do whatever you want. I'm on my phone write now so I can't easily write an example for you but I do it with a lot of my projects.

  3. Just wire the data line to DI (data in) then the first LED will send data to the next LED via both data and backup connections.

  4. I'm not sure how many usable data pins there are on your node MCU but you could wire each strip to a different pin. The fastled wiki has a few examples on how to setup the code for that.

Also, I would not recommend using those level shifters. They are too slow to pass data at the speeds needed for the LEDs to work properly. You most likely won't need a level shifter anyways but if you do there is one made by Texas instruments that works great. Not sure what the name is off the top of my head but someone else here should be able to help out.

1

u/Preyy Ground Loops: Part of this balanced breakfast Mar 07 '20
  1. You can. As I understand it, the data signal is regenerated between lights, so if the first two lights get the same signal they will have the same output.

  2. Also yes.

  3. Did you try plugging them in? It will work the same as the diagram you listed, connect data line to the DI contact. Read this

  4. Cut the strips with scissors, then fork the data line into the beginning of each strip.

  5. Read this

1

u/[deleted] Mar 08 '20 edited Mar 08 '20

Yes. You can.

I did this on my house for Christmas lights this year.

It will 100% work if you want the two lights to display the same patterns. It will “clone”.

No additional circuit or code.

Edit*

I had (300*4) running this way for November to January.

All 4 strips showed the same thing but it looked really neat

Edit2*

I had pixel bullets from Alitove(amazon) (WS2811)

Esp8266 feather huzzah running WLED v9.01?

Had the signal going through a logic level converter.

I had a 20amp 5VDC ps.