5 years ago.

How many leds can I setup???

Hi, is there a limit on how many leds i Can put on to my board before it will crash? I mean can it send to much current out and in from the ports??? So far I have connected 9 different exits from the board....

Jesper/https:/os.mbed.com/media/uploads/jesperat/thumbnail_img_5043.jpg

Question relating to:

The FRDM-KL25Z is an ultra-low-cost development platform for Kinetis L Series KL1x (KL14/15) and KL2x (KL24/25) MCUs built on ARM® Cortex™-M0+ processor. Features include easy access to MCU I/O, battery-ready, …

1 Answer

5 years ago.

Total current for all GPIO pins (KL25z) is 100mA with a maximum pin rating of 25mA. For small 'indicating' LED's you could attach 14 LED's via a series resistor of 470ohm's, thats around 7mA each LED and have them all on, or as many pins as you like but make sure no more than 14 are on at any one time. Make sure you have the series resistor between the pin and the LED otherwise you could exceed 25mA and damage the pin and/or the entire MCU. Generally you would be better driving LED's via a transistor or a specific LED driver IC.

Hi Paul, thank you very much for your reply, I'll keep that in mind when i'm working on my projects :-)

posted by Jesper Søndergaard 18 Nov 2019

Btw, does the resistors have to be 470 ohm?? I have used 220 ohms resistors with 8-9 attatched leds and this seems to work fine...? Does the KL25z sends more than 5 V out of the pins???

posted by Jesper Søndergaard 18 Nov 2019

You can use 220 ohm resistors, however the current will increase, check you don't exceed the LED max current as well as the MCU GPIO pin. I use 470 ohm for small SMD LED's which is sufficient, however bigger LED's may need more current.

All the platforms on Mbed are 3.3v GPIO levels.

This looks interesting and should give you more accurate information.

https://www.langir.com/led-resistor-calculator/?gclid=EAIaIQobChMIsPPe7LL05QIVxYXVCh1XpQ1kEAAYASAAEgKR3fD_BwE

posted by Paul Staron 18 Nov 2019