small electronics project/ prop

Discussion in 'Electronics & Electrics' started by Pugs, Jul 6, 2008.

  1. Pugs

    Pugs Member

    Joined:
    Jan 20, 2008
    Messages:
    9,263
    Location:
    Redwood Park, SA
    wanting to power 16 LED's all up 8 green "powered" on LEDs and then via a momentary switch 8 x "fired" RED LEDs

    Looking to use the Jaycar 3mm Red ZD-0102 & 3mm Green ZD-0122 LED's with the STSP Momentary SP-0710 and the Master Arm ST-0578 as the switches.

    so would 2 x AA or 1 x 9volt be suitable, what else would i need to use to make sure these where powered correctly ??


    so current flow would be Battery -> Master Arm switch -> Green LED's -> Momentary Switches-> Red LED's
     
  2. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    582
    Location:
    Newcastle, NSW, Australia
    Ok, the 2 LEDs you've listed both run off around 2 volts, and draw about 30mA each. A quick play around with the LED resistor calculator here and it looks like your best bet would be to use a 9v battery, and make 4 seperate strands of 4 LEDs. Connect 2 strands (8 leds) to 1 switch, and the other 2 through both switches.

    [​IMG]

    If you make up 4 strands like that, with 4 LEDs connected in series, then a 47 ohm resistor, then you can wire those strands up to your switches like this.

    [​IMG]

    Make sure you never run the LED's without a resistor or you'll blow them up. And be sure to get em around the right way (the long wire is the +, the short is the -)

    Should be plenty to get you going ;) Happy modding :)
     
    Last edited: Jul 6, 2008
  3. OP
    OP
    Pugs

    Pugs Member

    Joined:
    Jan 20, 2008
    Messages:
    9,263
    Location:
    Redwood Park, SA
    so 9volt battery-> Master on switch -> Resistor -> Green LEDs x 4
    -> Resistor-> Green LED's x 4
    -> Fire Switch-> Resistor -> Red LED repeated 8 times.

    this would be correct?
     
  4. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    582
    Location:
    Newcastle, NSW, Australia
    No worries ;)

    It was one of those things I didn't learn until using it after school, but it doesn't matter where resistors go, as long as they're in line with the LED, they'll work.

    The reason I've arranged them in strands, rather than side by side like (i think) yours, is because if you try to power a 2v LED from a 9v battery, you'll need a huge resistor to drop the voltage down. Even larger if you want to drive 16 of them side by side, and it'll get very hot.

    But the nifty trick is, if you wire 2 LEDs in series, they only get half the voltage going to each, so you only need a resistor half the size.

    With 9v we can do this twice, so we can make a chain of 4 LEDs and they'll only have 2.25v going to each of them. Then we only need to drop it by 0.25v, which is a much easier job ;)

    Otherwise I think our designs are pretty much identical, if there's any other part your not sure on pls ask.

    If you still want to wire them in parallel, i'd really recommend putting a resistor onto each led then wiring the pairs together. To do this with a 3v supply, you need a 39 ohm resistor for each LED. To do it from 9v you need a 270 ohm resistor, 1/8W or 1/4W is fine for either.

    If you want a single resistor driving a bank of 8 LEDs, take the figures above and divide them by the number of LEDs. so from 9v it would be 270 / 8 = a 33.75 ohm resistor. Please keep in mind that driving LEDs in parallel like this will draw alot of current, and put alot of strain on the LEDs and resistor(s), make sure they're 1W resistors not the small 1/8W or 1/4W, and they'll be running at near max capacity so they may get warm.

    That would give you banks of 8 LEDs, so you'd need to do that twice and wire both up to your switches. You pretty much can't do it with a single resistor for all 16, because the number of them on will change, which will change the resistance you need.

    No matter how you wire them up you shouldn't need more than 2 wires going to each completed group of 8. And yeah the example in your post is right.
     
    Last edited by a moderator: Jul 8, 2008
  5. TMM

    TMM Member

    Joined:
    Mar 29, 2005
    Messages:
    7,487
    Bern Edit: Abuse = ban, see you in 24 hours.

    7v drop @ 30mA is 210mW, hardly a huge heat load and that's a worst case scenario.
    Most LEDs are only rated for 20mA or so which is low enough for a 1/4W resistor, even when running the LED from 12v. The only case i can think of where you'd need more then a 1/4W resistor for an LED is if you were running off 15v+, or had multiple LEDs in parallel with a single resistor - which you should never do, the slight variations in forward voltage between the LEDs will cause them to draw different amounts of current, and not only will the brightness vary between them, but it'll cause some to fail prematurely if the current exceeds their rating. 1/2W Metal film resistors are cheap as chips anyway, and they look cool (they are blue rather then brown).

    Also i can't understand how running them in parallel would put more strain on the LEDs, in parallel the current is divided and the voltage is constant. Only if you are an idiot and don't know how to calculate the right resistor will this happen, but you shouldn't be doing it either way because of the reason outlined above. If you 'strain' your LEDs with to much current they will just blow up.

    It's better as strands though due to better efficiency and less components needed.

    Wrong. LEDs have a fixed voltage, and the 'excess' voltage is dropped by the resistor. It doesn't matter what resistor you put in series with an LED, the voltage drop across the LED will always be the same. The value you choose for the resistor determines the current which flows through both the resistor and the LED. Choose a resistor with a value too low and the current will be too high and blow the LED. If you put 4x LEDs (with a forward voltage of 2v) in series (with resistor in series too) from 9v source, the voltage drop across the resistor is 1v. Say your LEDs are rated for 20mA, then to determine the correct value for the resistor you go 1v/0.02A = 50ohms.
     
    Last edited by a moderator: Jul 8, 2008
  6. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    582
    Location:
    Newcastle, NSW, Australia
    niice... i'm just gonna ignore this one.. seeing as your points are just as stupid as this dribble..

    No, hes talking about using 16x 30ma high brightness LEDs, in parallel, which you'd know if you'd listened to him and looked them up like i did. From 9v if he connected them all in parallel and used a single resistor it would have to drop the voltage from 9v to 2v, and handle 480ma of current. In other words, it would push out 3.36w of heat, which is quite a lot for a small wire resistor, and far above its rated current. I said 1/4W or 1/8W would be fine for the smaller groups.

    It will drop by 1v in total across the resistor, so the voltage across each LED will drop by 0.25v from 2.25v, to bring them to their required voltage. Everything I said tracks with what you've said. Its two ways of looking at it...

    So your point would be?? other than blue resistors look cool.. which i'll pay, but he's asking what he needs, going over and above is obviously an option :p

    I'm assuming he's going to be mounting these in some kind of confined space (given the 3mm LEDs), so i'm guessing a resistor on each LED wouldn't be the easiest way to do it, the 4 chains of 4 LEDs i've suggested is still tidy but won't load anything up too much.

    Learn the material before you attack people.. you just look stupid otherwise.
     
    Last edited: Jul 8, 2008
  7. TMM

    TMM Member

    Joined:
    Mar 29, 2005
    Messages:
    7,487
    That's not a different way of looking at it, it's just wrong. Resistors don't drop a fixed amount, LEDs do. Resistors regulate the current, not drop the voltage.

    If you read my post you'd know why it is unnecessary to wire them in such a way, why he shouldn't wire them in such a way, and thus why he shouldn't need such high rated resistors. The slight variations in LEDs (even from the same batch) is enough to cause some LEDs to draw too much current (and subsequently cause others to draw little, and be dim) when in parallel with other LEDs - EDIT: not to mention the forward voltage between the red and green LEDs are different so you couldn't put all 16 in parallel anyway. In a perfect world it would work as long as all the LEDs had the same specs, but in reality, if the LEDs are to be in parallel, each LED needs their own resistor. It also works out cheaper to buy a lot of low power resistors then one high power one.

    1/2W resistors should be fine in the OPs case if he is using 30mA LEDs with a seperate resistor for each led.

    edit: here are the correct values
    [​IMG]
    if they don't have those exact values in stock then go the next value up. 1/4W or 1/2W rating should be fine.
     
    Last edited: Jul 8, 2008
  8. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    582
    Location:
    Newcastle, NSW, Australia
    wth? My point was to illustrate that it was a bad idea... I didn't tell him to do that... Where are you getting this? If he really wants to wire up 16 LEDs in parallel and drive them from a single resistor, I agree totally that its a terrible idea, but i'm not gonna stop him. (actually i did, i told him 2x8 was the most he could do, but it seems you missed that too) I said more than once that parallel wasn't the way to go, but it was the information he was asking for, I might as well not be rude and not hold back.

    I'm not arguing with you, you're talking about cause, i'm talking about effect. If you checked the voltages across the LEDs in a chain of 4 like i've said, the result of adding the resistor is a 0.25v drop across each LED, or a 1v drop overall. fkn learn to read.. A resistor is a required component when driving LEDs, and the resistance directly affects the voltage across each LED, the higher the resistance, the lower the voltage. This is exactly what I've said. It does this by regulating the current across the entire series, but that has no bearing on what we're talking about since the end effect is the same. How can you call that wrong??


    Damn OCAU used to be a great place.. nice to see its gone to the dogs with the rest of the net.. Why the hell are you attacking me? Argue away if you like, but I haven't seen you make a single point against what i've told him to do, or any of my figures... It's just personal or attacking my point of view...
    Sounds like someones been beat over the head with a textbook too many times... get out there in the real world.
     
    Last edited: Jul 8, 2008
  9. TMM

    TMM Member

    Joined:
    Mar 29, 2005
    Messages:
    7,487
    If you insist.
    "Then we only need to drop it by 0.25v"
    This is wrong because the voltage across the resistor is 1v. I learnt to read kthx, and no where did you say that was for each LED.

    "only have 2.25v going to each of them"
    wrong because LEDs have constant voltage drop.

    "resistor to drop the voltage down"
    wrong because resistors don't 'drop the voltage', they regulate the current. If you run an LED without a resistor the wiring going to the LED determines the current. Being very low resistance it'll allow a lot of current to flow (but the voltage will still be the same.) and your LED will blow up.

    Also running a lot of LEDs in parallel isn't a bad idea because you need a beefy resistor (because a lot of smaller resistors together make the same heat as one large one (V*A + V*A+ V*A = V*3A), but because of the reason i detailed.

    In the diagram that you posted, with values calculated properly, 1/4W resistors are more then fine.

    I like how you say to use a 1W resistor in the parallel example, when 1W isn't enough either. Also "In other words, it would push out 3.36w of heat, which is quite a lot for a small wire resistor" well in other words, the resistor would resemble a small piece of burnt carbon :D.
     
    Last edited: Jul 8, 2008
  10. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    582
    Location:
    Newcastle, NSW, Australia
    umm


    LED 3mm Red 500mcd
    If mA: 30
    If mA (peak): 160
    Min: 1.5
    Vf (V) Typ: 1.8
    Max: 2.2

    LED 3mm Green 500mcd
    If mA: 30
    If mA (peak): 200
    Min: 1.7
    Vf (V) Typ: 2.1
    Max: 2.4

    Your values of 20 ohm for the green and 60 ohm for the red are correct, but neither LED will be damaged running from a 39 ohm resistor. Calibrating to 2v, and actually drawing 2.1v, when i'm rounding the resistance up, is close enough.

    The 39 ohm resistor will allow a maximum of 50mA of current through the Red LED at 1.8v, which is well within its tolerance.

    EDIT: It was 47 ohm.. even closer.. 38mA at 1.8v, 28.2mA at 2.1v, oh well

    The idea was to keep it nice and simple for what seemed to be an early dabble in electronics, sorry for not trying to horrify the guy :p
     
    Last edited by a moderator: Jul 8, 2008
  11. TMM

    TMM Member

    Joined:
    Mar 29, 2005
    Messages:
    7,487
    How is 50mA ok when it's constant current rating is 30mA? the 160/200mA rating is only for a very short period (e.g. voltage spike), not for prolonged operation.
     
  12. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    582
    Location:
    Newcastle, NSW, Australia
    It's a simple way of looking at it, which makes the maths make sense to noobs. It was mentioned in passing, why the hell are you picking this apart? The function works the same, it has the same end result, and its a very easy way of looking at it, and the way i've found alot of people have been taught at school, so not worth arguing over.. I see the elitism runs deep.

    Again I never said anything wrong. It was said in the context of diving voltage by running the LEDs in series, which left him a theoretical 2.25v running to each LED, which he had to 'correct' by calculating the resistance to suit. I know what you're saying, i'm not an idiot, you're just failing to see where i was coming from.

    Bern Edit: Abuse = ban, see you in 24 hours.

    Yes they will burn the same amount of heat overall, but its pretty simple science to know that 16 things getting mildly warm are lots better than 1 thing getting fkn hot. Again i said 1/4W resistors would be fine for the smaller chains.

    Again you're taking things out of context, i told him a 1W resistor would be ok for the banks of 8, which would be pushing it, but would not burn them out. since it was a 'what not to do' example i wasnt too worried. The 3.36w was to drive all 16, which i've never said was an option or a good idea.
     
    Last edited by a moderator: Jul 8, 2008
  13. TMM

    TMM Member

    Joined:
    Mar 29, 2005
    Messages:
    7,487
    Well every school in Victoria teaches it the way i have explained (part of VCE physics). There's no excuse to not the use the correct way, because it's not even difficult. It's not elitism it's theory.

    Running a high power resistor is no problem at all. You can get 10W resistors which don't get that hot at all at high loads because they are so large. The heat is distributed over their surface area.
     
    Last edited: Jul 8, 2008
  14. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    582
    Location:
    Newcastle, NSW, Australia
    The green LEDs are his 'fire' lights, on a momentary switch, i'd give them years.

    I've never heard of VCE physics, but then i havent been 18 in a while :p. And your theory is great, and correct, But I was trying to explain 4 years of electronic engineering in 100 characters of text, excuse me for skimming some points.. i'm not here to train him in the correct prim and proper theory, i'm trying to give him the tools he needs to solve his problem and tell him what works in a way he can easily understand.

    V/I=R, ie "Voltage you need to drop by / Current draw of the LED = Resistance you need" Has been the standard for eons for this, and this is the context that i was talking in..


    I couldn't be assed with this anymore, at least get some people skills if you want to debate in public mate. "Don't listen to ViPeR-7 they have no idea what the fuck they are on about." is not the way to start a civilized conversation. The OP took this conversation to PM and I brought it back into public for the chance that I had something wrong or someone had something to add, not to get abused for helping someone. If the OP wants any more help he can bring it back to PM, this place is obviously useless.
     
    Last edited: Jul 8, 2008
  15. TMM

    TMM Member

    Joined:
    Mar 29, 2005
    Messages:
    7,487
    Understanding how diodes work is hardly 4 years of electronic engineering. There's no excuse for using the wrong resistor when it takes all of about 4 seconds to do the calculation.
     
  16. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,760
    Location:
    Cambridge, Massachusetts
    Shut the hell up the pair of you. You're more or less agreeing with each other, while explaining a simple concept in a very convoluted fashion, which can only serve to confuse the OP or anyone else reading (I had to read some of both your posts three or four times before I got what you were on about). Viper, he's right, your second post approached the theory from completely the wrong angle, and will only disadvantage the OP if he tries to learn anything further. TMM, he's right, stop being a douchebag.

    Pugs, to summarise what these two clowns have been trying to say, for your purposes you can consider LEDs to have a fixed voltage drop across them - they will conduct no current below this point, and infinite current above this point. You can read this right off the specs, the Vf(typ). It varies somewhat, which is where the Vf(max) and Vf(min) come into play. It's also why you can't put a chain of them in parallel, because if one LED has a slightly lower drop than another, the lower one will take all of the current, and blow, then the next lowest one will take it all and so on. You can ignore the implications of the previous two sentences, though, so long as you use series chains or give each LED its own resistor.

    Once you understand that the LED has a fixed voltage across it, you need to limit the current through it using a resistor. If you've got a circuit with a voltage source, an LED and a resistor, you know that the voltage source is fixed (consider a 9V battery to deliver 9V, even though this can vary slightly, you can treat it as fixed). You know that the voltage across the LED is fixed. The voltage across the resistor must be the difference between the two. So, if you've got a 9V battery and a 2V led, the voltage across the resistor must be 7V. If you've got a chain of four of those LEDs in series, the total voltage across them must be 8V, and hence the voltage across the resistor is 1V. Parallel chains can be calculated separately - they all have the same 9V across the chain, and hence are independant of each other.

    You can set the current that flows through the LED by setting the current that flows through the resistor, because any current that goes through one must go through the other. You set the current using ohm's law (V=IR). If you have a 2V led and a 9V battery, and you want 20mA to go through the LED, you must use a 350ohm resistor. The voltage across the resistor is 7V, the current is 0.02A (20mA), and V/I = 350.

    For LEDs which are continuously on (more than, say, 5-10s at a time) you should try to deliver the typical rated current. As has been pointed out, though, if they're only on momentarily you can push the envelope a bit and give them more current for more brightness. I'd go for 30mA through the reds and 50mA through the greens.

    Curly things start to happen when you get close to the source voltage though. Because the way I've described them above is only an approximate model, their real characteristics start to become a problem if you're dealing with tight tolerances, and small resistances. Small changes in voltage or resistance result in big changes in current, so you will probably find that as the battery goes slightly flat the leds will become disproportionately dim, or you might have abnormally low voltage drops and get them too bright and burning out over time. As a rule of thumb, I like to leave about 20% of the supply voltage vor current control. It's probably not a big problem, but if you can go with 15 instead of 16, you'd be better off with five chains of three for the green leds at least. You could also add an extra one on its own, using the method above.

    So, for chains of three green leds, you'll have 6.3V across each chain. This gives 2.7V across the resistor, and, for 50mA, it gives 54ohm resistance. A 56ohm is the nearest available, it will do fine. For the red chains or four, you'll have 7.2v drop, which gives 1.8V across the resistor. For 30mA, that's a 60 ohm resistor. Using the leftover 56ohm resistors will only give you 32mA, which should still be fine, but you can go for 62 ohm if you prefer to err on the side of caution - 29mA

    SHORTCUT: if all of the above sounds no less convoluted than what viper and TMM were shouting about, you can ignore all of the theory and follow this method. Read the Vf(typ) and If off the spec chart for your chosen LED. The resistor you need is given by
    R = [Vs - n*Vf]/If
    Where:
    R is the value of the resistor you need (use the next higher value from the shop)
    Vs is the supply voltage
    Vf is the typical forward voltage of the LED
    If is the typical forward current of the LED
    n is the number of LEDs you wish to have in series.
    And never try to put leds in parallel with each other, each chain must have its own resistor.

    Simple enough?
     
    Last edited: Jul 8, 2008
  17. STIK79

    STIK79 Member

    Joined:
    Jun 21, 2002
    Messages:
    1,056
    Location:
    Adelaide
    Just to add: To work out the power dissipated in the selected resistor:
    following LethalCorpses terminology

    P = ([Vs - n*Vf]^2)/R

    then I like to double it just to make sure.

    I.E. for the green string above and selecting a 56ohm for 48mA (see LethalCorpses maths)

    P = ([9 - 3*2.1]^2)/56
    P = 130mW disipated in the resistor - doubling gives 260mW so either a 1/4 or 1/2W resistor is fine :) (1/2W if you wanna be REALLY REALLY careful)
     
  18. alvarez

    alvarez Member

    Joined:
    Jun 25, 2006
    Messages:
    2,622
    Location:
    Geelong 3218
    just in case your brain hurts after the walls of text take the easy way out.
    http://ledcalc.com/
     
  19. OP
    OP
    Pugs

    Pugs Member

    Joined:
    Jan 20, 2008
    Messages:
    9,263
    Location:
    Redwood Park, SA
    tried that.. got some similar figures as posted above... yeah my brain hurts.... so much for a simple project...
     
  20. alvarez

    alvarez Member

    Joined:
    Jun 25, 2006
    Messages:
    2,622
    Location:
    Geelong 3218
    Its not hard and all you realy need is the resitor in ohms, From memory...

    R = V / I

    R is resistor value
    V is voltage drop across the LED (supply voltage - LED Voltage)
    I is LED current.

    I think its in one of the stickys, If you are really lazy like me the above link even gives you a crude wiring diagram of how to connect up the LEDs.
     
    Last edited: Jul 9, 2008

Share This Page

Advertisement: