Main Site Documentation

Maximum current consumption on IOs


#1

OK we had to dig into this further to make sure you can power up LEDs directly from FEZ directly. The on-board LED(s) are connected directly but we wanted to double check with datasheet to make sure this is within specification.

Here is the datsheet
http://www.nxp.com/documents/data_sheet/LPC2388.pdf

Looking at “10.3 Electrical pin characteristics” you can see a graph of voltage vs current which goes up beyond 16mA. The voltage will drop but this will not damage your FEZ.

So, go ahead and connect LEDs directly but, as in any microcontroller, do not forget to add a resistor. A 470 ohm resistor is recommended, which will result in under 10mA consumed from the IO.


#2

Thank you Gus for taking the time to dig into this, but I still have one question. What is the total current say a Panda can handle? Can it handle 10mA on each IO pin and source 600mA if a LED was attached to every pin? (I would think not)

Not comparing the FEZ to the rather useless TI MSP430, but on their Wiki it states that each IO pin can handle 6mA but the total should not exceed 12mA http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Drive_LED

Is it possible for you guys to figure out what the maximum load is for all the IO pins combined?

PS. I dont want to be a pain about this. Im only trying to save future users from the grief of frying their boards. :slight_smile:


#3

I’m getting 470 ohm using http://led.linear1.org/1led.wiz with

  • Source voltage : 3.3
  • diode forward voltage : 1.7
  • diode forward current (mA) : 4

Are those values that are you using for your calculations Gus ?


#4

Not sure what is the total since this is not in the datasheet listed above. I do not think such info would be provided or tested by the processor makers since the processors are not made for loads but for signals. Yes simpler 5V 8-bit micros are made to handle a lot of current but that is not the case on moderns 32-bit processors.
Lets put it this way, if you want to connect few LEDs to FEZ directly then go ahead. If you want to load every single pin on the processor then this shouldn’t be done on any modern system, including FEZ. You will need to add some transistors.

[quote]I’m getting 470 ohm using http://led.linear1.org/1led.wiz with

  • Source voltage : 3.3
  • diode forward voltage : 1.7
  • diode forward current (mA) : 4

Are those values that are you using for your calculations Gus ?[/quote]
I did those the numbers in my head and assumed the diode drop is about 0.7V, which is less than what an LED really is but I wanted to be more on the bad side to make sure we will not have problems.

I hope no one is afraid of connecting LED anymore :slight_smile:


#5

Again Gus, Im not dissing the system, but users should be aware of the limitations with driving things directly on the IO pins. A user might start up with the on board LED, then adding more for testing. Maybe do a Knight Rider sequence. All is fine then try to top it off and flash all LEDs just to fry his board. I mean with 60 IOs its tempting.

Thats all :slight_smile:


#6

When using a transistor I suppose a 1K ohm resistor must be connected between the IO and the transistor base?


#7

[quote]Again Gus, Iâ��m not dissing the system, but users should be aware of the limitations with driving things directly …
[/quote]
Yes and if you know the limits you shouldn’t use anything close to the limits either.

If you want a simple answer, connect up to 5 LEDs to FEZ directly and never worry about it.

The limits can be a lot more than 5 but why bother risking. Yes 60+ IOs but please put them to better use than just LEDs :slight_smile: … if you still need 60 LEDs then 3904 transistors are your friends


#8

Yes that should work


#9

If you want to drive heaps of leds couldnt you just run a high power, single input multi output, shift register attached to a serial port. it would save on using true IOs to run leds


#10

Speaking of such mundane things as transistors, I usually just pick up whatever Radio Shack has sitting around around, but in the last few days I’ve seen (for good reason) 3904’s cited, a preference for using 74HS CMOS logic chips and a few others.

Now I’ve actually got a capable processor board and I need to start fabricating stuff, I’ve got more specific needs for components like MOSFETs etc.

Any recommendations on a good, no-nonsense supplier who will sell components in small quantities?


#11

china sellers on ebay are cheap but takes a long time: 2-4 weeks


#12

2-4 weeks is a bit of a drag when I’m all fired up to be creative, but yeah, the prices are great.