Drivings LED with limited pins

M

Mike Miller

Guest
All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

-Mike
 
On Mon, 10 Mar 2014 15:34:48 -0700, Mike Miller wrote:

All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

-Mike

Unless I'm missing something, 10 pins (5 rows, 5 columns) would be enough
IF you can time-interleave them.
 
On Tuesday, 11 March 2014 09:36:41 UTC+11, John Larkin wrote:
On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), Mike Miller
mikemillernow@gmail.com> wrote:

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

Multiplex them (14 pins), or use a shift register (3 pins.)

The simplest sort of multiplexer would only be able to turn one LED on at any one time (a opposed to toggling any one of 23) but it would only use 10 lines for a 5x5 matrix. You'd connect the anode pins of groups of five LEDs together to a common current-limiting resistor, and connect each of the five resistors back to five PNP open collectors, any one of which (but only one) could be turned on to connect to - say - +5V.

Similarly the cathode pins of groups of five LEDs (one from each of the five different anode groups) would be connected together to one of five common NPN collectors, any one of which (but only one) could be turned on to connect to the
0V rail.

The shift register solution is more elegant and more flexible, and might be cheaper - 3 x 74HCT595 plus 23 current-limiting resistors is probably cheaper than five discrete PNP transistors, five discrete NPN transistors, five current limiting resistors and ten base drive transistors. Even the part count is almost the same

I wonder how John was going to use his 14 multiplexing lines - a 4 x 6 matrix is still only ten lines, a 3 x 8 matrix is 11 lines, and 2 x 11 is still only 13. I may be missing something here.

--
Bill Sloman, Sydney
 
Den tirsdag den 11. marts 2014 00.15.27 UTC+1 skrev Bill Sloman:
On Tuesday, 11 March 2014 09:36:41 UTC+11, John Larkin wrote:

On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), Mike Miller

mikemillernow@gmail.com> wrote:



I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.



What are some options for this?



1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?



2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.



Thank you for any ideas.



Multiplex them (14 pins), or use a shift register (3 pins.)



The simplest sort of multiplexer would only be able to turn one LED on at any one time (a opposed to toggling any one of 23) but it would only use 10 lines for a 5x5 matrix. You'd connect the anode pins of groups of five LEDs together to a common current-limiting resistor, and connect each of the five resistors back to five PNP open collectors, any one of which (but only one) could be turned on to connect to - say - +5V.



Similarly the cathode pins of groups of five LEDs (one from each of the five different anode groups) would be connected together to one of five common NPN collectors, any one of which (but only one) could be turned on to connect to the

0V rail.



The shift register solution is more elegant and more flexible, and might be cheaper - 3 x 74HCT595 plus 23 current-limiting resistors is probably cheaper than five discrete PNP transistors, five discrete NPN transistors, five current limiting resistors and ten base drive transistors. Even the part count is almost the same



I wonder how John was going to use his 14 multiplexing lines - a 4 x 6 matrix is still only ten lines, a 3 x 8 matrix is 11 lines, and 2 x 11 is still only 13. I may be missing something here.

the OP needs 23 so 2x11 won't do, 2x12 = 14 pins, 24 leds


-Lasse
 
On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), Mike Miller
<mikemillernow@gmail.com> wrote:

All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

-Mike

Multiplex them (14 pins), or use a shift register (3 pins.)




--

John Larkin Highland Technology, Inc

jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com
 
On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), the renowned Mike Miller
<mikemillernow@gmail.com> wrote:

All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

-Mike

You could drive 24 individual LEDs with 12 pins and 3 resistors, but
perhaps only 8-10 of them should appear to be on at once.



Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
On 3/10/2014 6:36 PM, John Larkin wrote:
On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), Mike Miller
mikemillernow@gmail.com> wrote:

All,

I want to be able to toggle 23 separate LEDs in my application.
The design challenge is that I only have about 17 pins available on
my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some
digital interface (spi/i2c) and then send over data to toggle the
appropriate pins?

2.) Ideally I don't want to have to do additional firmware
development on a second microcontroller.

Thank you for any ideas.

-Mike

Multiplex them (14 pins), or use a shift register (3 pins.)

Google "Charlieplexing".

Cheers

Phil Hobbs


--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net
 
On Mon, 10 Mar 2014 15:34:48 -0700, Mike Miller wrote:

All,

I want to be able to toggle 23 separate LEDs in my application. The
design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital
interface (spi/i2c) and then send over data to toggle the appropriate
pins?

2.) Ideally I don't want to have to do additional firmware development
on a second microcontroller.

Thank you for any ideas.

-Mike
 
In article <613c339a-c651-415e-a46c-03c46223c937@googlegroups.com>,
mikemillernow@gmail.com says...
All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

-Mike

Matrix..
A 5 x 5 = row and col scan. This will give you 25 LEDS using 10 IO's

Jamie
 
On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), Mike Miller
<mikemillernow@gmail.com> wrote:

All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

-Mike

2X TLC5926/TLC5927:

http://www.ti.com/lit/ds/slvs677/slvs677.pdf

John Fields
 
If you can talk I2C, you can use a port expander like the MCP23017;
that gives you 16 pins to work with, requiring 2 pins from your SOIC
(and a simple matter of the I2C software). The MCP23017 is popular with
the Arduino crowd, so you can find plenty of sample code using it.
You'd need to do some amount of multiplexing to get 23 LEDs on 16 bits,
or use multiple port expander chips as they also come in an 8-bit
version.

For a simpler approach take a look at the 74HC595 -- 8 bit serial input
shift register with latch and tri-state outputs. Each output will
deliver 30mA max, so if your LEDs will run on that, you're in luck.
Three of these in a row and you're in business.


In article <613c339a-c651-415e-a46c-03c46223c937@googlegroups.com>,
Mike Miller <mikemillernow@gmail.com> wrote:

All,

I want to be able to toggle 23 separate LEDs in my application. The design
challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital
interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a
second microcontroller.

Thank you for any ideas.

-Mike

--
 
Mike Miller wrote:

All,

I want to be able to toggle 23 separate LEDs in my application. The
design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital
interface (spi/i2c) and then send over data to toggle the appropriate
pins?

2.) Ideally I don't want to have to do additional firmware development on
a second microcontroller.
Arrange the LEDs as a 4 x 6 matrix. You can use 6 row drivers
and 4 column drivers or vice versa. One of the drivers needs to be
more powerful, as it could be driving all 4 or 6 LEDs on at the same time.
The other driver needs less power, can often be done with the bare
micro's I/O pins, and needs a series resistor. This requires a
constant updating, but at a pretty low rate, could be done by a keyboard
scanning routine. It only takes 10 pins and probably one driver chip
and some resistors.

Jon
 
On 3/10/2014 6:59 PM, Kennedy wrote:
On 11-Mar-14 7:15 AM, Bill Sloman wrote:
On Tuesday, 11 March 2014 09:36:41 UTC+11, John Larkin wrote:
On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), Mike Miller
mikemillernow@gmail.com> wrote:

I want to be able to toggle 23 separate LEDs in my application. The
design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some
digital interface (spi/i2c) and then send over data to toggle the
appropriate pins?

2.) Ideally I don't want to have to do additional firmware
development on a second microcontroller.

Thank you for any ideas.

Multiplex them (14 pins), or use a shift register (3 pins.)

The simplest sort of multiplexer would only be able to turn one LED on
at any one time (a opposed to toggling any one of 23) but it would
only use 10 lines for a 5x5 matrix. You'd connect the anode pins of
groups of five LEDs together to a common current-limiting resistor,
and connect each of the five resistors back to five PNP open
collectors, any one of which (but only one) could be turned on to
connect to - say - +5V.

Similarly the cathode pins of groups of five LEDs (one from each of
the five different anode groups) would be connected together to one of
five common NPN collectors, any one of which (but only one) could be
turned on to connect to the
0V rail.

The shift register solution is more elegant and more flexible, and
might be cheaper - 3 x 74HCT595 plus 23 current-limiting resistors is
probably cheaper than five discrete PNP transistors, five discrete NPN
transistors, five current limiting resistors and ten base drive
transistors. Even the part count is almost the same

I wonder how John was going to use his 14 multiplexing lines - a 4 x 6
matrix is still only ten lines, a 3 x 8 matrix is 11 lines, and 2 x 11
is still only 13. I may be missing something here.



For 23 leds

12 x 2 multiplexing would allow 24 LEDs

56 LED's can be driven from one microcomputer port.
http://www.tinaja.com/glib/muse152.pdf

--
Many thanks,

Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com
 
On 11-Mar-14 7:15 AM, Bill Sloman wrote:
On Tuesday, 11 March 2014 09:36:41 UTC+11, John Larkin wrote:
On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), Mike Miller
mikemillernow@gmail.com> wrote:

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

Multiplex them (14 pins), or use a shift register (3 pins.)

The simplest sort of multiplexer would only be able to turn one LED on at any one time (a opposed to toggling any one of 23) but it would only use 10 lines for a 5x5 matrix. You'd connect the anode pins of groups of five LEDs together to a common current-limiting resistor, and connect each of the five resistors back to five PNP open collectors, any one of which (but only one) could be turned on to connect to - say - +5V.

Similarly the cathode pins of groups of five LEDs (one from each of the five different anode groups) would be connected together to one of five common NPN collectors, any one of which (but only one) could be turned on to connect to the
0V rail.

The shift register solution is more elegant and more flexible, and might be cheaper - 3 x 74HCT595 plus 23 current-limiting resistors is probably cheaper than five discrete PNP transistors, five discrete NPN transistors, five current limiting resistors and ten base drive transistors. Even the part count is almost the same

I wonder how John was going to use his 14 multiplexing lines - a 4 x 6 matrix is still only ten lines, a 3 x 8 matrix is 11 lines, and 2 x 11 is still only 13. I may be missing something here.

For 23 leds

12 x 2 multiplexing would allow 24 LEDs
 
On Mon, 10 Mar 2014 18:48:08 -0400, the renowned Spehro Pefhany
<speffSNIP@interlogDOTyou.knowwhat> wrote:

On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), the renowned Mike Miller
mikemillernow@gmail.com> wrote:

All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

-Mike

You could drive 24 individual LEDs with 12 pins and 3 resistors, but
perhaps only 8-10 of them should appear to be on at once.

That should be 7 pins and 3 resistors!

--sp


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
On 2014-03-10, Mike Miller <mikemillernow@gmail.com> wrote:
All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

Multiplexing, Charlieplexing, or an external shift-register based led driver.

--
Neither the pheasant plucker, nor the pheasant plucker's son.


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
 
On 2014-03-10, Bill Sloman <bill.sloman@gmail.com> wrote:
On Tuesday, 11 March 2014 09:36:41 UTC+11, John Larkin wrote:
On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), Mike Miller
mikemillernow@gmail.com> wrote:

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

Multiplex them (14 pins), or use a shift register (3 pins.)

The simplest sort of multiplexer would only be able to turn one LED
on at any one time (a opposed to toggling any one of 23) but it would
only use 10 lines for a 5x5 matrix. You'd connect the anode pins of
groups of five LEDs together to a common current-limiting resistor,
and connect each of the five resistors back to five PNP open
collectors, any one of which (but only one) could be turned on to
connect to - say - +5V.

Also if you use NPN emitter followers you can then omit the base resistor.

Similarly the cathode pins of groups of five LEDs (one from each of
the five different anode groups) would be connected together to one of
five common NPN collectors, any one of which (but only one) could be
turned on to connect to the 0V rail.

ditto PNP followers

doesn't that setup allow upto 5 LEDs to be lit simultaneously?
and by scanning any combination to appear lit.

The shift register solution is more elegant and more flexible, and
might be cheaper - 3 x 74HCT595 plus 23 current-limiting resistors is
probably cheaper than five discrete PNP transistors, five discrete NPN
transistors, five current limiting resistors and ten base drive
transistors. Even the part count is almost the same

If you only want to light one led at a time the microcontroller's
outputs are probably strong enough.

> I wonder how John was going to use his 14 multiplexing lines - a 4 x 6 matrix is still only ten lines, a 3 x 8 matrix is 11 lines, and 2 x 11 is still only 13. I may be missing something here.

23 pins would be a 2x12 matrix: it's easy enough to build an inverter using the column drivers

2x12 gets the most brightness if you need several leds to
simultaneously appear to be lit, and if you can drive the rows
directly with the microcontroller outputs it saves on parts.

--
Neither the pheasant plucker, nor the pheasant plucker's son.


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
 
On a sunny day (Mon, 10 Mar 2014 15:34:48 -0700 (PDT)) it happened Mike Miller
<mikemillernow@gmail.com> wrote in
<613c339a-c651-415e-a46c-03c46223c937@googlegroups.com>:

All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins
available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle
the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

OK no problem, 32 LEDs:
https://www.sparkfun.com/products/retired/10312

 
On 2014-03-11, Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:
On Mon, 10 Mar 2014 18:48:08 -0400, the renowned Spehro Pefhany
speffSNIP@interlogDOTyou.knowwhat> wrote:

On Mon, 10 Mar 2014 15:34:48 -0700 (PDT), the renowned Mike Miller
mikemillernow@gmail.com> wrote:

All,

I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.

What are some options for this?

1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?

2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.

Thank you for any ideas.

-Mike

You could drive 24 individual LEDs with 12 pins and 3 resistors, but
perhaps only 8-10 of them should appear to be on at once.

That should be 7 pins and 3 resistors!

6 pins and one resistor if you choose the right LEDs


--
Neither the pheasant plucker, nor the pheasant plucker's son.


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
 
On Monday, March 10, 2014 6:34:48 PM UTC-4, Mike Miller wrote:
All,



I want to be able to toggle 23 separate LEDs in my application. The design challenge is that I only have about 17 pins available on my SoC.



What are some options for this?



1.) Use another microcontroller with 23 available pins with some digital interface (spi/i2c) and then send over data to toggle the appropriate pins?



2.) Ideally I don't want to have to do additional firmware development on a second microcontroller.



Thank you for any ideas.



-Mike

Charlieplexing: http://en.wikipedia.org/wiki/Charlieplexing

--
-Harold Hills
 

Welcome to EDABoard.com

Sponsor

Back
Top