Jump to content

Building A Circuit for LEDs


VilladonEnt
 Share

Recommended Posts

Hello,

I am planning out a circuit to provide power to the built in LEDs in my switches. The specs on my LEDs are rated for 4.2v to 6v Max and 15mA - 20mA max.

My thought was to use a voltage regulator like the 7805 on my circuit board to supply 5v to the LEDs since that is in the range my LEDs are rated for. Also I noticed there are three pins on the regulator,

1 for incoming power, 1 for ground and 1 for outgoing power.  Am I correct?  I do have a spare 7805 handy.  Would this be all I need to suppy the 5v?  How many mA does the 7805 produce?  I'm using a 12v 1250mA WallWart supply. 

Thanks All!

Villadon

Link to comment
Share on other sites

You will need a resistor in series with the diodes to limit the current. NEVER connect a LED directely to the supply voltage!

How to calculate the resistor value is shown here: http://www.kpsec.freeuk.com/components/led.htm

A 7805 can deliver up to 1A but it will get very hot with such a load. So better use a heatsink if you exceed 500mA.

Raphael

Link to comment
Share on other sites

Hi,

tying them into a +5v circuit is useful if your LEDs need to be always on. If on the other hand you want them to switch on and off according to actions on your box, you will want to use a DOUTX4 module for that. DOUTX4 both arranges for the supplying voltage (+5v is routed from the Core) and the logic. The resistors on this module are just what Raphael was pointing out: they're for limitting the current through the LED.

Good luck!

Link to comment
Share on other sites

Thank you guys for replying. :D

tying them into a +5v circuit is useful if your LEDs need to be always on.

That's exactly what I want to do.

I've figured out which resistors I need if I was going that route But with 60 or so buttons I thought it would be easier to create a 5v circuit.

My confusion is the power supply supplying 1.25 A  and the buttons only needing 15-20mA.  Excuse me for the lack of knowledge here but how

is the easiest way to reduce the mA? So I don't get the 7805 too hot.

Thanks Again!

Villadon

Link to comment
Share on other sites

Thank you guys for replying. :D

That's exactly what I want to do.

I've figured out which resistors I need if I was going that route But with 60 or so buttons I thought it would be easier to create a 5v circuit.

My confusion is the power supply supplying 1.25 A  and the buttons only needing 15-20mA.  Excuse me for the lack of knowledge here but how

is the easiest way to reduce the mA? So I don't get the 7805 too hot.

Thanks Again!

Villadon

Hi, the buttons will TAKE what they need. the PSU's rating is what it CAN deliver MAX. So, having an overrated PSU is no problem at all, it's even more safe this way.

Simple analogy:

Voltage gets FED to your components, so you'll have to make sure there's not too much of it, or they'll be over fed.

Amperage is DRAWN from your PSU, so you have to make sure there's enough of it, or your components will kill your PSU ;)

Cheers,  Alex.

Link to comment
Share on other sites

I just can´t withstand to pop in and bring my picture in. ;D Sorry!

I think the best way, voltage & current can be visualized is by water. Imagine that the voltage is the pressure with which the water comes out somewhere and the current as the water flow itself (to be exact, this is indeed the principle of the physical electron movement - the electrons are just water in this case).

So: If your supply is not connected anywhere, that means the resistance is very very high, plugs are between the + / - pole. The current/flow is zero and the voltage/pressure is at max level. If a copper piece is between the both ends, the "water" can easily be transported to the other side - the voltage/pressure drops rapidly (depending on the goodness of your supply) and the water flow is very high.

LEDs: LEDs are indeed something like copper pieces or "open water hoses". So if you connect them without anything else the current/flow will be maxed out to the highest Level and fry your LEDs. So you need some very small hose, so the water flow is slowed down before the LED/big water hose piece. These small pieces are called resistors. ;) The current/flow is stabilized and the voltage/pressure keeps at the max level of your supply (perhaps a *little* less).

I JUST hope that this STUFF is not as CONFUSING as I could IMAGINE!!! If it is, just ignore me. ;) ;)

Greetz!

Link to comment
Share on other sites

If you are trying to power 60 LEDs each with 20mA, as this is 1200 mA = 1.2 Amps. More than a 7805 can handle without getting hot. On top of that, you're pumping 12v into a 5v regulator, so 7 volts at 1 amp is being turned into heat.

Your last post suggests you think you don't need the resistors; you still do. It's the resistor that limits the current, the mA.

I don't know why you have a 12v supply, or whether your circuit needs 12v or not... but what you can do with that 12v is drive multiple LEDs in series. There's no need to regulate it to 5v first. You can put 5 in series, so if the voltage drop on each LED is 2v then that's a 10v drop across the LEDs, 2v drop across the resistor, so for 20mA for all 5 LEDS, use R=V/I -> R=2/0.020 -> 100 ohms. This way you can drive 60 of them in groups of 5 for just 12*20mA = 240mA.

Read that website again: http://www.kpsec.freeuk.com/components/led.htm

... and look at the FORWARD VOLTAGE on the specs of your LED. That's how much of a voltage drop there will be across each LED. You'll need that to calculate how many you can drive in series with 12v and thus how much voltage drop there'll be across the resistor in order to calculate the resistor value. If the forward voltage is the 4.5v to 6v values you stated already (are they blue or white??) then you can only put two in series.

Link to comment
Share on other sites

Hi Again  :D

If the forward voltage is the 4.5v to 6v values you stated already (are they blue or white??) then you can only put two in series.

They are Green/Red/Yellow LEDs the specs are :  IF = 20mA , VF typ. = 4.2v, VF max = 6.0v. The same for all colors.

VL = 4.2 + 4.2 ,  VL = 8.4

R = (12v - 8.4v) / 0.020

R = 3.6v / 0.020 = 180ohm

So I can drive 2 LEDs with one 180 Ohm Resistor. Correct?

I don't know why you have a 12v supply

Well I figured this would be ok, since i'm connecting 2 cores and a bunch of DINx4's for my MB64e. and also driving those LEDs mentioned above.

So what I understand so far I would be creating a circuit with 30 180 ohm resistors to drive 60 LEDs.

Thanks again for all your responses.  I've learned so much from this forum!!

Villadon

Link to comment
Share on other sites

Hi Again  :D

They are Green/Red/Yellow LEDs the specs are :  IF = 20mA , VF typ. = 4.2v, VF max = 6.0v. The same for all colors.

VL = 4.2 + 4.2 ,  VL = 8.4

R = (12v - 8.4v) / 0.020

R = 3.6v / 0.020 = 180ohm

So I can drive 2 LEDs with one 180 Ohm Resistor. Correct?

Well I figured this would be ok, since i'm connecting 2 cores and a bunch of DINx4's for my MB64e. and also driving those LEDs mentioned above.

So what I understand so far I would be creating a circuit with 30 180 ohm resistors to drive 60 LEDs.

Thanks again for all your responses.  I've learned so much from this forum!!

Villadon

If you only use Core, and some DINX4 it's better to use a 7Vac powersupply, so your 7805 won't get too hot. You don't need 12v at all.

Link to comment
Share on other sites

it's better to use a 7Vac powersupply, so your 7805 won't get too hot. You don't need 12v at all.

Thanks here for that tip as well!

I've been doing pretty good on heat sinking here, but I think I'll bump down to that too, if I can find something. What's the deal with the high tolerance on some of these things anyway? I've got some nice, heavy, high-amperage ones, which I thought would be safe, but things rated for 9V will put off 12 or 13, and 12's I've got can do up to 15 or 16. Can you check the regulator inputs to see what they actually do in-circuit, or is it exactly the same on that side? (-my basic electronics theory went down the toilet about a year after leaving the classroom)

Also, I notice you recommending an AC supply. Any preference there, even with the rectifier sections?

Lastly, if we had a larger d.out board with all our lights on it, can you hang more than one regulator/filter circuit off the main input supply for each board, if the pin 2's are tied, or is that asking for trouble?

Sorry to tack a bunch of questions on Villadon's post, but I guess he may want to know them as well. :)

George

 

Link to comment
Share on other sites

Thanks here for that tip as well!

You're welcome, but as always: as soon as anybody else gives you advise that sounds like they're more knowledgable about this stuff, they probably are ;-)

I've been doing pretty good on heat sinking here, but I think I'll bump down to that too, if I can find something. What's the deal with the high tolerance on some of these things anyway? I've got some nice, heavy, high-amperage ones, which I thought would be safe, but things rated for 9V will put off 12 or 13, and 12's I've got can do up to 15 or 16. Can you check the regulator inputs to see what they actually do in-circuit, or is it exactly the same on that side? (-my basic electronics theory went down the toilet about a year after leaving the classroom)

I don't understand what you mean with "tolernce", but if it is about the regulators: they need about 2 volts to operate. So in order to get a clean 5v you need to feed it 7. Also note that these regs only give accurate readings when something is actually attached to it, a Core for example. or else they will indeed feed higher voltage on the out pin.

Also, I notice you recommending an AC supply. Any preference there, even with the rectifier sections?

AC is nice, because when rectified and regulated, you get the peak current from the wave (so in practice your AC voltage gets upped bij 41% when converted to DC, minus 0,7v). If you feed DC to your rectifier,the only thing it will do is eat 0,7v from it. You could use a DC supply and omit the rectifier, but be careful not to switch the polarity, or you'll discover a new kind of smell from your elco's :-)

Lastly, if we had a larger d.out board with all our lights on it, can you hang more than one regulator/filter circuit off the main input supply for each board, if the pin 2's are tied, or is that asking for trouble?

Your DOUT boards get their power from the Core, unless you build a custom cable. If you want that, you could power each DOUT board with a separate Filtercap/78xx line. But let's say for example that you'll use 100 LEDs, and they're always on. I don't know if you want full brightness, but let's assume you'll go with the standard 220 Ohm resistors. (Right now I'm going to use a calculation from a website in Dutch: http://www.tomvanleeuwen.nl/led/ - it's for calculating LED values. If you can't read Dutch it's not much use unfortunately)

Let's also assume your LED's are rated for 3,5V and 20mA - that's quite standard. With 220 Ohm resistors they will draw about 7mA a piece. that's 700mA for all your 100 LEDs. As long as you don't use a backlit LCD, your entire box can be powered off 1 7805. If more power is needed, just increase the value of your resistors. If you use 390 Ohm, the current will be down to 4mA per LED, so using 200 LED's wil only eat 800mA. They will be less bright though. You can also use the bigger resistors to limit the current so a backlit LCD can be attached to a single 7805.

Hope this clears things up a bit. And I also hope I haven't made any stupid errors, I'm fairly new to electronics myself ;-)

Cheers,  Alex.

Link to comment
Share on other sites

What's the deal with the high tolerance on some of these things anyway? I've got some nice, heavy, high-amperage ones, which I thought would be safe, but things rated for 9V will put off 12 or 13, and 12's I've got can do up to 15 or 16. Can you check the regulator inputs to see what they actually do in-circuit, or is it exactly the same on that side? (-my basic electronics theory went down the toilet about a year after leaving the classroom)

If you measure the voltage coming out of an unregulated walwart (with nothing attached), it will be a bit higher because there's no load. It is supposed to deliver the rated voltage at the rated current, eg. 9v at 1A. If the only "load" is your multimeter, it will be a higher voltage than the rated voltage. This means that if you use a regulator, the walwart's rated voltage must be 2-3v higher than the regulator voltage so you can still regulate it down to the desired voltage when you are drawing the maximum current. You can check the regulator inputs, but the voltage would be relative to the load on the regulator outputs. (My theory might be wrong too - I'm not really an expert just a tinkerer!)

Link to comment
Share on other sites

Alex & Wilba,

Thanks!

Yeah, the "tolerance" part was actually about the transformer (wall-wart) part of it. I figured it was like Wilba said, and they were just spec'd for some "pre-regulator" headroom. For instance I've got some 9's which are fairly close to nine volts, then these other giant ones, who put out 12 or 13. They're also higher wattage, which would make sense with the part about the current-related "drop".             

I appreciate the tip on that. I guess that means with these big-ass ones powering something like a core, they're probably knocking the crap out of the 7805, since the overall load won't take the input supply down all that much. I'll try to be a little more realistic on my xformer choices.

Alex's part about the "split" input supply is exactly what I meant. I have a tendency to make boards with not only my buttons, lights, or pots on them, but the whole shift register/mux chain to go with them. I was wondering what I'd need to do if I just landed a 7805, the filter caps and a rectifier on the bigger boards for that stuff, and just took the data/select stuff to and from the core. Seems like it would be easier on the main board, and I could use smaller (or no) sinks on them.

What considerations would be made on wiring the boards like that? I guess all the grounds have to be tied, but what should I plan for, as far as keeping the proper voltage and current for each of them?

Thanks Again!

George

EDIT-- Just went back and saw the additions to Alex's power supply post. Looks tasty! I guess that's sort of the same thing I was just asking about, only he's got different regulator values.

-- So does this mean a parallel split to multiple regulator circuits is OK?

Link to comment
Share on other sites

  • 2 weeks later...

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

×
×
  • Create New...