Some time ago I decided to create 8×8 LED array for Arduino. It took me three weekends, a lot of soldering, painting, and coding to achieve it. But it is done!

Code is on the GitHub: https://github.com/thePetrMarek/ArduinoLedArray

Watch the video above before you continue, please. It is only 30 second of your life 😉 . I decided to create an array of size 8×8. Thus I used 64 LEDs. I didn’t have that many LEDs of a single color. So I used three colors and arranged them in Bayer filter. This means that red, green and blue LEDs lies in diagonals and there are two times more green LEDs. The reason for more green LEDs is because Bayer filter is used in digital image sensors (cameras, recorders, etc.). This allows them to capture green color better, to which a human eye is the most sensitive.

Arduino LED array early prototype

Arduino LED array early prototype

The LEDs are soldered to form an array, which you can see in this article: Row-columm Scanning to control an 8×8 LED Matrix. It is controlled by Arduino. The interesting thing is that Arduino itself doesn’t have enough pins to control all LEDs at once. There is a simple trick. It is called Multiplexing. The trick is to connect single column at a time and select which LEDs to turn on in it. You then unconnect the column and connect the next one and choose which LEDs to turn on again. And over and over. If you do it fast enough, the eye will stop seeing any flickering. You can control individual LEDs this way even if you don’t have enough pins.  The effect of multiplexing is nicely shown in this video: LED cube multiplexing demo. The speed of flickering increases until you don’t see it.

Arduino

Array’s connection to the Arduino

I made two demos after I had solved the multiplexing (which took me some time to only realize, that I would need to use this method). You can see them both in the video above. The first is “wave” effect, in which the colors are changed to create the effect. The second is the Game of life. It is described in detail on the Wikipedia page: Conway’s Game of Life. I will describe it in short here. Imagine, that each light is some little monster. If the light is on, the monster is alive. If the light is off, the monster died. There are four rules. The monster dies, if it has none or only single neighbor (because of loneliness probably). If there are two or three neighbors, the little monster is happy and continues to live. If there are four or more neighbors, the monster dies because of overpopulation. And if there is free space, which has three neighbors, the new little monster is born on this place. You place some little monsters on the array and run the rules. The monsters will start to form unusual patterns. The patterns sometimes stabilize, sometimes collapse, and they can even evolve forever. You can see it in the second half of the video.

Update 27.8.2017

I decided to use black and white colors to paint it because the cardboard is not particularly elegant. I also spend some time with coding few cool effects which I can loop. You can see them all in the top video. My plan is to have the array as decoration, like changing painting. Problem is, that most of the effects are very aggressive. The array is now on my shelf gently shoving seconds past by turning on or off a single LED each second. It is powered by unused USB port on my wifi router.

LED Array on the shelf

LED Array on the shelf

Leave a Reply

Your email address will not be published. Required fields are marked *