Pages: 1 [2] 3 4   Go Down
Author Topic: Need help: How to make my own 24x16 LED Matrix display  (Read 6380 times)
0 Members and 1 Guest are viewing this topic.
India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Use 5 shift registers - 3 to make the 24 bits, and 2 to make the 16 bits.

That's a very cool idea. So effectively join the anodes in the columns and cathodes in the rows. So 3 shift registers for the columns and 2 for the rows. But with this circuit also, wouldn't the current drag be more than the arduino can provide? It's possible to have all 384 LEDs switched on at the same time by making the columns high and the rows low. How do I power it?
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26970
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"It's possible to have all 384 LEDs switched on "
Only if you screw up! The idea is that no more than 1 column is turned on at a time, the column whose cathode is pulled low.
Here's the start of the array, 5x16 shown so far.
The Anodes get there current via the pullup resistor.

The cathode are all driven high.
The anode are pulled high/low.
ONE cathode is turned on, the LEDs with Anodes not pulled low turn on.
the cathode is turned off.

The anode are pulled high/low.
ONE cathode is turned on, the LEDs with Anodes not pulled low turn on.
the cathode is turned off.

repeat.

What I did was out put the array in memory, and every 500uS read out the anode info, turn off the current cathode, write out the anodes, and turn the next cathode on.
Then during the 500uS, read the serial port, buttons, do math, whatever to update the array as needed.


* 24x14_6B595.jpg (65.77 KB, 960x720 - viewed 37 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2520
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For a first matrix I really would recommend the MAX7219 chip for simplicity as it deals with all the scanning for you. As you want 24x16 just use 6 chips daisy chained together (1 chip = 8x8 matrix). This shows how to wire them up http://arduino.cc/playground/Main/MAX72XXHardware and attached is the schematic I did for my first arduino project. I would use a 10uF/100nF per chip if your driving 6 of them.

* Clock5013.pdf (66.99 KB - downloaded 13 times.)
Logged

India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What I did was out put the array in memory, and every 500uS read out the anode info, turn off the current cathode, write out the anodes, and turn the next cathode on.
Then during the 500uS, read the serial port, buttons, do math, whatever to update the array as needed.

Thanks! Let me try this out. I've attached a schematic of the display based on your input. Once I can get it to work on the simulator, I'll probably try to get a PCB manufactured for the 8x8 displays and for the bit shifts. Pretty hard to fit all of them on a breadboard. Btw, really like the boards you have on your website, esp the Bobuino smiley.

For a first matrix I really would recommend the MAX7219 chip for simplicity as it deals with all the scanning for you.[/url] and attached is the schematic I did for my first arduino project. I would use a 10uF/100nF per chip if your driving 6 of them.

That was my first impulse. I've even ordered one to play around with. But, it's way cheaper with bit shifts at least where I'm staying. I've been able to wire a single 8x8 to a bit shift register already, so I have a basic understanding.




* 24x16 wiring.jpg (149.95 KB, 574x565 - viewed 24 times.)
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26970
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks like a good start. Hard to tell which are anodes & which are cathodes.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks like a good start. Hard to tell which are anodes & which are cathodes.

I'm not sure myself smiley. The actual 8x8 LEDs that I have are far worse. They've got them all mixed up. i.e. Pin 1 is for column8 and pin2 is for row6 and so on  smiley-eek
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One of the other members posted this URL to Nerdkits over here: http://www.nerdkits.com/videos/ledarray2/

I think it's a very interesting idea to connect 2 LEDs between the same terminals so that I alternate the polarity between the terminals in quick succession and light both of them. This should allow me to reduce the number of bitshifts by half. Theoretically, I should be able to run a 24x16 or even a 32x16 LED array with just 3 bit shift registers (2 for columns and 1 for rows). Of course, this would require twice the number of processing cycles by the MUC, but I think the Atmega is capable of doing it fast enough to avoid any flicker.

What do you think?
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26970
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Seems like you'd be taking on a lot of hassle to save 2 parts.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Seems like you'd be taking on a lot of hassle to save 2 parts.

No hassle at all since I'm doing this for fun smiley. I think it's just amazing that with some thought, we can reduce the number of bit shift registers for a 24x16 display down from 12 to 7 to 5 and now to 3.

Of course this is theoretically speaking. I'm sure getting the algorithm to convert an array using 3 bit shifts will be a bit challenging. And I lose the benefit of the pull-up resistor to the +5V pin on the arduino, thereby limiting it to just 40mA max. I think bad code might actually introduce a flicker here since it takes twice the number of cycles to power the pattern.
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I may have been wrong. I've tried to bring it down to 3 shift registers, but I can't do it. The best I could do using the reverse polarity trick is to bring it down to 4. I've attached an image of the circuit I could come up with. The Anodes and Cathodes of the 8x8 displays are shown in the image. Anyone know of a way to bring it down to 3 shift registers?


* 24x16_reverse_polarity.jpg (168.98 KB, 762x516 - viewed 10 times.)
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Premature optimization is the root of all evil. - Donald Knuth
Logged

India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Premature optimization is the root of all evil. - Donald Knuth

Agreed smiley. I'm not saying I'll do it this way in my project. I'm just curious to see how the difficulty increases. Honestly, I'm much better at coding than electronics. So, why not try to push the MCU to it's limits? Trying to code for this is like a real brainteaser.
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
why not try to push the MCU to it's limits
Beside the display, you may need your MCU to perform other operations, like reading buttons, getting time from RTC etc. If the MCU is busy most of the time with the display, it may look unresponsive to the user.
Logged

India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Beside the display, you may need your MCU to perform other operations, like reading buttons, getting time from RTC etc. If the MCU is busy most of the time with the display, it may look unresponsive to the user.

Let me try it and see.
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, looks like the circuit with 4 shift registers also doesn't work. I realised that the shift register doesn't have a high impedance state i.e. at any point, every pin will need to be either HIGH or LOW. It can't be 'disconnected' and hence, not possible to turn on just a single LED using that circuit. So, I guess the best way to do this would be with 5 shift registers.

I can picture florinc and CrossRoads smirking silently  smiley-red
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

Pages: 1 [2] 3 4   Go Up
Jump to: