Searching \ for '[EE]: PIC for Driving 3 Color LED?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'PIC for Driving 3 Color LED?'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: PIC for Driving 3 Color LED?'
2004\04\18@221645 by Brooke Clarke

flavicon
face
Hi:

I would like to experiment with a 3 color LED to see what colors it can
make.
The commercial color LED drivers seem targeted for cell phones and are
extremely small surface mount parts making them difficult to work with.

I would like to have good control of the current in the Red, Blue and
Green LEDs.  The forward drops for the 3 colors are considerably
different with Blue a little over 3.5 Volts.  This is a problem in that
a small change in the supply voltage or LED temperature will cause a big
change in the LED current is simple dropping resistors are used from a
+5 Volt rail.

One approach would be to use 3 independent current sources, each good
for 100 ma and switch them on and off (PWM) with an 8 pin PIC.

Is there a simpler way to do this?

Have Fun,

Brooke Clarke, N6GCE
http://www.PRC68.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\18@225912 by William Chops Westfield

face picon face
On Sunday, Apr 18, 2004, at 19:16 US/Pacific, Brooke Clarke wrote:

>
> One approach would be to use 3 independent current sources, each good
> for 100 ma and switch them on and off (PWM) with an 8 pin PIC.
>
> Is there a simpler way to do this?

PWM isn't hard. 100mA is a lot for this class of LED.  If you can get
by with 20mA, you can simply use a (tuned) resistor for each LED chip
to get the max current, and PWM to get the variation.  Ala:
http://www.emanator.demon.co.uk/bigclive/rgb.htm

BTW, "three color LED" usually means one with two chips (R&G), with
yellow output if your turn them both on.  The sort of thing you're
talking about would be a "3 chip LED", or "full spectrum LED", I think.

BillW

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\18@230326 by Jinx

face picon face
> I would like to experiment with a 3 color LED to see what colors
> it can make.
> The commercial color LED drivers seem targeted for cell phones
> and are extremely small surface mount parts making them difficult
> to work with.

You can get free samples, must be worth a look and some effort

http://www.marktechopto.com/index.cfm?a=135

> I would like to have good control of the current in the Red, Blue
> and Green LEDs.  The forward drops for the 3 colors are
> considerably different with Blue a little over 3.5 Volts.  This is a
> problem in that a small change in the supply voltage or LED
> temperature will cause a big change in the LED current is simple
> dropping resistors are used from a +5 Volt rail.

Why are you worried about the 5V dropping ? I don't actually
see a good reason why a well-regulated supply would, not
at the sort of current levels that LEDs need if it's got suitable
current and filtering

What temperature rise are you expecting ? LEDs change peak f
by only a dozen nm when T goes from ambient to ambient +100C,
and that's really starting to cook them. Similarly with current. If they're
getting hot enough to be a concern you're probably damaging them,
and the LED god is going to be most displeased

> One approach would be to use 3 independent current sources,
> each good for 100 ma and switch them on and off (PWM) with
> an 8 pin PIC

A simple way would be with an LM317 and a resistor

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\18@233101 by Spehro Pefhany

picon face
At 07:16 PM 4/18/2004 -0700, you wrote:
>Hi:
>
>I would like to experiment with a 3 color LED to see what colors it can
>make.
>The commercial color LED drivers seem targeted for cell phones and are
>extremely small surface mount parts making them difficult to work with.
>
>I would like to have good control of the current in the Red, Blue and
>Green LEDs.  The forward drops for the 3 colors are considerably
>different with Blue a little over 3.5 Volts.  This is a problem in that
>a small change in the supply voltage or LED temperature will cause a big
>change in the LED current is simple dropping resistors are used from a
>+5 Volt rail.

A bit of current change won't be all that visible, relative differences
might be important near white, but the eye has a kind of color balance
correction anyway. The Vf voltage differences can be taken care of with
different valued resistors. The LEDs will change output intensity and
color with temperature as well, even if you hold the current constant.

>One approach would be to use 3 independent current sources, each good
>for 100 ma and switch them on and off (PWM) with an 8 pin PIC.

You could do that, though current sinks might be easier.

>Is there a simpler way to do this?

Just resistors and transistors might be good enough. You could sense
ambient temperature and fiddle with the current ratios if that was
necessary.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spam_OUTspeffTakeThisOuTspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\19@134755 by Dwayne Reid

flavicon
face
At 08:16 PM 4/18/2004, Brooke Clarke wrote:
>Hi:
>
>I would like to have good control of the current in the Red, Blue and
>Green LEDs.  The forward drops for the 3 colors are considerably
>different with Blue a little over 3.5 Volts.

PWM is the way to go.  Pick your supply voltage.  Then pick current limit
resistors such that you get full intensity white light at that voltage.

Have a look at <http://www.emanator.demon.co.uk/bigclive/rgb.htm>.

dwayne


--
Dwayne Reid   <.....dwaynerKILLspamspam@spam@planet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 20 years of Engineering Innovation (1984 - 2004)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body

2004\04\20@115553 by Byron A Jeff

face picon face
On Sun, Apr 18, 2004 at 07:16:08PM -0700, Brooke Clarke wrote:
> Hi:
>
> I would like to experiment with a 3 color LED to see what colors it can
> make.

That's on my task list too.

> The commercial color LED drivers seem targeted for cell phones and are
> extremely small surface mount parts making them difficult to work with.

And unnecessary.

>
> I would like to have good control of the current in the Red, Blue and
> Green LEDs.  The forward drops for the 3 colors are considerably
> different with Blue a little over 3.5 Volts.  This is a problem in that
> a small change in the supply voltage or LED temperature will cause a big
> change in the LED current is simple dropping resistors are used from a
> +5 Volt rail.

So use individual resistors for each leg that matches the Vf for the
particular color.

>
> One approach would be to use 3 independent current sources, each good
> for 100 ma and switch them on and off (PWM) with an 8 pin PIC.

Be sure to check both the absolute current ratings and the duty cycle curves
for the part. Exceeding the max current for a given duty cycle is a recipie
for a smoking crator instead of an LED.

Also be aware that 100ma well exceeds the current capacity of a PIC I/O pin.
So you're looking at a transistor driver to make it work. And simply adding
a low valued resistor on the emitter leg of a NPN transistor can get you
simple current control by providing a PWM generated analog voltage at the base
of the transistor where the current is (Vb - 0.6V)/Re Vb=base voltage and
Re = Emitter resistor.

One question (in general): any particular reason folks are so enamored with
the 8 pin parts? Personally I avoid them like the plague due to extremely
limited I/O and complete inability to have a bootloader. Unless you're talking
about a 1000+ unit run, the costs between the 8 pin part and a hefty capable
40 pin part with all the bells and whistles (12F629 and 16F871 as examples)
is only a 3X price difference. In hobbyist/small scale run terms, the price
is negligable.

So I'm just wondering if there is an advantage to develop with a extremely
limited target as opposed to a larger more capable part?

>
> Is there a simpler way to do this?

Not really. Make sure you read up on Scott Dattalo's vertical counters for
software PWM which will let you set an control multiple channels. And while
testing your code, I'd advise using current that is under the 100 percent
duty cycle maximum to retain the magic smoke.

BAJ

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu

2004\04\20@165634 by Ben Hencke

picon face
>
> One question (in general): any particular reason folks are so
> enamored with
> the 8 pin parts? Personally I avoid them like the plague due to
> extremely
> limited I/O and complete inability to have a bootloader. Unless
> you're talking
> about a 1000+ unit run, the costs between the 8 pin part and a hefty
> capable
> 40 pin part with all the bells and whistles (12F629 and 16F871 as
> examples)
> is only a 3X price difference. In hobbyist/small scale run terms, the
> price
> is negligable.
>
> So I'm just wondering if there is an advantage to develop with a
> extremely
> limited target as opposed to a larger more capable part?

And for only a few times the price of some 40 pin PICs you can get a
rabbit module with 52 i/o, 128k of ram, 256k of flash, and ethernet.

But seriously, I am very fond of the 12f629 & 12f675. The 12f629 and
12f675 are really 16f parts in a 8 pin package so you get the same
instruction set, redesigning for a larger part is easy. They are only a
buck each (very easy for to get in qty of 25) and how much more do you
need to run a RGB LED or a simple temp/light sensor? You even have pins
left over for 3 buttons without any i/o expanding hacks. It all depends
on the project. Would you seriously use a 40 pin part to blink 3 leds?
IIRC even high-end PICs only have up to 2 PWM channels, so you would do
it all in software anyway and only end up using 3 pins.

The only gripe I have about the 8 pin parts is lack of a hardware
USART. Of cource it would then need better OSC options, but those are
already in the works.

IMHO Part of the inspiration to use a PIC in the first place is to
solve complex tasks with simple tools. I believe this ideology extends
to both hobby and production designs.

Of cource you can't do everything with such a limited device, most
projects require more i/o and horsepower.

I personally can't wait to see what I can do with a 10f PIC when/if
they come out.

Hope that helps answer your question :-)

- Ben Hencke


Obligatory Quote:
"Make everything as simple as possible, but not simpler."

 --  Albert Einstein





__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25"
http://photos.yahoo.com/ph/print_splash

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu

2004\04\20@173806 by David Duffy

flavicon
face
Byron A Jeff wrote:

>One question (in general): any particular reason folks are so enamored with
>the 8 pin parts? Personally I avoid them like the plague due to extremely
>limited I/O and complete inability to have a bootloader. Unless you're talking
>about a 1000+ unit run, the costs between the 8 pin part and a hefty capable
>40 pin part with all the bells and whistles (12F629 and 16F871 as examples)
>is only a 3X price difference. In hobbyist/small scale run terms, the price
>is negligable.
>
>So I'm just wondering if there is an advantage to develop with a extremely
>limited target as opposed to a larger more capable part?
>
>

I've used the 8 pin parts for "smart glue logic" before.
eg. One 8 pin PIC per board in a modular system.
It simplified the design and kept the modules compact.
Board space costs $ so making it smaller saves money.
David...

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu

2004\04\20@205606 by Dwayne Reid

flavicon
face
At 09:56 AM 4/20/2004, Byron A Jeff wrote:

>One question (in general): any particular reason folks are so enamored with
>the 8 pin parts? Personally I avoid them like the plague due to extremely
>limited I/O and complete inability to have a bootloader. Unless you're talking
>about a 1000+ unit run, the costs between the 8 pin part and a hefty capable
>40 pin part with all the bells and whistles (12F629 and 16F871 as examples)
>is only a 3X price difference. In hobbyist/small scale run terms, the price
>is negligable.

I've got one board that uses 8- 12c508 PICs, another board that uses 5, one
more that uses 4.  I'm just finishing up my first medium-volume product
using a 16f630.  But I've also got lots of boards that use the larger PICs.

Lots of tiny PICs on a single board was the easiest solution for a few
specific projects.  It would have been much harder to try and fit all the
necessary functions into a single large device and still maintain the
required response times (over-current protection for high current PWM
controllers is one example).

I'd have to say that I now reach for an 8 pin PIC just about anytime I need
to do something that formerly used discrete logic or a small PLD.  The
12c508 is a marvelous device - quirky but marvelous.  I think that we use
around 500 or so per month, with 12f675 and all the other (larger) 14 & 16
bit parts being a distant minority.  I'm not working with the 18F parts yet
- just waiting for the dust to settle on the errata sheets.

Price is the main reason I use the 12c508.  Most of our high volume
products fit quite nicely into 5 or 6 i/o pins and often need less than 200
words of code.  The 12c508 is almost overkill, except that its the smallest
part Microchip makes.

dwayne

PS - one of our suppliers asked if we would consider changing to the 12f629
if they matched the price of the 12c508.  I'm not even barely interested -
the 12c508A has been extremely robust in the real world applications we
subject them to.  There would have to be a significant cost savings with a
different part before I'd consider going to all the work of migrating to
and qualifying that different part.  Just matching the price of the PIC
would actually cost us money.

dwayne

--
Dwayne Reid   <@spam@dwaynerKILLspamspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 20 years of Engineering Innovation (1984 - 2004)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu

2004\04\20@235450 by Jason S

flavicon
face
> One question (in general): any particular reason folks are so enamored
with
> the 8 pin parts? Personally I avoid them like the plague due to extremely
> limited I/O and complete inability to have a bootloader. Unless you're
talking
> about a 1000+ unit run, the costs between the 8 pin part and a hefty
capable
> 40 pin part with all the bells and whistles (12F629 and 16F871 as
examples)
> is only a 3X price difference. In hobbyist/small scale run terms, the
price
> is negligable.
>
> So I'm just wondering if there is an advantage to develop with a extremely
> limited target as opposed to a larger more capable part?

I come from a software backround, so I'm used to thinking of the problems
modularly.  I find it a lot easier to write some modules into a few 12F629
or 12F675 and have a central larger chip that runs the project but has
simpler code than it otherwise would have.  It's sort of like doing
multi-threaded programming by having a seprate PIC for each thread.

For example someone recently asked about decoding an IR remote that could
have a few possible signals.  My approach would be to use a 12F629 to handle
the input from the IR detector and deciding which button is pushed.  It then
has 5 outputs left to pass 5 possible values to a larger pic or since only
one button will be pushed at a time, I can represent 32 possible buttons on
the 5 lines.  That makes the function of receiving an IR signal a lot
simpler to do in main PIC because the hard part is done in a separate device
so I don't have to worry about real-time issues and polling the IR detector
in my main chip.

I'm also working on driving an RGB led just to play with it like the author
of the original post.  The 12F675 gives me 3 output lines to do PWM on the
LED sections, and I'm still left with 3 inputs.  That's plenty to read a
serial instruction to select a colour or use an analog input to base the
color on/etc.  There is no reason to use a larger chip.  My entire PCB for
the project is smaller than the footprint of a 40-pin DIP.

I asked earlier about the small chip + shift registers vs a large chip with
lots of IO.  Ultimately I decided to use the large chip.  In designing the
PCB, I had a lot of trouble routing all the lines coming from the PIC on a
single sided board.  With shift registers, I just need to send 3 wires to
each SR, 2 of which are common to every one, and the board layout is much
easier.

Jason

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

2004\04\21@013918 by William Chops Westfield

face picon face
On Tuesday, Apr 20, 2004, at 13:54 US/Pacific, Ben Hencke wrote:

>> One question (in general): any particular reason folks are so
>> enamored with the 8 pin parts? ... the costs between the 8 pin part
>> and a hefty capable 40 pin part with all the bells and whistles is
>> only a 3X price difference. In hobbyist/small scale run terms, the
>> price is negligable.

Oh come now.  3x difference is hardly "negligable"!  In my case,
"hobbyist" usage means I buy 25 or so of a particular chip and try to
use those for as much as I can...
>>
>> So I'm just wondering if there is an advantage to develop with a
>> extremely limited target as opposed to a larger more capable part?

It has something to do with balance.  I've been enamored of the little
PICs since the 16C54 first made the hobbyist press, back in 1981 or so.
  Perhaps that's cause I see microcontrollers as programmable
electronics, rather than small computers.  The bigger PICs are less
interesting; they're too much like all the other microcontroller chips
you can get.

> And for only a few times the price of some 40 pin PICs you can get a
> rabbit module with 52 i/o, 128k of ram, 256k of flash, and ethernet.

Yes, exactly.  If I'm going to use a 40 pin chip, I almost want
something nicer than a PIC.  The 8051 class goes up to 32 or 64k of
program memory in a broad family, and there are similar motorola chips,
and AVRs.  (until the 18F series, microchip's offerings were pretty
grim in the "big microcontroller" area.)  Beyond that you have
dragonballs, and powerquiccs, along with 80186 and others, and it
becomes less important to have everything on one chip.  Moreover, you
start to hit cheap off-the-shelf systems at about the $100 price point.
 Low end palmtops.  Used two-generation-old PC clones.  Gameboy
development systems.  They're just not CUTE anymore (except in their
own areas, of course...)  If I can't do it with amateur soldering
equipment on a board smaller than a palmtop, it's just not very ...
hobby-like... anymore.

BillW

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\21@034222 by Wouter van Ooijen

face picon face
>So I'm just wondering if there is an advantage to develop
> with a extremely
>limited target as opposed to a larger more capable part?

- Fun!
- PCB area (OK, that is mostly a cost factor so not important for a
prototype, but it might be important for instance for a gadget that you
are supposed to put on your clothes, or something that must fit in a
model rocket)

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...