LED connection through USB power adapter with current-limiting resistor

Customer:

I need advice before purchasing: I want to use an LED to illuminate something through a phone charger power adapter. I have a diagram showing an adapter, a white LED, and a switch (though the switch may not be necessary since it could be directly connected). I’m wondering if this setup would work as shown, and where I should connect the LED to the adapter. I’m planning to start with one LED but may need multiple LEDs for illumination later. I’m developing a couple of products and will likely need to place more orders for additional components. I work with electronics but I’m not completely inexperienced, so I may have follow-up questions as I develop my products.

Original message (Croatian)

[name removed] Ul.Kučićki put 45 [address removed] tel. mob.
Soledered Electronics d.o.o. [address removed][address removed] [email removed]

Poštovani, molim Vas prije kupnje navedenoga za malu stručnu pomoć, a meni treba LED dioda koja treba osvjetljavati (NEŠTO) što bi bilo preko punjača za mobitel.
U prilogu imate prikaz: ADAPTER 1, BIJELA LED DIODA 2 i PREKIDAČ 3 koji možda neće biti jer bi se direktno isto uključivalo, a mene interesira dali isto može raditi na zamišljeni priloženi način, i isto tako gdje spajam LED diodu na ADAPTERU.
Zamišljena je jedna LED dioda za osvjetljenje i možda će biti više dioda za osvjetljenje !?
Pripremam dva proizvoda zašto će mi trebati još vremena…, a tako bih onda od Vas uzimao puno više komponenti pored sada uzoraka koje sam već kupio na odnosu kojih prilagođavam proizvodu…! Tako da će mi trebati u HODU JOŠ UPITA od Vas, a jer se ne bavim elektronikom s time da nisam totalni laik…!
Priloženi MJERAČ ZA ŽESTOKA PIĆA i TOČENO PIVO su mi jedni od proizvoda, a koji su uspješno zaživjeli na tržištu blizu 30 godina koji više nisu tako aktualni, jer se ugostiteljstvo promjenilo…! Sa 22. godine sam pokrenuo svoju prvu proizvodnju svoga Patenta mjerača količine pića MAM-MAI i vlasnik sam više Patenata na raznim poljima…!

Attachment omitted in migration: UPIT No 2 soldered.com Rijeka 10.04.2023.jpg

Attachment omitted in migration: MJERAČ KOLIČINE PIĆA ZA INVENTURU Vl. ko Marić NOVATV 18.04.2022.jpg

Attachment omitted in migration: 1.MJERAČ ZA TOČENO PIVO Vl. 18.04.2022.jpg

Attachment omitted in migration: 2. MJERAČ ZA TOČENO PIVO Vl. 18.04.2022.jpg

Attachment omitted in migration: IMG_20230410_151425_412.jpg

Attachment omitted in migration: IMG_20230410_151532_416~3.jpg

Attachment omitted in migration: IMG_20230410_151241_305.jpg

Originally submitted via email support on 10 April 2023. Migrated to the forum for community visibility.

Soldered Support:

An LED requires a specific forward voltage drop and current to light up, depending on its color. You need to add a current-limiting resistor in series with the LED. For a white LED with a forward voltage drop of 3V and a current requirement of 20mA, powered by a 5V source, a 100 Ohm resistor or higher should be used. A larger resistor will only make the LED dimmer, but do not use a smaller value or the LED will be destroyed.

Connect the VCC pin from the USB adapter to the switch. Connect the switch to one end of the resistor. Connect the other end of the resistor to the anode of the LED (the longer pin). Connect the cathode of the LED (the shorter pin) to the GND pin on the USB adapter. Note that the USB-C standard requires specific voltage on the CC1 and CC2 pins, so you must add 5.1 kOhm resistors between the CC1 pin and GND, and between the CC2 pin and GND.

Original message (Croatian)

Kako LED dioda ovisno o boji ima određeni pad napona i određenu struju koju treba da bi svijetlila potrebno je da u seriju s njom dodate određeni otpornik. Kako odabrana dioda ima pad napona od 3V te struju od 20mA, a izvor napajanja je 5V otpornik bi trebao biti 100 Ohma ili nešto veći (ako stavite veći samo će slabije svijetliti, naravno ispod navedene vrijednosti ne treba ići jer će se uništiti LED dioda).

S VCC pina na USB adapteru spajate na prekidač, s prekidača na jedan kraj otpornika, a drugi spajate na anodu LED diode (duža nožica). Katodu LED diode spajate na GND pin na USB adapteru. Kako USB-C standard zahtjeva određeni napon na CC1 i CC2 pinovima trebate dodati otpornike od 5.1 kOhm između CC1 pina i GND pina te između CC2 pina i GND pina.