Main Site Documentation

YALCQ (Yet another LED current question) :)


Hi Im back with another LED current question (I can hear Gus sigh allready) :slight_smile:

I have added a LED cube project in the Wiki (link removed) And as I say in the description I cant really get the speed of flipping the LEDs on an off fast enough to get a good POV. So is there a faster way of doing this in NETMF?

But back to the LED current.
With the 220ohm resistors that I have got on the 5mm LED it seems to work ok. But what will happen if I would try to turn on all 9 LEDs for a level on the same time? Will the current fry the board?
Or even the whole cube that would mean 3 LEDs in parallel sharing a 220ohm resistor.


I’m a hardware newbie but I think you’ll have to use one resistor for each LED.
And Gus would say 220ohm is not safe, you need 400+.
If you have a multimeter you could measure the current.


Yes, you want one resistor per LED (makes things simpler that way).

Since Ohms law says:

R = E / I

and we know that the voltage output of each pin on the FEX is 3.3V and that we would like 10ma (0.010A) of current flowing through the LED we can calculate that:

R = 3.3V / 0.01A = 330 Ohms.

You might be wondering where the 10ma of current for the LED came from? That is a general safe forward current for most LEDs. Using the 220 ohm resistors you have in your circuit now we can find that the forward current through the LED woudl be:

I = E / R = 3.3 / 220 = 0.0136A or 13.6mA, which is still pretty safe for most LEDs

One very important point though is the total current used by all LEDs. Say you have 10 LEDs each drawing 10ma, well now you are up to 100ma. While driving a few LEDs directly is easily doable from the FEX microcontroller there will be a limit as to how much power it can handle directly. I suspect that it could drive several LEDs at once, but perhaps not 20 or 30 of them. The only way to know for sure is to monitor the temperature of the chip.


Thank you for your input guys.
I only had the 220ohm resistors and luckily it seems fine with those.
I think I’ll leave the cube as it is and not fry the board with turning on more LEDs :slight_smile:

With all the IO’s on the Panda one could probably build one massive cube :smiley:


If you combine resistor for more than one LED then when 2 LEDs come on, the LED will be less lit than one LED on by itself. You are using one resistor for 2 LEDs so there is less current flowing in each LED. Of you have a lot of LEDs on that one resistor then the resistor will be fried maybe but no damage should occur to your hardware, not FEZ for sure…they are connect to transistors and not to FEZ right?

200ohm is fine if your LED need plenty of current and it shouldn’t damage anything on those large LEDs or your transistor.

Can you make a drawing of how everything is connected (schematics)?


Does the USBizi-100/144 Chipset have an internal temperature sensor we can monitor?


Here are a schematic as I remember it (I’m at work)


This is a bit of a high load when having 2 LEDs on the same pin. But since you are no keeping the LED on, but rotating through them, I would say it is safe.

About speed, I was thinking you can use the parallel port interface we are going to add so you can control 8 LEDs in one call instead of having a loop and setting 8 LEDs. You have more than 8 pins but you can also have more than one parallel object…2 will give you 16 pins to control.

It will be about 10 to 15 times faster I think but it is easy to try to find out. Unfortunately, you have to wait will the guys at GHI get to implementing the parallel interface for us :slight_smile:


This sounds great Gus
That would be like the PICAXE pins = %00011100 to set 8 pins in one command.
I’ll leave this one for now and and probably revisit it when you get the parallel object working. I’m willing to beta test it :slight_smile:

Again, thanks for your response.


Somewhat correct! Our implementation will allow you to use any pins and assign them to any bit in the byte! Confused yet? Details will come soon.

You are a FEZ senior so when beta is out, you have access automatically :wink: