Go Down

Topic: P10 LED Matrix Panels 16x32 (Read 82690 times) previous topic - next topic

Palomar

Paul -- Starting a new thread, as suggested...

Quote
Well... tpic6a595 will be somewhere between absolutely perfect and completely unsuitable for those panels  smiley-wink
Perhaps they will come with some suitable documentation. Or maybe that documentation will assume you also bought the driver board and power supply that were designed for it.


The panels should arrive Tuesday. We'll see if they come with more doc. www.ebay.ca/itm/161206810653

Quote
You could search the forum and the internet for other Arduino projects that have used them. Maybe, just maybe, this will help: http://www.freetronics.com/collections/display/products/dot-matrix-display-32x16-red#.UHbKClHHXeQ


For anyone dropping into the middle of this project, I'm a beginner micro hacker with an assignment to create a large scoreboard for a lively horseshoe tournament. I need to display a total of 12 two-digit scores for 6 simultaneous games, 4 players per game. Each of 12 players along one side of the field will have a hard-wired foot switch to increment the score for himself and his teammate. The LED digits need to be 4 to 7 inches high, easily visible in daylight at a wide viewing angle. I have already tried two different 7-segment displays;  one was not visible at all in daylight;  the other was visible only when you're standing perpendicular to it. So, now I'm going to try a 16x32 matrix that is supposedly for outdoor use. PaulRB has been very patient, offering many helpful suggestions in the previous efforts.

So Paul, thanks for the link to Freetronics. Based on photos and specs, their panel appears to be very similar to what I bought. Their Quickstart Guide (see bottom of http://www.freetronics.com/collections/display/products/dot-matrix-display-32x16-red#.U-g-vWM5d5a) indicates that you can simply connect a few data lines to Arduino and it will light up dimly. For full-bright, I have a 300W ATX power supply that will provide 25A to the 5V power connections on the back of the panels.

Freetronics has also posted a code library on GitHub for their panels. https://github.com/freetronics/DMD
I have no idea whether it would work on my panels.

What do you think? Do I still need a TPIC6x595 in there?

Phil






PaulRB

#1
Aug 11, 2014, 03:20 pm Last Edit: Aug 11, 2014, 03:27 pm by PaulRB Reason: 1
Hi Phil,

Checking those links quickly, *IF* your panel is identical to the Freetronics, you won't need any driver chips. The Freetronics board has all its driver chips built-in and connects directly to the SPI pins (plus a few others) of the Arduino. The problem you may have is physically connecting the panel to the Arduino - Freetronics provide an adaptor board, but you may have to rig something up with a bit of stripboard and soldering, assuming you can figure out all the necessary connections.

Looking at the schematic for the Freetronics adaptor board here, I'm confused. Most of it makes sense, except the connections "C", "G" and "D". These are apparently shown connecting to outputs C, G and D on the Arduino - but there are no such connections!

Paul

Palomar

Paul,

The panels arrived today, and I'm very pleased to say that I have the Freetronics clock demo sketch working nicely this evening.

Looking at the back of the panel, we have the 16-pin connector wired up to a Nano mega328 as follows:



The display lights up moderately well with power from Nano only, running on 4 AA's. If I can get my ATX power supply to give me some voltage, I should have the display blazing soon. The PS runs with the green wire jumped to ground, but gives no voltage on any of the cables. An ATX tester indicates that it is working properly. Something wrong. Another mystery.

Thanks for the link to Freetronics and their DMD code library. That really did the trick. Made it easy.

Phil

Palomar

#3
Aug 15, 2014, 09:27 am Last Edit: Sep 20, 2014, 06:09 am by Palomar Reason: 1
Paul,

I guess we can wrap up this topic on a positive note...

I have two panels working nicely as a 16x64 prototype. With the ATX power supply, they are painfully bright indoors, and fully visible outdoors in direct sunlight from a very wide angle (like 140+ degrees). The red color is plenty bright enough, so I will stick with that for the final product. Red panels are also the least expensive, as I need 12 of them.

So, still a lot of work remaining, but the hardest problem is now solved. Thanks again for your assistance!

Phil

PaulRB

Good work Phil. Don't forget to post some pictures of the working project.

Palomar

#5
Aug 16, 2014, 03:50 am Last Edit: Aug 17, 2014, 03:06 am by Palomar Reason: 1
Paul,

It will probably be a couple more months before the full-sized scoreboard is complete. Here's a couple shots of the bare prototype. The first is outdoors in blinding direct sunshine (95 degrees here this afternoon). The display is quite satisfactory for our purposes.



This is indoors in subdued lighting. The digits are a full 6" high and provide more than enough light to read a book. It's using a little more than 2A, probably about 3A.



I found a large font called MyBigFont.h at http://forum.freetronics.com/viewtopic.php?f=26&t=5754. It uses the full height of the panel. The font code also contains a good description of how a matrix font works (within the context of the DMD library).

BTW:  The ebay vendor finally responded to my inquiry saying flatly that these panels could not be run on Arduino. I will let them know to the contrary, and will provide the relatively simple details for future reference.

Thanks again!  Phil

Palomar

#6
Oct 26, 2014, 08:09 am Last Edit: Oct 27, 2014, 11:29 pm by Palomar
The horseshoe scoreboard is basically wrapped up now. It uses twelve 16x32 dot matrix LED panels, known commonly as P10 units, and two USB Nano 3.0 processors.

I have to thank the folks at Freetronics (Australia) for the use of their DMD code library. And again much thanks to PaulRB for help and encouragement along the way. Here's a few photos if anyone is interested...

As you can see in the photo, the scores are fairly readable in bright direct sunlight, much like the pricing signage at the newer gas stations. The board is about 6 feet wide and the digits are 6 inches high. The frame is made of 4 inch wide oak. The LED panels are mounted on 3/8 inch particle board covered with matte black Formica. Total weight, about 60 lbs.



On the back side...



A closer look...there are the two Nano's mounted in sockets on the perf board, with 16-wire ribbon cables sending data out to the LED panels. To my surprise, I wound up needing a FORTY amp power supply to feed the beast via TWO 12-gauge wires which get noticeably warm. It's set for 4 volts so I'm using at least 120 watts. The two curly wires are USB extensions from the black interface panel to the Nano's so they can be programmed without removing the rear covers. The little 2" circuit board supplies 12V for the fans. The 26-wire ribbon cable brings in high/low signal from the 12 foot switches used by the game players to update their scores. The red arrow points to a 140-degree (F) thermal switch which will cut off the power supply if it overheats, while allowing the fans to continue running.



The main board...The resistors are pull ups.



Back side has about 50 jumpers. Each Nano handles one half of the scoreboard.



Rear covers in place. One fan blows in while the other exhausts.



I haven't quite finished the code, but here it is. Note...I'm not proficient in C, so this may elicit gasps or chuckles. If you notice anything that is obviously inefficient, please let me know...

Code: [Select]

// TEST6:  added code to display scores on LED matrix
// TEST7:  added code to display 6 scores simultaneously
// TEST8:  debugged the 6-score code
// TEST9:  converted switch logic from pull-up to pull-down
// TEST10: display all 99's first; max score 25
// --------------------------------------------------------------------
volatile int intFlag = 0;                   // interrupt flag
int i = 0;                                  // index for switches and scores (0 thru 5)
int j = 0;                                  // score pair indicator (0, 2 or 4)
int k = 0;                                  // display column offset (0, 64 or 128)
int prevSw [] = {0, 0, 0, 0, 0, 0};         // prev switch status
int currSw [] = {1, 1, 1, 1, 1, 1};         // curr switch status - initialize HIGH
// int score  [] = {0, 0, 0, 0, 0, 0};         // current scores
int score  [] = {99, 99, 99, 99, 99, 99};   // test scores
String PL = "";                             // used with Serial.println

// DMD stuff
#include <SPI.h>
#include <DMD.h>
#include <TimerOne.h>
#include <MyBigFont.h>
DMD dmd(2,3);                               // (DISPLAYS_ACROSS, DISPLAYS_DOWN)
// --------------------------------------------------------------------
void ScanDMD()                              // timer interrupt to drive display refresh
  {
    dmd.scanDisplayBySPI();
  }
// --------------------------------------------------------------------
ISR (PCINT1_vect)                           // pin change interrupt A0-A5
  {
  intFlag = 1;                              // set interrupt flag
  }
// --------------------------------------------------------------------
void setup ()
  {
  dmd.clearScreen( true );                  // clear entire display     

// Initialize pin change interrupt (PCINT1_vect)
  PCMSK1 = 63;                              // set interrupt mask for pins A0-A5
  PCIFR  |= bit (PCIF1);                    // clear any outstanding interrupts
  PCICR  |= bit (PCIE1);                    // enable pin change interrupts
 
// Initialize DMD interrupt used to refresh the display
// Set period in microseconds to call ScanDMD
// Anything longer than 4000 (4ms) may cause the display to flicker
  Timer1.initialize( 5000 );
  Timer1.attachInterrupt( ScanDMD );

  digitalWrite (A0, HIGH);                  // enable pull-down pin 14
  digitalWrite (A1, HIGH);                  // enable pull-down pin 15 
  digitalWrite (A2, HIGH);                  // enable pull-down pin 16
  digitalWrite (A3, HIGH);                  // enable pull-down pin 17
  digitalWrite (A4, HIGH);                  // enable pull-down pin 18
  digitalWrite (A5, HIGH);                  // enable pull-down pin 19
 
  dmd.selectFont(MyBigFont);                // select large font

//  Serial.begin(9600);
//  Serial.println("START");   

  refreshBoard ();                          // display initial scores
  }
// --------------------------------------------------------------------
void checkSwitches ()                       // check switches and update scores
  {
  delay (50);                               // debounce

  for (i = 0; i <= 5; i++)                  // loop to quickly check switches A0-A5
    {
      prevSw [i] = currSw [i];              // save previous switch status
      currSw [i] = digitalRead (i + A0);    // read current switch status
    }
   
  for (i = 0; i <= 5; i++)                  // loop to update scores
    {
    if (prevSw [i] == 1 && currSw [i] == 0) // if switch went from HIGH to LOW...
      {
      updateScore ();                       // update score
      refreshBoard ();                      // refresh entire display
      }
    }
  intFlag = 0;                              // clear interrupt flag
  }
// --------------------------------------------------------------------
void updateScore ()                         // update score
  {
  j = (i / 2) * 2;                          // determine which pair of scores
 
  if (score [i] > 24)                       // if score exceeded 25...
    {
    score [j]     = 0;                      // reset the pair to zero
    score [j + 1] = 0;       
    }
  else               
    score [i] += 1;                         // else increment score by 1
  }
// --------------------------------------------------------------------
void refreshBoard ()                        // refresh entire display
  {
  dmd.clearScreen( true );                  // clear entire display   

  for (j = 0; j <= 5; j = j + 2)            // display scores in pairs
    displayPair ();
  }   
// --------------------------------------------------------------------
void displayPair ()                         // display a pair of scores
  {
  int scoreA = score [j];                   // get a pair of scores
  int scoreB = score [j + 1];
 
  char scoreA1 = scoreA / 10;               // breakdown score to individual digits
  char scoreA2 = scoreA - (scoreA1 * 10);
  char scoreB1 = scoreB / 10;
  char scoreB2 = scoreB - (scoreB1 * 10);

  if (scoreA1 == 0) scoreA1 =  32;          // if leading zero, replace with ASCII blank
  else              scoreA1 += 48;          // else add offset for ASCII zero

  scoreA2 += 48;                            // add offset for ASCII zero
 
  if (scoreB1 == 0) scoreB1 =  32;          // if leading zero, replace with ASCII blank
  else              scoreB1 += 48;          // else add offset for ASCII zero

  scoreB2 += 48;                            // add offset for ASCII zero                 

  k = 32 - (j * 8);                         // k is the y coordinate (0, 16 or 32)

  dmd.drawChar(  0, k, scoreA1, GRAPHICS_NORMAL );  // display the scores
  dmd.drawChar( 12, k, scoreA2, GRAPHICS_NORMAL );
  dmd.drawChar( 42, k, scoreB1, GRAPHICS_NORMAL );
  dmd.drawChar( 54, k, scoreB2, GRAPHICS_NORMAL ); 
  }
// --------------------------------------------------------------------
void loop ()                                // main loop
  {
  if (intFlag == 1) checkSwitches ();       // check switches after an interrupt
  }






PaulRB

Well done Phil. I can see ways to "improve" your code, but if its working well enough, why bother?

Out of curiosity, why 2 Nanos?

Palomar

Paul,

Each Nano controls one half of the scoreboard. There are 6 foot switches for each half, coming in on pins A0-A5.

Initially I could not cycle a switch on/off very quickly or it would ignore some of the cycles. After adjusting several parameters and optimizing the code, I got to the point where I could not tap my foot fast enough to skip a cycle. With just one Nano, I doubt I could have achieved that.

Phil

angelvinny

Hello friends,

I have a problem I'm trying to work with this array but is hard for me because I have a Mega 2560 Arduino, because it does not work, only a couple of LEDs light, I read somewhere that this library will not work for this model of Arduino if someone has the solution appreciate your help, este es mi resultado:

https://dl.dropboxusercontent.com/u/193085204/20150901_170635.jpg

PaulRB

Hi and welcome.

If you have a problem and need help, you should start a new topic of your own in the forum, instead of trying to re-start a year old topic that belonged to someone else.

Before you start your new topic, read the "read this" topic you see at the top of the forum. If you do not follow the instructions there, no-one will be able to help you, even though they want to. If you follow the instructions, I am sure you will get lots of friendly help and advice.

Paul

angelvinny


Thank you for your recommendation've started a new post on the following link, hopefully help me, thanks

http://forum.arduino.cc/index.php?topic=345524.msg2381511#msg2381511

rtek1000

Hello,

I found some things:

Schematic diagram of the module P10.

Schematic diagram "rubbings" with two modules P10: P10 (1R) -V701C (red LED) and P10 (1R) -V901A (green).
In the circuit 16 registers 74HC595 (ms D1-D16), the buffer element 74HC245 (ms D17), the decoder 74HC138 (ms D18), the inverter 74HC04 (ms D19) and four assembly P-channel transistors IRF7314 (or 4953, VT1-VT4). Also in the scheme have R1-1 ohm resistor assembly, R2- 4,7 kW; R3; R4 - 100 ohms, two electrolyte C1; C2 - 470,0 nineteen capacitors C3-C21 - 0,1 mF installed on the conclusions of the power circuits.
Input signals from an external device to the connector coming HUB1.2, and to the X2-OUT connector can be connected to the next module trail P10. All major connector HUB1.2 signals pass through a buffer D17 ms, wherein each of the signals SCLK and CKL goes through two lines; Some go to the conclusions of 11, 12 registers (ms D1-D16) of the module, the second - on the output connector to work with the following modules. The input data signal R, having passed through the buffer element ms D17, to the input data of the first register (output 14 ms D1). With 9 ms D1 output data is input to the next register. The picture no circuit fourteen registers ms D2-D15, but in the circuit they are connected in series and each runs with its own group of 32 LEDs. The output data from the R-OUT output of the last register 9 (ms D16) fed to the input of the R output connector X2-OUT.

To turn the LED requires a zero level at the output of the register and the opening of one of the transistors VT1-VT4. Scan mode the module P10 - 1/4, that is, at each time to open one of the four transistors or may illuminate a group of 128 LEDs connected to the outputs of all registers. The control signal transistors is determined by the states of lines A, B connected through a buffer element ms D17 decoder to address inputs (pins 1, 2 ms D18). By the conclusion of the decoder 5 ms D19 through an inverter connected signal OE, which determines the brightness of the LED module.

When working with one module information on the R input jack HUB1.2 with the control unit takes four 128-bit parcels, each time exposing the lines A and B, the next address. The shift register data is clocked by the positive edge of the signal CKL, and the output data is transferred to the register on the rising edge of the signal SCLK.

[All right reserved to respective authors]

Source: http://sotvorimvmeste.ru/viewtopic.php?f=33&t=194

Application:

Temperature display described in this article is intended for outdoor installations and measuring the ambient temperature. Cable length to the sensor can be up to 20 meters (longer is not tested), which allows you to spread the sensor itself and the display. Measuring range: -40 to +50. Measurement accuracy according to the sensor datasheet DS1820 = +/- 0.5 C. The current consumption of about 1.3 A.

LED modules were purchased from a Chinese online store. Color options are different - green, red, blue, and even a lunar glow. The truth is, buying these modules task was to study protocols HUB08, HUB12, because the information in the network it is extremely small (or rather even do not).

Thus, the modules consist of an array of LEDs (32x16 = 512 units), and 16 pieces of shift registers 74HC595.



Studying the principle of the scheme came to this algorithm:



Thus, only four groups of shift registers. Each group will be activated by the respective levels of the ports A and B. The display dynamic, so is lit set group - the shift register on the next group, etc.

Initially the idea was to collect data on the running line modules, but the CPU PIC18F2550 showed that 2 Kbytes of RAM for this is not enough - the work is necessary to conduct the type double word. Buy for experiments that something serious does not make sense, because the Chinese are ready controllers for $ 20-30.

He came to the idea of the development of the thermometer, which is often set to attract attention to the outlets (kiosks, pharmacies).



Download the firmware for the microcontroller can be on this link tempP10led.
http://conture.by/wp-content/uploads/2013/08/tempP10led.zip

Sources do not ask - it would make life more difficult students-))). But the idea will show, but after watching the video.

https://www.youtube.com/watch?v=iuFS1QgHzC0

How to screen the inscription DEVLAB.BY, which you have seen in the greeting on the screen? It's simple - you need to sit down and figure out the code below ...

dword hello [16] = {
   0b00000000000000000000000000000000,
   0b00000000000000000000000000000000,
   0b11100111101000101000001100111100,
   0b10010100001000101000010010100010,
   0b10010111001000101000010010111100,
   0b10010100000101001000011110100010,
   0b11100111100010001111010010111100,
   0b00000000000000000000000000000000,
   0b00000000000000000000000000000000,
   0b00000000000111100100010000000000,
   0b00000000000100010010100000000000,
   0b00000000000111100001000000000000,
   0b00000000000100010001000000000000,
   0b00000000010111100001000000000000,
   0b00000000000000000000000000000000,
   0b00000000000000000000000000000000
};

ServiceReq void (void) {// function is called every 50 ms
 static word led_count = 0;
 byte T [4] = {} 32,24,16,8;
 unsigned char i = 0;
 unsigned char x = 0;
 unsigned char xx = 0;

 if (led_count == 500) {
   LATBbits.LATB2 = 1; // enable the module

   is (xx = 0; xx0; x -) {
         ShowLines (((x-1) * 4) + XX, t ); // Set registers group
       }
     }
     if (xx == 0) {
       LATBbits.LATB0 = 0; LATBbits.LATB1 = 0; // The first group of registers
     } else if (xx == 1) {
       LATBbits.LATB0 = 1; LATBbits.LATB1 = 0; // The second group of registers
     } else if (xx == 2) {
       LATBbits.LATB0 = 0; LATBbits.LATB1 = 1; // The third group of registers
     } else {
       LATBbits.LATB0 = 1; LATBbits.LATB1 = 1; // The fourth group of registers
     }
     LATBbits.LATB6 = 1; LATBbits.LATB6 = 0; // signal STR
   }

   LATBbits.LATB2 = 0; // turn off the module

   led_count = 0U;
 }
}

void ShowLines (y byte, byte x)
{
 Byte;
 is (a = x; a> (x-8); a -) {
   LATBbits.LATB5 ubit = (y (a-1)); // The signal is set R1
   LATBbits.LATB7 = 1; LATBbits.LATB7 = 0; // signal  CLK
 }
}

BOOL ubit (byteB byte, byte bit0)
{
   if (((hello [byteB] >> bit0) & 1)> 0)
   {
       return 0;
   } else {
       return 1;
   }
}

[All right reserved to respective authors]

Source: http://conture.by/post/1100

Translated from russian to english by Google.
Please avoid private messages, your question may be someone's answer in the future!

rtek1000

https://github.com/freetronics/DMD2

Same pinout:



Arduino Nano v3.0 & IDE 1.6.5 works fine!


The DMD2 library includes the following new features:

   - Supports Arduino Due (IDE 1.5.6 or newer), as well as AVR-based Arduinos.
   - Adds new "SoftDMD" support, which allows the standard DMDCon board connections to be used on all standard Arduino compatible models - including Arduino Mega/EtherMega, Arduino Due/EtherDue or Arduino Leonardo.
   - Integrated timer management for simpler sketches.
   - Improved performance, on an AVR-based Arduino a single DMD panel uses approximately 5-6% CPU overhead to update (including when using the SoftDMD mode rather than hardware SPI.)
   - New drawString() methods accept flash strings, or the Arduino String type, directly. See the "AllDrawingOperations" example.
   - New DMD_TextBox class supports automatic scrolling, and automatic print() interface for writing out numbers, variables, etc. See "Countdown" and "ScrollingAlphabet" examples.
   - New dmd.setBrightness() call allows changing DMD brightness (no more blindingly bright displays!)
   - New DMDFrame base class allows direct swapping of the DMD framebuffer, supporting double buffering operations and similar (see "GameOfLife" example.)
Please avoid private messages, your question may be someone's answer in the future!

Mohamedkhemeri

Please, Can I Get Program arduino P10 32x16 led matrix program arduino

Go Up