Go Down

Topic: Need help: How to make my own 24x16 LED Matrix display (Read 6 times) previous topic - next topic

plastygrove


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?
My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

CrossRoads

"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.
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.

Riva

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.
http://forum.arduino.cc/index.php?action=unread;boards=5,67,10,11,66,12,15,17,21,22,23,24,25,29;ALL

plastygrove


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 :).


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.


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

CrossRoads

Looks like a good start. Hard to tell which are anodes & which are cathodes.
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.

plastygrove


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


I'm not sure myself :). 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:
My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

plastygrove

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?
My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

CrossRoads

Seems like you'd be taking on a lot of hassle to save 2 parts.
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.

plastygrove


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 :). 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.
My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

plastygrove

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?
My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

florinc

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

plastygrove


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



Agreed :). 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.
My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

florinc

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.

plastygrove


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.
My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

plastygrove

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:
My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

Go Up