LED Ring: Incorrect colours

I have the following Chinese LED ring

I have tried both the NeoPixel and FastLED librarys but the colours don’t show correctly. The LEDs only clicker red or green.

I have tried the FastLED calibrate example but do not seem able to work out what the setting might be.

“FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);” does not give the correct results.

Without seeing your code, I assume that it’s the code and flickering is normal :wink:

A wiring diagram might also be useful; how do you power the strip?

If it’s a matter of colours being swapped, you can change the part marked in red to e.g. GRB

FastLED.addLeds<WS2812B, DATA_PIN, [b][color=red]RGB[/color][/b]>(leds, NUM_LEDS);


I have tried all the below attachements.


DemoReel100.ino (3.6 KB)

strandtest_wheel.ino (4.18 KB)

RGBCalibrate.ino (4.91 KB)


It appears to be a dodgy LED ring.

Why is there a 470R reisitir in the ground? That is not going to help anything. The resistor should be in series with the data line.

Also is that processor running of 3V3, that means you might need a signal booster to get it up to 5V.

When drawing a schematic have the power at the top and ground at the bottom. This is drawn upside down.

You can’t directly control addressable led strips from an ESP. Addressable led strips require 5V signal, not 3.3V signal; you will need a level shifter between ESP and ring. A 74HC14 according to Grumpy Mike (he knows his stuff as do many others) in https://forum.arduino.cc/index.php?topic=621140.msg4208897#msg4208897

I see he already climbed in
//End edit

And according to your diagram
You’re feeding the signal into the output of the NeoPixel ring, not into the input; that will never work.
The resistor should be between the ESP (or level shifter) and the NeoPixel input; nit between NeoPixel and ground.
You should have a buffer capacitor over the 5V and GND of the NeoPixel ring; electrolytic capacitor 1000uF.

Thanks all for the input, yes I had made a mess of the power; I checked my power source and it was not set to 5V. Regarding the schematic, I had made a mistake on it i.e. I had connected to the input on the LED ring.

Resistor issue... noted and won't do again :-[

Regarding the orientation of the ground and power, this is the 2nd time someone has commented on this but I am not sure that I understand what is meant by this.

Something like below; 5V on top, GND at the bottom. It does not matter if you draw a rail (as I did) or separate points.

5V  <-------+----------------------------------
            |   +-------+
            +-- + Vcc   |
                |       |
                |       |
                |       |
                |       |
            +---+ GND   |
            |   +-------+
GND <-------+----------------------------------

Thanks :slight_smile:

You can't directly control addressable led strips from an ESP. Addressable led strips require 5V signal, not 3.3V signal;

Well, most of the time it works. The single LED shield for the WeMOS D1 Mini does exactly that. That is what tricks people.

Even more tricky is that it works if the 5 V line is less than 5 V as it usually is if fed from a USB port, but not if it rises to 5.5 V because the logic levels are a proportion of the supply voltage.

I am - as you well know - a proponent of the 74HCT14 or 74HC04 as a buffer rather than what I consider a less commonly available non-inverting hex or octal buffer chip. I usually do not specifically mention the 74HC14 as the Schmitt input nominally has a wider threshold.

Is this drawn better or do I need to add VCC somewhere?

I can't comment much on why I have done it this way other than to say I have adapted sketches that I have seen elsewhere. Removing the C4 capacitor and LED mount, I have used the LM3940IT in this configuration before to drive an ESP-01. So I am guessing that it will still work. I will be testing this build now.

My question about the above is does capacitors in parallel make sense or should I just put a single larger capacitor in? Also why would one have two different times of capacitors in parallel?

Not sure about C3 C2 and C5.

The schematic looks better; I would have placed the led-ring connector at the right hand side of the ESP. Makes it a little easier to follow.

You can then either extend the 5V rail or you can just connect Vin to 5V like you did in your original schematic.

The convention in circuit diagrams is that ground goes along the bottom (because after all, that's where you usually find the ground) and supply lines along the top. This dates from the days of valves ("Tubes" for those of the Trump persuasion; "Vacuum tubes") which were drawn with the cathode at the bottom and anode at the top.

Of second priority, signal - or control in the case of digital logic - flow is directed from left to right so inputs such as buttons or sensors go on the left and output devices such as LEDs and motors toward the right.

Power feed may be from either side but it is often less cluttered if the power supply is on the right. "flowing" in the opposite direction to the signal. This also ties in with the observation that the output devices - toward the right - are generally the heaviest consumers of power. :grinning:

My question about the above is does capacitors in parallel make sense or should I just put a single larger capacitor in?

In general yes having separate capacitors make sense. The 0.1uF ceramic capacitor handles high frequencies, the larger capacitors have more inductance so they can’t do this.

In general having more than one large capacitor helps distribute the decoupling effect, but in this case there is not much else going on in the circuit so I would just have one here. It should be placed close to the regulator.

Thanks that diagram is a lot better to follow, we don’t have to turn our brain in knots.
In the 1960s it was common to have the negative at the top with the zero volts at the bottom. This was because the only transistors there were in those days were PNP ones.

Thanks all; I do appreciate your patient expalinations (with both the diagram and how capacitors work); alas I think that I still have a way to go and so will probably still present some mind-bending schematics in the future - but they will hopefull get better :0

Great you took that on board. With an attitude like that you will soon learn and it will become second nature to you.

You will get better, all of us here are more than happy to help, that’s why we do this.

Thanks also for getting back. All too often we never hear if a particular approach worked. Have a Karma Pont.