Starting on an LED matrix display

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
tonythemediaguy
 
Posts: 18
Joined: Tue Mar 10, 2009 3:29 pm

Starting on an LED matrix display

Post by tonythemediaguy »

Hi,

I'm starting to build an LED matrix display (and eventually and LED cube) but I'm new to microcontrollers. Obviously the arduino is good for a lot of things, but is it better than the minipov 3 for what I want to do? Or maybe I just don't understand the difference because I'm too noob. If anyone can help point me in the right direction, I'm eager to learn.


Tony

mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Re: Starting on an LED matrix display

Post by mtbf0 »

for starters you could get an 8x8 matrix and play around with that. it's the same problem as a 4x4x4 cube.

here's a minipov 4x4x4 cube. two half cubes, actually.

there are a lot more pictures of the build on flickr.

tonythemediaguy
 
Posts: 18
Joined: Tue Mar 10, 2009 3:29 pm

Re: Starting on an LED matrix display

Post by tonythemediaguy »

Thanks

But as far as the controller, which is more geared for this?

The_Don125
 
Posts: 373
Joined: Tue Mar 06, 2007 11:51 pm

Re: Starting on an LED matrix display

Post by The_Don125 »

Depends on how many LEDs you want in your matrix/cube

The minipov3 has a maximum of 17 digital I/0 (18 if you have a high-voltage programmer), which could allow a maximum of 17 LEDs controlled directly, 8x9x2 LEDs by multiplexing, and a lot by charlieplexing.

The arduino has 20 digital I/0, so needless to say, it can drive a few more LEDs.

trialex
 
Posts: 189
Joined: Mon Apr 03, 2006 6:25 pm

Re: Starting on an LED matrix display

Post by trialex »

Arduino is probably easier to program, both physically and software-wise. It's easier to interface hardware to it. It has a lot more "space" to fit in code, so in the future you can write longer animations. It will be a lot easy to do "other" things with it after you have done your LED cube project.

minipov is cheaper.

My opinion of course.

mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Re: Starting on an LED matrix display

Post by mtbf0 »

tonythemediaguy wrote:Thanks

But as far as the controller, which is more geared for this?
all you need is a timer and a bunch of i/o pins. a minipov has two timers and 17 pins and runs at 8MHz. an arduino has 3 timers and 20 i/o pins and runs at 16MHz.

both have enough timers, pins and speed.

i think an app like this is easier to program without all the arduino helper functions which are kind of clunky and pretty slow.

Code: Select all

// write a 1 to digital pin 3, in one clock cycle, using a single word of flash
  PORTD = (1 << PD2);
// write a 1 to digital pin 3, with a subroutine call and a lot of comparisons to locate the i/o pin
  digitalWrite (HIGH, 3);

tonythemediaguy
 
Posts: 18
Joined: Tue Mar 10, 2009 3:29 pm

Re: Starting on an LED matrix display

Post by tonythemediaguy »

Please forgive my ignorance, I just want to ask all the right questions before I buy.

How many LED's could each control? Or is it like sets of LED's I could control?

Thanks

mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Re: Starting on an LED matrix display

Post by mtbf0 »

tonythemediaguy wrote:Please forgive my ignorance, I just want to ask all the right questions before I buy.

How many LED's could each control? Or is it like sets of LED's I could control?

Thanks
i leave the calculations for the simple case to you, but the results are 17 and 20.

if you multiplex the maximum leds you can run is ((npins + 1) / 2) * (npins / 2), so the results are 72 and 100.

if you charlieplex the maximum leds you can run is npins * (npins - 1), which gives us 272 and 380.

if you want to use shift registers, well, the sky's the limit.

other things to consider are that if you want to use the uart, you'll have to give up two pins and, as i learned recently, if you want to load new code to a minipov you might want to be able to disconnect your led array from pin pb7, (SCK).

there is also the matter of the amount of current an avr pin can sink. that would be 40ma, which is about two leds worth. you can sink larger currents through transistors. in my cootiecage i limit the current through each transistor to 10ma and process half a row at a time, so at any given time i have only between 0 and 4 leds on.

tonythemediaguy
 
Posts: 18
Joined: Tue Mar 10, 2009 3:29 pm

Re: Starting on an LED matrix display

Post by tonythemediaguy »

Thanks mtbf0! Very Helpful.

So I think I'm going to start with an arduino just so I can do other things with it later. As far as shift registers go, I have a bunch of 4017's around, you think I could use those?

I'm using 20,000mcd LED's (white, blue, green) so I'll need to increase the current to 20ma, so probably just a transistor changeout?


Thanks Again,

Tony

mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Re: Starting on an LED matrix display

Post by mtbf0 »

a 4017's a decade counter isn't it? not really what's called for here.

i've used a 595, which is a nice latching serial in parallel out 8 bit shift register, on the high side with a 2803 darlington array on the low side. this worked well for me, though i'm no engineer, so i can't vouch for it's appropriateness, but i think sparkfun uses this setup in their rgb matrix driver boards.

ti makes some nice 16 bit sipo constant current drivers that emsl uses in their meggy jr kit, (in the peggy, too, i think). i built one last week, but built it badly so the led matrix popped out and won't reseat. fortunately i wasn't going to use it anyway, but now i can't play games while i wait for my leds to fly across the ocean.

tonythemediaguy
 
Posts: 18
Joined: Tue Mar 10, 2009 3:29 pm

Re: Starting on an LED matrix display

Post by tonythemediaguy »

I just ordered my first Arduino and an adafruit proto shield. This will be more than enough for me to get started.

Thanks for your help.

Tony

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”