WS2812B Wrong colors

5.7 volts is too high at the controller power pin.

Thanks, I changed the setting on the buck converter to have 5V.

Ok then strip it back, just try a code that simply fills one strip with the same colour, green will do. Post that code so we can look at it. And say what number led gives what colour.

Are you using a real Arduino Pro Mini or is it a ripoff clone?

Ok then strip it back, just try a code that simply fills one strip with the same colour, green will do. Post that code so we can look at it. And say what number led gives what colour.

I have tried on my girlfriend’s helmet, which is the a similar build, and we have temporarily connected only the main dome, so 1 strip, 1 color (0,150,0) in the program, and we also get multiple colors displayed.

On my helmet:
Strip 1 (eye): 11 LEDs, all green
Strip 2 (eye): 11 LEDs, all green
Strip 3 (main dome) 66 LEDs:
LED: Color:
0 White
1 Blue
2 Red
3 White
4 Blue
5 Red
6 Green
7 Green
8 Green
9 Green
10 Green
11 Green
12 Green
13 Green
14 Green
15 Green
16 White
17 Blue
18 red
19 White
20 Blue
21 red
22 white
23 blue
24 red
25 white
26 blue
27 red
28 white
29 blue
30 red
31 white
32 blue
33 red
34 white
35 blue
36 red
37 white
38 blue
39 blue
40 white
41 blue
42 red
43 white
44 blue
45 red
46 white
47 blue
48 blue
49 blue
50 blue
51 blue
52 blue
53 blue
54 blue
55 blue
56 blue
57 blue
58 blue
59 blue
60 blue
61 red
62 red
63 red
64 red
65 white

Code is still the simple one, with only one color (other codes tried give unexpected colors, with only 6 to 15 being right):

// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#define PIN            6

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS      88

// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

int delayval = 10; // delay for half a second

void setup() {
  // This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (__AVR_ATtiny85__)
  if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
  // End of trinket special code

  pixels.begin(); // This initializes the NeoPixel library.
}

void loop() {

  // For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.

  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(0,150,0)); // Moderately bright green color.

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

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

  }
}

Are you using a real Arduino Pro Mini or is it a ripoff clone?

I use generic ones, I have tried with two makes with the same results:
This one and this one.

Thank you for the help!

Thanks for that. Yes those two boards are fakes so their might be a quality issue here.

Can you do some tests for me as I have not got your system? With only the long strip connected reduce the green value from 150 down to 8. Now disconnect the wire from your boost converter to the 5V line of the Micro and power it from the USB socket of your computer, does it show all green now?

Thank for your continued help Mike.

As suggested, I have: - Disconnected the eyes strips - Added a capacitor on the power to the LEDs strip - Added a resistor on the Data cable - Disconnected the power cables from the converter - Changed the program for color: 0,8,0 - Power the system from USB

The color sequence is the same as before, at least for the 15 first LEDs (I haven't checked them further one by one).

We have done the same on my girlfriend's helmet, she as also a string of different colors. We use 2 different makes of the Mini Pro.

I'll be away from home for a week, but if you have more suggestions, I'll be happy to try more.

We use 2 different makes of the Mini Pro.

Are any of these real or are they both ripoffs?

Do you have any other sorts of Arduino you can try?

They are both not original. I can't seem to find an original for sale online since it has been been discontinued.

I'm going to try to simplify further: reduce the length of the cable, maybe also the length of the strip.

Well I set up a Pro Micro and ran your code in reply #14. This is what I got.

IMG_2277.JPG
So I am not seeing the same issue as you.

If I have got this right then with two strips connected, a short one and a long one, both on the same pin. Are you getting all 11 of the short strip green but the first 11 ( at least ) of the long strip different colours? That seems to suggest you have a problem with the long LED strip rather than the code or timing.

I notice from the schematic of the Pro Mini that it could be fitted with a 8, 16 or 20 MHz crystal. What is fitted on yours, it should be marked on the top.

Sorry for the long silence, I was away from home.

I found what the issue is: it’s one of the 2 kinds of LED that I purchased that creates it…
individual LEDs

I have replaced them by the other model (LED strip), and voila…

I though it was not the hardware because:

  • Some from the strip also had wrong colors. I suppose the signal was polluted though the individual LEDs?
  • When I swapped the 2 first individual LEDs, the wrong colors remained the same, according to their position, not to the LEDs itself.

Thank you very much for your help Mike!

Thank you very much for your help Mike!

Your very welcome, and thanks for the feedback to conclude this thread. Often people just leave things hanging, or just say it is solved without saying why.

I know this is an old post - But I wanted to seal it up so people knew what the problem was. I am 99% sure you were using RGBW (note, the forth LED, WHITE). That will then create a chain of issues since you need to send FOUR individual codes per LED. It chains over to the next one in line, and goes forever.

Just adding to this rather than creating a new thread. But one of my strip is showing randomly wrong colour leds, however only when below 50 percent brightness. If I fade it down then some led stay in brightly with the wrong colours. If I put full brightness and then reduce then the colours are all as expected until the brightness get low again.

This is only on one strip, my other strip with the same code is perfectly fine.

I have a 1000uF cap on the +/- supply of the strip. I have a 220 ohm resistor on the data pin of the strip. All cable lengths are reasonably short.

I believe the supply is just over 5V at the start (5.15V off memory) and very close on 5V at the end.

Should I look at my power supply, changing my resistor or looking at using a new gitial pin.

Its a buy of a pain to change things in situ which is why I haven't tried these things yet.

This is only on one strip, my other strip with the same code is perfectly fine.

Look to see if this strip has a ceramic capacitor on every LED. I once got a strip that only had them fitted on every eighth LED.

I cut a 5m strip in half at the cut marks and made thr two strip’s. So each strip is the same, other than the one working 100 percent running off a lab power supply with no capacitor or resistors yet, and the one not working right when dimmed down running off a plug pack however has the capacitor and resistor in it… I had hoped addimg the capacitor and resistor would fix it but it made no difference to random wrong pixel colour (or individual pixels night when the rest are off).

I will check about the capacitors on the strip however.

As the led work fine at 50 percent and upwards in brightness I was thinking that the strip isn’t damaged and it’s not to do with voltage drop. But this is an uneducated stab at the problem.

and the one not working right when dimmed down running off a plug pack

I am assuming that a plug pack is some sort of power supply. I am also assuming that the ground of this plug pack is also connected to the ground of the Arduino and the +ve is only connected to this second strip. Is this correct?

running off a lab power supply with no capacitor or resistors yet,

Well put them in as soon as.

Grumpy_Mike: I am assuming that a plug pack is some sort of power supply.

|500x500

Grumpy_Mike: I am also assuming that the ground of this plug pack is also connected to the ground of the Arduino and the +ve is only connected to this second strip.

Yes common ground for the strip and the wemos. The positive of the supply is only powering the wemos mini and the strip it's controlling.

Grumpy_Mike: Well put them in as soon as.

Yes that is the plan before I keep using them. However thats the strip with no problems. But I realise that over time it could damage them.

Grumpy_Mike: I am assuming that a plug pack is some sort of power supply.

Yes like linked above. I haven't checked is it's regulated or switch mode... I know it's not an unregulated supply though.

I haven't checked is it's regulated or switch mode... I know it's not an unregulated supply though.

It will be a switch mode supply given the size and weight.

Any thoughts why it's only a problem at lower brightness or off? Could it be a data line issue?? Or perhaps the strip is damaged? Although seeing it works perfectly fine at the higher brightness makes me think power and the leds plus drivers are ok? This is a question not a statement as obviously I'm not too sure.

Maybe I try a different value resistor or maybe try a different digital out or perhaps borrow the esp8266 from the strip working properly? Problem is I may need to pull the strip's down and unsolder plus resolder so I'm a little hesitant unless there is reason for the problems to only be at the lower brightness or off for me to do that.