Jump to content
Electronics-Lab.com Community

High Power LED Mood Lamp


audioguru

Recommended Posts

Are the resistor values correct in this nice new project?
http://www.electronics-lab.com/projects/games/005/index.html

The red LED has a forward voltage much less than the green or blue but it has the lowest current-limiting resistor value. Therefore if the transistor saturates then its current will be 554mA which is way more than its 350mA rating.

If its transistor saturates then the current in the green LED is 125mA.

The blue LED is the least sensitive and has a high forward voltage. Its current limiting resistor has the highest value so if the transistor saturates then its current will be only 83mA and it won't be very bright.

But the 10k base resistors allow a base current of only 430uA. For the transistor to conduct 300mA then its current gain would need to be 700! These transistors can't saturate.
The current gain of the BC327 is typically 135 but could be as low as 54.
The PIC can output much more than only 430uA so shouldn't the base resistor values be reduced to supply the transistors with enough base current to saturate? A value of 680 ohms would work fine.

post-1706-1427914318266_thumb.png

Link to comment
Share on other sites


  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic


Although 10K is a bit more than I would use, either way is fine since the source is a PIC. The project is ok as is.

MP


The expensive high power LED is rated for a very bright 350mA per LED. With a base current of only 430uA then the transistors supply typically only 86mA of LED current. What a waste!

The cost of using base resistors with the correct values: NOTHING! Why not?
I wonder what value of base resistors Mixos used for his. He and a few others said it didn't work without any base resistors and the author said his PIC got hot.
Link to comment
Share on other sites

PICs can run hot with no current limiting. Since this program is sending out a pulse and not a steady DC voltage, there is no danger to the PIC. It will just run warmer at certain duty cycles.

Personally, I like to use resistors on the output pins of microcontrollers. I am just saying that the "no resistor" version will work.

MP

Link to comment
Share on other sites


PICs can run hot with no current limiting. Since this program is sending out a pulse and not a steady DC voltage, there is no danger to the PIC. It will just run warmer at certain duty cycles.

Personally, I like to use resistors on the output pins of microcontrollers. I am just saying that the "no resistor" version will work.

MP


The PIC has a max allowed output current of 25mA. When it is driving the nearly dead short of a base-emitter diode then the current is as high as 60mA, because it is HC Cmos.
Of course series base resistors are needed to limit the current and limit the power dissipation in the PIC. A few people including Mixos said that the PIC didn't work without the current-limiting resistors.

The guy who recommended adding base resistors said his PIC worked fine and ran cold. All others that didn't work also worked fine with base resistors.
Why not engineer the job correctly?
Link to comment
Share on other sites

The purpose of this thread is to show my discovery of two problems with this new project.
Hopefully, the problems will be corrected so people making the project will have it work well.

1) The value of the base resistors for the transistors is much too high and stops the transistors from conducting anywhere near the high current rating of the expensive LED. Therefore the expensive LED will operate fairly dimly like cheap LEDs.
The project in the photos and on the author's website has the LED operating at extremely high currents because that circuit didn't have base resistors.

2) The current-limiting resistors for the LEDs have values that would overload the red LED and cause the blue LED to be too dim, if the base resistors are correct. A few people on the author's website reported blowing-up their red LED due to the overload.

Link to comment
Share on other sites

The photos on the project page here in Electronics lab are with the 10K resistors. I agree that are high and i should test a lower value.

About the collector resistors these are calculated to produce a white color when all leds are on. That means that we don't need all led to power on maximum. Some of them will be used below specifications to achieve better efficiency on the produced colors.

Link to comment
Share on other sites

Thanks, Mixos.
The BC337 transistor has a very wide range of current gain. With 680 ohm base resistors then the base current is 6.3mA which is well within the amount that a PIC can safely supply (25mA max) and is enough for any BC337 transistor to saturate properly for high brightness.

The mood lamps I built slowly fade all 3 colors from zero to the same high amount of luminous intensity, so when the colours are separate then their max brightness looks the same. Then they fade to every tint of white that is possible, and also fade to any brightness of any colour, like on a colour TV screen.

This project has white chosen to be the brightest, therefore red is much brighter than green or blue, and blue by itself is very dim.

The blue LED in this project is 3.5 times dimmer than the green so I think it should have a higher current than the green, the project has the blue LED with the lowest current. The red is nearly the same brightness so I think its current should be nearly the same as the green, instead of having 4.4 times more current and having much more brightness like in the project. The program should ramp the colours equally to produce all the colours which happens on a colour TV screen.

Be careful. The max current for the LED is 350mA. Therefore its minimum current-limiting resistor value for red is 7.4 ohms if the transistor saturates well. The project has only 4.7 ohms for the red which will make 553mA and burn it out like is reported on the author's website.

Link to comment
Share on other sites

Hi Nef,
I think there was some confusion from the discussion about the different designs on our site and on the author's site. I would recommend building the project as it is on this site and then making any adjustments as needed to get the colors and brightness where you want it. The 10K resistors on the project will not allow the micro or transistors to burn up. The project is using PWM instead of a straight DC signal, so there is much latitude before parts failure

MP

Link to comment
Share on other sites

Hi Nefelodemon,
I am sorry that it is confusing.

If the base resistors for the BC337 transistors are 680 ohms instead of 10k ohms then any BC337 transistor will saturate well and cause the max LED current to depend on the value of the current-limiting resistor, the power supply voltage, the LED voltage and the PWM in the program. With 10k base resistors and current-limiting resistor values as in the project then transistors with low gain will cause the LEDs to be dim, and transistors with high gain will burn the red LED.

The author selected current-limiting resistor values that operate the red LED at a very high current that is much more than its spec'd max, and will cause it to be much brighter than the other colours and will cause it to fail as had happened to people reporting the problem on his website.

The resistor values on my corrected schematic operate the LEDs at safe currents and so that each colour will have the same max brightness.

The max spec'd current for each LED is 350mA.
With a 27 ohm current-limiting resistor, the 2.2V red LED will have a max current of 96mA.
With a 15 ohm current-limiting resistor, the 3.55V green LED will have a max current of 83mA.
With a 3.9 ohm current-limiting resistor, the blue LED will have a max current of 321mA.
I planned the currents according to the Luminous Intensity of each colour so that their max brightnesses will be the same.
The author selected different brightnesses because he wanted white to be the max brightness and white has a lot of red and not much green and blue. With the program fading each colour then white will always be produced when the brightnesses of each colour are the same.

Link to comment
Share on other sites

Thanks for your answers!
I've decided to "go" with audioguru since he claims that his resistor values are the safer and  produce more light that the values described on the project page.

Now I have created a pcb for this project but I'm worry about the routes width. I design it with eagle and I've choose the 0.024 route width (I'm not sure what the unit of this number is).
Is this width enough for 500mA currents or do I need bigger tracks?

Note on pcb:
1) The pic on PCB is the PIC16F83P but it has the same pinout as the PIC16F628A that is not included on Eagle library.

Edit: PCB Image removed. Next version available at next posts!

Link to comment
Share on other sites

You show 3.7 ohms but 3.9 ohms is a standard value. It will dissipate a max of 400mW so use a 1/2W or 1W resistor which is larger than what you show.

The 27 ohms will dissipate 250mW so use a 1/2W resistor.

The 15 ohms will dissipate only 100mW so a 1/4W resistor is fine.

I recommend adding a supply bypass capacitor on the pcb even if you must add a jumper for it. Use a 0.1uF ceramic disc.

Link to comment
Share on other sites


You show 3.7 ohms but 3.9 ohms is a standard value. It will dissipate a max of 400mW so use a 1/2W or 1W resistor which is larger than what you show.

The 27 ohms will dissipate 250mW so use a 1/2W resistor.

The 15 ohms will dissipate only 100mW so a 1/4W resistor is fine.

I recommend adding a supply bypass capacitor on the pcb even if you must add a jumper for it. Use a 0.1uF ceramic disc.


Thanks for the suggestions.
I will correct the value of the 3.7 ohm resistor to 3.9 as you comment (I'm not very familiar with the available values of components  ::) )

As for the capacitor, is ok a 0.1uF / 50V ?
Also do you think the board has space problems using the  1W resistor? I was going to solder them in upright position.
Link to comment
Share on other sites

I want the pcb to be as smaller and compact I can so a regulator with a heatsink is a little "heavy" for me ::) But if I don't find a regulated 5V  power supply I will think that option!

This is the next version of the pcb ( including the supply bypass capacitor- no air wires required  ;D ).

Any furhter suggestions?

post-1722-14279143186733_thumb.jpg

Link to comment
Share on other sites

I ordered 2 leds from Ledsee electronics and I m waiting to get them in my hands. I also wait the pic samples from microchip! Until that moment I hope to have the board ready for soldering!!!
When I get it to work I will try to make some temperature measurements to see if a heatsink is necesery.

And a final question: what settings I must use to Eagle to export the PCB for printing in actual size?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
  • Create New...