RGB Matrix info

Leave a comment

For anyone who is interested here is a Fritzing image of how the RGB Matrix in the other posts is actually setup. I have recieved a few queries about how the shift registers are connected to the Arduino, so I hope this helps people. It shows that there are two sets of DATA, CLK and Latch that come from the Arduino.

As I have said in other posts the IC’s I have used are MBI5026 (16ch, constant current, serial in Parrallel out) and the PNP transistors were rated up to 1.5amp. Capacitors are 0.1uf Ceramic type. Resistors are for IREF of the IC’s (currently I am actually using a trimpot on each IC)

I have omitted the connections from the IC’s to the columns of the Matrix. Also missing are the wires from the Row IC to the PNP transistors as well as the connections from the transistors to the Rows. This is simply because there would be A LOT of wire and if would acutally make it more difficult to follow what is going on and how it is setup. (about 90 connections omitted, not including the connections not shown to form the 16×16 matrix) If you are going to attempt something like this on breadboard be prepared to be sitting there wiring it up for a LONG time!

And now I have Colour!

Leave a comment

More time has passed. WOW this just takes for ever. I have done heaps more on the Processing side now and managed to get full colour up and running on my breadboard. My order of 4, 8×8 RGB matrices arrived and I got them together as soon as I could. But when I re wrote the code for colour I was VERY disappointed with the results.

This was my first attempt:

It is a bit hard to make out but it was very washed out even to my eyes. I could barely see that it was playing a video. I spent a long time looking to figure out what I was doing wrong. Turns out it was to do with how our eyes don’t perceive LED light (PWM light) in a linear way. Once I wrote in a function to account for this I got much better results.

Much better:

Let me know what you think. If anyone is reading this! 😛

Colossal U-Turn

Leave a comment

OK. Long time, again, since last post and things have taken a U-Turn. I have decided not to use the Peggy design. It was a great starting point but I started to see more potential in the Arduino. It just so happens that a post on the Arduino forum caught my eye about a person who made a Shift Register library for the Arduino. This library used a chain of Shift Registers to give individual control over each lights brightness. Also included were functions to group lights into sets of 3 which allows easy setup of RGB LED’s. They called this library ShiftPWM. It was allowing non PWM shift registers to do PWM via software control. Within a short space of time and some discussion on the the forum boards improvements were made to the code that increased its performance allowing a whopping 768 LED count with 32 levels of brightness. That is 100 more LED’s than the Peggy could control but this would use ALOT of Shift Registers to achieve a matrix. I tested the setup and it worked very well and it was as easy as “point and set” to get the PWM working. I asked the library creator (ElcoJacobs) if the library could be adapted to work on a matrix. He said that he would look into but that he didn’t have a matrix to test on. A couple of weeks later he came back with ShiftMatrix. A library using the same techniques but setup to run a matrix of LED’s instead of a chain.

I did some testing with this and was able to help identify some issues which he was able to fix. Now I have a stable matrix updating at 50hz that can handle 768 LED’s with 32 brightness levels. ShiftMatrix like ShiftPWM is a set and forget PWM system. You just tell the library which LED, x and y co-ordinates, and what brightness level you want and then the library does all the shifting bits and PWM calc for you.

I immediately set about revising my Processing Code to work with this matrix and it was VERY easy to get working. Within the space of one day I had a 16×16 test matrix running with streaming video. And best of all I think I can scale this up. By making it modular and just streaming out more data. More about that in a minute.

My new goal. To try and make a 16×16 RGB matrix and have video stream to that. If that can be accomplished I then want to test being modular and make a second martrix (with its own controlling Arduino). If I can sync the two together then I should be able to scale up to 32×32 RGB. If I can accomplish this I will be VERY happy! 🙂

Sadly I have not even begun to make the large matrix. Strangely that might turn out to be a blessing. If I can make the RGB test work then I would probably not have used it and if I do end up going Mono color I think it will be alot more than 25×25 like the Peggy. So I am fairly happy that I hadn’t had time to make it yet.

So now for the demo. This is 16×16, 15fps/32 brightness levels. Using just 1 Arduino, 2x MBI5026, 16xPNP transistors and 4x 8×8 Red LED matrix.

To get the library involved go to:

I hope to update again soon. I haven’t posted any code as I am still working on the Processing side of things.

Initial Tests

Leave a comment

Ok so its been a while since my last post. Real life gets in the way all the time 🙂 but I had some free time last night and was able to drag out my electronics kit. Ran my multimeter over the pcb and checked the connections. All seems to be good. Connected a few rows and a few columns and connected the Arduino to my PCB. Powered up the system and it worked!!! So I now have a working Peggy driver board. 9 connections from the Arduino to the Driver Board and then 25 row connections and 25 column connections.

So with all of that working I have to finish my larger matrix and then I can see it all work ing……In Jumbo size!

Where to go next

Leave a comment

Since building it all on breadboard I have been trying to figure out how to build it into a more permanent system. They problem for me is the fact I don’t want to incorporate the Arduino into the permanent system. I want to be able to remove the Arduino and use it for other projects. What I thought of is building the LED drivers and row controllers onto a strip board with wiring sockets for connecting the Arduino.

This sounded great in theory. Trying to design this onto a strip board became challenging. I already had some small pieces of strip board and I thought I could squeeze everything on to the ones I had. This turned out to be a real PAIN!!! but like everything hindsight is 20/20. I pushed ahead and used a program called DIY Layout Creator. I managed to get everything to fit in the design and without a second thought I pressed on and started to make it. It wasn’t until about half way through assembly I realized that a few of my components didn’t match up size wise to the components in DIYLC. Mainly this was the Variable resistor used to limit current output of the LED drivers. Due to the small size of the Strip Board I literally ran out of room and ended up being ‘Creative’ to not have to start all over on a new board. This resulted in me using some single pin sockets to lift the Variable resistor up and then bending the pins to make it all match up. Also it turns out that I forgot a bunch of wire links and have had to be ‘Creative’ again to fix those.  I knew there would be alot of wire links to make all the outputs match up but there ended up being WAY more than I thought.

I don’t have lots of time to work on these projects and it has take me months of spare time here and there to finally get this thing complete. I have photos that I took on my phone that I will upload as soon as I figure out how I am going to organize all of this.

And before anyone asks, no I am not going to post the design I used. In reality the strip board piece I used was WAY to small. If I every build another one it will be bigger and better laid out and I will post that design. Or the schematics I based all this off are on the Evil Mad Scientist website. Find the latest version and customize the board for what you want.

First Attempt

Leave a comment

I purchased most of my parts from ebay and the rest from farnell(now element14).


  • 12pcs 8×8 red 3mm LED matrix
  • 10 x MBI5026 Serial LED Driver
  • 100 x S8550 PNP 1.5A Transistor
  • 50 x 100 ohm resistor
  • 5 x CD74HC154EN 4-16 Demultiplexer
  • 10 x 0.1UF CAPACITOR
  • 1 x Large Breadboard to fit everything on

Not included is the Arduino Duemilanove that I had purchased earlier. Note: I bought larger quantities than needed to make a peggy.

With the above components I set about turning the Peggy schematic into a working prototype on my breadboard. This lead to ALOT of wiring. I almost ran out of jumper wires. There was not enough space on the large breadboard for all of the components so I had to use another smaller breadboard as well. It was a big sprawling mess but when I powered it up and put the first program into the Arduino it came to life and worked fine.

Story So Far

Leave a comment

So I have made this blog after I started all of this so here is a little catch up.

I have been investigating the computer controlled Christmas lights that seem to be multiplying each year. And I thought “I could do something like that”. Well turns out that here in Australia its a bit more difficult than I thought as most of the material I found for it was meant for a US audience. But it got me thinking about what I could do. I came up with the idea of a LED matrix that could display moving pictures and animations. I found a few examples but they were way to technical and I couldn’t follow them. But then I came across a system that I could wrap my head around. It is called a PEGGY. It is made by evil mad scientists, I am not making that up(Google them). Specifically the Peggy 2.0 system. It is essentially a 25 x 25 grid of LEDs that has a microcontroller and some LED drivers. They have a kit but it is also open source and all of the schematics were there so I decided to make my own.

I want to build my peggy a bit bigger than theirs. So I spent a long while slowly gathering up everything I would need (I don’t have buckets of time to work on this, I have a family :))

I now have pretty much everything to attempt building it. And that I why I started this blog. To show my progress as I go.

I will make another post soon showing what I have done so far.