Author Topic: Question on the LM7812  (Read 16245 times)

0 Members and 1 Guest are viewing this topic.

wildbill hickup

  • Full Member
  • ***
  • Posts: 183
Question on the LM7812
« on: December 03, 2005, 08:12:11 PM »
Will the LM7812 allow a lower (than 12v) to pass. I hope to use it to better regulate power from bats to LED's In high wind gusts sometimes I will see voltage spikes going into the bats. I beieve this may be why my LED's are experiancing a short life. They will work fine for quite some time but get slowly dimmer and dimmer til some of the just plane go out. I have a dozen or so LED's all run as a separate circuit parallel to each other with thier own 470ohm resistor. Will a LM7812 control the voltage the LED's see while letting say 11 volts through when bats are lower. Is it normal to see 15-16volts into bats for a brief amout of time durring a high wind gust?
« Last Edit: December 03, 2005, 08:12:11 PM by (unknown) »

ruddycrazy

  • Hero Member
  • *****
  • Posts: 519
Re: Question on the LM7812
« Reply #1 on: December 03, 2005, 01:59:33 PM »
Hiya Bill,

          Eh mate I just went thru and checked the current that would flow thru the 470 ohm resistor at diffent voltages ie:12-15 volts and the biggest current I got was 35 milliamps, this shouldn't blow the led's. Anyway a LM7812 needs a 3 volt buffer higher than the output voltage to operate as stated in the datasheet. You could use a low-dropout regulator though. If you can put your schematic here I can have a better idea but without enough info I'm only guessing. One LED driver chip which looks the bee's knees is the HV9910 and it can drive a string of high wattage led's in series, I have a few samples but time hasn't allowed me to play with them yet. Anyway mate if I can help out I will


Cheers Bryan

« Last Edit: December 03, 2005, 01:59:33 PM by (unknown) »

dinges

  • Hero Member
  • *****
  • Posts: 1294
  • Country: nl
Re: Question on the LM7812
« Reply #2 on: December 03, 2005, 03:59:11 PM »
Hi,


Yes, an 7812 will pass lower voltages, though with a bit of voltage loss. (I'm speaking from experience here; this thing has bitten me once ;-)


E.g., you have 10V going into the 7812; at the output you will have about 8V (+/- 1V). I think the same applies for lower voltages than 10V, but I have no proven data on that. You could of course give it a quick try yourself, by varying input voltage and measuring output voltage. Quick & easy, I'd say.


As to driving LEDs: until recently, your setup (voltage regulator & individual resistors for the LEDs) was how I drove LEDs. You can also rig a 7812 to be a current source: instead of a constant voltage, it supplies a constant current (say, 20mA for a LED). But before I'll explain, I suggest you search the web ('7812' 'current source' should do the trick), or that you give us more information about your setup & your needs.


BTW, if you have 12V, you could put several LEDs in series (about 2-3 if white LEDs, which need about 3.5V each; about 10 red LEDs, which need about 1.7V each) and use only one series resistor for each LED-chain. That way, you lose much less power in your series resistor (which can also be much smaller, perhaps only 20-50 ohm) and get much more light. This is more effective (& simpler too!) than using, say, 3 individual LEDs, each connected to 12V via its own resistor.


If what you really need/want is a voltage regulator for your battery (unclear to me), you should have a higher voltage than 12V; you could use an LM317, which you can easily adjust, or you could use your 7812 and put a few (2-3) diodes in the middle leg to ground (kathode to ground). This would raise your ouput voltage by .7V for each diode.


So, in short, I'd advise to put at least several LEDs in series for each chain; and the 7812 will protect your LEDs (& batteries, but not really a problem) against voltage spikes (as long as they are lower than 35V, which I think is the maximum voltage the 78xx-series is capable of handling.


Good luck & let us know if you need more specific info.


Peter,

The Netherlands.

« Last Edit: December 03, 2005, 03:59:11 PM by (unknown) »
“Research is what I'm doing when I don't know what I'm doing.” (W. von Braun)

dinges

  • Hero Member
  • *****
  • Posts: 1294
  • Country: nl
Re: Question on the LM7812
« Reply #3 on: December 03, 2005, 04:26:23 PM »
Oops, instead of '10 red leds of 1.7V each' you'd better use only 6-7. Calculations from memory... 10*1.7=17, not 10.7 :-)


Peter,

The Netherlands.

« Last Edit: December 03, 2005, 04:26:23 PM by (unknown) »
“Research is what I'm doing when I don't know what I'm doing.” (W. von Braun)

RP

  • Hero Member
  • *****
  • Posts: 722
  • A dog with novelty teeth. What could go wrong?
Re: Question on the LM7812
« Reply #4 on: December 03, 2005, 04:38:45 PM »
Another way to protect your LEDs is to use a Zener diode as a voltage clamp.  Put a 13volt zener across your LEDs (after the resistor) and if the voltage gets too high, it goes into conduction and "Clamps" the voltage.  The resistor will protect the zener too.


ALtenratively if you have a bunch a plain old silicon diodes you can do the same thing with a string of them.  Each one will act as a 0.6volt clamp. 20 in series will conduct at 12 volts.  Measure the voltage across the LED chain (after the resistor).  That will probably be 9-10 volts or so. add the right number of diodes to be a little more and hook them in.  Now you're protected and there's zero loss until you are in an overvoltage condition.

« Last Edit: December 03, 2005, 04:38:45 PM by (unknown) »

dinges

  • Hero Member
  • *****
  • Posts: 1294
  • Country: nl
Re: Question on the LM7812
« Reply #5 on: December 03, 2005, 05:28:23 PM »
Well what do you know; whilst searching the web for an entirely different issue, this link came up:


http://www.otherpower.com/otherpower_lighting_leds.html


It has most of the info you need/want, I think.


However, 2 or three images didn't get through; they give errors on the website.


Otherpower.com doesn't cease to amaze me... It hadn't even crossed my mind to look for LED-related issues there.


Peter,

The Netherlands.

« Last Edit: December 03, 2005, 05:28:23 PM by (unknown) »
“Research is what I'm doing when I don't know what I'm doing.” (W. von Braun)

ghurd

  • Moderator
  • Super Hero Member Plus
  • *****
  • Posts: 8059
Re: Question on the LM7812
« Reply #6 on: December 03, 2005, 05:39:14 PM »
I have seen some 78XX that will not conduct if they can not maintain XX.


Measure the current through the LEDs. Generic internet LED math is usually overdriving them considerably, maybe over double.

Keep them 20ma or less, 15ma is better.

Do not parellel multiple LEDs with one resistor, because 1 LED will have a lower Vf and get much more current than the others.


A 78XX based current source is nice. But a single resistor per LED string is easy.

Make sure to actually measure the ma.


Sounds like your LEDs are way overdriven.


G-

« Last Edit: December 03, 2005, 05:39:14 PM by (unknown) »
www.ghurd.info<<<-----Information on my Controller

dinges

  • Hero Member
  • *****
  • Posts: 1294
  • Country: nl
Re: Question on the LM7812
« Reply #7 on: December 03, 2005, 05:51:04 PM »
Ghurd is right about the overdriving.


When you're using white LEDs, I'd go for 20mA (mine I use at 15mA; 30mA continuous being the max.rating)


When using red LEDs, max. current is 20mA; I usually adjust for 5mA, but then I've always been skimpy :-)


Note: the above info is for standard LEDs. There also exist extra bright LEDs, extra efficient LEDs, LEDs with in-built resistors, etc.


It depends on what you want: do you want just an indication, then a few mA will do; if you want max. light (you need the lighting), then go to 2/3 of max. rating.


That's why I said we need more information; without it, we're making assumptions and could possibly lead you astray. This is basically a very simple electronics circuit, but without knowing what the goals and restrictions are, you might end up a less-than-optimally satisfied customer :-)


Peter,

The Netherlands.

« Last Edit: December 03, 2005, 05:51:04 PM by (unknown) »
“Research is what I'm doing when I don't know what I'm doing.” (W. von Braun)

wildbill hickup

  • Full Member
  • ***
  • Posts: 183
Re: Question on the LM7812
« Reply #8 on: December 03, 2005, 06:05:26 PM »
Origionally I had 330ohm, the 470s are a step up. Ireduced the ma to 20 on the calculator and got 470 ohm so we will see how that dose. The LED's in question ae for lighting 10000mcd white 3.2-3.8v 30ma.
« Last Edit: December 03, 2005, 06:05:26 PM by (unknown) »

wildbill hickup

  • Full Member
  • ***
  • Posts: 183
Re: Question on the LM7812
« Reply #9 on: December 03, 2005, 06:16:35 PM »
Well thanks to all for the help and I'm off to read that link. Always amazed at the info I can find on this site.
« Last Edit: December 03, 2005, 06:16:35 PM by (unknown) »

ghurd

  • Moderator
  • Super Hero Member Plus
  • *****
  • Posts: 8059
Re: Question on the LM7812
« Reply #10 on: December 03, 2005, 06:22:49 PM »
If it is not measured, use 3.1V and 15ma for calculations to be safe. 30ma, even 25ma, is too high except for, maybe, a flashlight.
« Last Edit: December 03, 2005, 06:22:49 PM by (unknown) »
www.ghurd.info<<<-----Information on my Controller

Tom in NH

  • Full Member
  • ***
  • Posts: 191
Re: Question on the LM7812
« Reply #11 on: December 03, 2005, 06:55:40 PM »
Hey Wild Bill. Hope everything's going well over Vermont way. You might also wish to consider using a variable voltage regulator such as the LM317. You can use it to either feed your LEDs a constant voltage or a constant current, which will keep you from blowing out your LEDs. A nice feature of the variable regulator is you can wire in a potentiometer and it will make a light dimmer. The 78xx's and the LM317's are probably your cheapest solution, but not the most efficient. Look into the low dropout (LDO) chips if you need to maximize efficiency or reduce heat dissipation. --tom
« Last Edit: December 03, 2005, 06:55:40 PM by (unknown) »

richhagen

  • Hero Member
  • *****
  • Posts: 1597
  • Country: us
Re: Question on the LM7812
« Reply #12 on: December 04, 2005, 01:19:42 AM »
I've had strings of 3 white LED's connected through a 120 Ohm resistor connected for several years to the output of a C12 charge controller.  I believe it just switches on the voltage from the battery when it is within range.  The laundry room light stays on all of the time unless the panels get buried in deep snow for a few days.  Rich
« Last Edit: December 04, 2005, 01:19:42 AM by (unknown) »
A Joule saved is a Joule made!

kell

  • Newbie
  • *
  • Posts: 38
Re: Question on the LM7812
« Reply #13 on: December 04, 2005, 08:51:32 PM »
If you just want to control led's but the voltage of your power source varies, making it impossible to regulate current through the led's with a resistor, you are better off just rigging up a constant current source.  You can go the LM317 route, which uses the three-terminal chip and a single resistor to give you a constant current source with a drop of a few volts.  There are also simple circuits using one or two transistors.  For example, look at circuit number 4 at this link

http://www.4qdtec.com/csm.html

The way it works, R1 biases the top transistor on.  Current flows through R2; when the current is high enough that the voltage across R2 equals Vbe, the base emitter voltage, the lower transistor turns on and grounds the base of the upper transistor.  So it balances out to where the output current Io always equals Vbe/R2.  

You can determine the value of R1 by how much base current is required for the upper transistor to conduct Io, so R1 has to be (less than) Io divided by the gain of the transistor.  Since you only want about 20 mA you'll probably use little transistors which mostly have a gain of over 100, and the base current needs to be at least .0002 amps.  Running it from a 12 volt supply, some value less than about 50kohms is required.  You could use 10k.

R2 would be Vbe/Io.  Vbe is usually around 0.6 volts in these low current applications, but you may have to fiddle.  You could end up with R2= .6/.02=30 ohms.

I think Radio Shack still has packets of little transistors.  The ones in diagram 4 are npn (arrow pointing away from transistor).  The transistors drawn with the arrow pointing inward are pnp.
« Last Edit: December 04, 2005, 08:51:32 PM by (unknown) »

wooferhound

  • SuperHero Member
  • ******
  • Posts: 2288
  • Country: us
  • Huntsville Alabama U.S.A.
    • Woofer Hound Sound & Lighting Rentals
Re: Question on the LM7812
« Reply #14 on: December 05, 2005, 07:01:25 AM »
This is the very best Website for using LEDs for lighting.


http://ourworld.compuserve.com/homepages/Bill_Bowden/led.htm


Even includes a resister calculator, you input . . .

Number of LEDs

LED voltage

LED current

Voltage your working with

and the calculator will tell you what resister to use.

« Last Edit: December 05, 2005, 07:01:25 AM by (unknown) »

Bruce S

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 5375
  • Country: us
  • USA
Re: Question on the LM7812
« Reply #15 on: December 05, 2005, 06:57:31 PM »
Hey Wildbill;

  Below, I hope it loaded right, is a circuit I uploaded a while back , got the name wrong tho.

It has the good ole LM317 along with some resistor sizes for different outputs.

I do concur with others, I believe that you've been over driving those LEDs.

Cheers


http://www.otherpower.com/images/scimages/3871/31LM7T_pwr.gif

Bruce S

« Last Edit: December 05, 2005, 06:57:31 PM by (unknown) »
A kind word often goes unsaid BUT never goes unheard

dinges

  • Hero Member
  • *****
  • Posts: 1294
  • Country: nl
Re: Question on the LM7812
« Reply #16 on: December 05, 2005, 08:30:54 PM »
Just for the record: this schematic is a voltage source; when using this, you will still need resistors to limit current, just like the 7812 when using that as a voltage regulator.


There is a way to rig a 78xx as a current source (not the usual voltage source), so you might even discard the resistors; a short description:


Connect a resistor from output pin to middle pin; value of the resistor: R=U/I, where U is the xx in the 78xx; e.g. 12V for an 7812. I is the current to which you want to limit, in A; for LEDs, use .02A; So R=12/.02=600 ohm; 560 or 680 ohm are standard values.


Let the middle pin (normally ground) of the 7812 float; it is only connected to output pin via the resistor. Pin 1 is the input voltage. You take the output current from pin 3; this is the positive lead to the LEDs; the negative of the LEDs go straight to your battery or whatever that your using. Looks a bit confusing (did to me), but consider the whole circuit to be an automatically variable resistor that sets current to a fixed value, independent of voltage.


BTW, make sure that your resistor can handle the current dissipation.

Let me know if this hasn't been clear; I've a handdrawn schematic that I could scan, if I can find the scanner...


Peter,

The Netherlands.

« Last Edit: December 05, 2005, 08:30:54 PM by (unknown) »
“Research is what I'm doing when I don't know what I'm doing.” (W. von Braun)

kell

  • Newbie
  • *
  • Posts: 38
Re: Question on the LM7812
« Reply #17 on: December 06, 2005, 06:58:05 PM »
You don't draw the current directly from the output pin of the linear regulator.

I Googled up a circuit diagram of a constant current circuit using the 317:

http://ourworld.compuserve.com/homepages/Bill_Bowden/page7.htm#charge.gif

Note that the current comes from the "adjust" pin, which corresponds to the ground pin on a 7805 or 7812, etc.

For the purpose we're discussing, you can consider the LM317 just a plain ole voltage regulator with a voltage set at 1.2 volts.  

The constant-current circuit works the same regardless of whether you use a 78xx or the LM317.  But you would be ill advised to use a 7812.  You would drop almost all your voltage across the resistor with basically nothing left to run the leds.  That's why people use the LM317 for a constant-current source; low voltage drop across the resistor (1.2 volts) means less wasted power and more headroom for the load.  The total voltage drop across a LM317 constant-current supply is 1.2 volts plus the "dropout," which is the voltage drop between the in and out terminal.  Dropout is likely about two diode drops, so I estimate you would have in the vicinity of 2.5 volts total drop in the circuit.

The two-transistor constant-current circuit in my earlier post would have a drop consisting of Vce for Q1 plus Vbe for Q2, which would be about a volt and a half, probably.

If you use a small mosfet like a VN7002 or MPF960 for Q1, you can get extremely precise current regulation that's independent of load, but still varies with the temperature coefficient of the base-emitter junction of Q2.  Your current would decrease about one third of one percent for each increase of one degree centigrade.
« Last Edit: December 06, 2005, 06:58:05 PM by (unknown) »

dinges

  • Hero Member
  • *****
  • Posts: 1294
  • Country: nl
Re: Question on the LM7812
« Reply #18 on: December 06, 2005, 10:08:01 PM »
Kell,


Thanks for correcting me on which pin to draw power from; you're right. It shows how unfamiliar I still am with this kind of use of 7812s.


As to LM317s being better than 7812s for this purpose, I wish I had known this 2 months earlier, when I was building my milli-ohm meter (with a 1A current source built in, an 7805). It works fine, but is dissipating quite some heat (5W).


Peter,

The Netherlands.

« Last Edit: December 06, 2005, 10:08:01 PM by (unknown) »
“Research is what I'm doing when I don't know what I'm doing.” (W. von Braun)