Go Down

Topic: Help Debugging with Nano and Addressable LED (Read 307 times) previous topic - next topic

jordanjlopez

Dec 16, 2019, 01:03 am Last Edit: Dec 16, 2019, 01:09 am by jordanjlopez
This is my first time ever working with electronics, so please bear with me!

I'm trying to put together a word clock using the Arduino Nano and a strip of WS2812B addressable lights.

I am stuck trying to get the LEDs to light up. I decided to test with just a strip of 12 LEDs to make sure it all works, but am eventually going to extend to 144. I can't get the first strip of 12 to light up though.

The arduino nano turns on, and using a multi-meter I verified that there is current flowing through the place where I connect the LEDs, but they're not turning on. I'm not quite sure how to debug this, but I suspect the issue is in the Data connection from PIN 6 on the nano.

WS2812B LEDs on Amazon
5V 12A 60W PSU on Amazon


Current circuit state:

jordanjlopez

#1
Dec 16, 2019, 01:09 am Last Edit: Dec 16, 2019, 01:49 am by jordanjlopez
This is the current program I'm trying to run:

Code: [Select]
#include "FastLED.h"

// fast led constants
#define DATA_PIN    6
#define COLOR_ORDER GRB
#define NUM_LEDS    12

#define LED_TYPE    WS2812B

// this creates an LED array to hold the values for each led in the strip
CRGB leds[NUM_LEDS];

void setup()
{
  FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
}

void loop()
{
  for(int i = 0; i < NUM_LEDS; i++ ) {
    leds[i] = CRGB::Red;
    FastLED.show();
  }
  delay(500);
 
  for(int i = 0; i < NUM_LEDS; i++ ) {
    leds[i] = CRGB::Black;
    FastLED.show();
  }
  delay(500);
}


EDIT: Changed 0 -> i in the loops

larryd

#2
Dec 16, 2019, 01:43 am Last Edit: Dec 16, 2019, 01:44 am by larryd
    leds[0] = CRGB::Red;

Should be:

    leds[i ] = CRGB::Red;

etc.
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

jordanjlopez

leds[0] = CRGB::Red;

Should be:

    leds[i ] = CRGB::Red;

etc.
Oh good catch! Thanks for that.
After changing it though, still no lights. But that would have presented another problem down the line.

larryd

#4
Dec 16, 2019, 01:49 am Last Edit: Dec 16, 2019, 01:55 am by larryd
Works here, must be your wiring.

Show us a good image of your wiring.

Posting images:  
https://forum.arduino.cc/index.php?topic=519037.0


BTW






No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

jordanjlopez

Thanks for double-checking on your end!

It's definitely possible that my wiring is the issue, I've been winging it soldering-wise.


Also I forgot to mention that I did have a 470 ohm resistor on the data line. Forgot to put that in the diagram as I had it taped over with electrical tape.

I had also completely covered the two prongs of the capacitor in electrical tape.

Updated diagram


Wiring


Up-close of Nano


larryd

#7
Dec 16, 2019, 02:15 am Last Edit: Dec 16, 2019, 02:18 am by larryd
Do the following in order:


Run the simple 'blink' test, does it work?

You might have a bad D6 or Nano.

One of your connector wires may not be crimped properly, check for continuity.

If 'blink' works, try D8 as your output.

You might have a bad first pixel, cut the 1st pixel off then re-solder.


No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

runaway_pancake

Is D6 connected to the Data_In pad. 
It may be it's connected to the Data_Out??
Try the other?

"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

jordanjlopez

Are you using rosin flux ?
I don't think so, I'm using the tin provided in this kit on Amazon

Do the following in order:


Run the simple 'blink' test, does it work?

You might have a bad D6 or Nano.

One of your connector wires may not be crimped properly, check for continuity.

If 'blink' works, try D8 as your output.

You might have a bad first pixel, cut the 1st pixel off then re-solder.



I'll run through these and get back to you. Blink test works though!

Is D6 connected to the Data_In pad.
It may be it's connected to the Data_Out??
Try the other?


I'm not sure what you mean here, does one side of the d6 pin do input and the other do output?

runaway_pancake

"I'm not sure what you mean here,..."


One end of the strip is DIN (connect to D6), the other is DOUT.
No pic of the wiring at the strip to tell.
Just trying to cover the bases.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

larryd

#11
Dec 16, 2019, 03:08 am Last Edit: Dec 16, 2019, 03:10 am by larryd
In post #5, looks like the OP's green wire is going to Din.




No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

jordanjlopez

It works now! Based on Larry's advice, I decided to switch the pin I was using. I also swapped out the pre-crimped connector wires for ones I soldered myself and now the LEDs are lighting up.

Thanks so much for your help guys!

Go Up