Can't Get LED Strip to Switch On

Hi folks,

I’m very new to all this so please go easy on me :slight_smile:

I’ve purchased a ESP32 board and a ESP8266 board and have tried to set this up on both boards. I’ll explain what i’ve done on each board below.

The particular brand is made by AZ Delivery and purchased through Amazon in the UK. I’m using a strip of Tesfish WS2812B lights with 300 LEDs over the 5 meter strip.
The pinout diagram for the ESP8266 can be found here and the pinout for the ESP32 is here

I’ve installed WLED on both of the boards and have connected them to my wifi without issue however when I connect the LED strips using the board delivered 5v power, I can’t get them to switch on. I’m using breadboard wires to make the connection.

I’ve used a multimeter to validate that both boards are outputing 5v on the pins I’m connnecting to which in the case of the ESP32 is the V5 and GND pins, any on the ESP8266 is the VIN and GND Pins. Once connected, i’ve again validated that 5v is being received at the other end of the LEDs using a multimeter.

On the ESP32 board I’ve connected the data to Pin G2 and set WLED to use GPIO2 which the pinout diagram suggests is correct - I have also changed this to different GPIO pins with no difference. On the ESP8266 I’ve connected the data cable to D2 which should be GPIO4 but again, nothing.

Can you guys tell me if i’m doing something wrong here?

Appreciate your help.

In general, step 1 is get the software working so you can reach it in your Web browser and configure WLED.
Step 2 is to connect the MCU to your strip and get some pretty colours

The KB has some good info on the basics and typical errors: WLED Basics

Without connecting your MCU (let’s start with the ESP32) to the LEDs, can you get to WLED in a browser to do some configuration?

Are your LEDs 5V, can you post a link?

Do you have any kind of a levelshifter?

Do you have a general wiring diagram of how you’ve hooked this up, what are you using to power your LEDs and MCU?

Hi there.

Thanks for the reply. I perhaps should have said, I can get to WLED without problem so the installation seems to have worked so the issue seems downstream of the board and software.

The LEDs are 5v. A link to them is here.

I don’t have a level shifter and I’m not sure what that is I’m afraid.

I don’t have a diagram but have explained where I’ve connected in my post above. I can draw one up when back at the computer if it helps.

I’ve been powering the board from a 5v phone charger to power the board but have not added power injection to the LEDs as yet. In the tutorials I’ve seen, it suggests this should work though.

Many thanks

Great, getting to WLED is half the battle.

As far as a phone charger setup for test, try with a small # of LEDs configured in WLED (say 10).

You’ll have to get a levelshifter sooner than later as the ESP32 output level is marginal at 3.3V compared to what the LED’s expect (5V).

The KB link I gave you earlier has a bunch of info on why they’re needed, what types are recommended and how to wire them.

You can also try a different GPIO pin on the ESP32, 16 usually works well. Just configure WLED to match.

Also make sure you have the correct end of the LEDs connected. Data only flows in 1 direction.

On the ESP8266 I had a similar problem, as soon as I connected the LEDs it seemed to stop working. I think the issue was that GPIO2 is labelled D4 and GPIO4 is labelled D2, because as soon as I switched to using D4 it just worked.

Trying to power 300 leds from a phone charger via the controller cannot be healthy. At 5v the current will be too high.
Reduce the leds to a small number or supply the strip with external power.
Hopefully your controllers will not be damaged.

Alan

1 Like

Thanks for the reply folks. To answer some of the questions:

@divsys - I’ve tried with 50 but will try again later with a small number, as you suggest.
You say that the board will only output 3.3v but my multimeter is telling me i’m getting 5v across positive and ground terminals? Or are you referring to the data channel output?
I’ll give GPIO16 a try and see what that gives.

@Jinx - I beleive i’ve got that right. The arrows flow away from the wires i’m connecting to.

@Adled - I do intend to try and supply via a 10amp 5v supply when i’ve got it working so i can utilise them at a reasonable power. Although from the few tutorials i’ve watched, this should be possible so long as i dont go above 850ma brightness.

The ESP32 MCU operates at 3.3V, there’s an onboard regulator that will drop the 5V you feed into the board (via USB) down to 3.3V. So, yes 3.3V is the most the GPIOs can output for data. That’s the basic reason a levelshifter is required, the LEDs need 5V data signals for reliable operation.

I suggest a very small number of LEDs to start so as to minimize potential power issues. For example, your 300 LED strip will draw 300mA even when showing nothing! That’s due to the power each LED requires (1mA each) for its internal processor to process colours. Then you have to allow for the ESP32, which can be 200-500mA depending on what it’s doing.

Pretty quickly, you’re getting near to 1A of draw which gets near what some phone chargers can reliably power. Starting small, to prove the concept is easier than fighting power problems (that will come later) :wink:

Thanks again for your replies and patience with me :slight_smile:

I’ve connected up this evening on GPIO16 and set WLED for just 2 LEDs but nothing still :frowning:
If it makes any difference, the supply i’m using is rater for 2 amps so assume i should at least get something through when configured to 2 LEDs (not withstanding the level shifter maybe being needed)
I assume it doesnt matter which GND connection I use?

I assume it doesnt matter which GND connection I use?

Watch out for that “gothcha” on some ESP32 boards, the pin right next to the 5V pin is NOT GND, but CMD. Try one of the other 2 (3?) GND pins on your board.

Hah. I did fall for that first off, which is why I started testing with the multimeter to be sure. But now im certain im using the Proper GND and not CMD

Well, you’re down to a levelshifter now to make sure the data from your ESP is up to snuff.

Could still try posting a photo(s) of your setup just to see if something pops into view…

Yes, it certainly looks that way. I’ll have to see where I can source some cheaply. Amazon are ridiculously expensive for this stuff and I don’t have an electronics shop nearby. Will see what I can find and will post some pictures of the setup later.

Seems eBay was my friend here! I’ve got 2 SN74AHCT125 chips coming by the weekend so will let you know how I get on.

I don’t have a breadboard so was going to just connect with wires. I’m pretty clear on the wiring, in that i connect all the red wires (5v) and the back wires (GND) to the pins shown on this diagram but i’m not sure what the bit at the bottom means where red and black meet (and it says 100nf).

Could anyone explain? Apologies if this is a basic question.

Find a piece of perfboard (0.1" pre-drilled PCB with copper pads around the holes like: Amazon perfboard).
That will make it much easier to keep your wiring tidy.

That little symbol is a ceramic capacitor, with a value of 100nF (0.1uF). That’s an important piece to eliminate switching noise that can show up as flicker on your strip. It goes near pin 14 on the chip to ground. Make sure you get all the unused inputs grounded (or to 5V) as well, floating inputs are another way to cause unwanted noise.

Don’t worry about the output resistor, you can usually work fine without it.

Thanks again. Will see how i get on. Do i just connect the capacitor to the 5v on one side and then the negative to the other?

Out of interest, how are all these tutorials not needing to do this? Is it down to the brand of th eLED lights or something? I see Chris Mayher gets mentioned a lot on here - this is the tutorials i’m following so am just curious whats different.



Pics as promised

/soap box on

Youtube videos in general are like free advice, worth exactly what you pay for them.
There’s a few (unfortunately very few) reasonably accurate ones out there.
Too many of them either gloss over some important points or pass on just flat out wrong information.
The justification is always: “But I’ve got video - see it works!”

None of these guys has ever tried to put any of their “designs” into production, where the reality of spec variances, supplier differences, variable supply voltages, sloppy workmanship etc,etc,etc all come into play.

Unfortunately, physics doesn’t watch Youtube and the rules of electronics are the rules.

/soapbox off

That capacitor just goes from 5V to ground (either way it’s not polarized). You just want it as close to the V+ pin (14) as you can get it.

After seeing your pics, I have one other major suggestion(s):

Power your strip properly.

Those little dupont connectors are notoriously bad at making good connections, especially power.
Hooking a piece of wire into a Dupont and then into a JST connector is worse.
Sugg 1)
Sacrifice a wire or 2 and cut the Dupont off the end. Splice the cut ends onto each of those flying leads you’ve taped up (they’re usually used as power injection points) Plug the Dupont back into your ESP 5V and Gnd. That’s still only good for 10-20 LEDs, but you’ve eliminated at least 2 potential bad wiring points.

Sugg 2)
Do the same as 1), but solder the wires, at least the splices. The best would be to solder those injection wires directly to the MCU. Again that eleimnates another 2 potential bad connections.

But if you’re not happy about soldering to the MCU…

Sugg 3)
Get a separate 5V 2A (or better) power supply and use it to drive those injection wires.
You’ll need a separate ground and data wire from the MCU to the strip, but those don’t carry any current to speak of, so they’re much less critical.

Thanks again for your help so far.

I’ve tried a crude splice of the power while at my desk today but no luck. I’m pretty sure i have some wire billed as LED wire which is thicker than the dupont connectors so i’ll solder some connections to the MCU and then to the LED strip.

I’ve got a power supply coming as well which is a 5v 10 amp affair. I’ve also ordered an off the shelf controller just so i can be sire its not the LED strip.

Hopefully with the level shifter and the power supply, i’ll actually get some light!