How to connect leds to usb. The simplest USB backlight

After a store-bought USB keyboard light broke on the first day of use, I decided to make my own. For this you will need:
1) USB plug to type A socket
2) LED
3) Resistor
4) TRP telephone cable
5) Soldering iron, solder, rosin
6) Scissors or knife
7) Pliers (pliers)

USB plug we will need in order to supply power from the USB output. There are several types of USB outputs, most computers use type A. You can see the pinout of these outputs or. I bought a USB plug in a store, so it looked like this:

To the white little thing on the side that will be inside, you need to solder the telephone wires.
First, you need to cut off a piece of the cable of the length you need from the cable, then cut it in half (two-core cable) and clean it of excess insulation. The edges of the resulting wires should be completely stripped of insulation, carefully cutting through the insulation to the wire around it and removing it. Then, one wire should be cut by 1-1.5 centimeters - a resistor will be soldered to it. We solder the stripped ends of the wires to the extreme pins of the USB plug, these are the power outputs, we close the middle pins together with a small lump of solder, these are differential information outputs.
In order to solder, you need to preheat the soldering iron by plugging it into the network, then (after 10-15 minutes) melt a little rosin, then solder, pick up a drop of solder on the soldering iron and apply it to the pre-connected surfaces to be soldered.
It’s good to check with a multimeter in dialing mode if you have closed the “extra” pins - only pin 2 from 3 should be closed. Follow the links above, you should also look at the polarity of the pins, and mark the wires at both ends so that it is clear to you where is the positive potential, where is the negative.
Then we insert the white little thing into the piece of iron, plug it with the second piece of iron, compress the place where the wires exit with pliers so that the USB plug cannot come loose.
Light-emitting diode I bought in the store. I would choose a bright or ultra-bright LED, with a light intensity of at least 5 candela. Color of your choice, I chose blue. You should remember and note the parameters of the LEDs, such as their operating voltage and current. The LED should be connected considering the polarity - the cathode to the positive potential, the anode to the negative. You can see the polarity in this picture: As you can see, the shorter lead is the cathode, the long lead is the anode. You can also look at the light as the pieces of iron in the LED, compare with the picture and find out the polarity.
Resistor selection. The resistor plays a very important role - it limits the current so that the LED does not burn out. The voltage at the USB output is standard and stabilized (does not depend on current) - 5 volts, the current can vary from 0 to 500 milliamps. In theory, if the LED has a working voltage U, then we need the remaining 5-U voltage to drop across the resistor, and the current is working for the LED (we connect the LED in series to the USB output). Thus, to connect an LED with operating voltage U<5В и током I<500мА нужен ограничивающий резистор номиналом (5-U)/I. For example, my LED consumes 3.5 V and 0.02 mA, so I took a resistor of (5-3.5) / 0.02 = 75 ohms. However, there may not be such a specific resistor in the store - then you need to take the first resistor, close in value to the calculated one, but larger so that the LED current does not exceed the nominal one and the LED does not burn out. Of course, one should not take, for example, 100 ohms instead of 75, it is desirable that the resistance deviation does not exceed 10% of the calculated one. And do not take ceramic resistors instead of ordinary ones - they are very overall.
If you have old resistors, you can measure their value with a multimeter, or try to determine the value by color marks - using this table:
So, after soldering the resistor to the short end of the wire, and soldering the LED (observing the polarity), you can connect the USB backlight. If the LED starts to shine, then everything is fine, but if it does not light up, it gets very hot and after a while there is a distinct smell of burning, then you reversed the polarity and the LED burned out. If the LED is off, and there is no burning smell, then most likely you have closed the information pin with the power one, or have not closed them together - you can open the plug and solder it again.
The result is the following structure:



The cost of this design was only 29 rubles, taking into account the cost of parts, not taking into account the cost of transporting parts, the purchase of tools.
In the dark, it shines well (7 candelas), it does not blind the eyes, but the letters on the keyboard are visible.

Tags: electronics, amateur


In this article, we present to your attention an overview of the most interesting idea for making a USB backlight for a laptop keyboard.

We will need:
- glue gun;
- soldering iron;
- USB plug;
- cap from a plastic bottle;
- tester;
- Light-emitting diode;
- 100 ohm resistor.

First of all, we take a tester and determine which resistor is right for us to make the backlight.


Take a USB plug. The first and fourth pins of the plug are positive and negative. The second and third pins are for data transfer. Let's start assembling.


Solder the resistor to the negative terminal. The polarity of the resistor does not matter in this case.




Let's move on to the LED. The plus side of the LED is called the anode, and the minus side is called the cathode. On newer LEDs, the anode leg is longer than the cathode leg. If you are using an LED that was previously used, then the polarity can be distinguished by the sawn off skirt or crystal bed that is located on the cathode.


Solder the minus of the LED to the resistor.




We solder the positive leg of the LED to the positive contact of the USB plug.




We insert the plug into the connector and check the assembly for operability.


We put a mark on the plug, bend the resistor and the LED to the desired position, fill the cap from the plastic bottle with hot glue and immerse the resistor with the LED bulb and the plug to the mark.






The backlight itself is ready. If desired, you can paint it with spray paint.

A useful homemade product that will definitely come in handy almost anywhere where there is a USB:

  • At home for illumination: you can connect even to a computer, even to a laptop.
  • Hiking, fishing or hunting: you can connect to an external battery (power bank) and lighting in a tent or on the street is ready!
  • In the car for lighting: now every radio has a USB input. If you make the wire longer, then you can generally use it as a mobile examination lamp.
  • There are quite a few other uses as well.



  • USB cable from any unnecessary charging.
  • A pair of 5-500 ohm resistors - the resistance depends on the brightness of the LEDs.
  • Non-working 220 V LED bulb.



Let's disassemble the light bulb. To do this, pry off the white dome with a flat screwdriver. It is glued on and should gradually move away from your pressure.



We remove the internal board, we will no longer need it, we will have our own.


We make a hole in the base for the wire with a hot soldering iron. You can just drill through.


We skip the wire to power the light bulb.


We now need to assemble a very simple circuit to power the LEDs from USB - 5V.


We do everything on a piece of plastic. My brightness is low, but if you want to be brighter, you need to do everything on an aluminum piece of metal. For better heat dissipation from LEDs. The resistance of the resistors can also regulate the power of the glow of the LEDs, and hence their heating.


We glue our assembled board to the light bulb. Glue on hot glue.


Now we collect the light bulb. Glass can be glued with super glue.


Here's what the finished USB-powered lamp looks like.


And here's how to glow. Almost like the lights before when it worked from 220 V. LEDs can be taken more powerful and larger in number. But in this case, the current consumption will also increase, which may affect the USB load. I made the best choice.

No more slippers in the dark.

Do you like to spend time at the laptop screen, lying in bed, but at the same time do not want to annoy the rest of the family with bright light? Or maybe the screen light flickering in the dark helps you relax and tune in to a wave of rest and relaxation? Then you probably know firsthand the eternal problem of typos made due to insufficient illumination of the keyboard. Having decided to buy a lamp for the keyboard, you will save yourself from this minor trouble forever.

Maximum illumination with minimum power consumption.

USB lamp for laptop keyboard lighting is distinguished by its bright and original design, combined with functionality and ease of use. The power source of this device is a standard USB connector. You can connect a keyboard lamp to your laptop or connect it to a battery to turn it into a handheld flashlight or a mini table lamp. Such keyboard lamps will be an excellent gift for any modern person, making his daily life even more comfortable.

USB Notebook Keyboard Light Features:

  • Materials: plastic, metal, rubber;
  • Creates natural neutral light;
  • Creates a uniform wide illumination;
  • The bendable leg allows you to give the lamp almost any position;
  • Power supply - USB connector;
  • Compatible with any USB devices;
  • Rated voltage: 5V;
  • Rated power: 1.2W;
  • Dimensions: 17 * 1.8 * 0.9 cm;
  • Weight: 18 gr;
  • Available colors: white, blue.

Everyone knows that LED lighting as a decorative element has long been overshadowed by all sorts of lamps and neon lights. The diode device is usually connected to a power regulator, which, in turn, takes energy from the outlet, converts it to the desired values, and sends it straight to the LEDs. A complex and confusing process, isn't it? Someone may protest: “There are probably other methods for connecting a lamp, because if everything was so difficult, LEDs would not have gained such popularity that they can boast of now, because not everyone wants to mess with this design , set it up and devote a lot of time to this process. If you also think so, then you are right. Manufacturers have foreseen this feature of behavior and came up with an LED strip with a built-in USB connector.

USB LED strip

USB LED Strip - USB Pinout

Everyone at least once charged the phone from the USB port of the computer, because it is more convenient when compared with charging from a wall outlet. This fact shows that the USB contacts pass current, which can be used to operate diode bulbs. The usual USB connector in modern version 2.0 devices. It has 4 pins, half of which are used for data transmission, and the other half is designed to power the connected electrical appliance.

You can learn more about USB 2.0 pinout using this picture:

USB LED strip - How it works

The average load tolerance of a USB connector is 500mA current and 5V voltage. Such parameters allow you to connect a whole strip of low-current LED bulbs to the port.

The most important part of the assembled structure is not the LED strip itself, as many might think, but the USB connector, because without it your device will remain an ordinary illuminator powered by voltage from the outlet. You can buy a connector at any electrical goods store or use an old and unnecessary one. Think carefully, you also have, for example, a charger from a broken phone that you have not used for 3 years. Why would it lie idle if it can transform your workplace. Calculate the length of the cable, taking into account the distance between the system unit and the installation site of the future lighting. If we are talking about desktop computers, some keyboard models have an additional USB port built in, which is perfect for organizing LED backlighting. If we are talking about a laptop, this goes without saying: the connector is also located on the side of the device.

USB LED strip - connection diagram

To implement the connection of one LED, you need a mating part of the USB connector, a two-wire cable, a resistor and a diode bulb that can shine brightly (SMD5050 is perfect). If you bought the USB connector separately, take it apart, free the inner part where the pins are located, so that it is easier to solder. Having decided on the type of LED, calculate the resistance of the resistor. This can be done using this formula: R=(U PIT -U LED)/I LED , where:

  • R - resistance;
  • U PIT - supply voltage coming from the USB connector;
  • U LED - forward voltage of the diode, depending on the hue of the backlight;
  • I LED - rated operating current of the diode.

USB LED Strip Wiring Diagram

After the calculation, it remains only to solder all the necessary components together and decorate the backlight, remove traces of soldering, and bring it back to normal. First of all, take wire cutters and shorten the positive terminal of the diode, then solder a resistor to this terminal. The next step is to solder one wire to the free terminal of the resistor, and the second to the terminal of the diode marked "-". Under the heat shrink tube, hide the leads, resistors, mounting and soldering points. To give a decent appearance to the structure, both cables near the LED bulb are wrapped in a thermal tube, it is advisable to find a tube of a larger diameter than the wires. Solder the connecting wire on the reverse side to the terminals of the disassembled USB connector. The cable that comes from the resistors must be connected to the first + 5V terminal, and the cable that comes from the minus of the LED must be connected to the fourth GND terminal. After soldering, check that there are no short circuits with terminals numbered 2 and 3 and assemble the connector.

USB LED strip and where to apply it

USB LED strip. To many, such a process will seem complicated and difficult, so it is easier to choose another path. The power supply of a desktop computer produces the optimal voltage of 12 V, which is present on the 4-wire Molex connector inside the system unit. You will need to purchase a Molex counter with pins and attach to it and to the diode strip a power cable of the required size, which is output through the back of the system unit. The "plus" of the USB LED strip is connected to the Molex with a yellow wire, and the "minus" is connected to a free black wire.

Internet