LEDMatrix

image image

click images to enlarge

Description

The LEDMatrix is a MondoMatrix expansion board that can control up to 64 tri-color RGB (4pin) LEDs.  The board can also be used to control 192 individual LEDs.  Each LED can be controlled to have a degree of luminance between 0 and 255.  This means that you can have one tri-color RGB LED (per ‘port’) that has color values between 0 and 255 for each of the three colors.  Using color codes, you can then make a huge variety of colors using RGB color values.  You can also have three individual LED’s on each ‘port’ that can have a luminance value in the range of 0 (all the way off) to 255 (all the way on).  The LED matrix has a separate power port for the board itself and the LEDs.  This means that you can use a wide range of LEDs.  It also protects the board from power related events that can harm the controllers.

Important note about expansion boards:
All MondoMatrix expansion boards must be connected to the main controller (Displayduino) to work.  The connections are made using the RS485 network and there is an RS485 network port on all of the MondoMatrix boards.

Specifications

  • LED Drive Current: approx. 20ma
  • Maximum recommended LED voltage drop: 4V
  • Maximum recommended LED input voltage: 5V
  • Input voltage range for the board power inputs: 7V – 12V DC in, 100mA
  • Power consumption for LEDs on a full board: approx 1.3A
  • Data interface: approx. 115.2 kbps (113.636kbps actual), 1 start bit, 1 stop bit, 9 data bits, MatrixNet V1 protocol
  • 256 discrete levels of brightness control.
  • Board size: 4.8125 inches by 4.8125 inches (nominal).
  • Mounting holes: 3.0mm holes arranged on the corners of a 4.3625 inch square.
  • REQUIRES 4 PIN COMMON CATHODE RGB LEDS

LEDMatrix Introduction Video:

Network Checklist:

image

  1. Make sure a Displayduino controller is at the beginning of your network connecting to A, B and G terminals of all expansion boards on the network.
  2. Make sure the LED power supply is dedicated to powering the LEDs.  One LED power supply can be used to power multiple LEDMatrix expansion boards (as long as it has enough amps) but can not be used to power the data power port(s).
  3. Make sure your expansion boards all have a unique address that matches your code.
  4. Make sure that you have a 10k Ω resistor on each end of your network connecting A and B together.
  5. Make sure the data power is a separate power supply.  One data power supply can be used to power multiple expansion boards and the Displayduino data power (as long as it has enough amps) but should not be used to power the LED power port(s).
  6. Make sure to use twisted wires for the RS485 network connections.

* Note you can have different kinds of expansion boards (LEDMatrix, ServoMatrix etc.) on the same network but each boards should have a unique address

Sample Arduino Code

This code sample is a good test for the LEDMatrix.  This code turns on the red LED’s (sets values to 255) one port at a time until all 64 red LED’s are on, then it turns on the green LED’s (sets values to 255) one port at a time until all 64 green LED’s are on and finally it turns on the blue LED’s (sets values to 255) one port at a time until all 64 blue LED’s are on.  Once all of the red, green and blue LED’s are on, the code tells the board to shut off the lights (sets values to 0) one port at a time.  Once the lights are all off, the code starts over.

#include 

MatrixNet myMatrix;

unsigned char i = 0;

void setup()
{
  myMatrix.begin();
}

void loop()
{

  //Slowly fills all the LEDs on board 0 with red

  for(i=0;i<64;i++) {
    myMatrix.changeLED(0, i, 255, 0, 0);
    delay(50);
  }

  //Now Slowly fills all the LEDs on board 0 with green

  for(i=0;i<64;i++) {
    myMatrix.changeLED(0, i, 0, 255, 0);
    delay(50);
  }

  //Now Slowly fills all the LEDs on board 0 with blue

  for(i=0;i<64;i++) {
    myMatrix.changeLED(0, i, 0, 0, 255);
    delay(50);
  }  

  //Now slowly turns off all the LEDs

  for(i=0;i<64;i++) {
    myMatrix.changeLED(0, i, 0,0,0);
    delay(50);
  }
}

Get Help

Help

Help

<pre>
#include&nbsp;<MatrixNet.h>

MatrixNet&nbsp;myMatrix;

<span style=”color: #CC6600;”>unsigned</span> <span style=”color: #CC6600;”>char</span> i = 0;

<span style=”color: #CC6600;”>void</span> <span style=”color: #CC6600;”><b>setup</b></span>()
{
&nbsp;&nbsp;myMatrix.<span style=”color: #CC6600;”>begin</span>();
}

<span style=”color: #CC6600;”>void</span> <span style=”color: #CC6600;”><b>loop</b></span>()
{
&nbsp;&nbsp;
&nbsp;&nbsp;<span style=”color: #7E7E7E;”>//Slowly fills all the LEDs on board 0 with red</span>
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;<span style=”color: #CC6600;”>for</span>(i=0;i<64;i++) {
&nbsp;&nbsp;&nbsp;&nbsp;myMatrix.changeLED(0,&nbsp;i,&nbsp;255,&nbsp;0,&nbsp;0);
&nbsp;&nbsp;&nbsp;&nbsp;<span style=”color: #CC6600;”>delay</span>(50);
&nbsp;&nbsp;}
&nbsp;&nbsp;
&nbsp;&nbsp;<span style=”color: #7E7E7E;”>//Now Slowly fills all the LEDs on board 0 with green</span>

&nbsp;&nbsp;<span style=”color: #CC6600;”>for</span>(i=0;i<64;i++) {
&nbsp;&nbsp;&nbsp;&nbsp;myMatrix.changeLED(0,&nbsp;i,&nbsp;0,&nbsp;255,&nbsp;0);
&nbsp;&nbsp;&nbsp;&nbsp;<span style=”color: #CC6600;”>delay</span>(50);
&nbsp;&nbsp;}

&nbsp;&nbsp;<span style=”color: #7E7E7E;”>//Now Slowly fills all the LEDs on board 0 with blue</span>

&nbsp;&nbsp;<span style=”color: #CC6600;”>for</span>(i=0;i<64;i++) {
&nbsp;&nbsp;&nbsp;&nbsp;myMatrix.changeLED(0,&nbsp;i,&nbsp;0,&nbsp;0,&nbsp;255);
&nbsp;&nbsp;&nbsp;&nbsp;<span style=”color: #CC6600;”>delay</span>(50);
&nbsp;&nbsp;}&nbsp;&nbsp;
&nbsp;&nbsp;
&nbsp;&nbsp;<span style=”color: #7E7E7E;”>//Now slowly turns off all the LEDs</span>

&nbsp;&nbsp;<span style=”color: #CC6600;”>for</span>(i=0;i<64;i++) {
&nbsp;&nbsp;&nbsp;&nbsp;myMatrix.changeLED(0,&nbsp;i,&nbsp;0,0,0);
&nbsp;&nbsp;&nbsp;&nbsp;<span style=”color: #CC6600;”>delay</span>(50);
&nbsp;&nbsp;}&nbsp;&nbsp;
}

</pre>

Source Code (NEW May 22, 2011!)

The source code and hardware files (schematic and PCB layout) for the LEDMatrix are available here.