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.

Comments

  1. pff says:

    solar led desk lamp
    dimming

    serious? is it that bright?

  2. superlopez says:

    SUNNAN lamp are great aid in soldering, light just in the place needed and without cables.

  3. fco says:

    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€?

  4. UltimateJim says:

    No, I don’t know, y’know? Y’KNOW!?

  5. H3LIO says:

    Why dont you just had a POT.

  6. adam outler says:

    Great hack to turn a cheap lamp into a high quality one.

  7. tenfingers says:

    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.

  8. Nick Short says:

    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.

  9. Doublet says:

    @Nick Short
    I live in Belgium and I speak Dutch (native), English (learned myself and at school), French (learned at school) and learning German at school.

  10. Grovenstien says:

    @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!

  11. strider_mt2k says:

    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…

  12. fartface says:

    Actually best method of diming is a switch to switch out one or more led’s. Far better at conserving the limited battery power than PWM.

  13. blue carbuncle says:

    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?

  14. strider_mt2k says:

    Dude.
    Some of us didn’t get that technic go cart kit at all.

    (sniff)

  15. blue carbuncle says:

    @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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 91,297 other followers