This instructable is subdivided in 5 parts:

- Planning the construction (Step1)
- The handmade shade (Step2+3)
- The electronic circuit for driving 3W LEDs with the ATmega8 controller (Step4)
- The Code (Step5)
- How to get it stand-alone (flash the Arduino bootloader with PonyProg and burn the sketch) (Step6) coming soon

Vid: Some Impressions

Pic1: The Moodlamp
Pic2: A mighty 3W LED

Step 1: Planning the Construction:

I love to do a concept on just one sheet of paper.

On the first sheet you see some early ideas. "I chose the bottom-right design.

The second page shows some details for the construction.
measurements are experimental like each time, but ok for me ;-)

My hardware thoughts were:
- Can I handle the materials?
- Will the light shine through the shade?
- What proportion should it have?
- How many knobs and pots will I need for a simple interface?

My software thoughts were:
How many different functions should the lamp have?
- Automatic RGB fading with changeable speed
- Manual color adjustment
- White with adjustable brightness

Hello, great instructable, I don't plan on copying your circuit completely and I have my own lamp design in mind, but I was wondering what type of power transistor did you use?<br>Thank you
Hi, and thanks for your interest. <br>The lamp was my first experience with powerLeds and in the meanwhile I've found some smarter solutions to drive these leds. <br>I recommend you to use the MC34063 switching regulator as mentioned in this article: <br>http://translate.google.com/translate?hl=de&amp;sl=auto&amp;tl=en&amp;u=http%3A%2F%2Fwww.mikrocontroller.net%2Farticles%2FKonstantstromquelle_fuer_Power_LED<br><br>In Germany I can get it for 0.27&euro; and the additional parts are available for cents. <br><br>I hope you can get it to work!<br>Regards, <br>jo
I just wanted to say thank you. I looked through at least half a dozen other RGB LED lamp instructables, and yours was the most helpful while I was designing my own lamp. Thanks!
hi and thanks for your feedback!!
im sry this is the noobyist question ever but when it said ground on the schecmatics just attach it to the ground on arduino? and while im on here on the video you had a big silvery grid thing attached to the transistors, what the heck is that is it importiant. and one last question on the top right of the shcematis where u said the button is there is a a little wire right next to it that looks like its suppose to be attached to it. is it? tyvm
oh iom so sry i didnt see and
u say that theres 3 pots but below there is a symbol for 6 (im not trying to correct you on your own circet i want you to correct me) (circled in red)
I said there are 3+3pots. three on PWMpins to drive the leds, three on AnalogInputPins
ok i got one more question sry ='( . why is there 6 potentiometers on the diagram and 2 in the vid.(im so sry this is my last question i got everything else together)<br/>
There are 3 pots for the transistor-drivers and 3 as "interface" with a switch to change the mode. .......--> each mode has it's own pot. ................(moodMode--> changeSpeedPot) ................(hueToRGB--> change the color valuePot) ................(fullRGB_white--> dim the lampPot) regards, jo
thanks for helping me and im only 13 so no i havent rly worked with stuff like that i think i can work off all the stuff u gave me. ty agin
thank you so much for putting up with my amature questions and ill try to stop burdening you and just put it together as the schematics sais(lol). just one thing is i dont know the numbering/abriviations(like:pb7) on you picture. the numbering skips from 1-6, 20-27 stuff like that. so can you edit it or something to make it look like a real arduino.if thats to much i understand and ill try to look up the abriviations.
OK, I don't know how familiar you are with electronics, especially with programming the Arduino and handling electronics.<br/><em>have you ever worked with a controller-board or electronic components like transistors and LEDs??</em><br/><br/><strong>Here you have some links:</strong><br/><br/>All the information you're looking for<br/><a rel="nofollow" href="http://www.arduino.cc/">http://www.arduino.cc/</a><br/>just look for some details on &quot;connecting to hardware&quot; and look at some tutorials on &quot;learning&quot;<br/><br/>Here you see the pinout of the chip, compared with the pinNumbers on the board<br/><a rel="nofollow" href="http://arduino.cc/en/Hacking/PinMapping168">http://arduino.cc/en/Hacking/PinMapping168</a><br/><br/>The platform is open source and I like that way of thinking.<br/>If I can help you with your problem, it's just great.<br/><br/>GoodLuck,<br/>jo<br/>
/*<br/>Here you get a simple loop for fading a led smoothly by trigonometric calculations:<br/>Take any led you got and put it into digitalPin9, which supports PulseWidthModulation (to fade the led) take the other electrode of the led and put it through a resistor (about 100...500ohm) to +5V or GND<br/><br/>...Purpose: Fading a Led<br/>Language: Arduino0012<br/>...... Author: nejo0017<br/>..........Date: 2009-03-03<br/><br/>For details on the Code: <a rel="nofollow" href="http://arduino.cc/en/Reference/Extended">http://arduino.cc/en/Reference/Extended</a><br/>*/<br/><br/>///////// the Arduino supports 8bit PWM on 6Pins:<br/>int ledPin3=3; // connected to the red led<br/>int ledPin5=5; // connected to the green led<br/>int ledPin6=6; // connected to the blue led<br/><br/>int ledPin9 = 9; // red<br/>int ledPin10 = 10; // green<br/>int ledPin11 = 11; // blue<br/><br/>void setup()<br/>{<br/>// nothing for setup<br/>}<br/><br/>void loop()<br/>{<br/>FadeLed(ledPin9); // calling the function<br/>}<br/><br/>void FadeLed(int led) // create a function and give it the led as parameter<br/>{<br/>int value;<br/>for(int i=0;i&lt;360;i++)<br/>{<br/>value = 128 + 127*(-cos(i*PI/180));<br/>analogWrite(led,value);<br/>delay(10); // wait for 10 milliseconds<br/>}<br/>}<br/>
i am so sorry but i inspected your diagram and i was wondering what this symbol ment. i couldent find it in the enternet
this is a switch for the reset. the schematic is (beside the oscillater circuit) complete to run the bareBoneVersin in the Moodlamp.
hi thank you for taking you time to explain all that. but yet i am a amature and didnt understand a word so if you could just answer my questions: is there one rgb led or 3 leds or whats going on there. (circled in red) why is there 2 extra leds (to the left and to the botton) (circled in orange) ok im amature a noob w/e so what is vcc ( black) and how and why are there so many grounds(agin im a amature) (brown) ty, i put it from most importaint to least and the things are cxircled below in the picture.
Hi, I'm also a noob ;) But anyway I'll try to explain my thoughts: When you look on the previous pictures, you see 3 leds on the PNP transistors, one as power indicator and one as debuggingLed, connected to pin13 on my selfmade ArduinoBoard. The RedGreenBlue Leds are connected with their Anode to +5V (vcc) and the Kathodes are connected through the transistors on GND (vss) If you connect +5V to the Collecter (C) and GND to the Emitter (E) of the transistor, nothing happens. If you connect +5V to the Base (B), you got a short circuit. Now you put the Led between Vcc and E, the Led burns. The voltage and also the Current should be constrained. I do it with a simple resistor calculated with the right value for enough current(I figured it out with a potentiometer and a amperemeter :). As I've written before you could learn a lot from the instructables about "constant current sources", but my solution is just about 40ct and works great. vss: voltage source (Ground (-)) vdd: voltage drain (+) vcc: voltage common (+) vo: voltage out As you can see, I used 3 leds with 3W, but usually I use common anode RGB leds from Dealextreme (keyword HongKong) Do you have a current project you're working on? If you'd send me a picture I could tell you where to solder the wires ;) Regards, jo (there are many nice things to do ;)
im sry the picture was messed up in my computer. but it would be nnice if you still could add a instructable
The electronics are very cheap and easy!<br/>I didn't use a constant current source, just some PNP transistors to get enough current.<br/>To limit the current I inserted a resistor between the Arduino and the base.<br/><br/>Collector: GND<br/>Base: ArduinoPin - resistor - Base<br/>Emitter: LED Cathode<br/><br/>The LEDs Anode is connected to 5V,<br/>The next step was to connect the cathode through a PNP transistor on GND.<br/>I used a Pot and a amperemeter to get the right current from the datasheet.<br/>I think it was around 1000mA.<br/>After getting the right current and brightness I checked the resistance and replaced it with a resistor.<br/><br/>That's it....... Very simple and not professional, but it works very good.<br/><br/>I hope the info was enough....<br/>If you want to learn more about LED driving circuits, see this Instructable:<br/><a href="https://www.instructables.com/id/Circuits-for-using-High-Power-LED_s/">https://www.instructables.com/id/Circuits-for-using-High-Power-LED_s/</a><br/><br/>Regards,<br/>jo<br/>
i dont rly get the circet. i mean to the right side you have a led just with a wire sticking out. and whatnot. so can you like make a instructable on the electronics ty
Very Very Nice outcome, love the power your getting out of the 3W LED's<br/><br/>Check mine : <a rel="nofollow" href="https://www.instructables.com/id/Arduino_RGB_LED_Lamp_4bit_LCD_Display/">Arduino_RGB_LED_Lamp_4bit_LCD_Display</a><br/><br/>Not using 3W RGB LED's but still effective, great outcome. Question for you. Are your 3W RGB LED's common Cathode? <br/><br/>I recently bought some 3W RGB LED's but there common Anode <br/>
hi, I'm approaching to arduino, and this is a very cool project to start (also as gift for my wife!) i'd like to see the code, if you can please publish it! thank you giorgio
hi giorgiodidon, I've just included the code. If you use it, just comment the functions you don't need. For a first test I would just uncomment the "Moodlamp();". If you set DEBUG to 1, the data will be sent via the serial-connection to the Arduino IDE. Regards from Germany, nejo
Forgot to add, my SMS1.tgz package requires SimpleMessageSystem from arduino.cc, but (as proof of concept) it's easy to modify for your choice of microcode. Highly commented/self-documenting.
If you use linux, get my package of shell scripts for controlling this, from <a rel="nofollow" href="http://user.cavenet.com/rolandl,">http://user.cavenet.com/rolandl,</a> named SMS1.tgz. Modular/expandable, can handle as many Diecimilas as you can plug in to your USB ports. Full IO and PWM control for LEDs or whatever, from keyboard, or GUI (via xdialog), or scripts. AD is scaled to mV and formatted for import to most spreadsheets. Easy to modify to suit your needs.<br/>
really nice :) got the code? and a bigger pic of the curcuit ;)
VERY cool project.<br/>Nicely documented too.<br/>Special &quot;bravo&quot; for clear and properly scaled macro photos.<br/>Solid 4 out of 5 stars for this!<br/><br/>before the questions begin...<br/>&quot;I clinched for the bottom-right design.&quot; = &quot;I chose the bottom-right design&quot;<br/>&quot;The measurement is <strong>virtuosic</strong> like each time&quot; = &quot;measurements are experimental&quot; (where DID you find that word? :-)<br/>&quot;I found a square meter from 1mm clear plastic sheet in a hardware store.&quot; = &quot;I found a 3 foot x 3 foot sheet of 30 mill plastic at the store&quot;<br/>&quot;The plastic can be cutted with a sharp knife.&quot; = &quot;Use a sharp knife to cut it&quot;<br/>&quot;After cutting i grinded the sheets with sand paper&quot; = &quot;I frosted the plastic using sandpaper&quot;<br/>&quot;All the plastic should hang on a windy construction of threaded bars from brass&quot; = &quot;Mount the plastic shades on the threaded brass supports&quot; (I think)<br/>&quot;I drilled some holes and wormed them to get the M3 threaded bars fixed&quot; = &quot;I drilled and tapped the holes to match the 1/8th threaded bar&quot;<br/>&quot;meantime I made a little plate from alloy&quot; = &quot;meanwhile, I made a heatsink&quot;<br/>&quot;The plates were breaknecking clamped into my lathe.&quot; = &quot;The discs were chucked in the lathe.&quot;<br/>&quot;Afterwards I bate it with &quot;mahogany-wood-stain&quot; to get a fine color out of the pinewood.&quot; = &quot;Afterwards, I stained it with a mahogany wood stain so the to make the pine look good&quot;<br/>&quot;I decided to make a grinded circle from the shade-material, nailed on the wood, with a microRGB-LED to light it up&quot; = I decided to make a base using the same frosted plastic as the shade, and backlight it with a RGB microLED.&quot;<br/>&quot;my shematic&quot; = &quot;my schematic.&quot;<br/><br/>

About This Instructable




More by nejo0017:Arduino Prototyping Shield on the cheap Handcrafted Arduino-powered RGB Moodlamp The becoming of a bonded hand 
Add instructable to: