Powering neopixels without a level shifter

I wand to wire a 16 led neopixel ring to my arduino nano esp32. I want the neopixel ring to run at 5v (so that it will be able to be at full brightness) how can I safely wire this without a voltage level shifter?

@wzctuba this is a great place to start

Thank you for your reply!

"Safely" is the wrong word.
Powering with 5volt and controlling with 3.3volt is not unsafe.
I just might not work as expected.
But why don't you give it a try.
An 8-LED stick I once tried on an ESP32 worked fine.
You can always add a level shifter if there is a problem.
Leo..

If the 3.3V pin can work as signal for the ring then feed 5V externally to the ring power and ground. The same 5V fed through a buck converter can give the 3V3 for the ESP.

3.3V is logic HIGH to 5V pins. IMO it is easier and cheaper to level down signal/low power and buck down >small power. With a diode and a pullup you can level one 5V→3V channel and know that 3V→5V signal works as is.

could I power it with the vbus pin as shown in the picture below?

The datasheet says... "... only when USBC is connected..."

11.4 VBUS
There is no 5V pin available on the Nano ESP32. 5 V can only be provided via the VBUS, which is supplied directly from the USB-C® power source.
While powering the board via the VIN pin, the VBUS pin is not activated. This means you have no option of providing 5 V from the board unless powered via USB or externally.

WS2812B = 16 LEDS * 3 COLORLEDS per LED = 48 LEDS * 20mA per LED = 960mA for the ring (1A power supply)

I was planning to use the usb-c to power it.

I have done that with a Nano ESP32 but I used the 3v3 out pin and it worked fine. I add that I did not intend my configuration to be permanent it was just for testing a piece of code so I advise using the directions on the Adafruit page if you plan on using it long term.

Here is another example of NeoPixels using a pi pico where the example also uses the 3v3 pin as the supply

The example is a simulation which is not showing a power supply but needs a "power" connection to function.

For what duration?

Like I said for test purposes and probably not longer than 4 hours

The 3.3 volt out pin is the constant voltage supply to the LED ring and is reduced and regulated from whatever supply is provided to the ESP32 or the pico, I have tried it with both microcontrollers on my benchtop using a 5 volt usb cord from a PC as the powers source.

I have used wokwi in the past but did not use it in this case.

For many chips that's not true. For many chips, a HIGH needs to be more than 0.7 x Vcc. When Vcc is 5V, that is 3.5V, so 3.3V isn't guaranteed to read as HIGH.

For some chips, like 74HCT series for example, the rule is different and 3.3V is guaranteed to be read as HIGH.

Where did you say or write "for test purposes" before this post?

As @PaulRB noted 3.3V is not guaranteed to be read as high. It works enough of the time that bad advice and poorly designed projects are all over the web. When I tried it with a esp8266 it worked, but I broke out the connections in case I have to add a level shifter :grinning_face_with_smiling_eyes:.

Post 9, maybe not word for word, but nots let get pedantic we are supposed to be helping the OP.

Like I said it works and it worked for me on two different microcontrollers.

I also made it clear that Adafruit have the better solutions for a final product.

Sorry to slip up like that.

For AVR chips @ 5V, 2.8V is HIGH. SD works fine if I don’t level MISO.

LOW/HIGH is a ratio of VCC.
For AVR the switch points are 0.3 * VCC and 0.6 * VCC.

But that's not the point here.
The question was about the switch points of a LED ring,
which are typically 0.3 * VCC and 0.7 * VCC.
0.7 * 5volt = 3.5volt, which an ESP32 pin can't provide.
Leo..

I mention AVRduinos because we’ve had threads measuring where the Uno HIGH is. I should remember that the problem with standards is there are too many of them.

To feed 3.3V data and get 5V signal, I would use a 5V pullup on the line and a diode to block the 3V3 from the 5V. When the 3V3 is LOW, the pullup gets sucked LOW.

If I had to do many lines, it’s 74HC4050 time!

Remember that addressable LEDs work with 800kHz signals.
Passive parts could corrupt that data.
Leo..

5.0V 1A supply, 3.3V data line. Slightly out of specs, but safe and I don't remember any case it didn't work. Higher supply voltage like 5.3V might be different story.
If this is setup you build for someone else, go with the shifters.