another LED project...
Archiver
Posts: 46,084
Hi there,
I have been following the other LED thread and its very applicable, but I have
some questions of my own...
I'm doing a similar project where I need to control 40 or so LEDs individually
from the stamp. I've been asking around, and have found out there are a few
ways to do this.... I'm wondering whether anyone has found the most effective
way. I've looked briefly into using the 74HC595 and programming the stamp
to run a pulse width modulation (so as not to overload the it)- but this would
mean the LEDs would run at less brightness. I was also told to look into using
a latch to avoid the brightness problem- does anyone know anything about
this? Should I be using transistors? FInally, what about the ULN2803- can it
help me and what is its relationship to the 74HC595?
I will be printing a circuit so that the LEDs will be in an X/Y grid matrix
configuration to control them, if that matters... and I'm sure I'll have more
questions about programming when I get the actual LEDs working. [noparse]:)[/noparse].
Sorry about the large inquiry and possibly confused questions- I'm just
learning (of course) and trying to sort out all the different information I'm
receiving. Any help in synthesizing this would be much appreciated.
Heather
I have been following the other LED thread and its very applicable, but I have
some questions of my own...
I'm doing a similar project where I need to control 40 or so LEDs individually
from the stamp. I've been asking around, and have found out there are a few
ways to do this.... I'm wondering whether anyone has found the most effective
way. I've looked briefly into using the 74HC595 and programming the stamp
to run a pulse width modulation (so as not to overload the it)- but this would
mean the LEDs would run at less brightness. I was also told to look into using
a latch to avoid the brightness problem- does anyone know anything about
this? Should I be using transistors? FInally, what about the ULN2803- can it
help me and what is its relationship to the 74HC595?
I will be printing a circuit so that the LEDs will be in an X/Y grid matrix
configuration to control them, if that matters... and I'm sure I'll have more
questions about programming when I get the actual LEDs working. [noparse]:)[/noparse].
Sorry about the large inquiry and possibly confused questions- I'm just
learning (of course) and trying to sort out all the different information I'm
receiving. Any help in synthesizing this would be much appreciated.
Heather
Comments
I'm doing a similar project where I need to control 40 or so LEDs
individually
from the stamp. I've been asking around, and have found out there are a few
ways to do this.... I'm wondering whether anyone has found the most effective
way. I've looked briefly into using the 74HC595 and programming the stamp
to run a pulse width modulation (so as not to overload the it)- but this
would
mean the LEDs would run at less brightness. I was also told to look into
using
a latch to avoid the brightness problem- does anyone know anything about
this? Should I be using transistors? FInally, what about the ULN2803- can it
help me and what is its relationship to the 74HC595?
===========================================
The 74HC595 is it's own latch, and it will not load the Basic Stamp. However,
you will need an additional 5 volt regulator, as the stamps onboard regulator
output (pin 21, I think) will not drive 40 LEDs at once.
=============================================
I will be printing a circuit so that the LEDs will be in an X/Y grid matrix
configuration to control them, if that matters... and I'm sure I'll have more
questions about programming when I get the actual LEDs working. [noparse]:)[/noparse].
Sorry about the large inquiry and possibly confused questions- I'm just
learning (of course) and trying to sort out all the different information I'm
receiving. Any help in synthesizing this would be much appreciated.
============================
Bring on any further questions.
Also, it is very common to use the '595 to ground the LED, where the LED has
"permanent" power on the positive side. Of course there needs to be a current
limiting resistor in series with the LED.
There are other methods to control your LEDs, but the '595 is probably the
simplest for a "beginner."
Ken
============================
Heather
[noparse][[/noparse]Non-text portions of this message have been removed]
wrote:
> I need to control 40 or so LEDs individually from the stamp.
I think that you have two choices. You can drive each LED
individually or you can multiplex them. Let's say that you have an
array of LEDs that is 6 rows and 8 columns. To drive them
individually, you might use six 8-bit latches. Each bit of each
latch would drive one LED. The '595 is one example but you can use
any type of latch that meets your needs. Of course, you need to make
sure that the latch can source or sink the required amount of current
to drive the LED. Usually, logic outputs can sink more current than
they can source so you frequently find LEDs being driven by sinking
current to ground through the logic output.
To multiplex LEDs, you wire them in a matrix perhaps with set of
drivers supplying current down the 6 rows and another set of drivers
sinking current of the 8 columns. Then, you turn on the row drivers
in sequence one at a time and for every column where you want the LED
in that row to be on you turn on the column driver. When you
multiplex, the LEDs have an apparent brightness that is approximately
1/N of the instantaneous brightness when an LED is being driven,
where N is the number of elements of a complete cycle.
Depending on the brightness that you need you may not be able to use
the multiplexing method. Another consideration is that the
microcontroller needs to be always cycling through the LEDs. If
there are other things that the microcontroller must also do, it may
not be practical to have it also do multiplexing.
> What about the ULN2803- can it help me and what is its relationship
to the 74HC595?
The ULN 2803 is a Darlington driver array. The Darlington part means
that the amount of current required to make the driver sink up to
500mA is pretty small; each driver uses two cascaded transistors
which gives you a high multiplier effect. They also have built-
in "snubber" diodes which are required if you're driving inductive
loads like relays, motors, solenoids, etc. You might opt to employ
these if the other devices don't have the current capacity that you
require.
programmable brightness, take a look at the MAX7219. It is usually used
to multiplex 7-segment displays, but is programmable in bit mode so you
can do anything with it. One of my colleagues used one for frame a
project with 64 LEDs that run in various patterns.
-- Jon Williams
-- Parallax
Original Message
From: myamygdala [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=SKx55p4R-yS_a-EMYD6OJUSeLIUCqdT0mWgfDSDIXuaIb7pKkx66xFS50_wtlxjERrFwABEB0NLeew]myamygdala@y...[/url
Sent: Sunday, March 28, 2004 4:21 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] another LED project...
Hi there,
I have been following the other LED thread and its very applicable, but
I have
some questions of my own...
I'm doing a similar project where I need to control 40 or so LEDs
individually
from the stamp. I've been asking around, and have found out there are a
few
ways to do this.... I'm wondering whether anyone has found the most
effective
way. I've looked briefly into using the 74HC595 and programming the
stamp
to run a pulse width modulation (so as not to overload the it)- but this
would
mean the LEDs would run at less brightness. I was also told to look into
using
a latch to avoid the brightness problem- does anyone know anything about
this? Should I be using transistors? FInally, what about the ULN2803-
can it
help me and what is its relationship to the 74HC595?
I will be printing a circuit so that the LEDs will be in an X/Y grid
matrix
configuration to control them, if that matters... and I'm sure I'll have
more
questions about programming when I get the actual LEDs working. [noparse]:)[/noparse].
Sorry about the large inquiry and possibly confused questions- I'm just
learning (of course) and trying to sort out all the different
information I'm
receiving. Any help in synthesizing this would be much appreciated.
Heather
register, with a lot of current drive per
pin. Thus, you can drive 8 discrete LED's
with this chip continuously. These chips also
'daisy-chain' very nicely, so you can add
LED's in groups of 8. This is great if
you DON'T want to PWM them.
The Maxim 7219 will control 64 discrete LED's,
and it will set brightness with a single resistor,
and it will do PWM on the LED's ITSELF. This
reduces the total current being used as it takes
advantage of people's 'persistence of vision'
to make all the LED's look lit at the same
time.
The ULN2803 (or whatever) is a transistor array.
This chip takes the small current the BS2 puts
out and amplifies it enough to drive 8 LED's.
You'd only use this if you only had 8 LED's
to drive, and you wanted to drive them from
the BS2.
--- In basicstamps@yahoogroups.com, "myamygdala" <myamygdala@y...>
wrote:
> Hi there,
>
> I have been following the other LED thread and its very applicable,
but I have
> some questions of my own...
>
> I'm doing a similar project where I need to control 40 or so LEDs
individually
> from the stamp. I've been asking around, and have found out there
are a few
> ways to do this.... I'm wondering whether anyone has found the most
effective
> way. I've looked briefly into using the 74HC595 and programming the
stamp
> to run a pulse width modulation (so as not to overload the it)- but
this would
> mean the LEDs would run at less brightness. I was also told to look
into using
> a latch to avoid the brightness problem- does anyone know anything
about
> this? Should I be using transistors? FInally, what about the
ULN2803- can it
> help me and what is its relationship to the 74HC595?
>
> I will be printing a circuit so that the LEDs will be in an X/Y
grid matrix
> configuration to control them, if that matters... and I'm sure I'll
have more
> questions about programming when I get the actual LEDs working. [noparse]:)[/noparse].
>
> Sorry about the large inquiry and possibly confused questions- I'm
just
> learning (of course) and trying to sort out all the different
information I'm
> receiving. Any help in synthesizing this would be much appreciated.
>
>
> Heather
7219,
as its seems the best for me... hopefully my samples come in soon so i can
start playing with them.
i'm sure i'll have programming questions to follow... [noparse]:)[/noparse] this community is
great!
heather