I am working on the DIY HID device and want to use about 10xWS2812b individually addressable LEDs to indicate button presses and being able to colour code them.
The ESP32-S3-Wroom-1 is powered via USB-C from a PC, which is 5V.
The WS2812b are rated 5-12V and need just a tiny current for Data.
The WS2812b Data line has a 330 Ohm resistor.
I tried prototyping got the following results:
I am using an ESP 5Vin pin as an output and getting around 4.6V at the pin.
5V of the WS2812b is connected to the 5Vin through a 1N4148 diode, which drops the voltage to 3.8 between 5V and Ground along the whole strip.
I cut in the circuit and the current with all 10 LEDs on static red of brightness capped to 30%
of maximum was 24mA.
Is this setup safe if I am not planning to exceed say 120mA?
What alternative could I use?
I was thinking of having a separate USB-C breakout board to power both ESP and WS2812 from the same bus, but not sure and would really appreciate any guidance.
I do that all the time. Totally convenient. Old USB cables can have the other end chopped off for access to the 5 volt and ground lines.
A 10 watt charger works well: feed the 5 volts to the Arduino 5 volt input. Feed the same 5 volts to the strip. You might want to develop using a beefier power supply, but in my experience overloading a charger has not done anything worse than obviously under-powering the circuitry. Code weirdness kinda thing.
Be careful not to run too many pixels too bright.
Do use the recommended capacitor on the 5 volt line, I place mine near the start of the strip.
Please spend time well here
where they will recommend the resistor you say you've used, and a capacitor of 100 to 1000 uF.
My last use was for 60 neopixels. I had done the entire project without the extra capacitor, I do not know exactly when such a capacitor becomes necessary. But I tossed one on there and sleep better. :-|
When you are working on the code, use the USB port to communicate with and power the Arduino board, and a separate supply for the strip. Just be careful, some Arduino boards can't have power on both the USB and 5 volt input. I should say I never bothered to dive deep on that, I just don't do it.
It can. The reason I say seerate is to teach good practice. Some day he will want to make a project that requires many amps for the motors or rgb leds and it is safer with less side effects (motor noise) to have a big PSU for the heavy draw and just plug in the USB for the board.
Does he have the skills to create a branch circuit for the 'other' load?
I've just wandered around the house and I see exzctly zero devices, projects or any commercial products sporting multiple power supplies providing the same voltage.
I think I didn't explain well or you missed the point. IF you have motors or many RGB leds then multiple supplies are common. Just search the forum, there are iterally hundreds of posts advising that.
Thank you for all the replies and insight.
Does this seem reasonable?
Pay no mind that its a different board and pins are arbitrarily chosen, I have labelled them as to what pins they will go to.
The breakout board has 5.1 Ohm resistors pulling down CC1 and CC2 pins.
What are you thinking?
Yes it is 5k1 sorry, here's the amazon link to the 6 pin breakout board:
I am not using Arduino, but an ESP32-S3-WROOM-1
which is 3.3V tolerant and has native USB support so can be configured as an HID or MIDI device.
So it has two USB pins: 20, 19 Which are D+ and D- respectively.
Here's documentation on USB Device stack for ESP-32-S3
I am planning to have an ESP bus-powered at all times from a PC/Laptop.
Trying to find out just now whether this breakout board would have any issue with already existing USB port tapped to USB_D+ and USB_D- on the Devboard, and whether I could keep prototyping with such configuration
I was planning to cap the current draw by the LEDs in code at around 200mA,
but thing is Iam using an LCD screen with a backlight on as well, so need to account for that also
I hope you know D+ and D- are the data pins. The power is the two outside pins labelled Gnd and VCC or some other industry standard term.
Why are you connecting to the CC1 and CC2 pins? They are USB-C special, just use the 4 pins labelled D+ D- for data, Gnd and VBUS for 5V.
Grounding both CC1 and CC2 on the Sink side means you are identifying the device as a USB-C to 3.5mm analog headphone jack adapter. The host device switches the port's function entirely from a data/power port to an analog audio output port.