audioguru Posted March 18, 2007 Author Report Share Posted March 18, 2007 Hi Gramo,You have read the datasheet for the PIC. You saw that it does not have a higher pulsed max current rating like a motor and a power rectifier do. Absolute maximum means absolute maximum, not "sometimes".Read the forum of the author of our Mood Lamp project. He forgot to use base resistors and some people did fry their PIC. Then the author used 10k resistors with a value much too high for our project. Kade used 100 ohms which is too low.MP:You didn't answer my question about what is the max PWM duty-cycle in the PIC's code. The author's max peak current measurement is far from the max current rating of the expensive LEDs. Quote Link to comment Share on other sites More sharing options...
MP Posted March 18, 2007 Report Share Posted March 18, 2007 You are right. I did not answer that question. You are telling me how it works, but at the same time, asking me how it works.At this point I see that I have allowed this thread to get away from being useful to members of the community. Thus, I will withdraw from the debate. I encourage you both to continue your education and to take a few chances on parameters that are not listed on the data sheet. When a spec is not listed on a datasheet, this does not mean it is not allowed. A datasheet is only a guide or starting point. It would be a fairly large book if the manufacturer listed all possible test parameters. It only gives you the basics. From there, you must use your own knowledge and experience, or perform your own testing.MP Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 18, 2007 Author Report Share Posted March 18, 2007 ... take a few chances on parameters that are not listed on the data sheet.That is gambling.The datasheet for the PIC is very clear: Do not use an output current of 25mA or more. Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 19, 2007 Author Report Share Posted March 19, 2007 Why was Gramo's reply deleted?It was important. Quote Link to comment Share on other sites More sharing options...
MP Posted March 20, 2007 Report Share Posted March 20, 2007 Importance level null. Post was in violation of Forum member agreement.Content removed.MP Quote Link to comment Share on other sites More sharing options...
gramo Posted March 20, 2007 Report Share Posted March 20, 2007 Re-phrased;I would not recommend this project to new comers because it puts your hardware at risk.Do not modify your program unless you are prepared to buy new components.Double check you Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 20, 2007 Author Report Share Posted March 20, 2007 Hi Gramo,I started this thread because the value of the base resistors is too high to allow the transistors to conduct the high currents needed for the expensive tri-colour LED.I also noticed that the value of the current-limiting resistor for the red LED was too low and would cause the current to be too high and the value for the blue LED was too high. The author made his first Mood Lamp using the transistors as emitter-followers that did not need base resistors.Then he made this one with the transistors as common-emitter type but did not include base resistors. People on his forum complained that their PICs were frying. I have attached his schematic here.He added 10k base resistors to our project without calculating their value properly.Kade in his forum also mis-calculated and used 100 ohm base resistors.I don't know if it is the switching speed of the transistors or the program PWM that limits the currents in the LED too much. Maybe the author burned a few LEDs because his heatsink is too small. Then maybe he reduced the PWM max duty-cycle to reduce the average current for less heating. Quote Link to comment Share on other sites More sharing options...
ante Posted March 20, 2007 Report Share Posted March 20, 2007 How about changing the BC 337 for some BC 517 they don Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 20, 2007 Author Report Share Posted March 20, 2007 Hi ante,The BC517 darlington transistor has a typical base-emitter voltage of 1.4V at the current used by the LED. When a PIC output goes high then a base resistor is needed to limit the current to less than 25mA.The max current in this project is much lower than the 350mA rated current of each of the 3 colours at max brightness simultaneously. I don't know why the current is so low. Quote Link to comment Share on other sites More sharing options...
ante Posted March 21, 2007 Report Share Posted March 21, 2007 Hi AG,So, perhaps we need to change the series resistor values to compensate for the BC517 drop then. I believe the current draw of the BC 517 base will never get anywhere near 25mA! Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 21, 2007 Author Report Share Posted March 21, 2007 Hi Ante,The base current of the BC517 darlington transistor must be limited by a resistor. The PIC has high-speed powerful Cmos transistors like the 74HCxx series, so when the PIC output goes high but it is held to only 1.4V then its current will be typically 55mA. Quote Link to comment Share on other sites More sharing options...
ante Posted March 24, 2007 Report Share Posted March 24, 2007 So, the outputs are not protected? I did not get anything from the diagram. Why not completely redesign or just use mosfets instead? Quote Link to comment Share on other sites More sharing options...
audioguru Posted March 24, 2007 Author Report Share Posted March 24, 2007 Hi Ante,The absolute max output current allowed for a PIC is only 25mA.The absolute max output current allowed for a 74HCxx is also only 25ma.I think a PIC has the same Mosfets as 74HCxx ICs.My graph of output currents for 74HCxx ICs shows that with a 4.5V supply and a transistor's base holding an output at 0.7V then the typical output current is 41mA and with a 6V supply it is 68mA. Average the two at 55mA for a 5V supply.The current reduces a little as the output Mosfet gets hot.Base resistors as low as 172 ohms would limit the current to 25mA.100 ohms is too low because then the current is too high.10k ohms is much too high unless the transistor's load current is very low or the transistor is a high gain darlington.This circuit is fine when the proper base resistor value is used. Quote Link to comment Share on other sites More sharing options...
ante Posted March 24, 2007 Report Share Posted March 24, 2007 Yeah all right, no mosfets! 8) Quote Link to comment Share on other sites More sharing options...
DirtyH Posted April 2, 2007 Report Share Posted April 2, 2007 Hi therei found your project here, but was really shocked when i found outyou did not recommend a heatsink as a musthaveif you use the 3W zpower led like in your tutorialyou MUST use a heatsink.with no heatsink you will shorten the life of your led very extremly!!i quote the datasheet of the original 3W zpower led:--------------------------Caution--------------------------Please do not drive a rated current more than 5 sec. without proper heat sinkso, to the author please add that to your tutorialsome suggestion:i used an old pentium 100 heatsink in my moodlamp:my complete worklog could be found here:http://freenet-homepage.de/haraldschmid/bml/ Quote Link to comment Share on other sites More sharing options...
audioguru Posted April 2, 2007 Author Report Share Posted April 2, 2007 Hi Harald,Welcome to our forum.The author of out Mood Lamp project used a heatsink on the first one he made and it is shown on his website. But for our project he says you can use a heatsink if you want.The 10k base resistors have a value that is way too high for the transistors to conduct high current. The base resistors should be 680 ohms. Then the LEDs will be much brighter if the program allows it. Then a heatsink must be used.Here is a pic of Toon's heatsink: Quote Link to comment Share on other sites More sharing options...
blueroomelectronics Posted May 2, 2007 Report Share Posted May 2, 2007 On MOSFETs like the IRF510 which had an on resistance of 0.54 ohm won't even get warm at 350ma. No gate resistor is required and the PICs outputs will drive em fine at 5V. They are expensive though, much more than a 2N2222A + 680ohm resistor. Quote Link to comment Share on other sites More sharing options...
audioguru Posted May 2, 2007 Author Report Share Posted May 2, 2007 Hi Blueroom,An old IRF510 Mosfet has a max threshold voltage of 4.0V and it conducts only 250uA. So if its gate voltage is 5.0V then it conducts only about 2.5mA. It turns on well when its gate voltage is 10V.An expensive logic-level Mosfet like an IRF3711Z has a max resistance of 7.3 ohms when its gate voltage is 4.5V. Then its voltage loss is 2.6V which is much higher than the saturation voltage of an ordinary cheap transistor. Quote Link to comment Share on other sites More sharing options...
blueroomelectronics Posted May 2, 2007 Report Share Posted May 2, 2007 I've got a Vgs of 20v on the datasheet, and a Vgs MAX of 4.0 on the same datasheet...http://www.aoc.nrao.edu/~pharden/ref/_IRF510.pdfAhh, I see, the MAX 4V is the minimum it needs to switch on... Quote Link to comment Share on other sites More sharing options...
audioguru Posted May 2, 2007 Author Report Share Posted May 2, 2007 I've got a Vgs of 20v on the datasheetThat is the highest voltage that can be used without breaking it.and a Vgs MAX of 4.0 on the same datasheet.That is the max threshold voltage for some of them to barely turn on when they conduct only 250uA. The curves show that a typical one conducts 350mA when its Vgs is 4.5V.You cannot buy a sensitive one. They are random. Quote Link to comment Share on other sites More sharing options...
blueroomelectronics Posted May 2, 2007 Report Share Posted May 2, 2007 Ok is a 2N2222A a workable transistor? or a 2N4401? Quote Link to comment Share on other sites More sharing options...
audioguru Posted May 2, 2007 Author Report Share Posted May 2, 2007 Ok is a 2N2222A a workable transistor? or a 2N4401?The 2N4401 has identical spec's to a BC337, a max saturation voltage of 0.7V with a collector current of 500mA and a base current of 50mA. Their pins are reversed.The 2N2222A has a max saturation voltage of 1.0V at the same currents. Quote Link to comment Share on other sites More sharing options...
blueroomelectronics Posted May 2, 2007 Report Share Posted May 2, 2007 Ahh thank you, I'll use the 2N4401Do you know the 2N equivalent of the BC548 & BC558? Quote Link to comment Share on other sites More sharing options...
audioguru Posted May 2, 2007 Author Report Share Posted May 2, 2007 Do you know the 2N equivalent of the BC548 & BC558?A 2N3904 is NPN like the BC548 and a 2N3906 is PNP like a BC558. They have their pins opposite to the European ones. 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.