Built a quick microprocessor driven LED array

Jayls5

Newly Enlightened
Joined
Oct 11, 2009
Messages
74
I had some LED's laying around and a microcontroller, so I built this with my rooommate in an hour or so.

With multiplexing, we can make huge arrays that are completely controllable with images, scrolling text, etc. Just uses some C programming and a bit of creativity.

We started with simple loops, random function, and variable delay for some neat but simple effects.

http://www.youtube.com/watch?v=n4SlPs3H_1k

Just thought i'd share and take any questions/comments/advice.
 

SemiMan

Banned
Joined
Jan 13, 2005
Messages
3,899
Me thinks that "about an hour" is a bit of an optimistic estimate based on how long it would take to wire up the LEDs, power drivers, etc.

Semiman
 

Noctilucent

Newly Enlightened
Joined
Jul 16, 2010
Messages
33
Very neat - and that could easily be done in an hour.. it's not that many components.

I'm not sure where you get 'power drivers' from.. several microprocessors will happily source 30mA on their own and in cases where they won't, it's just a simple transistor (might be those black components on the right) to get things going. Given the experimental setup and very transient effects, this doesn't have to be a constant current type deal and USB (the thing appears to have a USB cable plugged in) gives 5V which will readily be dropped down to the 3.2V or whatever required for a single LED (wouldn't need more than 1 on at a time).

It's a cool little project, but - and don't take this personally, Jayls5 - overall I'm not too impressed with the microprocessor approaches. You're basically writing a computer program.. and when you're doing that, you've probably got a whole 1920x1080 RGB display in front of you anyway ;)

Microprocessors will increasingly form the heart of all but the very simplest of circuits.. simply because of their flexibility, power, relatively low cost and size (it's much cheaper to get a PIC or AVR than a whole set of CMOS/TTL logic chips with surrounding components - and would fit in just a fraction of the space), etc.

But there's something about doing things with the basic building blocks that seems more satisfying to me.

Still, it looks very cool and I wouldn't want to even begin designing a classic circuit to replicate what it is doing.. that would definitely take -much- longer than 1 hour :)
 

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
Which micro did you use? And which technique did you use to mux the LEDs? I've done similar stuff with LEDs in the past, but I've never actually messed around with muxing...
 

Jayls5

Newly Enlightened
Joined
Oct 11, 2009
Messages
74
Which micro did you use? And which technique did you use to mux the LEDs? I've done similar stuff with LEDs in the past, but I've never actually messed around with muxing...

Didn't have a need to multiplex yet... the board has like 50 inputs on it. When we scale up we will have to out of necessity.

Me thinks that "about an hour" is a bit of an optimistic estimate based on how long it would take to wire up the LEDs, power drivers, etc.

Semiman

The LED's are being run off of the microprocessor. I poked all of the cathodes through a piece of cardboard and left the anodes on the other side. My roommate and I then just soldered pieces of copper across in a grid and wired it up to the microprocessor. Then it was just making the program.


Very neat - and that could easily be done in an hour.. it's not that many components.

I'm not sure where you get 'power drivers' from.. several microprocessors will happily source 30mA on their own and in cases where they won't, it's just a simple transistor (might be those black components on the right) to get things going. Given the experimental setup and very transient effects, this doesn't have to be a constant current type deal and USB (the thing appears to have a USB cable plugged in) gives 5V which will readily be dropped down to the 3.2V or whatever required for a single LED (wouldn't need more than 1 on at a time).

It's a cool little project, but - and don't take this personally, Jayls5 - overall I'm not too impressed with the microprocessor approaches. You're basically writing a computer program.. and when you're doing that, you've probably got a whole 1920x1080 RGB display in front of you anyway ;)

Microprocessors will increasingly form the heart of all but the very simplest of circuits.. simply because of their flexibility, power, relatively low cost and size (it's much cheaper to get a PIC or AVR than a whole set of CMOS/TTL logic chips with surrounding components - and would fit in just a fraction of the space), etc.

But there's something about doing things with the basic building blocks that seems more satisfying to me.

Still, it looks very cool and I wouldn't want to even begin designing a classic circuit to replicate what it is doing.. that would definitely take -much- longer than 1 hour :)

These LED's take slightly higher voltage, and they were junkers so we just ran them straight off of the board. I'm with you on the traditional setups, but programming nets such awesome results so easily :) By the way, those black things are just numbers. You can run the video in 720p for a better view.


Thanks for the comments so far guys.
 

Jayls5

Newly Enlightened
Joined
Oct 11, 2009
Messages
74
Which micro did you use? And which technique did you use to mux the LEDs? I've done similar stuff with LEDs in the past, but I've never actually messed around with muxing...

I just realized I didn't answer your question. It's the Arduino 2650.
 

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
I just realized I didn't answer your question. It's the Arduino 2650.

I love my arduino duemillanove. It's a great started board, and has lots of cool features. But just to be clear, are you programming it in C or in the arduino processing+wiring language? I imagine using straight up C with that many pins would be a real pain.
 

Noctilucent

Newly Enlightened
Joined
Jul 16, 2010
Messages
33
These LED's take slightly higher voltage, and they were junkers so we just ran them straight off of the board.
The board's power being the USB 5V?

I'm with you on the traditional setups, but programming nets such awesome results so easily :)
Oh yes, absolutely! It decimates development time. Just being able to trial-and-error without having to wire things up (even in simulation software, that takes time) saves days even on smaller projects.

By the way, those black things are just numbers. You can run the video in 720p for a better view.
Ah so they are.. I tend to stay away from the HD videos.. while my post said that -you- probably have a computer with a 1920x1080 monitor in front of you, mine is from well before the era of HD screens (and thus dual core CPUs).

There was a project I saw a long time ago that would probably be easier with this, that might be a fun challenge. Are you familiar with LEDs being able to act as photodiodes? The project was one where essentially the user would illuminate the LEDs with something blocking some of the LEDs. The circuit switched between the LEDs acting as sensors and acting as regular LEDs, with those LEDs -not- exposed to the light lighting up. Giving a negative shadow. This wasn't quite realtime (I think 1 second exposure, 1 second display) but I don't know if that was intentional, a consequence of the LED physics, or etc.
Even if the LEDs are unsuitable for the purpose, some cheap photodiodes or phototransistors placed right next to the LEDs should still give the same effect.
 

IMSabbel

Enlightened
Joined
Dec 4, 2004
Messages
921
Ah so they are.. I tend to stay away from the HD videos.. while my post said that -you- probably have a computer with a 1920x1080 monitor in front of you, mine is from well before the era of HD screens (and thus dual core CPUs).
720p is 1280x720. My first Screen that could reach this resolution was a 15" CRT from 1995. I do not think yours is older, so dont try to belittle the OP.
 

JohnR66

Flashlight Enthusiast
Joined
Aug 1, 2007
Messages
1,052
Location
SW Ohio
I always wanted to tinker with PICs, but never got around to it until someone sent me some PicAxe chips for free. Nothing special to program them, just download the BASIC compiler software, a couple resistors and a serial cable, like from an old serial mouse and your ready.

I made a 5x3 matrix simple character display using minimal parts as you can see. using a shift register on one of the pins, the display can be made into a 7xwhatever length is needed.

The code is mostly data for the characters and a simple frame buffer routine that grabs the data from memory and writes it to the screen.

The point in this is just learning. I have no end product in mind. I challenge myself by writing the code without outside help.

matrixled.jpg


For those interested, here is the program that counts from 1 to F (hex) and loops.

'LED matrix display program for PicAxe 18X

'load digit pattern data into memory
poke $50, %10010000
poke $51, %11111000
poke $52, %10000000

poke $53, %11101000
poke $54, %10101000
poke $55, %10111000

poke $56, %10101000
poke $57, %10101000
poke $58, %11111000

poke $59, %00111000
poke $5a, %00100000
poke $5b, %11111000

poke $5c, %10111000
poke $5d, %10101000
poke $5e, %01001000

poke $5f, %11111000
poke $60, %10101000
poke $61, %11101000

poke $62, %00001000
poke $63, %00001000
poke $64, %11111000

poke $65, %11111000
poke $66, %10101000
poke $67, %11111000

poke $68, %10111000
poke $69, %10101000
poke $6a, %11111000

poke $6b, %11110000
poke $6c, %00101000
poke $6d, %11110000

poke $6e, %11111000
poke $6f, %10101000
poke $70, %01010000

poke $71, %01110000
poke $72, %10001000
poke $73, %01010000

poke $74, %11111000
poke $75, %10001000
poke $76, %01110000

poke $77, %11111000
poke $78, %10101000
poke $79, %10001000

poke $7a, %11111000
poke $7b, %00101000
poke $7c, %00001000


'column scan data
poke $c0, %0110
poke $c1, %0101
poke $c2, %0011


b6 = 100 'b6 = time length of fixed display
b7 = $50 'memory location start of graphics


writescr: 'routine writes data to LED matrix

if b6 = 100 then gosub update
b6=b6 + 1

b1 = $ed
b2 = $c0

for b3 = 0 to 2

peek b1, b4
peek b2, b5

let pins = b4 + b5

inc b2
inc b1

next

goto writescr


update: 'routine to update graphics aperture

b6 = 0

peek b7, b8 : poke $ed, b8
b7 = b7 + 1

peek b7, b8 : poke $ee, b8
b7 = b7 + 1

peek b7, b8 : poke $ef, b8
b7 = b7 + 1

if b7 = $7d then let b7 = $50 endif

return
 

wquiles

Flashaholic
Joined
Jan 10, 2005
Messages
8,459
Location
Texas, USA, Earth
The point in this is just learning. I have no end product in mind. I challenge myself by writing the code without outside help.
Well said. Sometimes we procrastinate for too long, when in reality it is not that hard/difficult - we just need to get started :thumbsup:
 

Noctilucent

Newly Enlightened
Joined
Jul 16, 2010
Messages
33
720p is 1280x720. My first Screen that could reach this resolution was a 15" CRT from 1995. I do not think yours is older, so dont try to belittle the OP.
I fear that you've misunderstood. Although my screen will happily do 1280x720 (and have 80 pixels to spare vertically), getting that on the screen from an invariably MPEG-4 compressed stream off of YouTube is, thanks to the lack of a suitable CPU (or GPU as the case may be), something I tend to stay away from.. thus missing the details in the video.. thus not making out that the black bits were numbers and so on and so on.

I don't even know where you're getting any belittling from, but.. OP: if you feel belittled - no belittlement intended.
 
Top