Thank you for entering this topic, please tell me if there are any language errors, i'm not English.
Soooo... i was thinking about making a 64x16 led matrix for my school (to put on the main door). Initially i wanted to make it on breadboard/pcb, but after some searching i found that you can find cheap RGB 8x8matrixes for no more than 4$ (3€).
So, i took a sheet of paper and wrote some functions that the matrix will (ideally) have:
RGB!
Animation support, can cycle through frames and move text (marquee).
Show time (using RTC)
Show temp, humidity, sunlight and send all the data to a server, to make graphs.
Show live tweets from a hashtag (eg. #mymatrix)
Show animations loaded from the web
Do you think is it possible to accomplish everything on an Arduino MEGA2560?
Also, here's what makes me major headaches:
I'll use the basic multiplexing method, but i'll make the scans in a multiple of 256, so i'll be able to dim the colors.
Eg. i want #00FFF0, i cycle 256 times and never lit red leds, lit 256 times the green leds, lit 249 times the blue ones.
The columns will be scanned using 575 shift registers, that will also provide current to the leds, while the rows will be scanned using TIP120 transistors directly connected to the arduino pins.
I'll use port registers, to accomplish the fastest speed possible.
Also, the 575 shift registers will be 24 (64*3 leds / 8), but i'll create 4 data lines of 6 shift registers each, so i can get 400% of the max speed of just using one data channel.
Do you think is this method feasible? Could it work?
Numbers seem incorrect.
Assuming you have 64 across and 16 high.
Use common anode RGB LEDs. Thus 16 high is really 48 (16 each R, G, B), drive with 8 shift registers: cd74ac164, with 20mA outputs. That drives the Rows <---->
Each column will then need to sink current from 48 LEDs, 48 * 20mA = 960mA.
Use an N-channel MOSFET to buffer output of common 74HC595 shift register, 1 column is turned on at a time
^
|
|
v
64 columns then just needs 8 shift registers.
Can store the data to be displayed in 3 arrays of 2 bytes x 8 bytes, one for each color, representing the 16 bits x 64 bits of the display.
If each column is on 1/64 of the refresh time, say 0.5mS, then the entire screen is refreshed every 32mS, for a 31.25H refresh rate, should be flicker free.
Use blink without delay coding; every 500uS read 6 bytes and send to the anode shift registers, and read 8 bytes and send to the cathode shift registers.
(others have used an interrupt to ensure the data gets sent at the required time).
With SPI.transfer( ) those 14 bytes can take as little as maybe 20uS to send out, leaving you ~480uS to do whatever you will do to update the arrays with new data.
I gave you my reasons for the design and the math behind it.
Feel free to try it your way. HC595 is not good for 20mA on 8 outputs; in fact only 70mA for the whole chip.
How much time do you envision saving over 20uS?
CD4017 is also very slow at switching outputs at 5V operation:
I have a very similar project, so hopefully I can post here without hijacking this thread too badly. This thread has been a lot of help already, so thanks!
My project:
48x24 led matrix
greyscale (assuming white w/pwm for brightness)
Will display very low resolution video
Physical oddness:
8ft x 4ft, with all wires hanging vertically from the ceiling (none running horizontal through the grid). This means that even though this would be multiplexed with leds in a nice grid, the wiring will need to be somewhat circuitous. (Someone else is doing the physical led matrix build, luckily.)
Ignoring, for the moment, that this will be an incredibly sparse display (leds far apart), are there other implications of having fairly long wire runs (between 2ft and 12ft from led to controller)? power requirements? LED brightness issues? sync issues between leds?
Also, while I do plan to build this, I am curious about off-the-shelf options that could be adapted to handle this. Primarily, I am wondering what advantages (other than less time to build) they may have (e.g. refresh rate, existing video libraries, ??). I'm planning to proceed as outlined by CrossRoads above, but am open to suggestion.
I should mention that I'm very new to this world, so stating the obvious may still be helpful.
Thanks for any help!
Oh, and I want to make sure I understand this:
CrossRoads:
Can easily break up into a couple of sections, say 48 x 32 each, just add some more anode drive shift registers & current limit resistors.
This would allow you to update 2 columns at once, yes? And the benefit of that would be that leds could spend twice as much time lit? And as far as the wiring goes, this would effectively modify the 48x64 matrix into a 96x32.
bedtime4bonzos:
Will display very low resolution video
At what framerate? Are you sure arduino can get all that data with the framerate you need? Also, you'll need something to do the processing and send to Arduino the leds values.
Physical oddness:
8ft x 4ft, with all wires hanging vertically from the ceiling (none running horizontal through the grid). This means that even though this would be multiplexed with leds in a nice grid, the wiring will need to be somewhat circuitous. (Someone else is doing the physical led matrix build, luckily.)
Meh... IMHO, it would be better to make a panel and mount everything (including arduino etc) on that panel. Noise could be an issue with your design.
Ignoring, for the moment, that this will be an incredibly sparse display (leds far apart), are there other implications of having fairly long wire runs (between 2ft and 12ft from led to controller)? power requirements? LED brightness issues? sync issues between leds?
Led flickering, noise on the bus etc.
You'll have also to count on the wire resistance.
Also, while I do plan to build this, I am curious about off-the-shelf options that could be adapted to handle this. Primarily, I am wondering what advantages (other than less time to build) they may have (e.g. refresh rate, existing video libraries, ??). I'm planning to proceed as outlined by CrossRoads above, but am open to suggestion.
There are already screens that can do this out of the box.
That will cost 2K+, though.
Can easily break up into a couple of sections, say 48 x 32 each, just add some more anode drive shift registers & current limit resistors.
This would allow you to update 2 columns at once, yes? And the benefit of that would be that leds could spend twice as much time lit? And as far as the wiring goes, this would effectively modify the 48x64 matrix into a 96x32.
Yes. You'll also have to do more processing, double the wiring, use more shift registers etc...
Hardly more processing; with my approach, just read from the array holding the data at two starting locations; x and x+whatever halfway across is. Then turn on 2 cathode drivers instead of 1. Yes, more row driver shift registers, but with the benefit of twice the brightness.
•48x24 led matrix
You might also consider the Parolo software that controls banks of MAX7219 8x8 matrixes. I was thinking of a board to break out the MAX7219 signals into 64 1x2 headers to connect to individual LEDs, it would be great for this application. MAX7219's are $1.25 at taydaelectronics.com MAX7219 7 Segment + Dot Point, Common Cathode serially interfaced display driver PDIP-24
Wow! Price really jumped! Glad I bought a dozen a while ago.
Here's half of the LEDs as they would be wired. The boards would be small, just the MAX7219, couple Rs & Cs, header for power/gnd & daisy chaining signals, and then 8 2x8 headers:
or just holes if you wanted to solder directly to the board and save a few bucks.
Ok, so you raccomend to use CD74AC164 for the columns, and the 575 for rows? Or the opposite?
Assuming you have 64 across and 16 tall, then cd7a14164 to drive the anodes connected as rows across, and HC595 with N-channel MOSFET to sink current from the 64 columns.
As you drew it, cd7ac164 at the top of your diagram, and HC595 (not 575) on the left side to drive the transistors:
I'm looking at pricing for materials, having a bit of a gut check. based on the geometry, we're looking at an absurd amount of wire. These boards would end up at the upper left of the project, so the longest run would be 12ft to the LED and 12ft back. How would I determine the highest gauge wire I could get away with? Cost is becoming an issue, and I'd really like to see this happen.
Also, building 16 boards per your diagram is a heck of a project in itself.
Very much appreciate all the help on this. I'm coming up to speed as fast as I can and this is accelerating that quite a bit.
You're only talking 20mA per LEDs, go with the lowest guage you think will be durable enough, or higher if something thicker is cheaper. 30 guage wirewrap wire even.
24 definitely would be good enough.
Building 16 boards (18? 6 x 3 to achieve 48 x 24) would not be hard, and these are low enough part count that they would go quick. My wife gets into a mental groove and cranks out 3 or 4 Mega screw shields at a time, finds it relaxing. I enjoy designing the boards, the puzzle of the layout for clean wiring and a good match to board size.
Very helpful to hear confirmation that 30 gauge would even work. With these long runs, I keep fighting the feeling that I'm neglecting something.
Also, I appreciate the feedback on the breakout board builds. From your response, it's clear that I am missing something on how to connect to the headers. I've only built circuits on breadboards so far, so I might be limiting myself to what could be done there, and I'm assuming I would be working with a protoboard of some sort here. In any case, I cannot figure out how all of the headers will connect to MAX7219. In the interest of displaying my ignorance: I'm imagining magical printed traces connecting everything for me. How is this actually done?
It's a PCB - I just didn't display the traces for clarity. The connections made are as shown on the schematic.
You would connect the first in the chain to your Arduino then the rest to each other.
I'm playing with spacing to check fit of this
Maybe a couple.
8 LEDs * 40mA * 18 displays = 5.76A.
up to 40mA depends on the LEDs you use.
You order them from me.
I buy bare PCBs from itead studio, probably order 50 of them for $45, will sell 18 to you for cost plus share of shipping to me and then shipping to you with 2.39% paypal fee.
You order your own connecters, caps, headers, etc. as needed and assemble.
I can also do complete boards if you'd rather, need to add cost of material & assembly time.
Would need your input on headers desired, or just holes, etc.