How To Build a USB Flashlight: A Simple DIY Tutorial

This tutorial will guide you through building a basic USB-powered light with five Light-Emitting Diodes (LEDs). You can expand on this and put it into a casing with a switch to create your very own USB flashlight from scratch!

This project is great for beginners who want to learn about basic electronics and soldering.

The finished flashlight

Materials You Will Need:

  • 5x LEDs (any color)
  • 5x 100 Ω resistors
  • 1x USB breakout board
  • Prototyping board for soldering (for example perfboard)
  • USB power bank (optional) *
  • Switch (optional) **

* You can power this project from any USB port. A USB power bank makes it portable.
** A switch to turn the light ON and OFF can be handy but isn’t necessary to make it work.

How the Circuit Works

This circuit is very simple. Each LED is connected in series with a 100-ohm resistor. This limits the current flowing through each LED to a safe level, preventing it from burning out. All five LED-resistor pairs are then connected in parallel to the 5V and GND pins of the USB breakout board.

The USB Breakout Board gives you access to the 5V and GND lines from a standard USB port to power the LEDs. The D+ and D- lines from the USB connection are not used.

How to Build the USB Flashlight

Start by soldering the USB Breakout Board to the perfboard.

Then solder the five 100-ohm resistors to the perfboard, leaving some space between each. Solder one side of each resistor on the same line as the 5V pin from the USB breakout board. Join them using solder to connect them all to the 5V pin.

From a hole next to the other side of each resistor, solder the positive (longer leg) of an LED. Then make sure the LED pin is connected to the resistor pin by using solder.

Connect the negative (shorter leg) of each LED to the same row as the GND pin of the USB breakout board. Then join them all using solder.

In the image below, I used a protoboard with a special pattern, and I simplified to using just one resistor.

Test Your Circuit

Before connecting your circuit to a USB power source (computer, wall adapter, or power bank), make sure that the 5V is not accidentally connected to the ground pin. Use the Continuity Check of your multimeter to check this.

When you’ve ensured that there is no connection between 5V and ground, you can test your USB flashlight by plugging in a USB cable to a USB source. The LEDs should light up!

USB flashlight working

Taking it Further

Experiment with different resistor values to change the brightness of the LEDs. Keep in mind that using a resistor with too low of a resistance can damage the LEDs. Note that the max current you can pull out from USB is usually 500 mA.

Feel free to use different colored LEDs for a unique look. But if you use same-color LEDs, it’s possible to simplify and use only one resistor of around 500 Ω to 1000 Ω.

Did you make it? Then how about designing a custom PCB for a more compact and professional-looking project?

More Circuits & Projects Tutorials

Leave a Comment