# Charging Lamp



## silentbogo (Dec 15, 2013)

Ok, so it is not a casemod, but casemods are kinda boring...

I have decided to make something cool and practical at the same time.

Pretty recently I have purchased this desk lamp. It looks very cool for a less than $8 dollar item, but it also has some space at the base of it, so I immediately thought of putting something inside 


 

Also I suffer from insufficiency of space in my office, and because of that there is no elegant or even practical way to charge my phone anywhere near my desk. So I've decided to fix this problem by incorporating the universal USB charger (5W) into the base of my lamp. This way I can receive phone calls without the need to run to another room.

The main idea is:
- Disassemble the lamp
- Disassemble the phone charger
- Make an incision in the lamp's base, to have access to USB plug
- Mount charger's PCB inside the lamp and solder it's inputs to lamp's input

So far i found a 35V AC converter inside the lamp. Soldering is very flimsy, so the first thing I have to do is fix it(*DONE*). Also this gives me the possibility to spare my charger and make an "extension" of the built-in PSU.

I have found the perfect 5W PSU on dealextreme. Also they provide female USB connectors, that i require for this project. It is small enough to fit into the base of the lamp and I can solder it to the input V~, bypassing the problem with the power switch.

So, lets begin ...
*TOOLS AND PARTS*
[*] 5W Switching Power Supply
[*] 74.4K , 49.3K , 49.7K and 42.5K Resistors
[*] USB Female Connector
[*] Soldering Iron
[*] Some insulated copper wire
[*] Scisors
[*] Multimeter
[*] Victim-phone w/ USB cable





First things first. Let's figure out how USB charger works.
Of course you need 5V DC to supply power to your device. This will be provided by our Power Supply.
Also we need to tell our phone/tablet that it is connected to the proper charging device.  For this purpose we have to build a bridge to supply needed voltage to data connectors of our USB connector.
Here is a pinout for 5W USB charger and a scheme of the bridge:



 


Of course with my luck I had no such resistors, so I had to replace the whole thing with theoretical equivalent, that outputs 2.043V and 2.755V (which is pretty close to what we need).
These are pretty much all the parts and tools we need. 

 
Once the bridge is put together and soldered to the PSU, we have a working prototype:
 
The initial testing showed that even with slight difference of resistance on data pins charger was able to push close to 850mA. A complete charging cycle took about the same as from the original HTC charger.

This is what my lamp looks like with USB port installed:
 
And the final result with Arduino Nano plugged in:
 

P.S. It's been a while since I've "abandoned" this thread, but it's mostly due to busy work schedule. 
Lamp was finished almost 3 months ago and I've been using it ever since then. It became not only a cool charger that you can surprise(or completely weird-out) someone with, but also a useful workbench PSU for almost all of my small USB-powered devices.


----------



## JunkBear (Dec 18, 2013)

Missing some pictures to explain for people who are not founded on electronics. Also where does the 35vcome from? Cause here all lamps are driven by the wall 120v. Details details gimme mooooreeee


----------



## silentbogo (Dec 18, 2013)

I live in Ukraine, so the input voltage is 220V.
The lamp itself has a built-in Power supply, cause it uses a low-power fluorescent lamp. 
I tested the output voltage with my tester and it shows 35V AC, but the idea of using it is faulty.
The reason why is because the on/off switch is wired to the input and not the output.

I've got more pictures, which I will try to post today. So far I fixed the faulty soldering in the lamp itself and found a perfect solution for a phone charger.


----------



## silentbogo (Dec 18, 2013)

Ordered parts from DX.com. Now it's just the matter of time.


----------



## JunkBear (Dec 18, 2013)

So I will wait for it. It is not same voltage but maybe I could put it to use here. My brother is an electronic engineer so I will ask him for help on similar projects.


----------



## silentbogo (Dec 18, 2013)

The PSU for the phone has an input voltage of  85V~265V, just like any other universal phone charger. 
So it should wokr for you too.


----------



## silentbogo (Jan 12, 2014)

So I have finally got all the parts needed to finish my project. Gonna solder everything together today and update the thread.


----------



## silentbogo (Jun 9, 2014)

Oh crap! It's been almost 6 months since the last update.... Almost forgot that i have started this thing 
Project completed and the final pictures are posted.


----------

