8
zenthoef
Posts: 16
Can the LEDs on the 8x8 RGB matrix display module be controlled individually? I would like to display and update a graph of information on this display, but I am not certain if this can be done after looking at the commands available in the document at http://www.parallax.com/Portals/0/Downloads/docs/prod/displays/32324-8x8-RGB-LED-Matrix-Display-v1.pdf
8x8 module link: http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/SortField/0/Level/a/ProductID/873/Default.aspx
8x8 module link: http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/SortField/0/Level/a/ProductID/873/Default.aspx
Comments
How fast do you need the display to be updated?
If you needed a fast update rate, you might need to create custom firmware to update the graph directly rather than having to send each pixel to the display when updating.
I was a bit surprised how small these displays are. I'm have some 8x8 arrays which are 60mm square, these displays are 37.7mm square.
The Parallax product does the multiplexing for you, and can even be tiled to make larger panels. In doing so, it has its own communication code that you can use to make one LED or many light in any combination.
You will have to read the documents and learn the communications that it expects.
Parallax does provide good code examples to help you get started and to verify that what you bought is working properly.
I am thinking my refresh rate would be really slow. Maybe 1 min at the slowest, and 1/4 a second at the fastest.
I didn't notice how small these are, so that is quite disappointing. I think I'll have to find another led matrix for this project.
Thanks all!
This 8x8 RGB LED Matrix with a Propeller driven multiplexer can do a heck of a lot more than just light one LED at a time. If you tackle the documentation, you can grow into mixing colors, having alpha-numeric banners and a lot more.
But you are going to have to interface with one more Propeller or other serial device that feeds it data.
For what you desire, there is a _drawdot command. And ever so much more.
I think the problem for zenthoef isn't the display capabilities but its size.
I've been playing around with LED arrays a lot lately. I ordered one the Parallax units to compare it with the other array I've been using.
Besides the smaller size, the main problem I see with the Parallax display it its brightness. Since the LEDs are directly driven by the Prop (on the cathode side) and each pin is multiplexed, each LED ends up with less than 5mA of average current. The anodes are driven by a '595 shift register.
I drive the larger LED array I linked to with SN754410 motor control chips (I'm looking for a better option) on the anode side and sink the cathodes with high power '595 shift registers. These larger displays are much much brighter than small Parallax displays.
I still think the small Parallax display are a good display, but only in certain circumstances where their small size and low brightness level isn't a problem. They are a lot easier to use than the larger displays I linked to.
I used two 8 wire cables to convert the mixed up pin outs of the LED matrix to pins 1 through 16 and then built a simple bread board to drive them. You can use transistors to drive each channel or there are DIP devices, such as the UNL2803.
It is a bit of a study project, but that is the rewarding part. One actually learns how to multiple the LEDs and how to properly balance the power demands.
And yes, I suspect that trying to drive everything with 5 votls is not good for brightness. The Darlington pairs have an internal voltage drop of up to 2 volts. Having a higher votlage source drive the LED circuit, especially if adjustible... will get brightness optimized.
You'll be hard pressed to make a DIY array for less than these premade ones. The price has gone up a bit but still $7.50 for an 8x8 RGB array makes wiring up your own worth it only for the experience.
I wired up a 12x10 array of red only LEDs. It was a lot of fun and a lot of work. I doubt I'd try to do it again with all the inexpensive arrays available.
I think the LEDs in the Parallax array have both the anode and cathode directly connected (with current limiting resistors) to the Prop's I/O pins so the LEDs are being driven with 3.3V not 5V.
I am driving the larger array I'm using with 5V. I agree there are advantages of using a higher voltage to drive the LEDs, particularly if I were to use Darlington pairs. For now I plan to stay with 5V since I need 5V for the shift register control anyway and 5V power supplies are so common. The SN754410 chips work fine to drive the anodes but I'm betting there are better solutions for driving the anodes than the SN754410.
I've had some circuit boards made with eight connections for externally driven anodes and each of the cathodes on the board is controlled with TPIC6B595N shift registers. It takes three shift registers to control all 24 cathodes but since the LEDs are not being directly driven by the Prop, a lot more current can be sent to the LEDs which makes them much brighter. The shift registers also save on the pin count.
The down side to the shift registers is the PWM refresh rate. I don't have the color resolution the Parallax displays have since the Parallax can drive the pins much faster directly than I can through a shift register.
I still like the shift register idea since 5-bits per color instead of 8-bits isn't a big deal (IMO) with these types of displays.
My plan is to make it relatively easy and inexpensive to make a 32 x 32 array with 16 of the inexpensive arrays. I'm hoping all 16 arrays can be driven from one Prop but I'm pretty sure it's going to take most of the Props resources to do so.
Edit: I was assuming by DIY array, you meant using individual LEDs. If you meant providing the driving circuit for a ready made 8x8 array then I agree even more with you. Though again, I don't have anything against making an array from individual LEDs. I'm basically using this thread ramble about some of my LED array ideas.
Is a BS 2 good enough to drive an 8x8 LED matrix?
This has been a real lesson in how to multiplex a 8x8 LED matrix with a micro controller. I had no idea the refresh rate that was talked about was the rate had to be so fast, or that just one LED is being turned on at a time. Very cool!
Embedded stuff is not my area of expertise at all; I think that is partially why I am trying to get into it!
That all said, could the BS2 do that kind of multiplexing on the 8x8 LED matrix that you showed, Duane? I am suspecting it probably isn't fast enough...
If I want to drive an LED matrix like that, I would pretty much need something like an Arduino or Parallax Propellor, am I right?
Schematics
Duane, do you have the schematics for your project at http://forums.parallax.com/showthread.php/143775-Propeller-Controlled-8x8-RGB-LED-Array-(-6-from-eBay)?
What I am trying to accomplish:
I also think some background in to what I am trying to do will help. I am doing a lightening sensor project from the STAMP 2 Communications and Controls project book. Instead of using just 8 LEDs to show what the lightening intensity at that moment is, I want to use an LED matrix to show a history of recent lightening activity. I would like to show several colors. Green for not much lightening activity, yellow as the next step up, and red for lots of activity. I would also like to flash the entire LED matrix white when the unit detects lightening.
Given what I am trying to accomplish, do you all think the LED matrix is a good way to go? Or is there another type of display you all recommend to accomplish something similar?
The refresh rate doesn't have to be fast in small display situations. If you intend to combine a lot of 8x8 panels together, the refresh rate has to increase as everything grows larger and there are a lot more pins to service within 1/30th of a second. If you are slower than 1/30th, you get flicker.
The other thing about refresh rate is the there is a sweet spot of refresh with yields the greatest perceived brightness of an LED with the least amount of power. It is a separate topic and I have yet to see someone really write a paper on how to do this with a matrix. I had a document that just gives an example with one LED.
The BasicStamp2 has 16 i/o pins. That limits the size of your project. A simple one color 8x8 requires on 8 i/o for data, but 3 colors require 8 i/o for each color or 24 pins. Since you don't have 24 i/o pin available, you migh be able to do something, but it gets more complex to wire and to code.
In other words, before I'd say 'yes' to a BS2, I'd like to know which 8x8 LED matrix you really want to use = one color, two colors, or three colors. And if you plan on 3 colors, do you want an infinite color palette?
Yes you can get Red, Yellow, and Green in one 8x8 matrix. But it would be easiest to drive your multiplex data where each 8 bits are sent out at the same time. The Propeller would do that nicely. And you have several pins left over to march a serial to parallel chip through all the columns of the display.
The other aspect of this is you may have to provide a separate and higher voltage to the LED drivers than the standard voltage to the microcontroller. The higher the voltage, the shorter the actual ON pulse, and the faster the refresh rate.
You can either use an LED matrix or there are LCD that are 'color graphic displays' that will just take data and active graphic boxes. It is the same principle, but display wiring is pretty much done for you. The LCD color graphic display deals with optimizing the multiplexing and refresh... you just have to get in synch with what it wants. And it may be easier to provide a second power supply as the required voltage is specified.
What size display do you want and what is the grid of dots?
As George explained, a lot depends on how many colors are in your matrix.
The RGB array I'm working with requires multiplexing. A BS2 may be able to drive the array if you gave up brightness control. The LEDs would have to be either on or off. I think even without brightness control an 8x8 RGB array would be tough for a BS2.
The 8x8 RGB arrays discussed in this thread have up to 24 LEDs on at once.
No, not yet. I usually start with a schematic when making a PCB, but in this case I started with the PCB layout. I'm planning on selling a kit with the PCB and parts needed for the 8x8 array I linked to earlier. I'll make sure I have a schematic before I start selling them (probably in a couple of weeks).
I suppose this could with some sort of serial LCD with letters to indicate status instead of colors, but I think a LED matrix would be more fun.
Is that document posted online somewhere? I'd love to look at it!
I would like a RGB matrix, like the one Duane pointed out. I think I will want an infinite color palate, because the colors I would like are green, yellow, maybe orange, red, and white. I imagine since I want white I will need the capability of an infinite color palate Is this accurate?
So, if I plan to drive an RGB matrix, I will need 24 pins to control the rows and several pins (maybe 3?) to control the rows through a serial to parallel chip?
I think I would like to have a display that is around 3"x3". I really am starting to lean back to an LED matrix. They just seem so cool!
Based on what you an Duane have said, I think I will be skipping using the BS2 for this project.
Why up to 24 at a time? I'm a little confused why up to that many could be on at once.
What will you have in this kit, and what do you think you might charge for it? If you don't want to make pricing totally public yet, maybe you could PM me that info?
I agree, and think I will be totally going with the LED matrix! :-)
Common cathode versus common anode? I have had to accept either when I shop for 8x8 matrics. I am sure one might be easier to build your control with, but you can build something that works well with both.
First off, you might just visit SparkFun and look into their 8x8 RGB display with serial interface for $59.xx USD. It would seem to fit the bill. This is 60mm x 60mm or 2.38" square. 3"X3" is not a standard item.
And the other stuff....
Why 24 i/o (actually output only) in parallel. Well, you have 8 dots in a column that represent seperate row positions. Each row have a red, green, and a blue LED. To get the right color in each dot, they need independent data of highs and lows.
On the other hand, the column selection is just marched through in precise rotation and the 8 colums can be done with a mere 3 data lines counting perpetually from 0 through 7 (or 1 thorugh 8).
About locating the article on the intensity of LEDs. ....
I have a hard copy that is buried within a pile of paper work. I am sure of that. But with it, the reference to a proper link is buried. I would have to dig.
Here is a quick link from Google for PWM wiht LEDs. The march through columns is the overall pulse length, but the ON for each rows R, G. B can be less and a higher voltage may offer a residual effect that is brighter than a constantly on LED and at a lower power consumption.
This effect is partially in the human eye and/or brain, so observations extend beyond mere electronic theory. I'll look for my article. but I do fear that you might find this to be an unresolved debate.
http://www.waitingforfriday.com/index.php/Controlling_LED_brightness_using_PWM
I think a lot depends on the driving circuit. The shift registers I'm using can only sink current, so in this case a common anode would be be good. I use a different IC to drive the rows (anodes) high, one after the other. Three high power shift registers then lets me control the 24 anodes.
I haven't figured out what I'm going to charge for my LED array kit. After seeing all the displays available, I doubt I'll be charging much above cost.
Besides the SparkFun array George mentioned, Adafruit also sells some nice arrays.
My array will make more sense for those wanting to put multiple 8x8 arrays together. It will require an external Propeller board like a QuickStart to drive the array.
I'll sell you one or two kits at my cost in exchange for your feedback. I'll PM you the details (within the next two days) and you can decide if you want to try it.
The buffers might be faster if they invert the output. But the added delay on not inverting may just require a tweat in code.
Sparkfun provides a PDF for the 8x8 RGB matix with duty cycle requirements for different colors. It seems yellow is achieved by driving the Red LED at near 100%. And there are various other creative combinations. All this pretty much indicates my thought that you can get extra brightness may be nonsense. You likely have to follow the manufacturer's recommendations to get full performance.
The Parallax device may be smaller, but appears to offer more range of color as each color pixel will take a one byte code. I am not sure what the Sparkfun device is doing.
I don't think I claimed infinite color. I mentioned in post #8 above I had to reduce the color to 5-bits each in order to avoid flicker caused by the shift registers. This is the main draw back of using shift registers on the cathodes. An advantage to using shift registers on the cathodes is it greatly reduces the number of pins required to drive the display(s). I'm hoping to use multiple cogs to drive a relative large display from a single Propeller. I'm hopeful I can drive 16 arrays with a single Prop. I'm not sure if I'll be able to do this and keep the 15-bit color pallet but I'm pretty sure 12 arrays is possible.
Parallax's display uses a single shift register to drive eight transistors which in turn drive the anodes of its display. Since the Propeller has to sink all 24 cathodes directly the current is limited to keep the Propeller from being damaged. The reduced current makes for a much dimmer display than would be possible if the LEDs were driven at full power.
I had a demo showing the difference in brightness between the two displays but I thought it was too long to post. I'll try to get a short demo posted soon. The difference of brightness between the two displays is very dramatic. The Parallax display does have superior color depth as well as its other advantages (which are many, I think it's a good display).
At 2:56 in to this video you can see my attempt at a rainbow text effect. I think it's kind of cool (also watch a few seconds at 4:01). The Parallax display can also produce this effect (with modified firmware) but it's just not as bright.
Thanks. The Sparkfun device has a schematic provided and it too uses shiftf registers. There is also the software code for it. These imply a limited color palette.
As usual there are lots of trade offs in how to multiplex these RGB matirces, and the manufacturer often decides on a lower part count and a single power supply to keep prices down and make it easier to use. It is a shame that the Parallax device didn't optimize brightness.
I don't think there is really a true yellow, more like an orange. But photos may seem to provide a yellow.
I take it this is referring to the SparkFun array? It looks like you can define the colors yourself so you should be able to mix green and red to get a convincing yellow. The Parallax array and the inexpensive array produce a very convincing yellow IMO.
It looks like the SparkFun array is limited to seven colors. The colors are apparently user definable but only seven? I'm getting 32,768 colors using shift registers on the inexpensive displays I don't understand why SparkFun's array has such a limited pallet. Maybe the Propeller is just a much better choice for driving one of these arrays. It's awfully nice to have a cog dedicated to just shifting bits to the shift registers and letting the other cogs worry about serial input and over all control. I noticed the SparkFun array has the anodes and cathodes reversed from the Parallax array and the inexpensive array I'm using.
I initially attempted a Spin driver for the array. It was awful! Much much too slow. Switching to PASM made all the difference.
I just followed the SparkFun link to their coffee table LED array. They use 64 arrays!. I was thinking 16 arrays would be a lot. Darn, now I'm thinking how cool 64 arrays would be.
I watched your video... very impressive. All my own work have been with one and two color LED matrices as the RGB matrices used to be hard to get in Taiwan and I was working with the Parallax SX chips.
Programming in assembly is really the only way to go. Once a person understands how the mutiplexing of rows and columns work, it becomes quite easy.
The problem with driving multiple matrices with the Propeller is the wiring. It is much easier to have one micro-controller per 8x8 matrix and to deal with buses for serial communication.
I suppose I may need to concede the wiring point, but IMO, using multiple uCs can also add problems. With one Propeller driving 12 arrays the display screen is easier to keep updated. Having to transmit data from screen to screen can really slow down the update processes. Someone posted a video showing how slow the Parallax display was at scrolling text with the default firmware. They were able to speed things up by modifying the firmware (I'll try to find a link). Parallax, being the cool company they are, made the firmware opensource in the hopes such improvements would be made.
I plan to post a video today showing my current PCB and how they plug together to make a row of displays. The array to array wiring isn't bad. I still don't have a clean wiring solution to go from the Prop to the first array (though it's not nearly as bad as the rats nest of wires in my previously posted video).
http://www.adafruit.com/products/420#Blog/Flickr
http://www.ebay.com/itm/PH6-RGB-Full-Color-LED-16-32-Dot-Matrix-Display-Module-/310303408628?pt=LH_DefaultDomain_0&hash=item483f8641f4
Duane and I had briefly discussed in a PM about using the matrix as a graphical display, and decided to return here to continue that discussion so others can benefit from it.
The project I am working on is a lightening sensor. I want the 8x8 matrix to show a history of lightening activity using a bar graph. Each column in the graph should represent the number of lightening strikes per 10 minutes. I'm not sure how many lightening strikes one LED will represent, but I can work that out later.
The important part for me is that the 3 lowest LEDs should be green, the next two yellowish, the next two red, and the last blue. Also, I want to flash the entire display white for something like 1/4 to 1/2 a second when there is a lightening strike. I think this means I don't need infinite colors, but that I just need to be able to multiplex in such a way that I can get those colors.
I have some thoughts about how the code should function to display the data. I am not a Propeller programmer, so there may be some fundamental flaws in my approach, but here it goes!
1. Use a 1x8 array to keep track of the number of strikes per ten minutes. Each cell in the array would be ten minutes worth of data. For example, an array with the values {0,0,0,0,2,4,7,8} would represent that 80 to 50 minutes from the present time there were no lightening strikes. At 40 minutes ago there were 2, at 30, 4, at 20 7, and 10 minutes ago 8.
2. The array in step one is then translated into a 2D 8x8 array representing which LEDs should be turned on in each column. The array in step 1 will be converted to the following:
{ (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,1) }
{ (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (1,0,0) , (1,0,0) }
{ (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (1,0,0) , (1,0,0) }
{ (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (1,1,0) , (1,1,0) }
{ (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (1,1,0) , (1,1,0) , (1,1,0) }
{ (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,1,0) , (0,1,0) , (0,1,0) }
{ (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,1,0) , (0,1,0) , (0,1,0) , (0,1,0) }
{ (0,0,0) , (0,0,0) , (0,0,0) , (0,0,0) , (0,1,0) , (0,1,0) , (0,1,0) , (0,1,0) }
Where each element in the array represents which array should be lit up (R,G,B), and could be represented as an integer or binary. The array is processed in a for loop where each row's values are fed to the shift registers to control the RGB LEDs. Basically one entire row would be on at a time, and of course this would go fast enough to make it appear the the entire display is on all at once. The limitation here is that we can only have 8 colors, but that would be good enough for what I am doing.
Then, if there is a lightening strike hopefully the display driver could be temporarily interrupted to turn on every single LED in the display to represent a strike.
I'm sure there is a better way to do this and that is the discussion I am looking to start!
I think these LED arrays would look really cool as a bar graph display.
The way my current firmware is setup, it uses a block of RAM for a display buffer. A single array would have an 192 byte buffer (64 LEDs x 3 colors). The bytes within the buffer are setup pretty much as you described except instead of using ones or zero an 8-bit number indicating the brightness level of that particular LED is stored in the array. Since I'm only using 5-bit color resolution the three least significant bits are ignored.
You really need more than just a single bit of color information in order to colors like orange and yellow. Even white looks better if you don't just turn on all the LED full on.
Do you plan to use the same Propeller chip to interface with your lightning detector or do you want to be able to send serial commands to the Prop to tell it when to scroll the display and add a new column?
I have been planning on using the same propeller chip to interface with my lightening detector. I only need one digital input for the detector.
I am thinking I could use one core on the propeller for lightening detection/counting, another for processing that data, and yet another for driving the led display. Maybe a 4th core could be used to drive the entire display white when there is a lightening strike. Does that make sense?
This shouldn't be a problem. The array uses 11 of the pins. Four pins are used to communicate with the PC and EEPROM and it's best to leave these pins unused unless you know what you're doing. This still leaves 17 free I/O pins.
The software uses three cogs as it is now. One cog is used as a kind of master control loop, one cog is used to send (and receive) serial data to the PC. And the third cog runs an assembly program to continuously update the shift registers and cycle the anodes.
I just looked at my program and realize I was off by one cog. The program uses four cogs right now. It uses two cogs for the debugging. I'm pretty sure I could combine two of the cogs and get it back down to three.
I doubt your lightning detector will take more than two cogs. Most likely it will only require one cog or possibly none since the lightning detection tasks could be added to one of the already running cogs.
Turning the display all white (or any other color) wont require an additional cog. It's pretty simple for the driver to fill the array with a single color.
Since you only want to control one array, there will be plenty of processing power to spare for your other tasks.
I better start reading the Propeller datasheet so that I can understand how/why this architecture has ended up like it has.