For a project, I purchased 5 LED RGB 5mm addressable WS2812. Link to WS2811 (practically the same? on the polulu website for documentation and information!
Using the FastLED library, I tested one LED by connecting the VCC to 5v, ground to ground, and DIN (input) to digital pin 2 and changed colors, albeit never at max 255,255,255 brightness (only going to 200, 0, 0 for while). It worked fine, and I had no problems with it, even adding a button and the like. LED and MCU (Arduino Micro) are all fine.
However, upon further research, I saw that the WS2812 LEDs draw “50mA” at max power and that the Arduino micro has a max (absolute max) of 40 mA per I/O pin and 200 mA total (I think?). Does this mean I risk messing up the microcontroller (arduino micro), digital pins and/or RGB LEDs? Or is this not relevant info?
I apologise, I am a newbie to Arduino and had no idea about milliamps or voltage or anything until yesterday! If you have the time, could you explain how this works? Why is mA drawn from the digital pin? Or isn’t it at all?
How come nothing happened to my microcontroller or LED? Even though I worked at more current than recommended.
Now, I furthermore saw that the FastLED library has code in it which can limit the mA and volt draw. “FastLED allows you to cap the power usage of your leds. There’s two ways to set the max power draw you want. The first is by specifying the voltage your leds will be running at and the maximum milliamps you want to draw:”
So, if I put it like this:
// limit draw to 1A at 5v of power draw FastLED.setMaxPowerInVoltsAndMilliamps(5,38);
Would this work without messing anything up, correct or wrong? Or do I need to do anything with the practical analog/physical circuit? Resistors? I just have it connected to VCC, ground and digital pin2. Would this just make them not as bright?
What if I were to connect other LEDS? If I had them all at 38 max then, does this mean I would be able to run 5 RGB LEDs through the board as the total is 190mA?
An extra question I have is that in previous project I have run two SG90 servos with no problem or resistors, and vibrators (75 mA?) etc with furthermore no problems. How come nothing happened and all worked fine with dozens of hours of tinkering? Lucky?
Thank you very much in advance!