Jump to content
Electronics-Lab.com Community

High Power LED Mood Lamp


audioguru

Recommended Posts

Hello again!!!

I've managed to build the pcb and program the pic but there seems to be some problems...
None of the green or blue led seems to be saturated (except the red one) and they don't  work as in the project description. There are no random colors and the changing pattern does'nt work.  The pcb and the wiring is correct. I only used some bc338 transistors intead of the bc337 described on the project.
I can only pinpoint the problem to bad programming of the pic. Is there any posibility to be programmed wrong using wrong fuses?
When my friend tryied to programme the pic none of the recomended fuses or the oscilator appeared but instead some others did (wich I can't remember). I sugested to change them to the ones the project describes but I get the above malfunctions ???
The problem now is that I can't reprogram them because my friend that owns the pic programmer is out of town:(
You think that using the fuses the binary aks for will solve the problems?

Link to comment
Share on other sites


  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

More dissapointing news ???
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 are set correctly.
I can only now pinpoint the fault in the hex program itself.
Any advise?

Link to comment
Share on other sites

Hi Lolong,
I started this thread to hopefully prevent the dim problem you are having. I said:
"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."

Change the 10k base resistors for the BC327 transistors to 680 ohms for much higher current in the transistors and in the LEDs. Then the red LED will have a current higher than its max allowed so the 4.7 ohm resistor should be changed to at least 8.2 ohms.

Try it and let us know if it fixed the dim problem. Then we can get the project fixed. 

Link to comment
Share on other sites

  • 2 months later...

Hi @ll,
can someone please check my modyfied layout for the advanced Mood Lamp with 6DIP switches made by Kade (see org. site). It's the first time that I've made a layout and I'm not really familiar with electronics ;D
Etching is not the problem...

There are two versions... with 7805 (55x42mm) and without (52x42mm).

Any help would be greatly appreciated

nase

Edit: Schematics removed

Link to comment
Share on other sites

Hi Nase,
Welcome to our forum. ;D
I noticed that you use 100 ohms base resistors for the transistors. Then the max output current rating of the PIC is is exceeded. Its absolute max output current rating is 25mA and yours is 43mA. Our project has the base resistors much to high at 10k. The author first tried no resistors and some people smoked their PIC. In this thread I explain why and recommend 680 ohms.

Sorry I didn't check your pcb.

Link to comment
Share on other sites

@audioguru,
thanks for the friendly welcome. You must have looked only at the schematic and this is not mine.... it's from Kade. He made the advanced version with a total different pinout and new code.

In the PCB's above, I have taken your advise. sorry for confusion ;D

I would like to know if my routing and the general layout is ok, because I mixed three into one. Normally I took a ready made layout etch it, order the necessary parts, solder it and hope that everything goes well ::)
I really have no clue of all the different parts/values and stuff :-[

Thanks nase

Link to comment
Share on other sites


I really have no clue of all the different parts/values and stuff :-[

The same for the programming experts the author of this project Toon, and Kade who made some more programming changes and additions.

In the author's forum, two other guys agree with my change of the base resistors but I have never been on that forum.
Link to comment
Share on other sites


I noticed that you use 100 ohms base resistors for the transistors. Then the max output current rating of the PIC is is exceeded. Its absolute max output current rating is 25mA and yours is 43mA.


This is not a steady DC voltage. It is a pulsed voltage. It is calculated differently. Your output is a factor of the on state vs the off state.

MP
Link to comment
Share on other sites


This is not a steady DC voltage. It is a pulsed voltage. It is calculated differently. Your output is a factor of the on state vs the off state.

MP


Its manufacturer warns that it might  blow up if its absolute max rating is exceeded. We are talking about current, not heating.
The PIC does not have a higher current rating for pulses like the transistors and LEDs do.

It is not necessary to exceed the 25mA max output current rating. A 680 ohm resistor limits the current to only 6.3mA and still allows the BC337 transistors to conduct the max 350mA for the LEDs.

post-1706-14279143417725_thumb.png

Link to comment
Share on other sites


Yes, current. You totally don't understand this, do you?

I understand that the mood lamp uses Pulse-Width-Modulation to dim the LEDs. The outputs of the microcontroller are pulsed. They don't need to have a current that exceeds the manufacurer's absolute maximum current rating. You don't understand??
Link to comment
Share on other sites

Yeah, i do understand. I read the source code. That is where you see nase does not have a current problem with his setup. But it is not that big of an issue since you have misinformed him on the safe side. Hence, my comment, "never mind".

MP

Link to comment
Share on other sites

The author's supply current graph indicates a max peak current of only 232mA that is far less than the max current ratings for the LEDs which is 350mA x 3= 1.05A.
My analog Mood Lamps use cheap ordinary LEDs but have a very bright max current peak of 300mA.

Therefore in the source code what is the max PWM duty-cycle that is used for each colour?
If the source code indicates that a high duty-cycle is used then the reduced max current is caused by the incorrect 10k base resistors for the transistors.
With a reduced value for the base resistors then is the max current rating for the LEDs exceeded?

The choice of 100 ohm base resistors for the transistors is also incorrect in the opposite direction since the max current rating of the outputs of the PIC is exceeded. 

Link to comment
Share on other sites

In another topic you asked why a member would email me instead of you when they found a problem with a design you were involved in. Look at this thread. The reason should be perfectly clear. You have exhausted this subject.

Everything you use in normal everyday life uses this same principal. Pulse a cheaper motor with DC pulses so that you do not have to incorporate a more expensive higher voltage/current rating motor in the design. It does not hurt the motor. It does not hurt the micro.
I am finished with this. Do you actually have a degree in theory, or is this a self-proclaimed title?

MP

Link to comment
Share on other sites

Well, that question doesn't make any sense. I guess it was an attempt at insult or avoidance?

I noticed you avoided my last question. The reason for this question was not insult. I was told that you do not have a degree. That you are a retired Stereo technician proclaiming to be a theory expert.

MP

Link to comment
Share on other sites

audioguru's comments made plenty of sense to me, reading over the last few threads.

25mA is the absolute maximum current rating from a PIC, exceeding this will lead to putting the device under conditions that will deteriorate its life span.

Pulsed or constant, absolute is absolute

Link to comment
Share on other sites

MP:
What is a degree in theory? I have a Bachelor of Electronic Engineering degree from Ryerson University in Toronto, Canada. I never had a mentor so I did not become a P. Eng. I worked at designing communications and sound systems for my entire career. I am an old geezer and have been retired for 6 years.

I noticed that you proclaim yourself as an engineer but you don't do any engineering on this site. Are you a salesman?

I just read the datasheet for a device and avoid operation beyond the manufacturer's absolute maximum ratings. The manufacturer says that operation above the max rating may cause permanent damage and may affect reliability. I believe them, you don't.

Some heavy duty items like motors and rectifier diodes have a continuous rating and a higher rating for short pulses. Light duty items like ICs don't have a higher rating.

Link to comment
Share on other sites

That's the course that allows you to be eligible for "Engineer in training" upon graduation, but does not recognize you as an Engineer, isn't it?

Gramo: There is most certainly a difference in voltage and current output between pulsed and constant. The output voltage is not the same on a switched circuit as a constant one.  Especially with varying on and off times. This is the whole purpose of PWM. Absolute ratings given in a data sheet are performed with a constant source.

MP

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...