Homemade keyboard backlight. USB lamp for keyboard backlight How to connect an LED to USB

After a store-bought USB keyboard backlight 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) Telephone cable TRP
5) Soldering iron, solder, rosin
6) Scissors or knife
7) Pliers (pliers)

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

You need to solder telephone wires to the white thing on the side that will be inside.
First, you need to cut off a piece of cable of the length you need, 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 by 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 outer pins of the USB plug, these are the power outputs, the middle pins are connected to each other with a small lump of solder, these are the differential information outputs.
In order to solder, you need to preheat the soldering iron by turning it on, 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 previously connected surfaces to be soldered.
It’s good to check with a multimeter in continuity mode whether you have shorted “extra” pins - only pins 2 and 3 should be closed. Using the links given 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 there will be a positive potential, where there will be a negative one.
Then we insert the white piece into the piece of hardware, plug it with a second piece of piece of hardware, and use pliers to crimp the place where the wires come out so that the USB plug cannot come loose.
Light-emitting diode I bought it at the store. I would choose a bright or ultra-bright LED with a luminous intensity of at least 5 candelas. The color is up to your taste, 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 taking into account 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 terminal is the cathode, the longer one is the anode. You can also look at the light to see how the glands in the LED stand, 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 the current) - 5 volts, the current can vary from 0 to 500 milliamps. In theory, if the LED has an operating voltage of U, then we need the remaining voltage of 5-U to drop across the resistor, and the current is operating for the LED (we connect the LED in series to the USB output). Thus, to connect an LED with an operating voltage U<5В и током I<500мА нужен ограничивающий резистор номиналом (5-U)/I. For example, my LED consumes 3.5 V and 0.02 mA, which means I took a resistor of (5-3.5)/0.02 = 75 Ohm. However, there may not be such a specific resistor in the store - then you need to take the first resistor, which is close in nominal 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, you 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 don’t take ceramic resistors instead of regular ones - they are very bulky.
If you have old resistors, you can measure their value using a multimeter, or try to determine the value by color markings using this table:
So, after soldering a resistor to the short end of the wire and soldering the LED (maintaining polarity), you can connect the USB backlight. If the LED starts to shine, then everything is fine, but if it does not light up, gets very hot and after a while a distinct burning smell appears, then you have reversed the polarity and the LED has burned out. If the LED does not light up and there is no burning smell, then most likely you have shorted the information pin with the power pin, or have not connected them to each other - you can open the plug and re-solder it.
The end result is this design:



The cost of this design was only 29 rubles, taking into account the costs of parts, not taking into account the costs of transporting parts and purchasing tools.
It shines well in the dark (7 candelas), does not dazzle the eyes, but the letters on the keyboard are visible.

Tags: electronics, amateur

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

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



  • 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 light bulb.



Let's disassemble the light bulb. To do this, you need to pry off the white dome with a flat screwdriver. It is glued and should gradually release 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 simply drill it with a drill.


We pass 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 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 be used to regulate the glow power of the LEDs, and therefore their heating.


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


Now let's assemble the light bulb. Glass can be glued with super glue.


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


Here's how to glow. Almost like the lights before when they worked on 220 V. LEDs can be more powerful and larger in quantity. But in this case, the current consumption will also increase, which may affect the USB load. I made the best option.

Probably everyone is familiar with the situation when you have to work at a laptop (typing text, or processing other information) in the dark, but for one reason or another you cannot turn on the light.

Something made by yourself will help you cope with this problem. laptop keyboard backlight. Without exaggeration, anyone who is at least a little familiar with electronics and can hold a soldering iron can make it. So, fewer words, it's time to get down to business.

To work, we will need: soldering supplies, a resistor with a resistance of 820 ohms, a ferrite ring (can be taken from any motherboard or computer power supply), a little crossover, heat shrink tube, thick wire, any npn transistor, in my case KT3102, bright White LEDs, you can use standard round ones. Or maybe not just LEDs, as in my case. I had a broken matrix from a laptop, and I used part of the backlight strip from it.

Let's start manufacturing by winding the transformer (if you can call it that) on a ferrite ring. To do this, you need to evenly lay 18–22 turns of wire around the entire perimeter of the ring. You need to wind with two wires at the same time; for convenience, it is better to take wires with insulation of different colors. The end result will be something similar to this:


Next, connect the end of the white wire to the beginning of the blue one. The plus of the USB connector will be connected to this solder. We connect the beginning of the white wire through a resistor (it is necessary to install it, otherwise the transistor will heat up, and the transformer will whistle and nothing will work) to the base of the transistor. By the way, the pinout of the transistor, if you look at it not from the cut side, is emitter base collector. We connect the collector to the end of the blue wire. Later, the minus from the USB connector will be connected to the emitter. The LED strip is connected with a plus to the collector and a minus to the emitter. The design of this homemade lighting device is simple and clear, so I am not attaching a diagram.



All the nuances are visible and understandable from the photo. Other rants about the design of this homemade product - laptop keyboard backlight inappropriate. Everyone will work out the design and construction for themselves. Based on available materials. Don't limit your imagination.

Very often, people who work at a computer, or simply spend their free time on it, are faced with the problem that in order to type any text or message, they have to strain their eyes. At the same time, the lamp standing on the computer desk glows from the monitor, and it is not clear how to make a backlit keyboard. With all this, the main lighting of the room is also blocked by the person sitting at the table.

So is there a way out of this situation? As it turned out, yes.

Do-it-yourself keyboard backlighting, and at a minimum cost, could be such a solution. After all, it’s always interesting to create something yourself, at home.

You need to understand whether it is difficult to make a backlight for a laptop or a backlit keyboard for a desktop computer. How much time and effort will be spent on this?

There are several options for making such a backlight with your own hands, both simple ones, accessible to a person who has never encountered such work in his life, and more complex ones, the manufacture of which requires knowledge of both computer technology and radio electronics. But you should probably start with simpler methods.

Simple keyboard backlight

To make such a backlight you will need:

  • LED strip 64 cm long;
  • power button (with fixation);
  • connector for Krona battery;
  • the battery itself;
  • Matchbox.

You should not buy a Chinese-made battery, because the powered backlight on such a “Krona” will not work for even a day. The LED strip should have a density of 60 or 120 elements per meter.

The first step is to tin the ends of the wires and the button contacts. One of the connector wires must be soldered to the LED strip. The second through the gap with the button - to the other wire of the light strip.

The main thing in this work is not to confuse the polarity on the connector and the tape. The soldered contacts are naturally insulated, the resulting product is checked, and if everything is assembled correctly, the backlight should work. After that, “Krona” is hidden in a matchbox.

After all the work done, you need to remove the protective film from the LED strip and stick it along the edge of the table, with the elements facing down along the pull-out shelf for the keyboard. Also, a matchbox with a battery is attached to the bottom using superglue or double-sided tape. In this case, the button should be at hand.

The result will be a backlight similar to the one in the photo above.

Option for a laptop keyboard

Such a homemade device can be useful for those who like to be alone in a dark room with a laptop. The main thing here is to understand how to make a keyboard backlight on a laptop with your own hands, and the work will already go like clockwork.

The fact is that you can’t put a laptop on a pull-out shelf, and even if you do, the lighting discussed above will be completely useless. The light from it will still not reach the keyboard. Well, making a more complex system by disassembling a laptop to install LEDs under the buttons is not at all easy, and therefore you need to consider the option of getting a USB backlight for the keyboard, mounted on top of the monitor in the area of ​​the WEB camera.


First, you will need to solder LED elements in series with the expectation that the backlight will be powered via USB, which means the voltage that should be used when choosing power and quantity will be approximately 5 volts. The main thing is not to confuse the polarity of the LEDs when soldering. It is advisable to take a resistor included in the circuit with a variable resistance; with its help, it will be possible to adjust the brightness of the backlight.

You can even take a piece of a small plastic bottle as the basis for the lighting - here you can be guided by your own imagination. It is better to place the LEDs soldered according to the diagram (below) in a fan, for a diffused, but always downward-directed light flux for more optimal backlighting of a DIY keyboard.

Well, in the end you need to connect the power to the USB cable. Even if you don’t have a tester at hand, and it’s impossible to check which wires are “plus” or “minus,” it doesn’t matter. It’s possible to find out everything using the “scientific poke” method, connecting one by one the wires coming from the USB connector to the ends of the series-soldered LEDs. And now the USB backlight for the laptop keyboard, made with your own hands and at home, is ready. You can be proud of yourself, because such a homemade product illuminates every key.


LED assembly diagram for laptop keyboard backlight

Option #3 – USB flashlight

This is the simplest option on how to make your own keyboard backlight. To implement this, you will need a bendable metal corrugated part from a piezoelectric home lighter or a guide from a headphone microphone, which will do the same function perfectly. You will also need a USB connector, an LED (by the way, you can remove it from an old laser mouse) and several pieces of wire.

Everything is extremely simple - you need to solder the LED to the wires, pass them through the corrugated part of the lighter or microphone, and at the output solder it as tightly as possible to the USB connector, naturally, defining the power outputs.

This flashlight will shine incredibly brightly, and you can direct it any way you want thanks to the corrugated base.

In general, it’s quite possible to figure out how to make a keyboard backlight yourself, you just need to want to, and dig deeper into radio-electronic spare parts, which can easily be found in any home.

And besides, the experience that comes with understanding how to make a keyboard backlight with your own hands is very interesting and exciting - a completely different feeling than if such little things were bought in a store.


Top