Dimming Control For An Ikea Solar Desk Lamp

[Frank] decided to augment his desk lamp’s features by adding dimming controls (translated). Since the light source is a triad of LEDs the best method of dimming their intensity is to use Pulse Width Modulation. That’s the method that he went with, and luckily the SUNNAN lamp from Ikea which he’s using as the donor for the project has just enough room to squeeze in the parts necessary for this hack.

You need two main bits to use PWM with a lamp like this; a microcontroller (or possibly a timer chip like the 555) and a transistor to protect that chip from the current necessary to run the LEDs at full brightness. [Frank] went with an ATtiny13 and a 2N2222 transistor, both quite common and very inexpensive (you can even pull the microcontroller from a light bulb if you know where to look). Two buttons were added to the top of the lamp base which allow for up and down controls. There’s even an SOS function which is triggered by pressing both buttons at the same time. [Frank’s] happy to show off the completed project in the clip after the break.


15 thoughts on “Dimming Control For An Ikea Solar Desk Lamp

  1. I have a couple of these lamps,
    as superlopez, I use them for soldering, and drilling.
    Based on the performance over 2 years, I think it’s better to take the LEDs out, and use them on stable power supply.
    The battery pack could be a good source for a low power MCUs on a wireless sensor network.
    Anyway, great hack and it’s great to start seing SUNNAN hacks.
    Do they still cost 15€?

  2. Pretty cool hack.

    @H3LIO: I had the same question, what I learned from a bit of googling is that varying the current with a pot can cause problems at lower levels for leds such as colors not appearing correctly or one of the leds not illuminating at all. So pulsing the led is apparently the preferred method of dimming.

  3. I find it hilarious that Americans (me included) make fun of people from other countries for their accents and “poor” English.

    I doubt more than 20% of Americans can speak another language, while the vast majority of Europe and Asia speaks, at LEAST, two languages.

  4. @pff: I have two of these lamps they are surprisingly bright. And also have great beam specs, projecting a perfect spot from edge to edge.

    I also considered adding a power supply to them all though that kind of defeats the object of the lamp being solar powered!

  5. Adding external power would lend an alternate charging method for times of bad weather.

    -or the long winter that is apparently coming on Game of Thrones, but I digress…

  6. kudos on the build. I’m in the old pot crowd. What are you guys doing that colors have to be so “true” and stuff? I’m sure that you all have legitimate uses outside of resistor bands (why can’t the companies all buy paint from one supplier? lol) and tanning caps or controlled growing of plants. I guess I’m lame but I’ve had the same magnifying lamp I found in a dumpster leaving work @ uni. It is a leviathan, like something Captain Nemo would have drunken sex with. Perhaps he could’ve used the braided power cord for autoerotic things whilst the leviathan sleeps. I have always felt lucky to have found it though.
    I also have these cheapy Orbital/Pee Wee Herman-style headlight glasses things that I switched out the lamps on to a coupla scavenged high(er) grade ones from flashlights. Because of their design, they can be used with kroger reading glasses quite awesomely for “gettin’ in there like swimwear” where the lamp fights your soldering iron lol.
    I’m pretty cheap though as I do electronics as one hobby of many and am cursed with a loving family with absolutely NO idea of what gear would make good gifts lol. The Orbital glasses are an exception as dad got those at a fishing shop originally and promptly dropped into the water that night lol so here fix it. Another possible exception would be the Lego Technic kit of the gocart that I got 5 xmases straight lol. So many yellow hole bars…

    my 2c and csbs. Anyone else have similar cheapo finds?

  7. @strider_mt2k lol. I still have a coupla extras ;) I’ve always been thankful my parents “tried”. Sometimes I just wish we had been in a little more cosmopolitan area (didn’t have to drive 2 hrs to get to a mall or Kmart back then), but I never had a shortage of love or (bad) ideas lol. That and my friends from the trailer park a mile down the road were allowed to ride their bikes on the road and would bring me stereos and tape decks to disassemble from the dumpster. I remember making a cable car outta an old tape deck when I was eleven that used the auto logic contorls to move around the string (FFWD would launch it off the other end lol). But yeah, sometimes I get very frustrated making do with the gear I have and the anecdotal education I received in electronics thru that dumpster lol. It also keeps ya creative, like the 300th thing youve made outta that gocart set lol. Cheers and if you have been good this year, remind me at xmas and I’ll literally send you one of my old kits.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.