Page 1 of 1
LED drive
Posted: Wed Oct 24, 2012 3:16 pm
by YahooArchive
> Does anyone know what pins on the ARMite board (if any) would have the
> power to drive the LED(), and if so, what the configuration of that
> LED circuit might look like (ie, what resistor value to add in-line,
etc)?
While I wouldn't recommend driving 16 LEDs with the ARMmite without a
buffer, its possible to drive a couple of them with any of the pins.
The IOs are rated to drive 4mA to 0.4V. Most people drive LEDs by
pulling low on them, but in mixed 5/3.3V systems with the LED tied to
5 and a 3.3V drive the LED may not go completely off, as there is a
parasitic diode in IO which conducts enough to keep the LED on dimly
Use a high efficiency LED and they are reasonably bright at 8 mA.
Drive the LED on by pulling it high with a 180 ohm resistor. (for
red/green/orange types).
The 3.3V supply of the ARMmite is designed to drive only the CPU, so
its not recommended to use it for other parts like LEDs, and
effectively you are doing this in by driving high. So its OK for a
couple LEDs, but not more.
If you have more LEDs, use a buffer (74HC04 or the like and pull the
LEDs low from the 5V supply with a series 470 ohm resistor).
Re: LED drive
Posted: Thu Oct 25, 2012 12:08 am
by YahooArchive
> > Does anyone know what pins on the ARMite board (if any) would
have the
> > power to drive the LED(), and if so, what the configuration of
that
>
> PS-
>
> Forgot to mention pins 12 and 13 are open drain, so they won't drive
> an LED high.
>
On the ARMmite I have had success with using IO 12 and 13 to drive
LEDs by sourcing +5V from the 5VDC regulator (Pin 3 of U5, the LM340)
to the LED's anode, and then pulling the cathode low with 12 or 13
via a 1K ohm series resistor.
I believe that I read in one of the application notes (or the mcu
manual) on NXP's site that the maximum current that the mcu can
source is 100ma total, with a 4ma per GPIO pin limit. This is not to
mean that one can drive 25 LEDs, however. BasicNode's suggestion to
limit one's self to 2 or 3 LEDs without buffering is sound advice...
Re: LED drive
Posted: Thu Feb 14, 2013 5:21 am
by YahooArchive
Hi All
I have been using the BASICBoard from Coridium LLC for some time and
have managed at some point to drive LEDs from P0 using code like the
following:
---
while(1)
IO(1) = x and 1
wait(250)
IO(2) = x and 1
wait(250)
loop
----
At some point I stopped being able to drive pins P0(2) to P0(10) high
in order to illuminate LEDs connected to those pins, even though i am
still able to illuminate IO(1). My question is: Is there a definite
check I can do to confirm if P0(2) to P0(11) may be destroyed or if
this might be some other software-based issue which may be resulting
in no drive to attached LEDs ?
Not that I am able to access other functions of the chip via LED, for
example I can read input from 5 LDRs attached to AD(0) to AD(4) and
print the output to the BASIC terminal.
I'm connecting the LED to io pin P0(2) as follows:
---- 3.3v Vcc ----o-----
|
|
\|/ LED
----
|
>
< 100 ohm resistor
>
|
|
o-------------[ P0(2) , IO(2) ]
Thanks in advance!
Traiano
Re: LED drive
Posted: Thu Feb 14, 2013 5:21 am
by YahooArchive
I would say 100 ohms is too small of a resistor for use on a red or green
standard LED. That would be equivalent to 20 mA from an output.
IO(7) is rated at 20 mA drive, but the rest are 4 mA drivers.
I've been using 330 or 470 ohm resistors.
There is also a maximum GND or supply current of 100 mA, so with 4 or 5 LEDs you
would be exceeding that.
Engineering is always a set of tradeoffs, the big push in micro design is for
low power (witness the CoreMark benchmarks which rate power consumption and raw
computational performance). So this also affects the design of the output
drivers, large drivers both take up space and contribute to higher standby
currents, so they are also smaller.
Re: LED drive
Posted: Thu Feb 14, 2013 5:22 am
by YahooArchive
I'm pretty sure that pin is toast. Need to drive loads like that using a
transistor.
Use something like a BC547 with the pin hooked to the base of the transistor.
You may want to put a 10k resistor between the pin and the base of the
transistor, even just the base will pull more current per pin then you want to
put on each pin.
Leave the led hooked to the 3.3v, and then into the 100 ohm resistor, then into
the Collector of the transistor, and connect the emitter of the transistor to
ground.
I had a project where I hadn't put resistors in and was running tranistors on 32
pins. When the SuperPro would try to start the pins would go high on startup,
and then draw enough current to cause the SuperPro to reboot. I put in 10K
resistors in each circuit, and things worked well.
If you have lots of LED's to run, and are looking for a low part count, try a
ULN2803, very simple way to drive 8 leds with one chip.
Darin Johnson
GK Technology
Re: LED drive
Posted: Thu Feb 14, 2013 5:22 am
by YahooArchive
I have a couple of testers I built 2 years ago using an ULN2803 to drive 24
VDC ice cube relays with these boards and they have run 5 days a week since
without a problem.
Re: LED drive
Posted: Thu Feb 14, 2013 5:23 am
by YahooArchive
Thanks, Darin, Bruce.
I think I can safely conclude I need a replacement chip

Re: LED drive
Posted: Thu Feb 14, 2013 5:24 am
by YahooArchive
I don't know this chip / stamp / module but I looked at the specs for
LPC111x
More specificly I looked at the specs for a "High-drive output pin PIO0_7"
and it shows -
The pin can sorce a MIN of 12 mA at Vdd > 2.5v
HOWEVER it can only sink about 4 mA at the same Vdd (So you killed it lol)
This means you have two options.
1)
Ground - LED - resistor - IO Pin ... with a resistor to limit current BELOW
12 mA (100 ohms is too small, try 120-150 ohms)
NOTE: you will have to change the code to put out a '1' to turn the LED on.
Don't even bother to do the same but the other end of the LED to +Vdd (3.3v)
as this chip can't do that without a transistor.
2) The second option is to use a transistor or transistor array the ULN2803A
/ ULN2003A are a good choice if you have to drive a number of LED's. You
will still need a curent limiting resistor in series with the LED just the
same.
To calculate the current limiting resistor you need to know the forward
voltage (Vf) of the LED.
Lets just say it is 1.3v and the supply to the chip is 3.3v then ....
3.3v - 1.3v = 2v
Now what current through the LED, just say 10mA
2v (from above) / 0.01 (10mA) = 200 ohms
In practice your LED will have a Vf of between 0.4v - 1.2v
10ma is fine as it leaves room for safety , 15 is fine for LEDS to but not
directly from a pin of this chip as that has to be under 12mA. LED's still
look very bright at 15mA or even 10mA
So as a ball park guess do this -
IO pin
|
V LED
|
/
\
/ 220 Ohms
\
|
ground
Re: LED drive
Posted: Mon Jul 08, 2013 2:24 pm
by basicchip
From help line-
What is the I/O current drive capability of Superpro pro+??
I like to drive some LEDs inside switches and can the I/O capable of
putting out may be 10ma?? ( Could I use 330 aum is series)
-----------
The I/Os are rated to drive low 4 mA to 0.4V
You can drive more than that the the output will be more than 0.4V
10 mA times 330 ohms is 3.3V. The LED will have a voltage drop across it as well, ranging from 1.5 to 3.5 V depending on the LED, RED LEDs typically around 1.5 and some BLUE ones near the 3.5V. On most of our boards we use 330 ohm resistors, but don't expect 10 mA and they are adequately bright.
You can also tie multiple IOs together, probably best done with separate resistors to get more current. Though the limit for all ground or power supply current for the device is 100 mA. When you connect multiple IOs you should control them in parallel by writing directly to the control register like-
FIO0DIR OR= &HC0 ' make IO(6) and IO(7) outputs
FIO0CLR = &HC0 ' drive IO(6) and IO(7) low