0

Red flashing on dotstar matrix
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Red flashing on dotstar matrix

by HecF on Fri Apr 09, 2021 3:44 am

Hi, I just got a dotstar matrix 8x32 and trying to use it with metro mini. This is the code I am trying to run:
Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_GFX.h>
#include <Adafruit_DotStarMatrix.h>
#include <Adafruit_DotStar.h>
#include <SPI.h>

Adafruit_DotStarMatrix matrix = Adafruit_DotStarMatrix{
  32, 8,  // Width, height
  DS_MATRIX_BOTTOM     + DS_MATRIX_RIGHT +
  DS_MATRIX_COLUMNS + DS_MATRIX_ZIGZAG,
  DOTSTAR_BGR};

void setup()
{
  matrix.begin();
  matrix.setTextWrap(false);
  matrix.setBrightness(40);
}

int index{0};
void simple()
{
  matrix.fillScreen(0);
  uint16_t c = Adafruit_DotStarMatrix::Color(255, 0, 0);
  matrix.drawLine(index, 0, index, 7, c);
  matrix.show();
  index = (index + 1) & 31;
  delay(500);
}

void loop()
{
  simple();
}

A simple vertical red line scanning the width of the matrix. Unfortunately it does not work perfect, sometimes a bunch of LEDs on the left side flash red:
Image
(bright red are the lines drawn by the program, bunch of slightly lit LEDs on the left is the flashing I am talking about)

It happens regardless of the color of the line I use, but with red it happens much more often. I tried the "Howdy" example (the only change is the matrix object initialization which was copied from the code above) that comes with the Adafruit_DotStarMatrix library and it happens there as well:
Image

This happens regardless of how the whole thing is powered: from USB of my computer of from the separate power supply (the total current maxes around 350 mA, so shouldn't be an issue even when powered from USB).

Any idea what's causing it?

HecF
 
Posts: 3
Joined: Fri Apr 09, 2021 3:01 am

Re: Red flashing on dotstar matrix

by HecF on Fri Apr 09, 2021 4:02 am

Are these "brown-outs"? I measured the voltage drop between the ends of the matrix and it was 1V. I tried feeding power from both ends and the issue seems to be gone when using power supply, but present when powering from USB.

HecF
 
Posts: 3
Joined: Fri Apr 09, 2021 3:01 am

Re: Red flashing on dotstar matrix

by HecF on Sat Apr 24, 2021 2:37 pm

Later I noticed the red flashing again, but much less frequent, I also had it connected to Raspberry Pi instead of Arduino and the issue was gone, no changes in the way the power was supplied, so unlikely it was the power issue.

HecF
 
Posts: 3
Joined: Fri Apr 09, 2021 3:01 am

Re: Red flashing on dotstar matrix

by adafruit_support_mike on Tue Apr 27, 2021 9:59 pm

That looks like a noise issue.

Post a photo showing all the connections from the microcontroller to the DotStar matrix please. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 62787
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.