nefelodamon Posted November 28, 2006 Report Share Posted November 28, 2006 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? Quote Link to comment Share on other sites More sharing options...
audioguru Posted November 28, 2006 Author Report Share Posted November 28, 2006 The microcontroller does whatever it is programmed to do.It does not do what it is not programmed to do. Quote Link to comment Share on other sites More sharing options...
MP Posted November 29, 2006 Report Share Posted November 29, 2006 Nef,If you did not set the fuse bits correctly, the micro is not going to work correctly. You need to re-program the PIC before you can do much else.MP Quote Link to comment Share on other sites More sharing options...
nefelodamon Posted December 1, 2006 Report Share Posted December 1, 2006 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? Quote Link to comment Share on other sites More sharing options...
nefelodamon Posted December 5, 2006 Report Share Posted December 5, 2006 I don't know why but today it worked.... ;DAll of a sudden I reprogrammed the pic once more and it worked perfect!!!I even build a second pcb and it worked without any problems!Thank you all!Here is the pcb of the project!!!led.mood.lamp.rar Quote Link to comment Share on other sites More sharing options...
lolong Posted December 10, 2006 Report Share Posted December 10, 2006 hi! the code of this project is correct? i think it´s bad, because i simulated with Oshon Pic Simulator IDE. Only on the red led. Quote Link to comment Share on other sites More sharing options...
lolong Posted December 16, 2006 Report Share Posted December 16, 2006 hi! i have a 12v and 500mA transformer, and i had to use a L7805CV for convert 12v to 5v, but the current that pass by any resistor of collector is about 30mA. Anyone can say me why is? Quote Link to comment Share on other sites More sharing options...
audioguru Posted December 16, 2006 Author Report Share Posted December 16, 2006 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. Quote Link to comment Share on other sites More sharing options...
nase Posted March 13, 2007 Report Share Posted March 13, 2007 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 ;DEtching is not the problem...There are two versions... with 7805 (55x42mm) and without (52x42mm).Any help would be greatly appreciatednaseEdit: Schematics removed Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 13, 2007 Author Report Share Posted March 13, 2007 Hi Nase,Welcome to our forum. ;DI 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. Quote Link to comment Share on other sites More sharing options...
nase Posted March 13, 2007 Report Share Posted March 13, 2007 @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 ;DI 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 Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 13, 2007 Author Report Share Posted March 13, 2007 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. Quote Link to comment Share on other sites More sharing options...
MP Posted March 16, 2007 Report Share Posted March 16, 2007 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 Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 16, 2007 Author Report Share Posted March 16, 2007 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.MPIts 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. Quote Link to comment Share on other sites More sharing options...
MP Posted March 16, 2007 Report Share Posted March 16, 2007 Yes, current. You totally don't understand this, do you? Never mind.MP Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 16, 2007 Author Report Share Posted March 16, 2007 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?? Quote Link to comment Share on other sites More sharing options...
MP Posted March 17, 2007 Report Share Posted March 17, 2007 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 Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 17, 2007 Author Report Share Posted March 17, 2007 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. Quote Link to comment Share on other sites More sharing options...
MP Posted March 17, 2007 Report Share Posted March 17, 2007 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 Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 17, 2007 Author Report Share Posted March 17, 2007 MP,Why do you disagree with manufacturers and use excessive supply voltage for opamps and excessive output current on Cmos microcontrollers and on power transistors in inverters? Quote Link to comment Share on other sites More sharing options...
MP Posted March 18, 2007 Report Share Posted March 18, 2007 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 Quote Link to comment Share on other sites More sharing options...
gramo Posted March 18, 2007 Report Share Posted March 18, 2007 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 Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 18, 2007 Author Report Share Posted March 18, 2007 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. Quote Link to comment Share on other sites More sharing options...
MP Posted March 18, 2007 Report Share Posted March 18, 2007 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 Quote Link to comment Share on other sites More sharing options...
gramo Posted March 18, 2007 Report Share Posted March 18, 2007 If the PIC were to fail due to some modified programming that went wrong, or a simple wiring error such as MCLR not being tied to 5V, the user would fry thier PIC :-\ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.