LED driver circuit help needed..

20 views
Skip to first unread message

skajam66

unread,
Jun 3, 2012, 11:01:58 PM6/3/12
to TokyoHackerSpace
Hi,
I'm looking to put together a project for my son to do this summer. I
want to drive an 8x8 matrix of 3 colour LEDS with dimming capability.
I don't need individual LED control - all LED's of the same colour can
be driven at the same level. Microcontroller will be an Arduino - I
know this has PWM capability but I also want to explore using a
weighted shift register for brightness control - i.e. latch a byte of
data into a shift register and clock it out a s a serial stream where
each bit has a time duration equal to 2^N where N is the bit position.
Can anyone advise me on (1) the best way to connect the LED's (i.e. 8
parallel strings of 8 LED's in series? all in parallel? all in
series?), (2) appropriate drivers for the chosen topology, (3) use the
Arduino PWM capability or shift registers?

Many thanks,

ac

Akiba

unread,
Jun 4, 2012, 12:32:11 AM6/4/12
to tokyohac...@googlegroups.com
Might want to research Adafruit's tutorial on the RGB Matrix they sell:
http://ladyada.net/products/rgbledmatrix/

Akiba
FreakLabs Open Source Wireless
Web: http://www.freaklabs.org
Shop:http://www.freaklabsstore.com
Twitter: http://www.twitter.com/freaklabs
> --
> You received this message because you are subscribed to the Google Groups
> "TokyoHackerSpace" group.
> To post to this group, send email to tokyohac...@googlegroups.com.
> To unsubscribe from this group, send email to
> tokyohackerspa...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/tokyohackerspace?hl=en.

Usmar A Padow

unread,
Jun 4, 2012, 1:12:17 AM6/4/12
to tokyohac...@googlegroups.com
I made a tutorial on how to make an arduino LED matrix https://github.com/amigojapan/Arduino-LED-Matrix-Display

It can be adapted to do RGB

Torsten Wagner

unread,
Jun 4, 2012, 2:20:10 AM6/4/12
to tokyohac...@googlegroups.com
It seems Akiba has a sort of filter like
THS && circuit.... running ;)

Well you need definitely a driver... but a row of FET stages should do fine.
As for connection you need to be aware that you require 3 I/Os for each RGB row.
This would make 3*8 for a 8x8 configuration and hence 24 I/Os.
If you or your son want to put a little more effort into the soft- and
hardware side you might consider to run all this lines by some
demultiplexers. Using demultiplexer for rows and columns might allow
you to run the LEDs directly from an I/O resp. an demultiplexer pin,
as for this you only light up one single LED at a time, you would save
the driver circuits and it might become almost a tie in terms of
circuit complexity.

However, you would have to program the logic to e.g. address LEDs of a
single line one by one and line by line (similar like an old TV) in
your software. And this has to run quick enough to fool the human eye
to believe all LEDs are "on" at the same time. Normally you move
along the LEDs one by one with a constant time pattern, to make them
appearing dimmed you skip refresh cycles for an LED. Thus, in case of
brightness control you have to multiply your refresh rate by the
amount of levels you want to have for brightness control (e.g. 8
levels).
Refresh time per LED would be
E.g.
8x8 LEDs =64 LEDs
You want 25 Hz refresh/frame to get a flicker free image
This are 40 ms time slot to update 64 LEDs or 40ms / 64 = 625 us for each LED
If you want to control the brightness of each LED by 8 levels 625 us
/ 8 = 78.1 us = 12.8 kHz refresh rate
If you set the LED 8 times in a row high it would give you the highest
brightness, 8 times zero would be off.
You can decide to multiplex the colours too or to run three times the
same circuit, one for each colour.

As you can see, the timing should be achievable. However, you have to
define functions which translate let me say something like
setLED(row,column,value) into the right timing sequences.

Not sure maybe this is already all to advanced for what you plane to
be an introduction into uC programming. On the other side, getting the
64 LEDs in place and drive them individually by demultiplexing is not
much more complex comparing to other ways of driving several rows of
LEDs at the same time. Being able to control each LEDs' colour and
creating nice effects is on the other hand much more cool.

Demultiplexers are cheap, I would say this might be even a cheaper
solution compared to driver stages.

@Akiba... ok I'm oiling up for the next round of electronic-geek oil
wrestling.....

Totti

Akiba

unread,
Jun 4, 2012, 2:25:25 AM6/4/12
to tokyohac...@googlegroups.com
Ha ha ha. I'm too lazy to do calculations recently.

Usmar A Padow

unread,
Jun 4, 2012, 4:19:55 AM6/4/12
to tokyohac...@googlegroups.com
Charliplexing, and flashing the LEDs faster than the eye can notice is all covered in my tutorial and the link to the geek labs site

skajam66

unread,
Jun 5, 2012, 7:10:16 AM6/5/12
to TokyoHackerSpace
Thanks everyone for your comments. This will give me a good start

Ac

On Jun 4, 5:19 pm, Usmar A Padow <usmpa...@gmail.com> wrote:
> Charliplexing, and flashing the LEDs faster than the eye can notice is all covered in my tutorial and the link to the geek labs site
>
> >> For more options, visit this group athttp://groups.google.com/group/tokyohackerspace?hl=en.

MRE

unread,
Jun 5, 2012, 9:10:25 AM6/5/12
to TokyoHackerSpace
Don't forget you need some frame buffer. Not that much, but three
bytes per pixel per frame.

64 LEDs X 3 colors X 12 frames per second = 2304 bytes per second of
image
Reply all
Reply to author
Forward
0 new messages