The achievement of the electronics was to make an affortable and scalable design. Considering at the beginning a matrix of 256 x 256. Thinking about 65 536 led drivers was not affordable by any project. After that we decided to reduced the amount of pins to a small matrix of 8 x 8.
In order to complete a scalable design we made an investigation about how the led panel works. Most of the information found at the web is about one color led panel, our goal was to use RGB leds. However we took from them the most important part which is the use of Shift-Registers.
With a register, the goal was to handle the color of one line, at a time. Then use the register to power on the next lines. The frequency will give us the appearance that all the leds are power on at the same time. But in reality it is only one row. A 74HC595 was a good option for it.
In order to control the color, the use of led driver was a key. For these project we use a WS2801 led driver because it is the only one available at the market. We can handle the pwm with it and give the exact color for each pin. Our first option was to use the TLC59711, which gives us 12 channels in comparison of the WS2801 that only supports 3 channels. But as I mention before, they arrived to the country very close to the deadline of the presentation no giving us a chance to test.
The data and clock output buffers are designed for cascading another chip, so the information can be delivered from one driver to another.
The electronics is compose of:
The design consist of a 5mm RGB led with common anode.Each of the pin's should have a led board installed inside the pin.
Each driver will handle the color of a RGB led. As long as we are going to do multiplexing, the led driver will be connected with all the leds of a column with exception of the anode. The design consist of an independent board that can be installed at lower part of the mechanical structure of the matrix.
These design it is use to control the power of each row. Because of the current of an arduino port do not have the enough power for handling all the leds of a row, we suggest the use of MOSFET transistors. These transistor are enable thought a BJT transistor. The board key is the shift register. By SW we will handle the frequency of displacement of each row.
These part of the project is the most challenge. It is compose of three parts:
The communication with the computer is though a serial cable with an ARDUINO UNO board (a bluetooh option is a good idea for future implemetation). The speed of the serial port is 9600 bps. We only need to be careful on the program the port number which the cable is connected.
In order to control the displacement of the motors, we are using an Arduino CNC shield V3 board. Each axis is controlled with an stepper motor driver DRV8825.
Each of the matrix's led has a value from 0 to 63 - Remember we are handling a 8 x 8 matrix. The program send us the following pattern:
"M" + row (from 0 to 7)+ column (from 0 to 7) + "L" + color code (10, 20, .... 70) + ";"
The Arduino defines the steps for the displacement of the stepper motor for x, y and z axis. The z axis is according to the led color. Each color has a define depth.
You may download the code here.
This Arduino board is responsible also of sending the color to the other Arduino board that will control the leds with this pattern:
"L" + row(from 0 to 7) + column(from 0 to 7) + color code (10, 20, 30, .... 70) + ";"
It is done with a serial communication towads the other Arduino.
These Arduino board receives the information serially from the other board. In order to control the led matrix, it builds a matrix of 8 x 8 for each color (RGB). Then each matrix of 1 x 8 (RGB) is displayed by the FastLED library, which is suitable for our led driver, in order to control the color of the leds. The register is used in order to see all the rows power on at the same time, while the true is just one at a time.
The messages received from the arduino board serially are:
"L" + row(from 0 to 7) + column(from 0 to 7) + color code (10, 20, 30, .... 70) + ";"
The colors are predefined at the computer program, so the arduino just find the correct RGB values for it.
The anode led matrix row is power according to:
dataArray[7] = 0x01; //0b00000001 |
dataArray[6] = 0x02; //0b00000010 |
dataArray[5] = 0x04; //0b00000100 |
dataArray[4] = 0x08; //0b00001000 |
dataArray[3] = 0x10; //0b00010000 |
dataArray[2] = 0x20; //0b00100000 |
dataArray[1] = 0x40; //0b01000000 |
dataArray[0] = 0x80; //0b10000000 |
Where 1 is the row to power up.
You may download the code here
The leds are power on with the FastLED.show() command.
An addtional board has been build in order to have all the electrical connections with a dupont connector on pin headers.
You may see the diagram and the board
You may see some pictures about the testing of the luminosity of the led with the acrilic cover and the led driver.