Go Down

Topic: WS2812 LED Matrix not responding (Read 892 times) previous topic - next topic

Dyspho

Hi everyone,

~ this is my first Arduino project and I am a general beginner in electronics.

I am working an a really simple project:
Displaying a specific image on a LED matrix controlled by an Arduino Micro when a button is pushed.

So far I just wanted to try connecting the LED matrix to the Arduino and make the LED change color to see how it was reacting.
Simple, but well, it doesn't work and I have issue to understand where the problem could come from.

I bought a LED matrix that is similar to the NeoPixel NeoMatrix from Adafruit.
It's not for Adafruit but it's made with RGB NeoPixel LED WS2812-2020.

It's this piece to be precise :


The specs are the following:

Input voltage: DC 3.7 V - 5.3 V (5 V recommended)
Rated power: 5 W (max.)
Operating temperature: -25 to 65 ° C
LED type: WS 2812-2020
Luminescent color: RGB full color (G - R - B order)
Number of LEDs: 64 LED (cut not possible, cascade connection possible)
Accessory: capacitor 220 μF 16 V

I followed the recommendations from the adafruit website and put a 440Ω resistor (actually 2x220Ω in series) between the matrix and the arduino output pin (pin n6).
I haven't solder the capacitor yet, it should work without it (right ?).

Here is what it looks like:




And here is my Arduino code:

Code: [Select]
#include <Adafruit_NeoPixel.h>

#include <Adafruit_NeoPixel.h>

#define PIN 6 // input pin Neopixel is attached to

#define NUMPIXELS    64 // number of neopixels in strip

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

int delayval = 100; // timing delay in milliseconds

int redColor = 0;
int greenColor = 0;
int blueColor = 0;

void setup() {
  // Initialize the NeoPixel library.
  pixels.begin();
}

void loop() {
  setColor();

  for (int i=0; i < NUMPIXELS; i++) {
    // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
    pixels.setPixelColor(i, pixels.Color(redColor, greenColor, blueColor));

    // This sends the updated pixel color to the hardware.
    pixels.show();

    // Delay for a period of time (in milliseconds).
    delay(delayval);
  }
}

// setColor()
// picks random values to set for RGB
void setColor(){
  redColor = random(0, 255);
  greenColor = random(0,255);
  blueColor = random(0, 255);
}


Nothing is happening on the LED matrix, they are not lighting up.
Is the problem from my circuit or my code ?
Can I power this Matrix from the Arduino only ?

If you have some tips on this one I would really appreciate !

Grumpy_Mike

Quote
I haven't solder the capacitor yet, it should work without it (right ?).
So why do you think they include a capacitor then?

Quote
Can I power this Matrix from the Arduino only ?
No.


PaulRB

#2
Feb 26, 2019, 09:22 pm Last Edit: Feb 26, 2019, 09:23 pm by PaulRB
Quote
Rated power: 5 W (max.)
64 X ws2812b can consume around 20W at maximum, so either the seller is telling you to not to exceed 25% maximum brightness (perhaps because the PCB is poorly designed), or they don't know what they are talking about.

Grumpy_Mike

The WS2812-2020 only takes 16mA per colour per LED so that would only give a maximum power of 15.34W, but yes well over 5W.

The maximum current can be just a tad over 3A.

If you code has a single running LED thought then you could drive it from your Arduino's supply.

Paul__B

#4
Feb 26, 2019, 10:06 pm Last Edit: Feb 26, 2019, 10:08 pm by Paul__B Reason: Snuck up on me!
3.84 Amps.  OK, whatever!

Having a PCB like that is a perfect opportunity to design a double-sided (as it clearly is) PCB with a ground pour (as it appears) and power rail forming a complete mesh in both axes to provide optimum power distribution.  The capacitor in the middle seems to be the perfect location.

It would be nice to have a decent image of it to see exactly how it is done.  I have ordered a couple of similar ones from eBay to play with as they represented the most economical price per LED but cannot spot or confirm this particular design.

Dyspho

#5
Mar 04, 2019, 05:44 am Last Edit: Mar 04, 2019, 06:00 am by Dyspho
Hi !

Thanks a lot for your answers.

So why do you think they include a capacitor then?
In the documentation, they say to use it if I use a large power source. I assumed powering the LEDs with the Arduino only wasn't a large power source.
Anyway I soldered it now.

I made another try by powering it with a 9V battery.

Here is my circuits:



I tried to run the same code, and in addition the sample examples code from the Adafruit_neopixel and Adafruit_neoMatrix libraries but nothing happened...

At that point I just don't know how to troubleshoot this.

How can I know if the blocker is from the code or the hardware ?
The connections seems ok but I damaged the hardware because of a bad practice... ?
(on that point, I checked the voltage across all component of the circuit and it seems ok, anything else I can check ?)


Paul__B> I will try to make proper photos tonight

PaulRB

#6
Mar 04, 2019, 07:58 am Last Edit: Mar 04, 2019, 08:05 am by PaulRB
9V batteries are only suitable for smoke alarms and useless for anything else. They can give perhaps a couple of hundred milli-amps. You need a 5V 3A power supply.

Your latest diagram does not show a common ground connection between the Arduino and the rest of the circuit. It won't work without that.

When you get a suitable power supply, 3A is too much to feed through a breadboard. You must connect the power supply directly to the led matrix, but don't forget you also need that common ground connection with the Arduino .

Grumpy_Mike

Quote
In the documentation, they say to use it if I use a large power source.
That is absolute rubbish. When using a voltage regulator you always need a capacitor.

Quote
How can I know if the blocker is from the code or the hardware ?
A very good question and one that goes right to the heart of the fault finding skills you need to develop in this line of business.
A good piece of advice is to never make a measurement without some expectation of what you will see.

Quote
checked the voltage across all component of the circuit and it seems ok
It is best to make voltage measurements from the ground to a component. Keep the ground measurement point fixed. You would spot the lack of a common ground by measuring the voltage on the LED strip's 5V and seeing nothing, if your meter was on the Arduino's ground or measuring the 5V on the Arduino and seeing nothing if your meter was on the LEDs ground.

Dyspho

Thanks for your answers.

My bad, I made a mistake on my diagram but I did connect my arduino's GND to the breadboard ground.

Grumpy_Mike> Thanks for the measurement tips !
I retested the whole circuits keeping the ground measurement fixed.
It seems ok as well !

Ok, I guess I have to find a 5V / 3A power supply now and try that out !

Silly question then, I suppose I also have to change my regulator ? and plug a 5v / 3A regulator ?
So far I am using a 5V / 1.5A regulator...





Grumpy_Mike

Quote
I suppose I also have to change my regulator ? and plug a 5v / 3A regulator ?
No the current rating of the regulator is only the current it will pass.

Quote
I guess I have to find a 5V / 3A power supply now
If you use a 5V power supply then you don't need a regulator.

Dyspho

Hi there,

I finally got a 5V / 3A power supply and made this circuits:



The arduino and the led matrix share the same ground (both connected to the Jack-In interface).

But nothing is happening, the led are not lighting up.
I tested the voltage along the circuit (keeping the same ground) and the led are receiving a bit more than 5V and the charge is 3A.

Is this electronics right this time ?



Paul__B

Your diagram show the right-hand resistor connected to a different row to the data wire to the LEDs.  Is this significant?

Grumpy_Mike

Also still no large capacitor shown.

Do you actually have a 5V Uno or do you have something else.

What about that photo of your wiring?

Dyspho

Hi !
(Sorry for the slow replies, unfortunately I can't work on this project recently  :smiley-cry: )

I am really sorry for the imperfect diagram I sent last time.

Here is a correct one:



I really thought I said what model of Arduino I was using in my first post but I didn't, my bad.
I am using a 5V micro.
And I've sold the capacitor a while ago on the matrix led.


What about that photo of your wiring?
You mean, you want a picture of my circuits ?

Paul__B

I really thought I said what model of Arduino I was using in my first post but I didn't, my bad.
I am using a 5V micro.
And indeed you did say that in your first post.

You mean, you want a picture of my circuits ?
Always a good idea.  Quite often what people show in a diagram does not resemble what they actually built!

Well, I have received my 8 by 8 matrix modules from eBay, not tried them yet but these do not have the mounting tabs, or the position for the capacitor.  Probably not relevant to this discussion as I am not using a Micro - though I did order one of those also.  May find time to try it ...


Go Up