Download as PDF

As I play around with stop motion I have become aware of the limitations imposed by using a single lamp to light the scene. Using a single lamp with no control over the brightness or colour doesn’t make for very exciting lighting. So I purchased a couple of simple portable LED desk lamps off Banggood with the intention of using them as fill lighting and coloured lighting with the addition of cellophane across them. I was also keen make the brightness adjustable.

The lamps were Banggood’s “Portable Folding LED Reading Light Rechargeable Table Study Desk Lamp” which is a folding design, has two levels of brightness controlled with a switch, and incorporates a 600mAhr rechargeable battery. Supposedly it could run off 240V AC, but having had a few similar appliances make popping noises and stop working when AC was applied, I don’t have much trust in running the thing on AC. With such a cheap product I also had little trust in the battery being charged properly. I may be being paranoid but because I had intended to modify them anyway they were ideal candidates for this project.

The original LED lamps
The LED Lamps before their modification.

Taking these considerations into account I decided to remove the battery entirely and make a system that was entirely DC and capable of using any low(ish) voltage DC supply; whether that was from a wall transformer, or a battery.

In the end the who LED controller came down to a simple LM317 circuit which was pretty much the standard arrangement with a potentiometer an a wire wound resistor on the output. I certainly can’t claim to have done any real design on this other than find some suitable resistors to achieve an output voltage range that worked well with the LED array.

Note - June 2024: This really is an appalling hack. The proper way of doing a dimmer for LEDs is with Pulse Width Modulation and a 555 chip. I have since made such a device and you will find this post here.

LED Brightness Controller Circuit
LED Brightness Controller - It’s really just the standard LM317 circuit with a variable resistor and output resistor. Click on the image for a larger view.

In the end the 330Ω resistors and 1kΩ potentiometer give a voltage output range between 2.5V and 6.4V. To achieve this efficiently the best battery option is a two cell LiPo with a terminal voltage around 7.4V.

The battery removed from the original arrangement was a small black plastic box with no markings on it other than “YG170307Y “ I couldn’t find any specifications for this battery but I came across the company Zhejiang Yonggao Battery Company Limited who make dry cell batteries. I figured it probably came from them and so was probably a NiMH battery. My computer controlled battery charger confirmed this. The addition of a connector means I can now use these batteries with the LED lights or on other projects.

Staying with batteries, an advantage of using an external battery, particularly lead acids is that it can be used as an emergency lighting solution. In an earthquake prone place like Wellington, that’s useful. The modified LED desk lamps can now be run from lead acid batteries which can be recharged using solar battery chargers.

Here are the layouts I used.

Stripboard Layout

Stripboard layout for the LED Desklamp hack
Stripboard layout with the capacitors and large resistor moved to show the smaller components. Click on the image for a larger view.


Perfboard Layout

Perfboard layout for the LED Desklamp hack
Perfboard Layout. The connections between the components are marked as colour blocks. Click on the image for a larger view.


Cooling

Running the LEDs off a 12V battery for a while caused the LM317 regulator to get moderately warm so I added a heat sink to the back of the LM317 and opened a few holes in the light’s foot to allow air movement through it. This was effective is reducing the regulator’s temperature.


I threw together a quick stop motion animation to demonstrate the light’s variable brightness. I apologise in advance for the high speed of the action. I need to work on my timing I think.

*Spy vs LED Desk Lamps*