(the schematics is just an example, I will choose different resistors and transistors)
I started to design my own Xmas PCB tree. I want to control 10 LEDs (2.1[V] drop, and 20 mA IF ) with an ATtiny5 microcontroller PWM pin.
Doing my research, I found that I can't put more than 2 LEDs in parallel on one pin of the microcontroller because there is a limit of sink of 40 mA and is possible if I go over this value to break the microcontroller.
The only solution that I found is to control the LEDs through a transistor that the source is connected to the VCC of microcontroller that can sink upto 200mA. Is there something that I am missing?