Go Down

Topic: Only the first few LED's.. sometimes (Read 406 times) previous topic - next topic

eeze

Been away from Arduino/ESPP/MQTT for awhile and definitely missed it.

Trying to work on some lights for under a table and I think i've missed something crucial.

I've got a 5M strip of 5V RGB WS2812B here
https://www.aliexpress.com/item/Hello-Fish-5m-WS2812B-Pixels-LED-Strip-IP67-Waterproof-30-Pixels-m-Dream-Color-LED-Tape/32491428092.html?spm=2114.13010608.0.0.LEXdf5

This 5V, 8A Power supply
https://www.aliexpress.com/item/New-Style-40W-LED-Power-Supply-for-3528-5050-Led-Strip-5V-8A-LED-transformer-for/1488503985.html?spm=2114.13010608.0.0.LEXdf5

I've tried with both a Arduino Uno and an ESP8266.  With the ESP8266 just the first 5 lights come on and seem random.
I've tested the power out of the supply at 5.5V

Pin 6 was connect to the data pin of the strip
the 5V to DC IN
and the grnd of the PS to the GND of the strip (not to the arduino)

But Nothing at all.    I was thinking it was related to the data pin as an OUTPUT but that hope was crushed.  No idea what i'm doing wrong.

Code: [Select]


#include <FastLED.h>
#define NUM_LEDS 60
#define DATA_PIN 6

CRGB leds[NUM_LEDS];

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);

}

void loop() {
 leds[0] = CRGB::Red;
        FastLED.show();
        delay(30);
}

LarryD

#1
Mar 16, 2017, 05:02 pm Last Edit: Mar 16, 2017, 05:03 pm by LarryD
Show your wiring.
A common GND to the Arduino is needed.


.
No technical PMs.
The last thing you did is where you should start looking.

eeze

Thank you Larry for the reply.

This morning I connected the common ground, similar to this diagram.


https://www.tweaking4all.com/wp-content/uploads/2014/01/arduino_usb_and_extrenal_power_ws2812.jpg

I get nothing on the first 8 LED's, then a few random colors on LED 9-14  then nothing on the rest of the strip.
As in this picture


I've tested the voltage at the end of the LED strip and it shows 5.4V so it would appear something is wrong with the data or my code.
I'm running "FastLED version 3.001.003"


LarryD

No technical PMs.
The last thing you did is where you should start looking.

LarryD

Keep leads short.
Arduino to strip less than one foot.


.
No technical PMs.
The last thing you did is where you should start looking.

andymule

The lights work with your Uno??

I just had an LED strip working in one place (msp430) and misbehaving in the other (ATTiny85). I had never burned my bootloader onto my smaller chip and so the clock wasn't running at the speed I expected -- causing bad light behaviour.

Reduce your strip LED number to like, 5, and see if only 5 things light up, too.

eeze

I just tested the same strip with a T-1000S controller and doesn't lit up.  I tested another same model strip with the T-1000S and it lights up right away.

So, I think maybe the two (???) strips I tested had failed.

I'm going to test again tonight on a smaller strip and see if I can get anything at all.

I hope I didn't damage them during my previous tests...

To Andy's question - Not sure, I haven't seen anything yet.  I have tried with a ESP8266 and an Uno.  Nada on both.

eeze

Ok, now i'm really at a loss.

I picked up one of the test good strips (on the hardware controller) and plugged it into my Arduino Uno.  Worked perfectly first try.

Then I copy the code, set the software to use the ESP 8266 and move the Digital Pin and Ground over.  All i saw was the first 12-15 lights start flashing different colors, not the blue chase light I was testing before.

Basically I move two pins from one board to another and I go from working config to none.

Really at a loss for what to test

Here is the code


Code: [Select]


// Verion 1 T.S  Setup


//Inclusions
#include <FastLED.h>


// Definitions
#define NUM_LEDS 300
#define LED_TYPE WS2812B
#define DATA_PIN D3
CRGB leds[NUM_LEDS];

/*
#define FASTLED_ESP8266_RAW_PIN_ORDER
#define FASTLED_ESP8266_NODEMCU_PIN_ORDER
#define FASTLED_ESP8266_D1_PIN_ORDER
 *
 *
 */

void setup() {
  // pinMode(D3,OUTPUT);
  // Initial Array
  FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}

void cycle() {    //This is a single led on/off at a time creating a single movement
        for(int dot = 0; dot < NUM_LEDS; dot++) {
            leds[dot] = CRGB::Blue;
            FastLED.show();
            // clear this led for the next time around the loop
            leds[dot] = CRGB::Black;
            delay(30);
        }
}  // End cycle

void loop() {
 cycle();

// End of Loop
}

eeze

I've been reading around and no idea if thise is down the right path but

My WS2812B are only 3 wires.  Many others that have used the ESP8266 have used a 4-wire with CLK.  SOmething about bit banging and SPI. Frankly I don't really understand it.

Is there anything I can do to leverage these ESP8266 that I have.  I really want to use these as I can connect to Wifi and use MQTT to control the lights.

eeze

Yep AndyD,  the lights worked with the Uno (5V) but not the ESP8266 (3.3V)

There are a couple of things I'm going to do. For others that may stumble on this thread.

1 -- Add the capacitor per
https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices

2 -- Add a 74AHCT125  to level shift the 3.3V to 5V. 

Ultimately, I'd prefer to use my ESP8266 board as it has the wifi that I want as opposed to my Uno which I need another shield.


PaulRB

I have a strip of 60 ws2812 leds (3 pin) working with esp8266 with no problems.

eeze

It seems the issue is related to the power supplied to the strip is 5V and the data pin phase is 3.3V so I need to add a 74AHCT125D  or similar.

Will give this a try and see how we go.

PaulRB

I didn't have to use any level conversion. Let us know if that make it work.

eeze

I didn't have to use any level conversion. Let us know if that make it work.
By chance are you using a Li-Ion battery at 3.7V to power your LED's and then using the ESP8266 to send 3.3V on Data Pin?

From what I've read, powering the strips with 5V and using a 3.3V on Data won't work.

Unless I'm doing something wrong.

How is your setup PaulRB?

PaulRB

#14
Mar 21, 2017, 08:49 pm Last Edit: Mar 21, 2017, 08:53 pm by PaulRB
Its all powered from a 5V wall-wart. Not enough current to light all 60 leds white at once, but my 60 leds are wrapped into a circle to make a clock and only a few are ever lit at the same time.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy