Introduction: Make a Portable Usb Powered Led Lamp
I'm going to show you how to build a bright and cheap portable usb led lamp that you could use while doing multi purpose jobs. It's always useful to have a spotlight for example when soldering, when working on your motorbike, or when doing your favourite diy things. This device will be powered by an usb power bank so that you can take the lamp everywhere having a spotlight even when electricity is missing, and will be controlled by two buttons: power (on-off) and brightness (on-off).
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: List of Materials
- 59 x bright white 5mm leds (1.50€ on ebay)
- 59 x 100 ohm resistors 1/4W (2 € on ebay)
- 1 pcb prototype board 150mm x 100mm (2€ on ebay)
- 1 pcb female usb (stripped from an old device)
- 2 pcb spdt switches (on - on)
- long thin wires
Step 2: Electronic and Schematic
The lamp will draw 500-600 ma when bright switch is off and 800-900 ma when the bright is engaged, so the power bank - or generic source - must provide at least 1A of current. Laptops provide 500ma on each usb2 port and 900ma on each usb3 port, so if you want to plug the lamp in your laptop you have to be careful and in the case modify the schematic in order to lower the current draw of the lamp.
The white led has a forward voltage of 3.5-3.6V, so it's not possible to make a series of leds in a single rail because (5V - 3.5V) = 1.5V which isn't enough to power up a second led, so we have to set all the leds in parallel and we need to compensate that 1.5V with a load resistor. The value of the resistor determines the brightness of the leds: the lower the value the brighter are the leds, but if the value is too much low the leds could die. The typical current draw for a led is 20ma, but we can push the draw down to 15ma so that the batteries last longer. Now having the voltage (1.5V) and the decided current draw (15ma = 0.015A), we can calculate the value of the resistor applying the formula [Resistance=Voltage/Ampere], so (1.5V / 0.015A) = 100 Ohm which is the value that we need for our resistors. From the formula [Power=Voltage*Ampere] we know that each resistor will dissipate (1,5V * 0,015A) = 0,0225 Watt, and we can safely place a 1/4W type resistor. With the same logic we can calculate the power of the led: [Power=Voltage*Ampere], so (3.6V * 0,015A)=0,05 Watt.
Each rail made up by a led plus a resistor would have a power consumption of (0,022W+0,052W) = 0,074W, and this value is the key to know how much rails could power up our power bank: if we know that our power bank can provide up to 500ma at 5V we have a (5V * 0.5A) = 2.5 Watt source, so the maximum number of rails would be (2.5W / 0,074W) = 33.7; since my power bank provides 1A, i can power up a maximum of (5W / 0,074W) = 67.5 rails.
Now we only have to decide the number of leds when the device is all light up and when the brightness is off (disconnecting a certain number of leds from the supply). In my configuration i decided to have a total of 59 leds, and when the brightness is off just 35 are actually working. This way when brightness is off, 35 rails will dissipate (0,074W * 35) = 2,59W which are (2,59W / 5V) = 520ma, while all the 59 rails will dissipate (0,074W * 59) = 4,36W which are (4,36W / 5V) = 870ma.
Step 3: Construction
just follow my schematic and create the matrix of leds in this way:
- first row with 7 leds
- second row with 6 leds
- repeat until you have placed all of your 59 leds disposed on 9 rows.
Then place all the resistors in the back of the pcb: this way the lamp will look 'prettier' leaving all the mess behind ;) the horizontal space between each led is 7 holes, while each row has a gap of 2 holes. leave disconnected pins 2 and 3 from the usb plug and just consider pin 4 as +5V and pin 1 as ground.
Step 4: Powering Up and Testing
Check for shorts: there're hundreds of soldering points, so be sure to keep everything clean. To check the draw of the lamp i used the usb charger doctor (bought from ebay for 5€), and you can see that the ratings are pretty close to our calculations. There are many factors why the ratings aren't exactly those of the calculations: first of all i used 5% precision resistors and the real value of the resistor oscillates between 95Ohm and 105Ohm, then each led has a real forward voltage between 3.2V and 3.6V. Anyway we're under the power bank limits (1A) and that's fine.