|
Post by David Murray on Nov 3, 2006 20:25:52 GMT -5
This is sort of on-topic.. I'm ready to start wiring up my shuttlecraft warp-engines, but I need a proper schematic. I'm very un-knowledgable on transistors.. but based on what I read of how they work, I've put together this schematic. Don't worry about the number of LEDs, resistor values, etc.. because I haven't even decided for sure how many LEDs I'm going to use and what voltages they will be. My main thing is, am I using the transistor correctly? And does it matter that that LED circuit runs on 12V but the shift-register will be sending +5V to the base on the transistor? if something is wrong, let me know asap.. I'll revise the diagram and repost it until it is right!
|
|
|
Post by gmoon on Nov 3, 2006 23:16:00 GMT -5
(I'm not by any means an expert at this stuff, but I have some books and magazines on the subject...) A couple points: 1) The transistors in your drawings don't seem to be either NPN or PNP; an NPN should have the arrow pointing from the base to the emitter. But, connection wise, the drawing seems correct (for NPN.) 2) The difference in voltages shouldn't make any difference, so long as the transistor can handle the voltage applied (and current drawn.) The voltage will effect the amount of current, tho. 3) The correct value for the base resistor can't really be figured without knowing: - a) the Hfe (gain) spec of the transistors
- b) the amount of current you want to switch (I could guess if I knew # of LEDs)
- c) voltage output of the shift reg (classic TTL would be ~2.5 volts)
Given all that, I think you're pretty close: if Transistors are typical NPN (like a 2n2222), H fe = 30 if you're using 3 LEDs in series, collector current (Ic) = ~55 mA, (.055 A) 0.0018333 = .055/30 (I b = I c/H fe) (Base current = collector current/ Hfe) 1360 ohm = 2.5/0.0018333 (R b = V b/I b) (Base resistor = base voltage/base current) Mighty close to 1K for this setup.... The more current you want to control at the collector, the smaller the base resistor value. If you're switching 500 mA, the resistor value =~ 150 ohm. So you can't really set that value until you decide on # of LEDs, etc.
Sits back, and waits for someone to correct him..
|
|
|
Post by MadModder on Nov 4, 2006 6:00:18 GMT -5
Considering a chain of LEDs in series draws a maximum of 30mA, you can use low power (100mA) transistors with large hfe. Then it really doens't matter what base resistor you use. Even as much as 18k works => (5-0,7)/18000=239µA. With a BC547C (hfe=>420) You have a LED driver good for 100mA.
Strive for the lowest current possible everywhere. When every LED is lit on a 8 bit shift register, only the base currents gives: 8 ports with 1k resistors -> 35mA. -> 175mW 8 ports with 18k resistors -> 1,9mA. -> 9,5mW Quite a bit of difference.
I mostly use 10k resistors and BC547C transistors for this kind of purposes.
|
|
|
Post by David Murray on Nov 5, 2006 0:43:16 GMT -5
Rats! I'm having a horrible time figuring out which LEDs to buy! I can't seem to get any good information. I bought several ones from Fry's to experiment with, even though they charge ridiculous amounts.. ($3 to $4 per single LED!!!!) But I needed to figure out what LED to use before buying hundreds of them for my project online.
The trouble is, the information on them is bad! Every single one I bought from fry's was advertised to be "Super Bright" or "Ultra Bright" or some crap.. but when I hookede them up, most of them were no brighter than the LED on a 1541 disk drive. And many of them had the voltages labelled wrong! Quite a few were labeled as 5V. I thought that sounded weird, and when they blew up I wasn't extreemly surprised. Turns out they were actually 3.7V when I looked up the part number on the internet.
The biggest problem I'm having is figuring out which ones are bright. The 'Super Bright' one I bought at Fry's today turns out to be a 45 mcd intensity. The same manufacture (Linrose, in this case) has other LEDs they advertise up to around 3,000 mcd. So, I would figure those would be the bright ones. But other manufacturers list their mcds as migh as 100,000. So.. what the heck? And I hoped I could figure it out by the voltage or miliamp draw.. but what is weird is that many of the LEDs that are totally different brightness levels consume the same amount of energy.
Anyone got a suggestion on a brand or model# where I can buy a few hundred LEDs (white, blue, yellow, or green would do!) that would be REALLY bright? I want the kind like they use in flashlights!
|
|
|
Post by MadModder on Nov 5, 2006 4:57:25 GMT -5
No, you can't figure out the brightness from current and voltage. LEDs have no (ordinary) internal resistance... I have bought several models from here www.besthongkong.com/The last ones were 10mm 100,000 mcd. I have used some of them to make a nice flashlight. Three 5mm 8,000mcd and a 9V battery in two film... ehm... containers?: madmodders.se/temp/ficklampa_6.JPGmadmodders.se/temp/ficklampa_8.JPGAnd the 10mm ones in an old broken flashlight: madmodders.se/temp/handlampa04.jpgmadmodders.se/temp/handlampa07.jpgmadmodders.se/temp/handlampa08.jpgthe last two pictures have the same camera settings, to show how bright the light is. It is not absolutely pure white, as you can see by the yellowish streaks. I also have 5mm blue. Very nice ones. It is kind of interesting how the white light is achieved. It is blue LEDS, whith a yellow phosphor coating inside on the LED chip (you can actually see this: madmodders.se/temp/BHKs_10mm.jpg ), and the coating lights upp when lit and blends whith the blue, and you have white. [edit] And you have the arrows wrong. The transistor leg with the arrow is always emitter. NPN always has the arrow pointing away from the base plate. The arrow shows tha current direction according to base. NPN has the current flowing from base to emitter.
|
|
|
Post by gmoon on Nov 5, 2006 9:35:33 GMT -5
No, you can't figure out the brightness from current and voltage. LEDs have no (ordinary) internal resistance... I didn't know that simple fact (I sort of knew it; using 'voltage drop' instead of resistance)--that makes a big difference in these equations. Thanks. My experience is limited to driving relays & motors.
|
|
|
Post by David Murray on Nov 5, 2006 16:58:24 GMT -5
Madmodder,
Those 10mm don't really look like 10mm in the picture. I guess there isn't a frame of reference.
I checked out the website you gave. I would say the LEDs there are definatly what I'm looking for but they are twice as expensive as other places I've seen. But I think I'll go ahead and buy them there so I know for sure they are the ones I want.
Does the arrow being in the wrong place affect the design any? From what I can tell the wiring doesn't change, right?
|
|
|
Post by MadModder on Nov 6, 2006 13:14:23 GMT -5
Right. Your design is correct for NPN transistors, like gmoon said earlier. How's this for a frame of reference?
|
|
|
Post by David Murray on Nov 6, 2006 15:56:00 GMT -5
Yeah... The whole flashlight is larger than I originally thought. Those are probably the same LEDs I ordered from them yesterday (cost me $25 after shipping for a pack of 50) I hope they will be bright enough.
Actually.. I'm sort of curious if these are as bright as the say they are, I might only need one LED per leg on my shift-register to achieve the effect I want. In which case, maybe I won't need a transistor. I'll just have to experiment with them when they arrive in a few weeks.
I'm also thinking about using them around the house for lighting to replace some incandescent and fluorescent lights I have. If you wanted to run them off 110V A/C, could you just use a rectifier and the correct number of LEDs in series (probably close to 30 of them) or would you still need some kind of resistor?
I actually did an experiment with this a few years back using some regular green LEDs. However, they burned out after a few days. In retrospect, I think the package I had bought had mislabeled the voltages for them (which is not uncommon. The ones I just bought from Fry's were labeled as 5V, but when I looked up the manufacturer's part# on the internet I found they were 3.75V)
|
|
|
Post by MadModder on Nov 7, 2006 14:40:56 GMT -5
Since LEDs don't have an internal resistance like we are used to with ordinary lamps, a small variation of i.e. 0.1V may burn the whole thing up. A resistor in series with a LED is always needed. That means it is generally not at good idea to connect three 2V LEDS to 6V. Make it two and a resistor.
|
|
|
Post by pyrofer on Nov 7, 2006 17:44:39 GMT -5
Ok, I bought some blue leds that have a forward voltage of 3.3v Im running them from a PIC similar to the 1541-III board at 3.3v The formula i was given was (Supply-forwardvoltage)/0.02=ohms so, 3.3-3.3/0.02=0
I put a 0ohm resistor in? put simply, wtf?
|
|
|
Post by MadModder on Nov 8, 2006 15:11:30 GMT -5
That is a problem. You can't have a supply voltage that is exactly the same as the forward voltage. Well you can, but without a resistor, the LED is extremely sensitive to voltage variations. It will most certainly suffer from a premature death at 3.4V. Let's say your 3.3V rail may give out as much as 3.4V occasionally. (very unlikely, but anyways...) That makes it 5 Ohms. 5.6 Ohm is a good choice. You wont notice any difference.
|
|
|
Post by pyrofer on Nov 8, 2006 15:42:59 GMT -5
Well, Its a two colour led, red/blue and i put it in with the existing resistors at 330ohms each. It seems bright enough with that, if it goes brighter then d**n, it really IS ultra bright.
My 1541-III-DTV has a BLUE drive led, nannannaa!
|
|