LDO linear regulator

#1
I hooked up a 3.3V Microchip TC1108 LDO linear reg (300mA) with its 3 pins as follows:

1. Vin (4 NiMH batteries) to bat +
2. GND to picaxe 08M in/out
3. Vout to a parallel string of LEDs (twenty or so to handle the 300mA)

By switching the PICAXE pin from input to output(on) (changes impedance properties of pin, yes?) I got the same effect as if I'd used a Darlington (or other more appropriate interface from the CMOS): The PICAXE switched the LEDs on and off, with enough current to power the whole string.

According to the datasheet, the TC1108 uses about 50uA. I read this as meaning that about 50uA goes from Vin to GND across the TC1108. As such the PICAXE, which can sink or source up to 20mA, can safely switch this LDO on and off in this manner (yes?).

My question is: can anyone tell me if (why) this is a bad idea? For instance, if I decided I want the PICAXE to switch 300mA (the TC1108 claims to output +/- .5% tolerance), is this a viable solution? Are the losses huge? Will I fry the PICAXE (because I am assuming incorrectly about the active amperage or other reason)? Is there a better solution for current regulation?

Last note - before someone chews me all up over this - I have a breadboard and a certain number of parts at my disposal. So I hook them up, see what they do, and then try to discover the meaning of the mistakes I make along the way. Its how I learn. So I had some LEDs, the Reg, and I found out I can switch them with a PICAXE. I may still be an idiot for it, but if anyone wants to know why I did this, the above is why. :)

Thank you very much.
 
#2
No chew up. It's good to experiment. But maybe not in quite such a random manner.

I don't get why you are doing it.
You've pretty much answered your own question when you state that the PICAXE output can go up to 20mA. As long as you limit the output current to 20mA then it will be safe.
What part does your regulator play?
WHY do you want to turn it on/off with a PICAXE?
If the PICAXE is supplying current to the input, then the output can only source (-50uA) what the PICAXE supplies, namely 20mA.
To turn LEDs on/off, simply connect them to a PICAXE output via a current limiting resistor.

To specifically answer your question "is this a bad idea", then I must say yes, purely because it serves no purpose rather than it might do any damage.

If you want your PICAXE to switch higher currents, then use a transistor. Have a look at the interfacing circuits in the manual.

Edited by - beaniebots on 24/08/2007 22:50:16
 
#3
Thank you, Beaniebots. Here's what I (thought I) accomplished with this circuit:

If I hook 3 bat up to it (3.6V nom), my green LEDs get the 3.3V the Reg promises and light up at full brightness. The entire string of LEDs is fed 300mA with no resistors (per my DMM). So the PICAXE sinks some uA from the Reg, and the LEDs get their current and full brightness. (By the way, the PICAXE is powered directly off the batteries).

The PICAXE can't sink/source 300 mA to light 20 parallel LEDs directly off the pins (especially one pin).

I have used Darlingtons in the past, but I lose .6 to .8 volts (per my DMM). Which means to get full brightness I need four bat (4.8V nom)and a bunch of resistors (the LDO regulates current to 300mA as promised without resistors).

So this circuit (I thought) had fewer components and tighter controls.

Another, related, question is how do I control larger amounts of current without just burning it off on a resistor? For instance, what are LED drivers (that don't require resistors on the LEDs as I understand) doing to prevent the LEDs from becoming SEDs (smoke emitting diodes - not my coinage, but useful). Also, can I switch larger currents without the half volt loss Darlingtons seem to introduce?

Thanks again!
 
#4
No No No ... STOP.
You have missed THE fundamental point about volts and amps.

The LDO regulator is a VOLTAGE regulator.
The only reason it stops supplying more than 300mA is because you have overloaded and the output DIES. You MUST NOT use a regulator in this manner. Two reasons. First, the regulator is not designed to work that way and may pack up altogether, second reason, the next regultor you get (of exactly the same type) will have an output that DIES at a very different current and what you thought was valid way of limiting to 300mA was NOT and may destroy your other components.

LEDs are CURRENT devices and MUST NOT have a VOLTAGE put across them.
LED drivers are CURRENT sources.

The simplest way to drive an LED is via a resistor. Yes, the excess is "burned off" in the resistor. If you use an LED driver the excess is "burned off" in the driver chip, if you use SAFETY CURRENT LIMIT of a voltage regulator the excess is "burned off" in the regulator.
No matter what method, the excess will be "burned off" somewhere so it might as well be in the cheapest of all components, the humble resistor.

Can you not lose the volt-drop of a darlington?
Yes, use a normal transistor (or FET) instead of a darlington.

Remember, you can connect LEDs in series and then you only need one resistor but obviously you will need a higher drive voltage.

Bottom line, drive your LEDs with constant current. If you really are concerned that the "burned off" energy in the resistor is killing the planet, then you could use a switchmode constant current supply which will be about 95% efficient. In ball-park figures, a single LED driven that way would save the same amount of energy in one year as a 100W light bulb would use in 20 minutes. Or in other words, it would take several years to pay-back the extra energy used by your soldering iron to make the switch-mode current source.
Those volt dropping resistors don't seem so wastefull after all!

 
#5
Have another read of the datasheet.
<A href='http://www.ortodoxism.ro/datasheets/microchip/21357b.pdf' Target=_Blank>External Web Link</a>

The LOWEST maximum current at spec'd voltage is 300mA.
Under short conditions, it could be high as 650mA so your assumption about &quot;regulated&quot; 300mA is way off.
You also need to keep an eye on the maximum permitted power dissipation which is specified as 508mW.

If Vin = 4.5v and Vled = 2v
Then Vreg = 2.5v
Best case @ 300mA P=750mW (well over spec)
Worst case @ 650mA P=1.63mW (quick destruction).

I've assumed a volt drop of 2v as an average for the LED because you have not specified the colour. If they are red ones, then death will come swiftly. If they are blue, then it might just about hang in there.
The other thing I forgot to mention is that it is not a very good idea to connect LEDs in parallel without a series resistor on each LED. This is because the working voltage varies slightly from LED to LED and one will take the lions share of the current. Running an LED over its specified current reduces its life very quickly. Even running it at the specified max current will cause its output to reduce by as much as 10% over the first 100 hours and 50% over one year.
(a figure not often quoted in the spec sheets but is typical for nearly all LEDs).

Please don't think I'm having a go. Its just that its important to get these points over firmly and early on because they are absolutely fundamental.
 
#6
All of what BB said ^ ^ ^ ^
And 20mA is 20mA in any way shape or form sink/source in or out of any Picaxe pin.
If you need a higher current than 20mA you must use another device which draws its power from the main supply rail and is only ever switched or controlled from the picaxe and only if the control needs less than the 20mA to do it.
SHARP make a 4 pin regulator device/s which do have an ON/OFF switch pin e.g. PQ3RD23.

But as pointed out a resistor is by far cheaper and easier to use than a current regulator chip, which is what you are trying to achieve here.

As BB said a regulator is a voltage limiting device, it is rated @ 300mA, drawing anything over this and the unit may fry.
 

premelec

Senior Member
#7
there are many efficient current regulators [switching - require inductors and good sense...] being marketed for the power [3 watt etc.] LED trade now... check &quot;LED drivers&quot; www.maxim-ic.com and www.ti.com and www.national.com www.supertex.com for leads... some run from 8 to 200VDC input - e.g. HV9930 ... reading data sheets helps as well as the general knowledge about current and voltage... prevoius posters have pointed you in the right direction on this...
 
#8
Thank you both, very much. A good hard learning is clearly what I needed here. BeanieBots, your response was poignant, hilarious, and elucidating.

As you have clearly figured out, I have a terrible time with controlling current. Ohm's Law is easy enough to write down, but my practical results using a DMM and test circuits are often confusing. Maybe I need a better DMM.

Say I use a FET to switch the current on/off to the LEDs. If I get a 500mA rated Microchip TC1410N, the FET is not actually controlling (limiting) the current? It is simply rated to switch an amount of current up to 500mA (within power and voltage ranges also)?

Similarly, and again, if I use a ULN2803 and run a bunch of LEDs off of it, I still need current limiting components to prevent damage to the device? (Just want to make sure I get this, because it is clearly something I totally botched to this point!)

Also, premelec mentioned power LEDs, which brings me to another question. If I use an XLAMP 4550 Green LED @100mA (about 80%) at 3.3V I need to put that bad boy on a .5W or bigger resistor (3.3V x .1A)? I am wandering off topic, but what is the point of a 5mm sized SMT component if it requires huge (relatively) passive components?

Last question. I read (and clearly did not absorb) Stan Gibilisco's &quot;Teach Yourself Electricity and Electronics&quot;. Any lucid, concise, recommended texts or websites? (I know that question is asked over and over, so please forgive me).

Many, many thanks. To all.
 

premelec

Senior Member
#9
Hi... my feeling is that you would benefit a lot from practising ohm's law equations and calculating power in components around a series circuit... E=IR and P=IE=(E*E/R)=I*I*R. Just set up some arbitrary simple resistors and 'LEDs' in series - on paper - and then noting that all the voltages across each component must add up to the voltage across the whole string and the same current goes through all the series components work out the power in each compnoent. Note that an LED is NOT a resistor but has it's own E and I characteristic - different for each LED and color of LED... this throws in a compliction which you also should get a better feeling for... for calculating estimate you can fake it with an estimated voltage across the LED in the series circuit. e.g. 1.6 volts for a red LED - 3.2 volts for a white LED.

Anyhow practice will help you to get a better feeling for what you are doing.

Edited by - premelec on 27/08/2007 22:44:25
 
#10
pme720, glad I amused you and hopefully managed to shed a little light.
You seem to be getting it.
After a little while, it will suddenly all come together.
Ohms law is all you need. Absolutely everything else stems from it. Even the impedance of a transmitter at non-resonant frequency can be worked out with ohms law.

The important bits are to understand are that electronic components will never be a perfect resistance, capacitance or inductance. Even a battery is not a simple voltage source. It is a voltage source with a resistor in series.

An LED can be thought of as a perfect diode in series with a very low value resistor and a low voltage battery.

Draw them out in series.
You will then see that the diode prevents any current flowing until the voltage you put across it is greater than the &quot;battery&quot; voltage. You will also notice that once that voltage has been reached, the current will increase very quickly because of the very low resistance resistor.

Whenever a specsheet specifies a current for a power device (eg, regulator, transistor) more often than not, it means the amount of current that will destroy it if exceeded.

Think of a 1 amp fuse.
It won't regulated the current to 1A. There's nothing clever inside. It's just a short length of thin low melting point wire. Currents over 1A will simply make it melt and break the circuit. In a similar manner, a 1A transistor will melt if you try to pass more than 1A through it.

Many integrated &quot;driver&quot; chips LIMIT their output current. What that means is that their output will maintain the specified voltage UNTIL you exceed the current. After that point, the voltage will drop such that the output current is not exceeded.
 
#11
You can control the ground pin of a voltage regulator to switch a highish current output on and not-so-on, but not really off (unless the ground goes negative by an appropriate amount. If feeding a load like LEDs that have a threshold voltage before much happens, or feeding a small voltage to &quot;fine tune&quot; a power supply output, you just might have a useful arrangement, but really it isn't a great idea. It is so much easier to use power fets (with the load in the drain circuit usually). If you want to drop voltage efficiently, you need a &quot;switch mode&quot; regulator circuit - which probably can be done with a power fet, inductor, diode and capacitor plus one or two pins of a picaxe (but there are many ways you can over-drive the output while getting the hardware and software perfected.
 
Top