Mkr1010 and 144 ws2812b leds - share power supply?

Hi all, I am new to playing with these boards and have very limited knowledge, so bear with me please.

Some time ago following this circuit diagram I managed to connect a 144 led strip (ws2812b) to a raspberry pi using a level converter to convert from 3.3 to 5v for the led strip.

Now, I received an Arduino mkr 1010 as a gift, and I thought it would be cool to try it out with the same setup.. it seems the mkr also uses 3.3v so I guess I can reuse the same circuit (or am I terribly mistaken?)

The question is: can I share the same 5v to power up both the leds and the Arduino at the same time? or do I need two power sources like I'm currently doing with the rpi?

Thanks!

You may be able to reuse that circuit. But you were lucky that it worked at all. That type of level converter is designed for i2c/uart signals, which are lower frequency than used by ws2812 leds. When I tried something similar, I found that it worked OK sometimes as long as I didn't put my fingers close to the circuit, which shows it was on the very edge of not working. A better level shifter is 74hc14 or 74hct14. I have had no problems using those.

You did not give details of the 5V power supply you intend to use, but assuming it is suitable, you should be able to power the Arduino and strip using it. Or the RPI for that matter.

Oh, I was not aware of that -- in fact I had no issue so far. I will switch to the 74hc14 or 74hct14 then :slight_smile:

The power supply is a AC/DC adapter that came with the LED strip. The output is marked as 5v/3A.. so assuming 3A will be enough for both arduino and leds, I can just connect the same 5v that comes from the adapter to the Vin pin of the arduino? that would be fantastic :smiley:

In theory, 3A isn't enough by half. The general rule of thumb is to allow 45~50mA per led. For 144 leds, that's over 6.5A. This much current can be drawn when all the leds are on full brightness white. Other colours, flashing animated patterns and lower than max brightness can draw far less.

So why was the strip supplied with only a 3A psu? Well, presumably it also came with a controller of some sort? That will have been designed to avoid using patterns or brightness levels that would exceed 3A. Either that, or just badly or cheaply designed.

If you use the FastLED library, there is a setting you can use to automatically limit the total current drawn to 3A, or, for safety reasons, maybe 2.5A.

I n fact I am using the leds in a "infinite mirror" project, and I require far less than max brightness. However I was not aware of that setting in fasted - neat!

I am only worried about screwing up the circuit really..