led mood lamp

Introduction

After making my pyramid mood light with 12 high power leds, i decided to make a bigger and better version, without the emphasis on the low budget.. After all, the pyramid mood lamp was more of a proof of concept with its shortcomings. I wanted the new mood lamp to be more powerful, so it could also be used in daylight conditions. I did this by using a z-power 3 watt RGB power led. This one led is far more powerful than the 12 ones combined i used before. The colors also mix better because of the wider opening angle and because the rgb chips lay very close together. But you better see it for yourself (please note: all foto's are clickable for a biogger version):

pink       blue

green       yellow

red       azur

Offcourse a video says more than pictures, so here you can see the different operation modes.

I also was not that satisfied with the diffused look of my previous led lamp in the shape of a pyramid. I had to use sandpaper to transform the transparant plastic casing into a diffused one, but when you look closely you could still see some areas weren't as diffused as others. And so beginneth my quest for a bigger casing which had to be already diffused...

And i found the perfect housing! Behold: the Mylonit table lamp from Ikea.

Mylonit lamp from Ikea

They come in two sizes: 31 and 45 cm high. Offcourse i bought the biggest version. Funny thing is Ikea already offers this lamp in different colours. But they all can only light up in one color, the lamp i made can take all colors of the rainbow.

Parts You Need

Here is a list of the components i used for making the led mood lamp.

  • 3 NPN transistors capable of driving 500 mA, for example the BC337
  • one PIC 16F628(A) and a programmer
  • a small perforated circuit board
  • some 1 watt resistors (5, 10 and 15 Ohm) and a DIP switch
  • a power supply (5 volts, 1000 mA)
  • Ikea Mylonit lamp
  • silicon paste from your local DIY shop
  • one z-power 3 watt rgb led
  • a little heatsink and some cooling paste

Because i now use the 3 watt z-power led, i couldn't use batteries anymore. That's why i bought a small power supply.
Update: a lot of people ask me where to find that led, so here you go.

General Layout

Here you see the z-power led mounted on a heatsink i took from an old video card. I drilled two holes and two screws hold the star shaped led in place. To conduct the heat better i used some left over cooling paste that came with my cpu. A smaller heatsink would suffice as well, but i had this heatsink gathering dust in my closet, so...

closeup of led       led mounted on heatsink

To avoid a shortcircuit i first dipped the screw heads in some silicon paste and left it to dry. If you take a closer look at the power led, you can see the 3 individual chips for the 3 colors. This led is so bright it's almost impossible to look directly into it. Then i started building the circuit after calculating the values of the resistors. I changed the calculated values a bit by maxing each color out and looking at the color of white it produced, as i'm not a such a fan of cold, blueish white.I like a warm tone better. This was how my test setup looked like:

test setup

The Circuit Board


Once everything was working like i wanted i soldered it all onto a small circuit board.

circuit board

I cut off one corner to get a better fit in the area under the lamp. This is the schematic i used:

electronic circuit

All i needed to do now was pasting it all together to the lamp and soldering the 4 wires from the led to the circuit board.

closeup of led       led mounted on heatsink

Programming The PIC 16F628 Microprocessor


I have used most of the code of my pyramid lamp again, but i changed some bits (litterally). Because i now have 4 switches (the one for switching the lamp on and off isn't used anymore, now i use a power supply) i wanted to add a random function. So you still have the fade and jump to different preprogrammed colors modes, but these modes now also work with random colors calculated on the fly. All of this combined with one switch to choose between two different speeds and another one to pause at any color the lamp is showing that moment.
Update: Here is the source code along with some guidelines to program the pic.
Update 2: It isn't that hard to program the pic. I uploaded the hex code to the pic with this very simple pic programmer and a program called ic-prog.

Conclusion

I am really satisfied with this lamp. This was what i was aiming for when i first got the idea of building my own mood lamp. I think this version definitely deserves the title 'mood lamp'  because it can light up a whole room with its colors. On the left you can see the lamp still shines strong with other lights on and on the right you can see the effect when all other lights are out. In the back you can see the pyramid lamp i made earlier.

closeup of led       led mounted on heatsink

Comments

Scott
05 Sep 2006, 18:25
Very nice…I made a similar lamp.

I used single 5mm RGB (20mA) LED so I didn’t have to worry about heat. Not as bright as yours… but almost too bright to be used as a nightlight.

I’ve placed mine in a small candle holder. To diffuse the light I loosely packed in some cellophane (I think from a CD wrapper).

Cyen
05 Sep 2006, 19:13
Very Cool! Congrats for getting picked up on the MakeZine Blog. You should think about marketing this. I'd buy this lamp in a heartbeat because I don't know how to do all the electronics. Nice.
ealex
05 Sep 2006, 19:22
These would sell like pancakes, nice job.
oscar
05 Sep 2006, 19:41
The <a href="http://www.thinkgeek.com/gadgets/lights/5acf/?cpg=froogle">Mathmos tumbler</a> is the commercial version of this lamp. Very cool, but seriously overpriced if you ask me.
Jesse
05 Sep 2006, 22:18
Great Job!

I'd love to see this with a remote for controlling on/off, mode switch, and color pause.

Joost Meijer
05 Sep 2006, 22:37
When I first saw the picture of 'your' lamp I ran to my livingroom immediately, I though someone had stolen 'ours' :) We have the same exact IKEA lamp, with a circuit and 18 leds build in to make it glow in the most beautiful colors. Also, it is attached through a serial connection with a NSLU2. It checks our email, when I have email the lamp burns blue, when my girlfriend receives email it's red, when we both have email it's purple. Great way to see if there's any new mail!
Darrel Anderson
06 Sep 2006, 07:35
Awesome!

Any plans to post the code? I would be very interested but haven't coded for micros yet...

Thanks for sharing!
Toon Beerten
06 Sep 2006, 11:09
Thank you all for your comments.
Because many people ask me i'm planning to sell a few lamps on ebay, so stay tuned if you're interested.

@ oscar
That Mathmos Tumbler looks more like my pyramid lamp. From the photo's i've seen it isn't that bright and is much smaller then this lamp. I like my lamp better. :)

@ Joost
Funny we used the same ikea lamp. It's indeed an inventive way to see whether there's new mail.

@ Darrel
Code is available upon request via mail. The source code of my pyramid lamp is already available on that page.
Miikka
06 Sep 2006, 11:42
I would like to take a look at that source code.
jongwon
06 Sep 2006, 11:43
Very cool I'd buy this lamp in a heartbeat because I don't know how to do all the electronics

http://funwebblog.blogspot.com
MichaelE
06 Sep 2006, 11:52
Very cool... To the guy with the NSLU2 version: Why not code a sound transducer into it using a USB Microphone and then use the recieved sounds to alter the lamp's display modes... Sort of like a physical manifestation of the Visualization tools that come with the media players....

That way the lamp would become interactive with the ambient environment! ;-)
Chris Gray
06 Sep 2006, 12:33
That lamp looks awesome, can't wait for the ebay auction. Perhaps consider ebaying everything but the lamp itself? I don't like the chances of glass making it safely to Australia. ;)
David BéCé
06 Sep 2006, 12:39
Kudos to you.

MIT has an "intelligent" lamp which changes color based on information gathered by radio. They published info and selle the dedicated chip.

Nazbatag is the name of a commercial product rabbit-shaped, which does the same on wifi.

@Joost Meijer
do you have any plan on publishing your work ? (schematics + code) I'll be delighted to have such a lamp, but i don not have the skills for the electronic part.
Harald
06 Sep 2006, 12:46
nice one :)

i made something similar, with the glassball Fado from IKEA

http://www.haraldschmid.net/images/rainbow/moodball.html

;)
billythekid
06 Sep 2006, 13:28
I would be willing to have sex with someone if they make me one.
tom
06 Sep 2006, 13:52
I dont have a pic programmer, any plans on just selling the board w/ components?
suraj
06 Sep 2006, 14:07
Very nice N cool , Congrats for getting picked up.
TomTheToad
06 Sep 2006, 14:08
I just the new version of this lamp with supersensitive infrasound detection from Ikea. Really cool range of colors. When my girlfriend has an orgasm it glows bright red.
...................
..............
When my wife found out I had a girlfriend it turned super green.

What a smart lamp.
Jhon
06 Sep 2006, 14:17
lol, very nice project. how mcuh would it be for you to work on one for me?? E-mail me if you are interested. :)

cheers
Henk
06 Sep 2006, 14:19
I admire anyone that can handle stuff like that
http://www.htw-dresden.de/~s51188/images/rainbow/sockel3.jpg
and not go crazy.

Just looking at those pictures made me a little dizzy :D

Would really like to have a lamp like this though :)
admirer
06 Sep 2006, 14:24
very cool!

makes me want to get that radio shack book on basic electronics down off the shelf

but since that ain't happenin' anytime soon

couldn't you just sell some on ebay?

good work!
Toon Beerten
06 Sep 2006, 15:11
@ Miikka

Send me a mail for the source code.

@ MichaelE

I also thought about the possibility to let it change to music using some sort of Fast Fourier Transform. So bass drums would let the brightness change, the mid tones would alter colors and high tones would alter the speed.
Maybe something for my next lamp...

@ Chris Gray

Selling it without the glass wouldn't be good either because then the buyer has to glue the led and circuit board and then still has to solder 4 wires.
In the case it should break, replacements can be found world wide at your local Ikea shop. :)

@ David BéCé

That Nazbatag bunny is indeed cool. :)

@ Harald

Your moodball looks good too. Funny that you used an Ikea lamp too.

@ billythekid

Just plain cash will do.

@ tom

Look at my other pyramid mood lamp site. There is a link to a very simple pic programmer.

@ Jhon and admirer

I can't make one for everyone who's interested. (except for billionaires)
That's why i will sell a few on ebay shortly which i will post on this site when it starts.

ccc
06 Sep 2006, 15:12
<i> billythekid
06 Sep 2006, 13:28
I would be willing to have sex with someone if they make me one.
</i>

I'd be willing to have sex with someone even if they DIDN'T make me one.
Ryan McLeod
06 Sep 2006, 15:36
I love it, I bought a set of three "mobo"s which are frosted plastic balls that do the same, but not as Beautifully as yours. I would kill for a tutorial on just the chip and how to program the micro.
brandon.rome
06 Sep 2006, 15:41
Could you maybe have a mailing list to notify people when they are on ebay? While I'd love to make this, I don't have the time or proper tools. Not to mention I'm sure I'd break it 50x in the process.
Jordan
06 Sep 2006, 15:54
I would love to know if you are going to sell a few of these. Please let me know when you are going to as I'd love to buy one!
jayOh
06 Sep 2006, 16:26
another buyer right here. can't get that geeky with it, but would pay anything reasonable for it!
Dan
06 Sep 2006, 16:55
You should look at the 16f7x7 PIC I used it with a similar project because it has three 10bit PWM hardware generators. The color fade on it is beautiful. I wrote my code in basic but if you like I'll email you the random color generator code.
Zang
06 Sep 2006, 16:55
I'd like to build the lamp myself, but I'd rather not go through the hassle of getting a programmer and burning that PIC 16F628(A).

Any chance you'll be selling just the programmed chips on ebay?
john smith
06 Sep 2006, 16:58
Where did you buy the z-world RGB LED?
Russ
06 Sep 2006, 17:39
Dan,

That PIC sounds interesting. How much current can each output sink?

Any chance you would be willing to email me that code? I'm just getting into PIC programming using MikroBasic, and wanted to make a lamp like this.

Thanks a bunch,
Russ
russ^^^tang^^^@^^^russtang.com
(remove the nine carets)
mike bartlett
06 Sep 2006, 19:05
Awesome,

I made something very similar for our camp site. I had 8 ultra-bright LEDs that fade in and out between them.

What I did is I mounted mine inside one of those rice-paper spherical hanging lamps, and then hung it from the top of our gazebo - so it looked like a magical suspended ball of amazement.

My LEDs don't seem as bright as yours, so I may give this a go for next summer.

Cheers, nice one.
Mike
Ben
06 Sep 2006, 19:11
For those in the US, here's a link to some LEDs on eBay: http://search.ebay.com/3W-rgb-led_W0QQfkrZ1QQfromZR8
indra
06 Sep 2006, 19:44
Nice work!! Really like it.
I'm thinking of trying it out myself, but don't really know how to program it. Any chance you'll be selling the programmed chip on ebay?if not, I can alway trial and error.
BTW do you have the complete part number for the pic?

Nice mood lamp!
bent
06 Sep 2006, 21:44
> Where did you buy the z-world RGB LED?

I second that question. I've been googling for it for ~30 mins now :-)
ibw
06 Sep 2006, 21:54
ebay: search for RGB LED.
Jade
06 Sep 2006, 22:22
I'm definitely interested in knowing when you will be selling these on EBay. What will you be asking for them, or what would you want for one?
poke smot
06 Sep 2006, 22:57
wow, these are great but there's no way i could make one. the wire work alone is enough... so i have a proposition to anyone who wants to make me two of these lamps for some money (probably paypal).
poke smot
06 Sep 2006, 22:59

WILL PAY TO MAKE
WILL PAY TO MAKE
WILL PAY TO MAKE
WILL PAY TO MAKE two lamps

MONEY MONEY MONEY! it will be yours

jeremyaversa@gmail.com
Matt
06 Sep 2006, 23:08
Hey, does anyone know what music is playing in the video clip? It sounds coool.
Toon Beerten
06 Sep 2006, 23:30
@ Ryan McLeod and indra
Maybe i'll write a few guidelines along with the source code.

@ Dan
I used the pic 16f628 because it was sufficient. PWM is done through software and there is still plenty of resources available.

@ Russ
Each output can drive ~20mA.

@ indra
Partnumber? Errr... pic 16f628 ?

@ bent
Got them from this store: http://stores.ebay.nl/LEDSEE-electronics

@ Matt
It's an edit from the intro of "Goldfrapp Lovely Head". I slowed it a bit down too.
Mike D
07 Sep 2006, 03:28
Awesome job man, gonna mod this a bit and make it 5v from my USB and throw it in a Bawls bottle and see how it glows otherwise gonna go on campus at VT and sandblast some plexiglass into a square case.....Good work thanks.

LED USB Light Tutorial
http://home.earthlink.net/~mdfast1/Site/DIY_USB_LED_Keyboard_Light.html

please just click a few links there if you get time....i recommend getting google adsense for this page too
Mike
07 Sep 2006, 03:33
Sorry, just saw you already got it ^^
Daedalus
07 Sep 2006, 03:55
hi, i got some idea, does can be put a microphne to proccess sounds and generating fading light by the "mood" of the sounds???

sorry for my bad inglish
Mike D
07 Sep 2006, 06:39
Daedalus

I think it would be a bit more then a microphone he would need. I think I saw that he wanted to use FFT (fast fourier transform) to read sound and maybe make it change like that. I like that idea too.

LED USB Light Tutorial
http://home.earthlink.net/~mdfast1/Site/DIY_USB_LED_Keyboard_Light.html
Scuba
07 Sep 2006, 10:45
Whats with the 10kOhm resistors? They're not in the specs but in the diagram. Part of the DIP??

Any idea's for a AC->DC solution for Australia (50Hz/240VAC).

Great Project!!!!
Chris Gray
07 Sep 2006, 10:48
Thanks for the reply above - like Scuba, i'd be interested to know what the voltage is powering these, as the $70 inverters are a hindrance if it's strictly 100-110v.
Scuba
07 Sep 2006, 11:41
Hey Chris,

It looks like it's DC @ 5 volts/1000 mA, so it's just a matter of finding a AC->DC converter for those specs cheap. No luck so far at DSE/Jaycar
Chris Gray
07 Sep 2006, 12:11
Ah, do tell me how you go - I thought it might be easier than having to hunt down a specific adaptor :/
Sayel
07 Sep 2006, 21:18
I also want to buy one lamp!!!
Toon Beerten
07 Sep 2006, 21:53
@ all

I uploaded the source code along with a few guidelines.

@ Scuba

You are right, i forgot them in the bill of materials.

@ Chris Gray

I live in Belgium so i use a 220 volt AC to 5 volt DC converter. But 110 volt AC to 5 volt DC converters are as easy to find as well.

@ Sayel

Have you seen the update on top? ;)
Alessandro
08 Sep 2006, 11:46
I really like the design. IKEA lamp adds the touch. I think I'm designing it into something like a remote controlled "Mood big vacuum tube" or something. Again, great idea.

You can buy the LED from Distrelec (www.distrelec.com).
The LED is manufatured by SEOUL SEMICONDUCTOR CO.
Manufacturer's part number is F10392 and you can get the pdf specifications "Google-ing" for part number.pdf (Yes, F10392.pdf !)
Steve
09 Sep 2006, 03:31
Way Cool project!!!

What was the name of the music in the video?
Casey
09 Sep 2006, 05:51
Wow, I study Software Engineering in Brisbane, Australia, and have done courses in digital electronics and (of course) a heap of programming - but I've never really had something to get me kick started into playing around with PICs. Just bought myself a programmer and am getting ready to code my own mood app. Was thinking I could add a PIR to it and make it sensitive to movement nearby :)

Casey.
Matt Gibson
09 Sep 2006, 07:43
Hi,

Matt from TheNewLight.com, a LED home tinker'er store based in Canada. Keep up the great work, we all need more people like you to keep the community of LED enthusiasts alive and spreading the word on how good LED's are for our world.

Again, Thanks!

Matt Gibson
http://www.thenewlight.com
Sebastià Rigo Riera
09 Sep 2006, 09:12
I've want to buy one of your lamps in eBay, but i'm from Spain and can't log in eBay.be.

I'm knew in eBay, but could you sell your lamp to other countries of Europe?

Anyway, if you can't sell anyone of your lamps, please contact me throught my email.
Harald
09 Sep 2006, 11:16
Hi

i got some question about the circuit.

On that picture:
http://tobe.nimio.info/foto/circuit_board_thumbnail.jpg
right next to the black power input, there is that small yellow 'thing'.
Whats that?
And is it important?
Because its not in the schematic.

thx :)

Harald
Toon Beerten
09 Sep 2006, 12:21
@ Alessandro

A big vacuum tube ? I don't know what to expect from that. Love to see how you will solve the remote control challenge...

@ Steve

It's an edit from the intro of "Goldfrapp Lovely Head". I slowed it a bit down though.

@ Casey

Good luck with it!

@ Sebastià Rigo Riera

Sent you a mail.

@ Harald

You're a good observer. Because i had problems with the Brown Out Reset Enable i had to stabilize the power supply a bit with just a small yellow capacitor.
It's not important if you already have stabilized power source.
Paul
11 Sep 2006, 11:58
It looks from your JAL source code that you have set the target to use an external clock, but I can't see a clock in the circuit diagram or in the board pics. I have tried downloading the hex and programming a 16F627, but it will not work. Is it because it needs a crystal? If so, how have you managed to get away with no crystal on your board?
Re: paul
11 Sep 2006, 14:42
The 628 has an internal clock that can be used I think it is 4mhz Im not sure if the 627 has one....

moobie
11 Sep 2006, 20:46
i am using a 627 (as i dont have any 628s around) and it works fine in the pic dev-board i have (velleman8048 - it doesnt have the dips though) however it works quite strange. there is a pwm action going on the LEDs but not on pins 10,11,12 as the diagram, the LEDs connected to pins 7,8,9 cycle. if i can find a piece of breakdboard i'll try doing a prototype and report back.
kahuna
12 Sep 2006, 09:13
interesting auction ending...

will you really sell the lamps for that price?
after my calculations you would make about 20-30 euro loss per lamp.

Paul
12 Sep 2006, 10:31
Moobie: Yes I found the same thing. I think the software is for the pyramid lamp because it seems to match that diagram. Just use pins 789 for your RGB and it works fine.
BTW I got the 627 working in the end.. it was a DFU error... I had specified the wrong oscillator option when I programmed the chip. I thought the clock option was defined in the source code, but it isn't, you have to define it when you prog the chip.
Toon Beerten
12 Sep 2006, 12:18
@ Paul and moobie

Yes, clock option has to be set in the programmer as in the instructions.
It could be i changed the pins at the last moment so that could explain the difference between the scheme and the source. The ports can easily be changed in jpwm3.jal.

@ kahuna

Yes i am not making even. I expected more interest. But you can always support me: toon.beerten@gmail.com is my paypal account. ;)
Luckily most of the buyers offered to pay a little extra.
Paul
12 Sep 2006, 14:29
For anyone in the UK, you can get the RGB LED unit for 6 quid from http://www.led-bulbs.com
infin8
13 Sep 2006, 01:19
from reading the post, can I assume all you have to do is to buy the parts and upload the code and it's done?
Kevin
13 Sep 2006, 15:26
Does anyone have tips on where to buy the parts?

e.g. a webstore (UK or Ireland) that does all the parts [apart from the LED, but including the bits needed for the home made pic-programmer] in small quantities?

I'd like to build one or two of those lamps, but I don't want to have to buy tons of spare parts. (Unless the gear is very cheap.) I can't imagine a strip (or however they're packaged) of resistors costs too much!

thanks
Harald
13 Sep 2006, 21:07
I tried to rebuild the circuit, but i got some problems.

First of all.
I built that simple pic programmer.
The pic programming went all fine. No error messages or so.


Now I built the circuit after your schematic.
(and I used pin 7,8,9 instead of pin 10,11,12,
someone mentioned that in the comments above)

Only the resitors with 5,10 and 15 ohm i didnt use. And i didnt use a LED.
I wanted first check the voltages with a voltmeter.

And here comes the problem.

I measure between the positive pole of the powersource (i use a 5volt/1A stabilised)
and the collectors of the transistors only 0,8V.
Shouldn't that be around 5V? (according to the resitors you used there).

The output of the pins 7,8,9 is 5V.
Is that right?

I hope someone can help me maybe a bit or guide me in the right direction.
If you need more information, please tell me.

Thanks in advance and sorry for the bad english. :)


Harald
13 Sep 2006, 21:15
EDIT:

sorry, i forgot something:

i doesnt seem like the fading/color changing stuff is working.

the voltages remain constant at 0.8V all the time an all three outputs.

but maybe thats just some sort of follow up problem of the real problem.. ;)
Toon Beerten
13 Sep 2006, 21:48
Well, in the source provided i assigned the rgb colors to these pins:
var volatile bit PWM_outR1_pin is pin_b1 -- Red
var volatile bit PWM_out_pinR1_direction is pin_b1_direction
var volatile bit PWM_outG1_pin is pin_b2 -- Green
var volatile bit PWM_out_pinG1_direction is pin_b2_direction
var volatile bit PWM_outB1_pin is pin_b3 -- Blue
var volatile bit PWM_out_pinB1_direction is pin_b3_direction

So yes, that are pins 7,8 and 9 of the 16f628. On the scheme it's drawn wrong.

The voltage you measure on these ports is an average because of the pwm, so you can't tell for sure that the pwm isn't working by just measuring the voltage.

But i'll send you an email for some troubleshooting, it talks easier then here.
Paul
14 Sep 2006, 07:25
Where did the hex file go? I thought it was here a few days ago, now it's back to saying it'll be put up in a few days when you get home...? Nice project, BTW.
Padge
14 Sep 2006, 12:22
Toon - Sorry about asking you more questions, I know you must be very busy, but I have a question about resistor values and the LEDs.
The LED I have bought is 3W, and the data sheet says that each LED should have 350mA max. So at 5v does this not mean the resistor driving the LED should be 15 ohm (based on the V=IR rule)? Your lowest value is 5ohm which will be delivering 1Amp to the LED? Isn't this going to blow it after a while.... or am I just being a wimp!!!
Padge
14 Sep 2006, 12:26
Harald - I had a problem when I first programmed my PIC (I am using a Velleman 8048 programmer from Maplin in the UK). It is very important to choose the correct options when programming - be sure to choose the internal oscillator option AND make sure to set MCLR = off (if MCLR is on then you will have to reset the PIC , i.e. set pin 4 low, before it will start). Once I had done these 2 things then toon's HEX code works perfectly.
Harald
14 Sep 2006, 14:09
@padge
thx but I have used both options as said.
i think the problem is more somewhere in the circuit itself, not directly at the pic.


and for your resistor problem:
you calculated something wrong
you have to take the forward voltage of the led into account

(5V - led forward voltage) / led forward current = resistor value

for example z-power green led:
forward voltage: 3.5V
forward current: 400mA
(5V-3.5V)/0.4A= 3.75 Ohm


Padge
14 Sep 2006, 15:04
Thanks Harald, I never knew about forward voltage etc. I've now found a online LED Resistor Calculator http://www.luxeonstar.com/resistor-calculator.php
michael
17 Sep 2006, 00:53
I just received my PIC and programmer from SparkFun, and it programmed nicely.

Just waiting for the LED to get here from Nanking now.

I still have to make a trip out to the IKEA store for the lamp.
Scuba
17 Sep 2006, 13:26
Local IKEA refuses to order in the larger lamp for me and a mate!! A store in another state in Australia has stock, but they won't transfer it up. I wonder if it would fit the smaller version, might have to look at other lamps...
Toon Beerten
17 Sep 2006, 19:53
Robert said:
Is anyone interested in making these at a good wholeprice for resale in the USA.Freelance Sales Agent will sell on commission or for low price, buy COD. Send Firm Price Quote for lots of, 5 10. 20 and 100
Send price and shipment costs to:
E-mail:
...@....net.
Great Site, well done..
Many Thanks
Robert.

----------------------------

and:

Thanks for your replies, but please make sure you send a firm price and date for delivery.
As stated I do not need the lamp, just the LED and control system.
If anyone has a remote control system, please send a price for 50 and a sample ASAP.
In London we have a Hotel' St Martin in The Fields, same group as The Delano Miami. With each room has this kind of colored lighting, all controlled from a wall dial showing each color. Anyone know of this product, can you make it, or where to buy it.(TV Style Remote control would be better)
Thanks for all the help so far.

===============================

Clearly this is a misunderstanding.
I specifically stated the source code is free for non-commercial use. I'll leave his request here but if you want to help this man out, please contact me instead. I'll make an arrangement of which i'm sure all parties can agree upon.
Thanks.
Toon Beerten
17 Sep 2006, 20:00
@ Paul

I fixed it, the link is back.

@ Padge

I see you've already gotten help from Harald. He's right btw ;)

@ michael

Good work!

@ Scuba

That's strange they won't order it. I also have bought the smaller version and there is also enough room underneath. I do think a 3 watt rgb led would be overkill for the little version...
Padge
18 Sep 2006, 14:14
I've got a quick question for anyone who knows a bit about the PIC in general. I've built the circuit, but I'm driving the LEDs directly from the PIC output ports rather than going through a transistor or resistor or anything. The LEDs are bright and it all works fine. Is this an acceptable way of doing it or will I damage the LEDs or the PIC this way.
moobie
18 Sep 2006, 14:25
@padge,

to my knowledge, the output ports on the PIC can supply something like ~20mA. if you try to suck more current probably there will be instabilites. not sure though.

about the k8048 kit.. can you tell me what config. do you use on the programming utility? i am using "3F42" (the MCLRE off, but couldnt find the internal osc. option??) and it is acting weird..
moobie
18 Sep 2006, 14:29
and here is the config. screen in detail. is it similar to your settings?

http://img143.imageshack.us/img143/3381/untitled1el8.jpg

cheers.
Toon Beerten
18 Sep 2006, 14:45
@ Padge

I built this lamp without resistors. It works fine and stable. Although it gets fairly hot. That's why in future lamps i will add resistors (2.2k) between the base and the pic ports. So if you want to be sure, add some resistors...

@ moobie

Sorry don't have that type of programmer...
Padge
18 Sep 2006, 16:52
@Moobie
Get the latest 8048 software from the velleman site.
Go to: http://www.vellemanusa.com/us/enu/download/files
and download the picprog2006_patch_v2010.zip file. This is just the latest picprog software.

Run this and make sure to select the '8048 compatibility' option from the menu. Select your chip type and you can then see the (more meaningful) options at the bottom of the screen.

The benefit of this version of the software is that it is much easier to use.

One other tip... when testing the chip on a breadboard etc. make sure you don't leave the input ports floating (the ones that the dip switch goes on), or you will get strange operation (like it suddenly starts flashing or it pauses etc).

Bodger
18 Sep 2006, 18:56
I don't understand your resistor values.

Assuming forward drop of 3.5V across the green and blue, and 2.2V across the red, and the supply at 5V.

With the given resistor values, I make the current through the green 150mA, the blue 100mA, and the red 560mA?

Are these values you have arrived at via experimentation? What led you to choose these values? Or maybe I just went wrong in my calculations.

Thanks.
moobie
18 Sep 2006, 22:38
@padge

wow that is a LOT better than the old one. thanks for the info :)
infin8
19 Sep 2006, 03:32
Hi I try to program the PIC and when I click program ALL, suddenly a windows message saying "privilideged instructions" and the IC-Prog software just hangs.
NEX
19 Sep 2006, 11:56
Hi,

Bodger have right. I don't understand the Values, too.

I calculated the resistor values for a Prolight RGB-LED. All colours need a current of 350mA.

For red (2,2V) -> 8Ohm
For green and blue (3,55V) -> 5Ohm

Greetings
Chris

Harald
19 Sep 2006, 14:35
@NEX and Bodger

You should read the whole article at the beginning, before complaining.

I quote:

"...Then i started building the circuit after calculating the values of the resistors. I changed the calculated values a bit by maxing each color out and looking at the color of white it produced, as i'm not a such a fan of cold, blueish white.I like a warm tone better..."
Harald
19 Sep 2006, 14:39
@infin8

Download the icprog_driver
http://www.ic-prog.net/icprog_driver.zip

put it in the same folder as the ic-prog.exe

start ic-prog

ignore error messages

go settings - options - misc

check: "Enable NT/2000/XP Driver"

OK

exit and restart ic-prog

now should everything work fine

Padge
19 Sep 2006, 15:14
@NEX @Bodger
You're right. I calculated the same values as you. I am using 10ohm on each LED to be safe and it is plenty bright enough.
Matt
19 Sep 2006, 15:15
How do you run a common cathode led with the transistors do you have to use both a npn and pnp transistor connected in succession?

Scuba
19 Sep 2006, 16:19
All the stuff has been delivered. I'm getting a strange error when attempting to program the PIC with ICProg - "Verify failed at address 0000h !"

Anyone know why this could be? I've installed the drivers for ICProg and the programmer is in working order. After programming, when i read back its all blank...

Thanks!
Harald
19 Sep 2006, 17:50
@scuba

Have you choosen the right device and hardware in ICProg?
(settings - Device and settings - Hardware)

Have you choosen the right options?
(oscillator and fuses)

Did you build the programmer yourself?
You sure it works?

Have you checked your COM port?

manicsunday
19 Sep 2006, 18:46
Quick Question,
Pin 5 on the PIC is that suppose to be -5V or ground? I grounded pin 5.
because i tried to test the circuit but without the transistors, the RGB LED and the power resistors connected, I'm getting 3.18A coming out from the power supply and my PIC got very hot. Did I do something wrong here?
infin8
19 Sep 2006, 19:53
@harald
I've followed your instructions, and i have the same problem as Scuba.
Error at 0000h.

I loaded the hex file, then change the oscilator to INTRC I/O from HS (when i load the hex file, the oscilator always changes to HS, so i have to re-change it to INTRC I/O).
The fuses I checked are PWRT and Boden.

The PIC I used is 16F628A-I/P.

Any idea what's wrong? Thanks!
Harald
19 Sep 2006, 22:01
@manicsunday
yeah, you did something wrong. ;)
try to switch the polarity of your powersource.
the pic shouldn't get hot, not even warm.

i had the same problem,
because i accidently switched the polarity of my power source.

my pic got so hot, i burned my finger when i tested how hot it was... ;)



@infin8
search on google for:
"Verify failed at address 0000h"
there are various hits, maybe some of it help you.
Brian
20 Sep 2006, 00:43
Has anyone measured the range of current this circuit draws at all?

I am trying to figure out if I can build a simple power supply from an old 12V transformer, some resistors and a zener to save money on actually buying a 5v supply. If the current draw is fairly constant for all modes of operation, I think it is possible, but with the sort of current I expect, any sort of large current drop away from the maximum designed for would fry the zener.

If anyone has an ideas about what the current is doing, it would help, but I'm guessing I'll just have to buy a 5v supply
Marcos
20 Sep 2006, 02:51
Very nice, a wonderfull idea. I just start to make my own lamp, but using little leds (std 5mm) as the first step.
Regards.
Matt
20 Sep 2006, 04:30
@ brian all you have to do is get a 1A 5v regulator from jaycar and put two filtering capacitors on the input and output sides, to create a perfectly stable psu for the pic that can accept any 5-16v input. Thats what I did, it works fine

http://www.tkk.fi/Misc/Electronics/circuits/psu_5v.html

The only problem I have now is driving a common cathode led instead of your common anode led, I have no idea how to do this, do you have to run two transistors? (a npn and pnp?)
Matt
20 Sep 2006, 04:33
@ infin8


You hit the wrong button in ic-prog, dont hit the button that looks like a green arrow goto one of the menus, then hit "program all" or "program device" (something like that... Also make sure that the pic is inserted the right way around and you havent killed it with static....
michael
20 Sep 2006, 21:01
My LED arrived and I have the lamp running on a breadboard. Everything is running cool, I used an old CPU heatsink for the LED and the base resistors to protect the PIC.
Looking good, still haven't made it to IKEA.
Scuba
21 Sep 2006, 10:23
The problem with mine was the cable - an old null modem cable was lent to me, little did I know that it wasn't in working order. THE programmer's owner tried it with another one and it worked fine :) Can't wait to get started...
José Ferreira
26 Sep 2006, 22:40
Hi,
I like your project, but i have a question since i have all the led's to make the pyramid mood lamp...but i would like to use the randam fuction..can i program the pic with the sourcode of the led mood like?
Matt
27 Sep 2006, 04:17
@ José Ferreira

yes it is essentially the same, just use the above circuit and source code with multiple leds like in the pyramid lamp circuit
Justin
27 Sep 2006, 06:03
I just built the circuit, but there seems to be a problem. The led flashes very fast and isnt very bright. Any ideas on what might be the problem?
infin8
27 Sep 2006, 19:01
Hey guys,
I'm having problem with the circuit. The RGB LED doesn't seem to be switching at all. I was able to use a scope on P7, P8 and P9 of the PIC and see that there are switching. But all my LED does is having all three light up and no change in colors etc. any idea what's wrong?
Jared
27 Sep 2006, 19:23
Hi guys,
I've received my RGB LED (and proceeded to blow out the red LED so I'm ordering another one) and all the rest of the parts should be showing up today. I can't seem to find a 5V 1Amp DC power supply lying around but I do have a 5V 2Amp DC supply. Will this work or will I blow the stuff up? It's been so long since my electronics class that I don't remember if the stated amperage is how much it puts out all the time or just what it's capapble of.
Toon Beerten
27 Sep 2006, 21:12
@ Matt

A common cathode led is essentially the same, so NPN's are fine. It's like the circuit of my pyramid shaped lamp.

@ Brian

The current range is biggest when random mode is on. It can go from just a few mA when each color is off, to ~700 mA when all colors are fully pwm'ed (white).

@ José Ferreira

It's possible, but this lamp has 4 input ports and the pyramid one only 3. So pay attention to that. Best thing is just to use the above circuit and source code with multiple leds like in the pyramid lamp circuit, like Matt already said.

@ Justin

Mmm, not immediately no. Did you double check your circuitry? Calculated the right resistor values for the leds you use? Do you use a stabilzed power supply?

@ infin8

Did you use BC337 transistors? Are you sure it's not running in pause mode?

@ Jared

Tough luck with that red led :s
A 5V 2A DC supply is fine. It means it can deliver up to 2A while only ~0.8 A is needed. No problem there...
Toon Beerten
27 Sep 2006, 21:13
@NEX and Bodger

Harald is right, i altered the values a bit to my liking. I also calculated according to the datasheets currents. In the datasheet it says to obtain a white color there has to be 237 mA for red, 37 0mA for green and 120 mA for blue.
Here is the link of the data sheet:
http://www.seoulsemicon.co.kr/_homepage/home_kor/product/spec/F10392.pdf
infin8
27 Sep 2006, 21:42
Hey Todd,
I used BC337.
How do I make sure that I''m not running in pause mode? Do the fuses has anythign to do with it? When I programmed the PIC the fuses I chose were WDT, BODEN and LVP. Is this correct?
And when I put a scope, I can see different pulses for different setting on P7-9, however, my transistors don't seem to be switching at all.

Thanks for the help Todd. Really appreciate it.


Scuba
28 Sep 2006, 02:08
Got the Base, Collector and Emmiter hooked up right infin8?

C The collector should be
|_ connected to the led's
B-|_) specific resistor, the base to
| the IC pins 7,8 or 9 and the
E emitter to the -DC connection.

Like Jared, I also blew up my Red LED. Luckily I've got a spare to test with at least. After building Justin's above, unsuccesfully, I tried my own. The circuit is really touchy, bumping any wires changed whatever the LEDs were doing, the brightness or just turned them on/off. Even hovering my hand over the IC appeared to change the colours (though i was a little sleep deprived by this stage). What are the exact settings for the 4 switches on the DIP?
Scuba
28 Sep 2006, 02:09
Oh noes, the beautiful ASCII art got screwed up... Oh well, you can satill figure it out if you ignore the text next to it.
Scuba
28 Sep 2006, 02:51
Hmm, for some reason - when i bridge the connection between the BC337's collector and base, the LED gets really, really bright (how I assume it should be). DOes this mean that all the current is being held at the base instead of distributed correctly?

And i just tested that hand thing again, it still happends - funky :S Mainly when i hover my finger near pin 1, it goes brigt, then off when i take it away...
infin8
28 Sep 2006, 03:45
To everyone:
Were you guys able to get the LEDs nto transition? Like everyone else, I blew my red LED so i'm left with blue and green.
All I get is a very bright blue light (don't stare directly at it!!!i got momentarily blinded:( ) and no change at all. Is it because my pic is not programmed correctly? WHat are the fuses that I have to choose?
Jared
28 Sep 2006, 08:11
Hello again,
I'm in the same boat as infin8 with the constant blue light. I've tried every combination of DIP switch position to no avail. The green and red LEDs seem to have a little juice going to them but most of the power is going to the blue LED and it just stays that way. My PIC supposedly programmed correctly (it verified OK) and I'm pretty sure I've got everything hooked up exactly like the circuit diagram shows. Does anyone have an idea on how to fix this?
Thanks guys.
Scuba
28 Sep 2006, 17:25
Super Blue here too... I had it kinda transitioning here for a bit, but i was at rapid, fit inducing speeds. The IC doesn't appear to be grounded properly, cause even if the table touches it goes to stock RGB only.
michael
28 Sep 2006, 22:51
Doesn't WDT have to be unchecked to keep the PIC from being constantly reset?
infin8
28 Sep 2006, 22:58
@Todd
This is the PIC I used:http://www.digikey.com/scripts/DkSearch/dksus.dll?KeywordSearch

The speed of the pic is stated to be 20MHz, and you mention that your is only 4MHz. I'm wondering if that is why some of us have been having problem in making it?
Jared
29 Sep 2006, 06:00
So I just started comparing the circuit diagram of this project with the previous mood lamp and noticed one glaring difference that may explain why none of us can get this to work. The resistors and transistors are on opposite sides of the LEDs in the two projects. Is the drawing for this project correct or should the resistors feed into the collectors of the transistors which then feed into the LEDs like the previous Pyramid project? (I'm wondering if Toon just messed up when he drew the schematics.)
Scuba
29 Sep 2006, 07:51
Jared - Had a look and can see the difference too. So you think it should be 5V+ -> 5/10/15 Resistor -> 337's Collector -> 337's Emmiter -> 5V-

Will have to try, won't get a chance for a while though. I tried avoiding the switch and running the 5V straight to pin 1 (MODE1) through a 10k resistor, with the other modes disconnected, but didn't get any difference...
Scuba
29 Sep 2006, 07:52
Correction above:
337's Emmiter -> LEDs R/G/B In -> LED out -> 5V-
Jared
29 Sep 2006, 08:42
Scuba - yea, I'm thinking 5v+ -> resistor -> collector -> emitter -> LED in -> LED out -> 5v-

Unfortunately my wiring was a complete disaster so it's gonna take me some time to unhook everything and rehook up this way. I'll let you know as soon as I test it unless you beat me to the punch.
Toon Beerten
29 Sep 2006, 10:29
@ infin8

The program is running in pause mode when pin a6 is high (5V). Fuses have nothing to do with the pause function. The only thing you have to be sure off is to uncheck MCLR. You say you see different pulses for different modes on the scope so i guess the pic is working fine but your transistors not. Can you replace them or check them if they work correctly?
The speed of the pic when using the internal oscillator is 4 Mhz, but can go up to 20 Mhz when using an external oscillator.
btw, where did you get my name is Todd? ;)

@ Scuba

If the circuit is acting touchy like you described, try grounding all unused pins of the pic. Try using an other *stabilized* power supply and put a small capacitor parallel to the +5V and ground.

@ All

If only one colour lights up it could mean the forward voltage of your led is different then mine, so you'll have to look that up in the datasheet and recalculate the resistor values.

@ Jared

The schematic shown is like i built it. Others have built it succesfully so it's not the schematic that is wrong. Relocating the resistors as you say is essentially the same, they are there to limit the current flow from +5V through the led through the transistor to the ground.

Question about: 337's Emmiter -> LEDs R/G/B In -> LED out -> 5V-
Do you guys use a common anode or common cathode led? I use a common anode led and what you propose wouldn't work with a ca led...
infin8
29 Sep 2006, 18:57
@Toon
Sorry on calling you the wrong name...had a long day :p
I still don't know what's going on. either i didn't program the pic correctly or something is wrong with my wiring. I don't know what's going on anymore. And I've checked that the PIC was not running in pause mode, P6 was ~0.6V.

There must be something that Jared, Scuba and me are not doing right.

The only reason I can think of is that the PIC was not programmed correctly.
Kai
29 Sep 2006, 22:04
Hi all, I'm trying to build this circuit, but I can't seem to pull pin A6 high. The other three control pins are almost 5V but pin A6 is only 0.14V. They are all connected the same way, MCU--->10k->+5V. I checked my breadboard and tried this on two 16F628A. Is it supposed to be like this?

Also, none of the LEDs are on, but I think that the transistors' problem. Would PN2222A work in place of the BC337?
Scuba
30 Sep 2006, 10:21
My inputs are B,G,R,C on the LED. Common cathode LED i assume? So i guess the circuit should be different in that case. Thanks for the help Toon :)
José Ferreira
30 Sep 2006, 18:24
HI again..
I'm having some problems fitting all in a smal space...si wonder if you can send me a photo of the back of your circuit board?.
thanks a lot again
Jared
01 Oct 2006, 08:12
So I desoldered everything and hooked it all up to a breadboard and after some tinkering I found out that my DIP switches were set in the wrong position so it was constantly paused...(I'm a dumbass.) But I'm still having the problem of the Blue LED getting all the juice. My pin 9 is doing everything it should... going from about 10mV up to 500mV, but pins 7 and 8 are only outputting a small fraction of that... going from 1mV up to like 7mV when the colors are supposed to be changing. So the blue LED is the only one I can really see since it's getting so much more power than the other two. Does anyone know why my red and green pins would be outputting such low voltage? Everything is set up exactly like the circuit diagram says.
Jared
01 Oct 2006, 08:14
Oh, and I've already tried swapping transistors around and it didn't make any difference. The blue pin is always outputting way more voltage than the other two.
mixos
01 Oct 2006, 10:17
I verify the circuit's behavior Jared described. I hooked the circuit like on schematic, programmed the PIC with the right fuses and the result is a bright blue led. Maybe there is a small mess between the code and schematic, causing this strange behavior.
Kai
02 Oct 2006, 02:53
I have a PICKit 2 and used JAL 0.4.60 to compile and assemble Toon's jal to hex, but I had to change 16f628_4.jal to the following to turn off MCLR and use internal oscillator. I also set the fuses there but it might be redundant. PICKit2 v2.01 doesn't let you set the fuses while programming. Here is my 16f628_4.jal:

pragma name 16f628_4
pragma target chip 16f628
pragma target clock 4_000_000
pragma target osc internal
pragma target watchdog off
pragma target powerup on
pragma target protection off
pragma target internal_mclr off
pragma target fuses 0x3f50

include jpic


Hope the above will help some of you. But I also have the same problem as Jared where the blue led is getting more current than the other two... The blue is jumping and fading, but the other two are barely on...
Brian
02 Oct 2006, 22:47
Everyone who is having transistor issues,

Try placing a resistor at the base of each transistor. Its been a while since ive taken my analog class, but i think the current might be too high, saturating the transistors. I put a 100 ohm resistor between the PIC and the base of each transistor and it works perfect now. I'm sure you could calculate an ideal value, but a whole range of resistors seem to work just fine as long as they arent too small or too big
XoR_iPLEiX
02 Oct 2006, 23:14
It worked!

Brian has the right solution for the "only bright blue" problem.

Just place a resistor between the PICs outputs and the base of the transistors and it will shine full of colour. I tested with 10K and 15 Ohm with identical results.

Thanks Brian for this "easy" fix.

Bye
michael
03 Oct 2006, 01:47
@kai
2n2222s are fine, the rating is nearly identical to the BC337.
Jared
03 Oct 2006, 03:21
@Brian

You brilliant, brilliant man you. Thank you so much. The resistors worked perfectly. Now I just have to wait for my eBay person to get their Paypal crap in order so I can get my replacement LED.

Thanks again.
Rainman51
05 Oct 2006, 22:07
Toon, You deserve a statue!! ;)
I made the circuit on my breadbord and it works fine!
But still have some questions:
- Could you post the exact function for each switch?
*I found out that SW1 makes a Rainbow effect or a G->GB->B->BR->R->RG-->>G effect.
* SW2 makes you chose between fading and switching?
* SW3 makes you chose between slow or fast
* And SW4 pauses the hole process.
Correct me if I am wrong please...

- I already have a sort of Moodtube with 10 Reds,10 Blues, 10 Greens all high intensity using just 3 switches 1 for R, 1for B and 1 for G so I can make 7 colors.
But it operates on 15V.
So Is it possible that I take the 15V supply on the Leds and resistors than to the collector and put the emmiter to Ground? But still have the PIC working on 5V? or do I need something else.

Thanx for the info!

Greetz
Jarno51
www.jarno51.tk

PS: I am also from Belgium (Brakel) Where do you live?

Toon Beerten
06 Oct 2006, 09:49
@ José Ferreira

A picture of the bottom of the print isn't possible anymore since i glued it to the lamp. Should have thought about that beforehand.

@ Brian

Thank you for pointing that out. I thought the resistors before the base were optional since it works fine in my lamp without them. I must have been lucky i guess :)

@ Rainman51

* SW1 makes you choose between G->GB->B->BR->R->RG-->>G effect and random color change effect
* SW2 makes you choose between fading and jumping from one color to another
* SW3 makes you choose between slow or fast
* And SW4 pauses at the current color displayed.

I'm not sure your leds will work with 15V. You'll have to look that up in the datasheet. You could use a voltage divider with 2 resistors to get 5 Volts since you'll need this anyway for the pic. But i'd opt for using an adapter which delivers 5 Volt directly...
I'm from Leuven.
Rainman51
06 Oct 2006, 11:47
Thanx Toon,

I was planning on using my 15V PSU and put a 7805 regulator behind it (makes the 12V come to nicely 5V)but let the 12V go to the Collector of the transistors.
I will search a bit further before I try it, so i dont blow things up...

Btw: I used common BC547 transistors as a test with just 1 Red,1Green and 1 Blue LED.
Just if people want to try it out ....
They can only take 200mA i guess. So dont use them with the 3W RGB led of Toon!!
Padge
06 Oct 2006, 14:43
Regarding the 5v PSU - I noticed last night that my son's Sony PSP uses a 5v charger, and it says it delivers 2000mA at 5v (0.3 at 240v). Would one of those do the trick? Because they are quite common you can pick one up for less than 10 GBP.
I had originally built my circuit with a spare 12v PSU and 2A 5v regulator. But the regulator gets very hot so I now think the best option is driving it from 5v direct (as Toon suggests).
Toon Beerten
06 Oct 2006, 14:50
@ Padge

That adapter is fine. I don't know if/how well the adapter is stabilized, but if your lamp acts strange just put a tiny capacitor in parallel.
Scott
10 Oct 2006, 17:18
Has anyone built one of this using the smaller 12" mylonit lamp. If did you use the same rgb led or is it too bright. I live in america and can't seem to find the 18" lamp anywhere.
José Ferreira
11 Oct 2006, 15:53
Hi...again.for the second time..
is there any other pic similar to this...some that can be used in this same circuit if the same code...but diferent.?...The guy...from the electronic store said that they are all sold..:S

thanks again :P
mixos
11 Oct 2006, 17:00
@Scott

I build it using the smaller 12" mylonit lamp and the result was beutifull. That was a trully amazing lamp. The only problem i can notice is at the base of the lamp, the colors don't blend very well, but this is only in a small region and can't indicate a problem. Also it is not viewable from all directions and all colors.
hockings
13 Oct 2006, 08:22
For those of us who aren't very electronics wise, any chance of someone putting a very detailed (but dumbed down) description of how this all works?
Markus Sorensson
17 Oct 2006, 08:45
My LED keeps flashing all the time... I don´t see the smooth transition like in the video... any ideas why?
orion88
17 Oct 2006, 09:26
Does anyone know where to get the LED in the USA? I've looked everywhere, and I can't find any suppliers within the USA.
Jared
17 Oct 2006, 16:12
orion88: I've had to order on eBay from sellers in Asia. Has taken a week and a half (both times) I've had to order LEDs.
orion88
17 Oct 2006, 23:55
@Jared

What seller did you buy from? It'll be reassuring to me to know that someone else has bought the product from them with good results.
Jared
18 Oct 2006, 00:06
orion88: Well DON'T order from "lck-led". I did a buy-it-now auction with them and they were unable to receive paypal payments even though the auction said that they prefer paypal... I did however have reasonable luck with "sureelectronics". The shipping takes freaking forever (1-2 weeks), but it will show up. Just do a search for "3w rgb led" on eBay and their auctions will show up at $.99 with $9 shipping. I e-mailed them about combining two orders together and they only charged me $16 for two LEDs shipped. The nice thing about their LEDs is that they have all 6 contacts exposed so you can wire them any way you want.
Markus Sorensson
18 Oct 2006, 22:24
@Jared

Hey, I also bought the LEDs from Sureelectronics... are they working ok for you?

I am not getting the expected behaviour... I get this slow annoying flashes, not the smooth transitions I am supposed to be getting.
Jared
19 Oct 2006, 04:50
@Markus
Yep, my LEDs are working great now. I'm not sure what's causing your problem, but making sure you put resistors between the PIC and the transistors might fix it.
Jared
19 Oct 2006, 04:52
Now that my LEDs are working perfectly it's time to play with the source code... has anyone done any cool modifications they'd like to share? I was thinking about modding something up to do a kind of candle flicker to put inside my pumpkins... but this will be my first attempt at coding so everyone wish me luck!
Nick666
19 Oct 2006, 19:06
Yes, but it is just an idea right now:

As an additional operation mode I want to manually fade the lamp via an adjusting knob (potentiometer) through the colors of the rainbow.
Man, I think of my old C64. There, you could plug a potentiometer directly to the joystickport and an internal 8-bit register represented the set resistance. With a little table you can assign 255 different rgb-values...voilà.
I think it will not be that easy with a PIC, will it?
Maybe a potential divider and an PIC A/D-converter will do the Job.
Nick666
19 Oct 2006, 19:10
As second addition I think of a dimming-knob
Arrasparus
21 Oct 2006, 01:37
Hi Toon:

I'm trying to make your fantastic circuit but i don't get it work.

I have programmed a PIC 16F628-04/P, is it different to PIC 16F628A?
And the refernce of transistor is BC33740W.

The pin 10 must be not connect to the programmer TE20 o direct to gnd.

I have used icprog with TE20 Programer with these Fuses: XT Oscilator, PWRT=BODEM:On, MCLR=WDT=LVP=CPD=CP:off and i dont get any error programming. Verify is ok.

When I apply 5v all leds are off all time.

How i can test that IC work properly? Any simple test?

Thanx.
Padge
24 Oct 2006, 13:36
Toon - Here's a challenge for you. Integrate a RGB colour sensor into the base of the lamp (or pointing forward) and make the PIC light the lamp in the same colour as it 'sees'. You've then got a lamp that changes colour to match it's surroundings - a chamelion - how cool would that be? Someone walks past in a red top, and the lamp goes red, brilliant!
alper
29 Oct 2006, 17:18
Like Philips Amblight technogy you can make ligth with RGB sensor for Home Teather System
jdeemo
31 Oct 2006, 05:10
Which cable do I purchase to connect the programmmer to computer?
Minotaur Nicce
04 Nov 2006, 01:09
Does anybody know any other guestbooks relating to this?
Harald
07 Nov 2006, 22:10
its finished ;)

lots of pics here:

http://www.haraldschmid.net/bml/

Harald
JensaH
13 Nov 2006, 17:43
Some stuff i changed.
in jPWM3.jal i changed the
-- PWM_out_pinR1_direction = input --use if not already in main program
-- PWM_out_pinG1_direction = input
-- PWM_out_pinB1_direction = input

to outputs. and the silly touch bug was solved (flickering and extremely sensitive to proximity i.e. hand)

everything works fine. my only cooling is a piece of solder trough the prototype board (bare smb RGP led (P5 from Seoul Semiconductor, Inc)
I'll prolly rewrite some code to match my needs later on and submit here. I have plans to connect a DS18s20 (themometer) and let it have a scale between -30 (blue) and +30 (Red) and a switch for that. it would be a cool way to show outdoor temp =)
wangJ
14 Nov 2006, 20:17
@JensaH

temperature controlled RGB LED would be very cool indeed :)
Sandra
21 Nov 2006, 18:49
How hot that heatsink can get?
DJRaca
25 Nov 2006, 20:09
I bought a PIC 16F84 Microcontroller. I am curious if I can implement this chip in the project or the only corect chip is 16F628. If yes, please post, in IC-Prog wich settings should I use. Thank you

PS: I created a circuit without using a PIC. It is much bigger and uses more devices, but if you are curious write me an email so I can send you the circuit.
DJRaca
25 Nov 2006, 20:24
Hey! It's me again...

I took a deep breath and I put my PIC in the slot. (15F84)
And YES IT'S WORKING!

I used the same simple PIC programmer which you showed us.

In IC-Prog I used the following settings:
- Programmer: JDM Programmer
- Device: PIC 16F84
- Oscillator: RC
- WDT Checked
- PWRT Unchecked
- CP Unchecked

Man! World must be thankful for people like Toon Beerten! Thanks a lot man!
leituga
26 Nov 2006, 18:08
where can i get this lamp? in my city there is not Ikea company.
Adarsha
27 Nov 2006, 06:23
Hi Toon,

In the instruction you said "I used jal-0.4.60.win32(http://prdownloads.sourceforge.net/jal/jal-0.4.60.i686.win32.zip?download)"

I downloaded the same, but could not find a way to run the compiler:(. Can you explain me in brief as how to set up this compiler please..
Adarsha
28 Nov 2006, 04:51
@infin8
Can you let me know what you did to rectify the error message
("Verify failed at address 0000h"). Even i am facing the same problem. I built this JDM programmer;
http://www.jdm.homepage.dk/newpic.htm
Razvan
30 Nov 2006, 22:29
I have 2 pic 16f628A
I write this pics with original program verify is ok,(IntCR I/O,off MCLR) but led dont fade...R G B light very slow but dont fade.
The program is compatible with Pic 16f628
AND pic 16f628A ?!If you have code source for PIC16f628A please send me...because i dont have compiler.
Thank's
Best Regard
sean
01 Dec 2006, 19:49
It's obvious that Toon Beerten has supplied us with an incorrect schematic. Notice on the RGB LED you purchased, the power has a negative symbol next to it.. In Toon's diagram, he has the LED attached to the positive terminal. For those unable to get the circuit working, here is the correct schematic.
http://img408.imageshack.us/my.php?image=lampschematicae3.jpg
nefelodamon
01 Dec 2006, 21:12
Hello!!!

This is a very nice project but I have some problems in order to make it work :(

Every time I try to program the PIC16F628A I'm using I end up with only the red led to fully work. Blue and Green are working very strange. When I choose the pattern G->GB->B->BR->R->RG-->>G effect there is no light when green and blue should be on.
The only saturated color is red. When I choose the random effect I only get pure red and white (either the red led is on OR all three together).
I have used the Velleman K8048 programmer with the original software (Progpic2 and Picprog2006 both with latest updates) and even IC-PROG.
The PIC is really programmed ok because it verifies ok and when I read back the code the fusses and set correctly.
I can't pinpoint the fault.
Can anyone helps please?
Razvan
01 Dec 2006, 22:02
Thank'you very much Toon Beerten !
It's very nice project
I have a small problem with my micro-switch...(initial don't verfy my switch) my circuit is blocket at one color, because a one switch for pause is bad....i replace..and it work very good
(I use ICPROG and my interface for programing)
Thank's
Best Regard
Eng. Razvan
Adarsha
04 Dec 2006, 09:35
Thank’ you very much Toon Beerten !
Finally I am successive in making my own programmer, and to do this circuit as well. It’s working nice... :)
Now I am in search of a good enclosure
Zoran
05 Dec 2006, 02:50
What`s important diference Prolight RGB-Power led & Z-Power rgb led(F10392)

Thank's
ikeahacker
06 Dec 2006, 12:12
toon, this is a wonderful. can i feature it on my blog? http://ikeahacker.blogspot.com. let me know. thanks.
hamid
09 Dec 2006, 16:38
hello
Joe
12 Dec 2006, 10:03
Why the led has eight solder pads?
Kade
13 Dec 2006, 03:44
I love your project. I plan on building this and I also plan on building that simple programmer you built (just for 16f628A's). I would like to know what programmer you selected in ic-prog for this. Currently I am waiting for my LED to arrive.
Kade
13 Dec 2006, 04:44
nevermind, I re-read the posts. I should be able to figure this out. Thanks for the lamp idea!

@ Joe

The LED in the above pictures has four pins soldered to a carrier board, which has four solder pads that you can use.
Lewis
14 Dec 2006, 05:50
i have rtyed everyhting to get this to work!! i have a 16F628-04/P will this microcontroller work? is it the same at 16f628a?

please help!!
ow_niceshot
14 Dec 2006, 20:06
I'm having a very difficult time getting the chip to program. I have the 16F628A (SOIC-18 package, no difference, just makes it a little complicated to solder) and I've tried it with a laptop and desktop. I've used both programming fixture types. I keep getting the "Verify failed at address 0000h". I've tried pulling RB4/PGM up and down, tried different I/O delays, tried programming both as a 628 and 628A.

I feel like I'm missing something that should be painfully obvious, but I've rechecked everything several times.

Any help would be muchly appreciated.
ow_niceshot
14 Dec 2006, 23:43
lesson learned... use the right transistors and verify the pin out! I think I was accidentally using PNP transistors... one more thing to make sure you try if you're getting that "Verify failed at address 0000h"
Andy
15 Dec 2006, 11:52
To all those people getting a "Verify failed at address 0000h" error...

I have been experiencing this error a lot recently and it almost driove me to insanity. I finally figured it out though. The error is due to not having enough potential difference between the PICs ground and the MCLR pin. In order to enter programming mode you need >13V (may work with a little less but this is the stated value). Modern computers, particularly laptops, only have +/-5V on the serial port therefore the JDM programmer (a common programmer and the type used by the author of the Mood Lamp) only gets a potential difference of 10V so the PIC never programs and verification fails at the first address.

The solution to this - first off try a different machine, an older desktop should work - thats how I fixed my problem. The second option is to manually boost the voltage with a couple of cells. You can find out how do this at http://www.ucapps.de/mbhp_jdm_expired.html and follow the Troubleshooting suggestions.

I tried this but it did not work, maybe you will have more luck. Im not sure why it did not work but I did not investigate much since I was in a rush to get this done.

Another suggestion is to use a different type of programmer, it is an obvious one but it may cause you a lot less trouble. I was using a JDM programmer with a USB<->serial adapter, it was only after having problems did I realise that this too would not generate the required voltage.
Tina
16 Dec 2006, 00:30
Hi all!
I have done this fantastic lamp and works fine. I have only one question. Can someone modify program for one position of SW1 to magenta color only? My room is in magenta style...
thank you!
Brian
16 Dec 2006, 16:42
Hi Toon,

I was wondering what value of resistors I would need if I were to drive 2 of these LEDS from the same driver, or if I can do that at all? Thanks
Lewis
17 Dec 2006, 04:54
I finnally got it to work!!!! check it out.

http://lewisjensen.com/rgbsnowman/

thanks for everyone's help and thanks to toon for a great project!
Kade
18 Dec 2006, 02:38
@Tina

I have made a small mod to the source code to do this for you (if it's paused when you turn on the lamp it should be magenta until you switch off pause)

I did a similar mod so I could use the lamp as a normal white lamp when desired.

http://web.aanet.com.au/edak/ikea_mood_lamp.zip

please let me know how it goes?

I have not yet tested this in circuit but it works fine using PIC Simulator IDE software.

cheers
Lusidvicel
18 Dec 2006, 19:50
Hello, i love tobe.nimio.info! Let me in, please :)
Lewis
18 Dec 2006, 21:02
Umm, you are in...heh
peter
19 Dec 2006, 04:38
hi all, thanks for the great lightshow device schematic. I too would love to buy one for doing my very special Spirit Body Process Performance Photography:

http://www.flickr.com/photos/phr/sets/72157594251675918/

Please let me know if you'd like to collaborate (anyone) by building a high brightness light wand with your design. I currently use the lightwand by Sauce.
ronnie jackson
19 Dec 2006, 06:35
^ gay shit.
Lewis
19 Dec 2006, 19:58
HAHA ^
Ryan Shuck
20 Dec 2006, 12:09
Hey Toon - I received your package today. Unfortunately, the Mylonit lamp didn't make it... it's actually in about 5,000 pieces. No worries though, I will stop by the Ikea and pick one up tonight. Thanks for your work on this, I appreciate it.
Yann
20 Dec 2006, 17:33
Very niiiice work !
Any plans of adding remote control(RC5)?

I see some free pic code for learning code from any RC5 remote and using some for piloting...

Sorry for my english.

Thanks to share ;)
Kade
21 Dec 2006, 23:30
I was cruising the net and looking for new ideas for this lamp and came across the sharp motion sensors

http://www.acroname.com/robotics/parts/R48-IR12.html

These could be used to detect hand motion, similarly to those mathmos hand activated lamps, but in this case your hand could be used to change the colour! Wave your hand over the top to turn it on or change colour!

Still waiting for my LED to arrive.
john doe
22 Dec 2006, 00:46
22 Dec 2006, 00:42
sweet project guy!
i have done a bit of work with LED's myself
although it's just been wiring
i am a complete newbie at programming
what exactly is involved
what hardware, software do i need?
etc.
can i get that link
(http://www.circuitsonline.net/circuits/view.php?id=91)
translated to engligh as well?
solle
24 Dec 2006, 11:38
If some of you stell have problems with finding the LED's try: http://www.led1.de fast shiping good price and so on...:D
programmer
26 Dec 2006, 14:49
i couldnt find the pic 16f628a but i have 16c63a pics how can i use it ?
tina_sk9
27 Dec 2006, 12:01
@KADE
Hi, I'll try your hex tommorrow and post result here.
Thank you!
Tina_sk9
özgür
27 Dec 2006, 13:31
thanks for answering..
im a student and it is my home work i tryed to make it but little problem.in my project at scholl i have to use 16c63a and i must control the led speeds(rgb) with dipswitch they wanted so project from me at schooll and i looked to internet for that and saw this mood lamp it is like what i look for but it is different pic and i must use as a output for rgb in my pic RC0,RC1 and RC2 pins of 16c63a and also i need to control the speed too it must be 4 different speed 15second;30second,45second and 1 min between leds to change color. it will be very nice and i will be happy if you can help me
Andy
27 Dec 2006, 21:54
Hi all,

I have got this lamp all made up and it was working fantastically (after a few small headaches that I managed to resolve). However, as soon as my girlfriend took it home (it was a Christmas present to her) she said it started flashing randomly from time to time. Since then I have managed to reduce the flashing quite a bit and it now only seems to do it when it goes to an orangy colour. It will then flash to red and work fine until it goes orange again.

Now, my thoughts are that when it goes orange it is reseting and starting the cycle all over again from the first colour (red). I assume this to be the brown-out reset that Toon has mentioned. I probed the voltage across the power supply and it is wavering but only down to maybe 4.6V and I believe the brown-out voltage is ~3.5V. Does anyone have any clues on how to fix this?

For your information the only mods I have made to the above schematic are 100Ohm resistors between the Pic and transistor bases and a 10uF capacitor (electrolytic) accross the power rails.

Any suggestions are welcome as this is infuriating me now. Cheers.
Kade
29 Dec 2006, 03:23
@Andy

When you say you managed to reduce it, what did you do? Have you made any changes to the source code? According to the 16F628A datasheet, the brown out voltage can be anywhere between 3.65 and 4.40V (typ = 4V). what value capacitor are you using? it may not be big enough.
Andy
29 Dec 2006, 13:44
@Kade

Thanks for the response. It has happened a number of times over the development on the lamp:

First, I used two different PSUs, one caused a large amount of flashing instantly the other only a minor amount every now and then. I used a decoupling capacitor to stabilise it somewhat and it worked a little better to the point that I did not have any more issues. It was only after my girlfriend took it that it started failing more often.

Second, I added resistors at the bases of the transistors. This helped enourmously and I have slowly tuned thier values to be as low as possible but reduce the flashing to a minimum. 100Ohms seems to be the lowest value that minimises the flashing, any higher and the flashing still occurs but the lamp is much less bright (obviously!).

My assumptions are that in the first case the power supply was not stabilised so the capacitor helped with that. In the second case I beleive the transistors were saturating and causing the LEDs to draw a high current cause a brown out. This is only a gut instinct as I do not have the appropriate equipment to test these theories.

The capacitor is 10uF - I did mention this before:-P
Bart
31 Dec 2006, 00:03
Nice ;-)))

I've also made a similiar project:

http://www.elektroda.pl/rtvforum/topic653868.html
(unfortunatelly in polish only)
Based on ATMEGA8 with 3 modes - manual, plasma, spectrum analyser - sources and PCB could be downloaded from link above.

Bye !
Kade
02 Jan 2007, 04:09
@Tina

How did that modification go?
Kade
03 Jan 2007, 05:29
Finally built my own (my parts arrived), I should have used a breadboard and tested the components because I have a dud transistor (red one) so my red LED doesn't work. I tested the LED though and it's OK, so I have a little desoldering and replacing to do.

To overcome the verify problem I increased the delay to 40.

Can't wait to get my gluegun out and stick it all together!
Ong
03 Jan 2007, 11:52
Try this!
Kade
03 Jan 2007, 12:49
Okay, I feel like I am spamming this now, but I got it all together (replaced the dud transistor and glued it all up). I have modded the circuit (6 switches on pins 18, 17, 16, 15, 13 & 12) with the additional functions 'white' and 'dimmer', which respectively change the colour to white and dim to half brightness. I re-vamped the source code to be more user friendly and adaptable. if anyone is interested, please let me know.

@Tina

Did I give you the source for modified input switches? If so I can upload the original switches.
Pelle
04 Jan 2007, 11:13
I am interested in that sourcecode with white and dimmer and schematics. Where can I get it ?

Pelle
Marry
04 Jan 2007, 13:33
Good site!!! Thanx!!!
Emily
04 Jan 2007, 21:43
Is anyone currently selling these on eBay in the US? I particularly like the motion-sensor idea, if anyone is selling one like that!
Jonn
04 Jan 2007, 22:45
Good site!!! Thanx!!!
Harald
05 Jan 2007, 10:53
Hi Kade

i would really like to have that source code with dimmer and white.

could you please send it to akira2001@gmx.net

thanks. :)

Harald
Kade
07 Jan 2007, 00:06
the source code and modified schematic for the 6-DIP version of the mood lamp (inc white and dimmer) are available at:
http://web.aanet.com.au/edak/6DIP_mood_lamp.zip

IF YOU NEED to change the code and compile yourself, you will only have to overwrite Toon's ikea_mood_lamp.jal file.

Enjoy!

Oh, and if anyone wants to know, I got my LED from sureelectronics on eBay. I had to use different resistors though.
Adrian morgan
07 Jan 2007, 01:36
Toon I have an idea for your design in a box and not on a lamp at all. I know you mentioned the code is not for comercial purposes. Is there some sort of arrangement you are willing to consider on the lines of a commercial version you could sell a licence for or be paid some form of royalty.Its really creative and could inspire loads of things.
Martin
07 Jan 2007, 12:15
You could make business with these! Sell them for lower price than the IKEA commercial version, but the price must be a bit higher than the cash you payed to make the lamp, so you'll get some money to yourself and moree money to make more of these! :)
It's a really nice lamp, I'm trying to make one too! :)
Pelle
07 Jan 2007, 15:43
Thanx! Kade :)
Megan
07 Jan 2007, 21:29
Good site!!! Thanx!!!
peyton
08 Jan 2007, 01:33
I got everything together, programmed the PIC (yay!), assembled the circuit, and I'm having problems.

My LED wouldn't light up very brightly. Red and Blue were dim (red brighter than blue) but green was nada. I went back and checked the spec sheet for the LED I got and it looks like it's expecting 5V for red, but 8V or so for green and blue :( LED specs here:

http://www.mouser.com/search/ProductDetail.aspx?R=BL-43F0-0305virtualkey59930000virtualkey599-BL-43F0-0305

(click on data sheet)

Now, here's my problem:
1) With red, I think I'm supplying enough voltage. Why is it so dim?

2) With blue, I'm low on voltage, so it makes sense that it would be dim. How might I alter my circuit? I don't think I can just replace my 5V power supply with an 8V one, because the PIC wants 5V.

3) Why won't green light? According to the power curve in the spec sheet, it will start drawing current at lower voltages than blue, so I would expect to see it brighter than blue..

4) Why does this schematic say 12V power source?

http://img408.imageshack.us/my.php?image=lampschematicae3.jpg

Is that just wrong?


Maybe I should just get another RGB LED? I'm trying not to waste the $30 I spent on this one :)

Thanks in advance, all
Ion
08 Jan 2007, 20:16
Good site!!! Thanx!!!
Kade
09 Jan 2007, 01:19
Okay, you have a number of problems due to the LED you chose.

THE PROBLEM - You are low on voltage to supply the LED.

TO FIX - use a higher voltage source (9V will be okay) BUT you must use a voltage regulator (EG 7805) to supply everything but the LED's. The resistor values will be completely different for your LED because it's different...

RED LED (WITH 9V SUPPLY) - your red LED has ~4.5V forward voltage drop thus...
(9V-4.5V)/(.350Amp) = ~12.8 Ohm resistor is required (MINIMUM)

GREEN LED (WITH 9V SUPPLY) - your green LED has ~6.7V forward voltage drop thus...
(9V-6.7V)/(.350Amp) = ~6.5 Ohm resistor is required (MINIMUM)

BLUE LED (WITH 9V SUPPLY) - your blue LED has ~7.6V forward voltage drop thus...
(9V-7.6V)/(.350Amp) = ~4 Ohm resistor is required (MINIMUM)

The schematic diagram that you mentioned has the wrong supply voltage.

Info on the 5V regulator is available at: http://www.tkk.fi/Misc/Electronics/circuits/psu_5v.html
(thank Matt above for that)

Considering the costs of changing the circuit, power source and the extra regulator + capacitors, you're better off getting a new LED online for about $9US. i got mine from sureelectronics off eBay.
Kade
09 Jan 2007, 01:23
Oh, and something I forgot to mention, those resistor values, being the minimum, will not necessarily provide a white light. Experiment with these, but remember not to use values less than what I specified earlier.

Kade

(I have made many variations of the source code now, it's fun!)
peyton
09 Jan 2007, 01:41
Kade, thanks a million. That was a very helpful answer. I'm (hopefully) going to be much better with the code and such than the electronics engineering.

Cool, what code modifications did you make? I've got some grand plans involving wireless control that hopefully I will get to share with you guys once they're done :)
Mario
09 Jan 2007, 10:04
Hi boyz!
i have a jdm programmer , but the ic prog with win xp goes in error!!Please suggest to me a solution to program the pic! And...the 16f84a work with KADE hex file?bye
Zaika Pu
09 Jan 2007, 10:15
Love is all around, lets all around the world to play
Mario
09 Jan 2007, 16:56
@Kate
please can you post the hand motion schematics and hex for lamp ?
Very thanks
Mario
Mario
09 Jan 2007, 18:22
@ALL
the pic 16f84a cannot work with this firmware because haven't a clock generator inside.
(thanks DJ_RACA)

BYE
Kade
09 Jan 2007, 23:07
@Peyton

I have made changes that I had listed above (added dimmer and 'white' function) I have also given the lamp the ability to remember what colour it was on prior to turn-off, this will only happen when the lamp is in pause mode because otherwise it's useless. With every new version, I publish to the address I mentioned earlier. I was thinking of providing the lamp with remote control but I couldn't find a good way to fit it all in the limited circuit space. Simply put, I find it much easier to program than to implement more electronics.

@Mario
Firstly, my name is Kade, not Kate (male not female), secondly, both the original and my version of the source code must be modified slightly to work on the 16F84, as does the circuit. For the circuit you must add a resonator or Xtal to the clock inputs of the 16F84, which means you will also have to modify the switch inputs. Don't bother unless you know what you're doing. The same goes with motion control. The easy-to-use position sensors from SHARP are no longer available so that idea died.
Lion
10 Jan 2007, 18:42
Good site!!! Thanx!!!
Mario
10 Jan 2007, 21:11
@Kade
i'm sorry for missing your name...
at this moment i'm studing to program the pic's...and many information are new for me...thank for your precious help!i don't bother somebody...my msg was intentionally to help.and after...literally I have written with this firmware doesn't work with 16f84...new software was remake for xtal use.no?For hand motion sensor i had see many time ago a dj that with your hand motion upper the sensors modify the music....now i search the dsp and post the link.
Enought sorry and bye to all!
Mario-a....
Locurtola
11 Jan 2007, 09:19
Hi everybody!

I'm trying to build this wonderfull lamp...

I bought a Prolyte led, common cathode.

To mount it, can I follow the pyramid lamp schema? (PIC out to transistor base, transistor collector to 1W resistor to Vcc, transistor emitter to led anode and led cathode to GND)

Can you confirm these links? If I'm right, I'll solder everything toghether...

Thank you for the help,

Locurtola from Italy
programmer
11 Jan 2007, 12:32
Hi
i have madde this lamp and it is working no problem on it. but i want to control its speed with the dmx signal and i will use one of the pins for the signal input... and also i have to make some changes on the jal file too

is there any body here to help me about it i will use SN75179BP for the dmx signal and i will use it from the adres 1 of my lighting table
peyton
12 Jan 2007, 23:30
Sure would be nice if these LEDs were more widely available... :) Maybe I should buy a lot of them and then sell them to you guys on e-bay?
Bruno
13 Jan 2007, 12:19
Locurtola, to use a common cathode led module, all tou have to do is connect the led cathode to gnd, connect the transistor collectors to +ve and connect the emitter of the transistors to the led's anodes through the resistors. This should work.
Programmer
13 Jan 2007, 15:53

Hi again everybody

I have a Question I want to use SW(Dipswitch) only for the speed nothing more.if 1.th dip on then rgb color change time is 30second if 2.th dip on then 45 secont if 3.th dip on then 1min if 4.th dip on then 2min how can i use it?
Kade
14 Jan 2007, 01:02
@Programmer

This will take some trial and error at adjusting the values under the procedure that defines the speed (I think it's pin a7), placing the code to handle the 4 DIPS in that procedure and then removing all the code from the other switches. My source code (above) is much easier to follow than Toons but my circuit is slightly different (6DIP + one pin shifted), but it will definitely help you understand the code. BTW I thought you were a programmer?

eg in my code you would make most of the changes under the 'speed' procedure.


Kade.
Tina
14 Jan 2007, 13:26
@ KADE
Hi ,
Sorry I'm late..
The first modification works good, but I don't think that is magenta color [code rgb 255 0 255, http://www.pitt.edu/~nisg/cis/web/cgi/rgb.html]
The 6DIP version I'll try soon...
Can you contact me at tina_sk9@inmail.sk ?
BR
Tina
Programmer
14 Jan 2007, 13:34
thank you kade i will look and try it
Programmer
14 Jan 2007, 14:41
hi kade again..i will ask a questions to you it is so in toon's jal file
------------------------------------
procedure speed is -- controls speed
if pin_a7 == high then
time = 50
else
time = 5
end if
end procedure
------------------------------------i want to use my 4 dip for speed before i finish the prosedure.a6-a7-a1-a2 oonly for speed nothing more..how can do that?it must be so :
if pin_a7 == high then 30 second change speed
if pin_a6 == high then 45 second change speed

if pin_a1 == high then 120 second speed

if pin_a2 == high then 240 second change speed

can you help me?
Kade
15 Jan 2007, 06:22
@Propgrammer

You've answered your own question, though you could make this a lot easier and give yourself space for two additional switch functions. You could use pin_a7 and pin_a6 to adjust speed. eg

pin_a7 pin_a6 SPEED
low low 30 sec
low high 45 sec
high low 120 sec
high high 240 sec

code:

procedure speed is -- controls speed
if pin_a7 == low & pin_a6 == low then
time = 27
elseif pin_a7 == low & pin_a6 == high then
time = 41
elseif pin_a7 == high & pin_a6 == low then
time = 109
else
time = 218
end if
end procedure

Those values (27,41,109,218) are not necessarily equal to 30, 45, 120 and 240 seconds, just approximate. To get these exact requires some trial and error because it's not a time value, rather a value of how many times a particular cycle is run.
Just try it but don't forget to take out all the pause(pin_a6) functions/calls from Toon's sourcecode because you're using pin_a6 for speed now. You will still have the functions for random and transition.
Programmer
15 Jan 2007, 13:09
hi kade

thank you very much for your help.yes you are right im a programmer but it is abbout the cnc and webmasters programs this is little different :-) im a new user about the pic micro and this sit is very nice and help to that what we look for..

thanks everybody
Greg
15 Jan 2007, 20:09
Does anyone have a working link to download ic-prog? I have the LED and PIC ordered and I want to build the programmer in the meantime. I would appreciate it greatly if someone could sent me a copy of ic-prog.

Thanks all!
programmer
16 Jan 2007, 12:37
Hi Greg

you can download it from here

http://www.denizelektronik.com/junior_prg.htm
Greg
16 Jan 2007, 22:30
Thanks programmer and Toon. I have it now.

Greg
fr33z
17 Jan 2007, 17:32
Kade,
I've tried to make your version. Somehow it works on the programmer/tesboard i use(velleman K8048 http://www.velleman.be/downloads/0/illustrated/illustrated_assembly_manual_k8048_rev4.pdf)
But it doesn't in my breadboard. I thought it was because I don'n have an oscillator in my breadboard, but I've set the options so that it will work without the ext. Osc.

When i disable the Ext.Osc. on my testboard it works perfectly, but when i put it in my version of your schematic it just flashed randomly. What can I try to get it right?

Grtz,
fr33z
programmer
17 Jan 2007, 22:33
Hi kade