LED Matrix Grounding

Status
Not open for further replies.

djcali

Member
Hello,

I am using Pixelcontoller w/Teensy 3.2 and the Octows2811 Board for a Matrix of 35X40 (1,400 LEDs). I am not powering the Teensy with an external supply but just via the USB. On the first strip of 35 2812B pixels I have the orange wire going to the data in and the Orange/white going to ground of the strip. Should I be splitting the Orange/White to ground on each strip using the same data pin thereafter ? The first 5 strips will be using Orange and strips 6-10 using blue etc.. Basically I want to make sure I'm grounding correctly.

thanks!!
 
Complex question there when enough current is flowing that wire's aren't always the same voltage at each end. Signal quality wise you want the grounds to be shared from the end of one segment and onto the next, so the output of segment one data line is paired with a ground at the same potential going into the start of segment two. If you are building things with power and ground being fed from both ends I'd say you are already there, and just connect the Octo board ground wire (orange/White) to the power gnd of the first strip, then make sure you have common grounds between the start and finish of each segment (which your power design should already do, but make sure).
 
Does the usb supply the power requirement for all those leds? seems like a lot of current to provide without any external power source.

oops, sorry, misread your post, forget the above.
 
Last edited:
Basically I want to make sure I'm grounding correctly.

A quick sanity check involves turning all the LEDs on to full power white. Sun glasses might be a good idea....

Then measure the DC voltage between GND pins at the far ends of the display, or at the end of a row, or between the ends of a zig-zag row. They're all ground, so you should theoretically get zero volts, if the wire are zero ohms. But they're not zero ohms.... if you get less than 0.25V between the worst locations, you're doing pretty good. More than 0.5V is cause for concern.
 
Thanks. I will test that and post the updates. Until then, I have another issue i was trying to solve first.... I'm having an issue with some code. Right now I have 35x7 (245 leds) hooked up for testing. I'm using 210 leds per strip, so i have the first 6 rows hooked up to Led Strip #1 data and the 7th row hooked up to Led Strip #2 data. When I use the BasicTest all is well and runs as it should. But when I use the code below for a program called Jinx! only the first 6 rows are working. I got the code from somewhere online when I was searching for Octows2811 and Jinx! together. Does anyone see any obvious reasons why only Led Strip #1 Data is only working?

Code:
/* (C) 2014 by MSchmidl
  Required Connections as defined by OctoWS2811
  ---------------------------------------------
    pin 2:  LED Strip #1    OctoWS2811 drives 8 LED Strips.
    pin 14: LED strip #2    All 8 are the same length.
    pin 7:  LED strip #3
    pin 8:  LED strip #4    A 100 ohm resistor should used
    pin 6:  LED strip #5    between each Teensy pin and the
    pin 20: LED strip #6    wire to the LED strip, to minimize
    pin 21: LED strip #7    high frequency ringining & noise.
    pin 5:  LED strip #8
    pin 15 & 16 - Connect together, but do not use
    pin 4 - Do not use
    pin 3 - Do not use as PWM.  Normal use is ok.
*/

#include <OctoWS2811.h>

const int ledsPerStrip = 210; // adopt these value to your needs

DMAMEM int displayMemory[ledsPerStrip*6];
int drawingMemory[ledsPerStrip*6];

const int ledPin = LED_BUILTIN; // used to indicate a packet start

int pixelIndex = 0;
const int stateR = 0;
const int stateG = 1;
const int stateB = 2;
int state = stateR;
unsigned long pixelColor = 0;

const int config = WS2811_GRB | WS2811_800kHz;

OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);

void setup() {
  pinMode(ledPin, OUTPUT);
  leds.begin();
  for (int i=0; i < ledsPerStrip; i++){
    leds.setPixel(i, 0x0F0000); // all red
  }
  leds.show();
  Serial.begin(9600); // parameter does not matter - USB is always 12 Mbit/sec
}


void loop() {
  digitalWrite(ledPin, LOW);   // set the LED off
  if (Serial.available()) {
    byte incomingByte = Serial.read();  // will not be -1
    switch (incomingByte) {
      case 1: // packet state indicator used be GLEDIATOR
        digitalWrite(ledPin, HIGH);   // set the LED on
        leds.show();                  // show the current data
        pixelIndex = 0;               // restart with new data
        state = 0;
        break;
      default: // all values !=1 are payload data
        switch (state) {
          case stateR:
            pixelColor = long(incomingByte) & 0xFF;
            state = stateG;
            break;
          case stateG:
            pixelColor <<= 8;
            pixelColor |= long(incomingByte) & 0xFF;
            state = stateB;
            break;
          case stateB:
            pixelColor <<= 8;
            pixelColor |= long(incomingByte) & 0xFF;
            if (pixelIndex < ledsPerStrip) {
              leds.setPixel(pixelIndex++, pixelColor);
            }
            state = stateR;
            break;
          default:
            state = 0;
        } // switch state
    } // switch incomingByte
  } // if available
}
 
Status
Not open for further replies.
Back
Top