5V LED strip only works properly off of 3V

I have the following 5V LED strip (WS2812 30 3m): https://www.aliexpress.com/item/1005006165044898.html.

I tried powering the LED strip with a separate 5V power supply while powering the ESP-32 via its USB connection (connected to another USB power supply). While the LEDs came one, I could not control them and could not switch them all off.

When I however power the ESP via it’s USB port and then power the LED strip via the ESP’s 3V and GND pins, everything seems to work just fine. I am just not sure if the LEDs are as bright as they could be.

All this does not make sense to me as I would have thought a separate 5V power supply for the LED strip should have worked.

You likely forgot to join the grounds together.

1 Like

In addition to @kirah’s mention of common grounds (absolutely required) you likely will need to add a proper levelshifter as well.

Be forewarned: running your LEDs off the 3.3V supply from your board is not recommended, that supply is probably not able to supply much current before overheating and/or burning up.

1 Like

Thanks both for this.

Just to make sure that I understand correctly. I only need the logic shifter if driving the strip from the 3V pin on the ESP32. If I drive the strip from it’s own 5V source then I just need to join the grounds? Is this is correct then is a separate 5V source better than using a shifter?

You should have a level shifter either way. The Esp only outputs 3.3v data from it’s gpio pins. LEDs look for 5v data. The level shifter will boost the 3.3 to 5v. You may be able to get away without one but one is recommended. Not all LEDs are created equal and while some may be more tolerant to under voltage on the data line others may not be.

1 Like

Thanks again, just two more questions. In the schematic below I see the ESP showing a 3.3V and 5V link to the level shifter. Am I reading this correctly and if so what if the ESP does not have a 5V out?

Last question. I am wanting to try make my own custom board. Googling, I found the following 3.3V to 5V shifter.

image

I understand the input, output and ground. What I can’t work out is where does the 5V on the exit side of the R1 resistor goes. Also, is there may be a better way to build a logic shifter?

Well you’re supplying 5V to the board, it’s the same 5V that goes to the shifter.

https://kno.wled.ge/basics/compatible-hardware/#levelshifters

What you posted inverts the signal as it shows on the schematic, so won’t work.

Some shifters use 3.3v and 5v. Just use the SN74AHCT125N it only needs the 5v. If your Esp has a pin labeled VCC that is 5v.

I like the SMD formfactor of the BSS138.

Based on all the diagrams, I get the below. Have I done this correctly?

Or should it be

OR

BSS138 is not recommended as it may be too slow.

Thanks @Jinx, I took a guess at how to connect it all up. Does the below look right?

I’m not 100% sure, but I think VCCA needs to go to the 3.3v pin and VCCB needs to go to the 5v. If not using A2 I think it needs to be tied to ground. Might want to wait for @divsys as these ‘other’ shifters are more in his wheelhouse.

That 62 Ohm resistor I would have either multiple options (33, 62, 249) or leave it out. Depending on the situation different resistor values may be needed (or none needed).

While I wait for confirmation to the above, how would I connect the SN74AHCT125N?

My suggestion on using the 74LVC2T45:

Reverse the data direction, use B as the input and A as the output.

  1. DIR to GND
  2. Vccb to 3.3V
  3. Vcca to 5V
  4. B1,B2 inputs
  5. A1,A2 outputs

22nF (0.022uF) bypass capacitors are recommended on both Vcc pins.
You can see the datasheet: TI 74LVC2T45

There are a bunch of diagrams floating about for wiring the 74AHCT125, as recommended, checkout the KB - levelshifters again, don’t forget the bypass capacitor.

1 Like

Thanks again :slight_smile:

For completeness sake I post the final schematic

Thanks for the KB 0 levelshifters link too.