GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - sepandhaghighi/usb-lamp: DIY USB Lamp

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
images
images
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

πŸ’‘ DIY USB Lamp

πŸ“ Overview

A simple and customizable USB-powered LED lamp project for electronics enthusiasts, students, and makers. This guide walks you through building a USB-powered lamp from scratch using basic electronic components. The lamp runs on the standard 5V supplied by any USB port (e.g., from a computer, power bank, or wall adapter), making it a portable and efficient lighting solution. Whether you're just getting started with electronics or looking to add a small lighting solution to your workspace, this project provides a rewarding and educational experience with minimal cost and effort.


πŸ”© Hardware Components

Component Quantity Notes
USB Type-A Male Plug 1 Or a USB cable for easier connection
LED 1 Choose based on your color preference
Resistor 1 See table below for suggested values
Switch Optional For manual control
Heat Shrink Tubing Optional For insulation and finish
Soldering Kit - For permanent assembly
Breadboard/Wires Optional For testing before soldering

πŸ”Œ Circuit

Circuit Diagram

Circuit Diagram

Circuit Schematic

Circuit Schematic

Resistor Value Calculation

To calculate the appropriate resistor value:

$$R = \frac{V_{USB} - V_f}{I_f} = \frac{5 - V_f}{I_f}$$

Where:

  • $$V_{USB}$$ = Supply voltage from the USB port (5V)
  • $$V_f$$ = Forward voltage of the LED (depends on color)
  • $$I_f$$ = Forward current (typically 5–20mA)

Different LED colors have different forward voltage drops ($$V_f$$). Using Ohm's law, here’s a reference table for choosing resistors:

LED Color Approximate Vf (V) Suggested Resistor (Ξ©) @15mA Acceptable Range (Ξ©) @5–20mA
Red 2.0 200 150β€― – 600β€―
Green 2.2 180 140β€― – 560β€―
Yellow 2.2 180 140β€― – 560β€―
Blue 3.2 120 90β€― – 360β€―
White 3.2 120 90β€― – 360β€―

ℹ️ Use the next higher standard resistor if the calculated value is not available (e.g., use 200Ξ© instead of 197Ξ©).

Online Simulation

Simulate and test the circuit online using Tinkercad.

Tinkercad Logo

⚠️ USB Current Limits

  • USB 2.0 port provides up to 500mA
  • This circuit typically draws 15–20mA
  • You can safely power one LED with plenty of margin

✳️ Parallel LEDs

ℹ️ You can connect multiple LEDs in parallel, but each must have its own resistor to ensure proper current limiting.
⚠️ Never connect LEDs directly in parallel without individual resistors, and keep total current below USB limits (<500β€―mA).


πŸ“· Prototype Snapshot

Prototype Snapshot 1

Prototype Snapshot 1

Prototype Snapshot 2

Prototype Snapshot 2


🀝 Contributing

Feel free to fork the project and open pull requests. Bug reports, enhancements, and photos of your builds are welcome!

References

  1. Circuits on Tinkercad

About

DIY USB Lamp

Topics

diydiy-electronicsdiy-projectdiy-solutionsdiy-toolelectronicselectronics-developmentelectronics-projects

Resources

Readme
CERN-OHL-P-2.0 license
Activity

Stars

24 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402792 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.