Go Down

Topic: WS2812B wrong colors (ASAP) (Read 1 time) previous topic - next topic

hungrycoco

I have 2 sets of 30 neopixels with all the data pins wired in parallel (the DIN pin goes to the next DIN pin, not the DO pin) to the same data pin. This project is battery powered with 3 18650 batteries. I used a buck converter to step down the voltage to 5V and connected it directly to the neopixels. When I insert only 1 set of neopixels to the circuit, it lights up correctly, but if I plug in both sets, it only displays green.

Code: [Select]

#include<Adafruit_NeoPixel.h>

#define PixelPin2 6

Adafruit_NeoPixel InnerStrip = Adafruit_NeoPixel(1, PixelPin2, NEO_GRB + NEO_KHZ800);

void setup() {
  InnerStrip.begin();
  InnerStrip.show();
}

void loop() {
  softOnBlue();
  delay(2000);
  softOffBlue();
  delay(2000);
}


void softOnBlue() {
  for (int x = 0; x <= 255; x++) {
    colorWipeI(InnerStrip.Color(0, x / 2, x / 4), 2);
  }
}

void softOffBlue() {
  for (int x = 255; x >= 0; x--) {
    colorWipeI(InnerStrip.Color(0, x / 2, x / 4), 2);
  }
}

void colorWipeI(uint32_t c, uint8_t wait) {
  for (uint16_t i = 0; i < InnerStrip.numPixels(); i++) {
    InnerStrip.setPixelColor(i, c);
    InnerStrip.show();
    delay(wait);
  }
}

Paul__B

Do you have the 470 Ohm resistor in series with each Neopixel string, located at the first Neopixel?


larryd

What voltages are seen at different points on the strings?
Beginning
Half way
End

Show us a good schematic of your circuit.   
Show us a good image of your wiring.
Posting images: 
https://forum.arduino.cc/index.php?topic=519037.0     



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.

hungrycoco

#4
Sep 21, 2018, 06:33 am Last Edit: Sep 21, 2018, 06:37 am by hungrycoco Reason: image not attached
Voltage is roughly 4.9V

I can't take a pic of the wiring. The whole item is too big. But I have the schematic.

larryd

Are saying you have 60 Din all going to the 470 resistor?



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.

hungrycoco

#6
Sep 21, 2018, 06:53 am Last Edit: Sep 21, 2018, 06:58 am by hungrycoco
Yes. Should I separate the resistors?

Edit: I tried to disconnect the 2 strips and use another pair of 20 LED strips and it worked. Can it be that the DIN pin on my 30 LED strip is busted?

larryd

The recommended setup is one resistor per strip of LEDs (that are Dout to Din connected).

Why are you placing all Din(s) in parallel.




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.

hungrycoco

i want to make sure the strip still turns on even if one pixel is dead

larryd

Well, you cannot control individual pixels with your connection.

I have many feet of Neopixels running 24-7 for years with no failures.

I believe there are LEDs similar to 2812s that if one fails signal still passes thru, cannot remember the part number though.


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.

hungrycoco

i am not trying to control the leds individually, i need to control all at once actually.

larryd

You could experiment with 1 resistor per 10 pixels etc.
Pin 6 would go to 6 X 470 ohm resistors, each resistor goes to 10 Din(s).  6X10=60

Each pixel must have a .1uf capacitor from 5v to GND.
This capacitor might already be on your pixel PCB.


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.

Rintin

Blue leds are quite sensitive about the voltage. What buck converter are you using? Have yout checked the voltage when the leds are on?

Grumpy_Mike

#13
Sep 21, 2018, 09:39 am Last Edit: Sep 21, 2018, 09:42 am by Grumpy_Mike
It sounds like you have a fan out problem. That is the number of inputs any one output will drive.
Use a 74HC04 inverting buffer chip. Use two of them to make a non inverting buffer. Do this three times. Connect all the inputs together and then to the data pin of the Arduino. Take each output through a resistor and apply one to the 20 led strip. Then split the 30 strip into two strips of 15 and connect the other outputs to that.

Why is your answer in reply #2 contradicted by the schematic you posted?

A better soloution would be to take advantage in the inverted drive signal option the the libiary and just use a single buffer and split your strips into 6 lengths.

Paul__B

i am not trying to control the leds individually, i need to control all at once actually.
OK, what you have done is very unwise indeed.  You need to connect them properly, Dout of one to Din of the next.  These are specifically designed to work in that fashion.  If you really want all to be the same colour, then you can easily make an array in which all are the same colour and will all change simultaneously when you re-send a new array.

Quite frankly, you are creating so many problems trying to do it the way you describe that it simply isn't worth our time trying to help you through one problem after another.  Maybe you need just to buy new strips and use them the proper way.  This is called the "XY problem".

Go Up