Voltage regulator circuit for SMD LEDs or resistor?  - Page 1
Forum section: electronics / beginners

author: Jackster
author_rank: Frequent Contributor
timestamp: June 06, 2015, 07:44:51 pm
content: Hi allI have this LED lamp that I want to use in a project, well actually 2 of them.The LEDs are thesehttp://www.aliexpress.com/snapshot/6699637674.html?orderId=67522672543059http://www.aliexpress.com/snapshot/6699637671.html?orderId=67522672553059Max. Forward Current 20mAMax. Forward Voltage 1.8V-2.2V(Red,Yellow,Orange) 3V-3.4V(Other Color)I want to use a 9v battery to power them. But maybe also 12v. So I am thinking of using a LM317 as a current limiter.Like so,I don't know how to calculate this though.I'd like to have these two LED circuits run off one of these LM317s, to save space.Also need to take into consideration the different voltages.I wont be mixing the LED colours but Red is a lower voltage than pink..OR,Do I do what I currently do and put a resistor in front of each LED circuit?Just confused now...Any ideas?Jack,

author: afm
author_rank: Newbie
timestamp: June 06, 2015, 11:02:19 pm
content: Mix the colors of leds is not a good ideaFor me, the resistor is the best, trie to associate parallel/serie depending on the voltage

author: Jackster
author_rank: Frequent Contributor
timestamp: June 06, 2015, 11:22:35 pm
content: Quote from: afm on June 06, 2015, 11:02:19 pmI am not mixing the LEDs. It will either be one or the other.At the moment it is the most simplistic.But the 38k ones I have make the lights a tad too dim. Need to get some lower values but I think that means more amps going through?

author: flynwill
author_rank: Regular Contributor
timestamp: June 06, 2015, 11:44:00 pm
content: The formula for the current-limit application is right there in the data sheet I = 1.2/R.The bigger problem is that if you want to run off a 9V battery and get any life out of it you should design for it to work until the battery voltage drops to about 6V. Subtract 1.2 for the regulator and you have 4.8 V. So you can probably put 2 of the Red-orange LEDs in series or just one of the others. And now you're wasting most of the battery power in dropping the voltage. So maybe better to put 3 of the lower voltage LEDs in series, or one of the others and accept a higher drop-out voltage.Also unless the LEDs are matched, they won't share current very well if you just wire them in parallel, so you really need a current limit per string.

author: TerminalJack505
author_rank: Super Contributor
timestamp: June 07, 2015, 02:18:20 am
content: Usually the best approach to driving strings of LEDs is to use a constant current boost converter.They make ICs just for that but you can also just use a 555 timer chip.The attached circuit is driving a string of twenty 3.3V LEDs from a 12V source. It will work for a 9V source as well. It will boost the voltage up to the point necessary to get the current that is 'programmed' by R3.

author: flynwill
author_rank: Regular Contributor
timestamp: June 07, 2015, 02:33:02 am
content: That's a very clever circuit, I like it.

author: PSR B1257
author_rank: Frequent Contributor
timestamp: June 07, 2015, 06:34:16 am
content: QuoteThere is no problem with mixing LEDs as long as they are connected in series.LEDs shouldn't be connected in parallel anyway (as already sayed).

author: German_EE
author_rank: Super Contributor
timestamp: June 07, 2015, 08:40:43 am
content: If you measure the voltage drop of each LED it should be possible to wire two matched devices in parallel without using dropping resistors. However, performance in later life is not guaranteed and if one device ages faster than the other you will have problems.Best idea is a dropping resistor for each LED.

author: Simon
author_rank: Unknown
timestamp: June 07, 2015, 09:17:30 am
content: If the LEDs are from the same batch and are the same colour chances are they will tolerate being in parallel. As the voltage of 1 LED rises current will tend to favour the other LED. But this is not something you should try with LEDs from different sources or from known name sources like eBay. I once put a whole load of ultraviolet LEDs in parallel to make a UV box for PCBs but I had to match all the LEDs up to each other 1st.

author: agehall
author_rank: Frequent Contributor
timestamp: June 07, 2015, 06:02:40 pm
content: Quote from: TerminalJack505 on June 07, 2015, 02:18:20 amI'd really like to understand that circuit but I don't know where to start. Would you mind explaining the broad strokes for me?

author: Simon
author_rank: Unknown
timestamp: June 07, 2015, 06:59:31 pm
content: Quote from: agehall on June 07, 2015, 06:02:40 pmIt's a standard 555 timer oscillator. The output is driving a standard step up converter power stage. But the transistor is connected from pin 5 to ground. Inside the timer pin 5 is connected to one of the voltage divided Is the one that is two thirds of Vcc the base of that transistor is connected across the resistor in series with the load. So as more current tries to flow into the load the voltage on the resistor will go up and turn the transistor on this will start to lower the voltage to less than two thirds of the supply and will affect the timing and duty of the output wave and therefore reduce the step up voltage. In this way it automatically controls the voltage so that the current through the resistor is what you want the load to receive. If no current is going through the resistor and therefore the transistor is off the full step up ratio will be achieved. As more current flows through the resistor the voltage is reduced and so a fine balance is struck keeping current through the load constant.

author: TerminalJack505
author_rank: Super Contributor
timestamp: June 07, 2015, 07:54:24 pm
content: Quote from: agehall on June 07, 2015, 06:02:40 pmC1, R1 and R2 setup the 555 for a ~30 kHz square wave.Each time the 555's output goes high it turns T2 on. This basically brings T2's drain down to 0V. The left-hand side of the inductor is held permanently at 12V, so you have roughly 12V across the inductor, L1. This causes current to flow through the inductor and a magnetic field to build up.When the 555's output goes low it turns T2 off. This causes the magnetic field built-up in the inductor to collapse. The collapsing magnetic field will cause the current in the inductor to want to keep flowing. If there isn't anywhere that the current can easily flow to then the voltage across the inductor will quickly rise. Since the left-hand side of the inductor is held at 12V, the right-hand side is the node that sees all of the rising voltage. (This also implies the the voltage spike starts at 12V and not 0V. Which is why this circuit can onlyboostthe voltage.)Since the current can no longer flow through T2 the voltage rises to the point that the current flows through the diode (SD1). This will cause a charge to be stored on capacitor C2. The more charge that is stored on C2, the higher the voltage across it.After a dozen cycles or so the voltage stored on C2 is high enough that current will flow through the LEDs. Once this happens the current sense resistor, R3, along with T1, will turn off the 555's output each time that the current exceeds a certain threshold.The maximum current allowed is determined by how much voltage it takes to turn T1 on. For this particular simulation, the 2N3904 will turn on when there is about 635 mV across its base-emitter junction. Ohm's law says that current flowing through a resistor will cause a voltage drop across the resistor. When enough current flows through the sense resistor (R3) a large enough voltage develops across it that T1 turns on, bringing the 555'sControlpin low.I'll refer you to the 555 datasheet for an explanation of how theControlpin works but, basically, like Simon mentioned, you can affect the 555's output with it. In this case it will cause the 555 to keep its output low until the current drops back below the threshold.

author: agehall
author_rank: Frequent Contributor
timestamp: June 08, 2015, 06:39:45 am
content: Thanks for the very good explanations - I'm starting to grasp the idea here. Very clever stuff I must say.

author: LarsT
author_rank: Contributor
timestamp: June 20, 2015, 09:22:20 pm
content: Quote from: TerminalJack505 on June 07, 2015, 02:18:20 amIs it possible to use the same circuit, with some modifications to make a buck converter to power 3V, 1A leds from lets' say a 5V or a 12V battery?

author: Zero999
author_rank: Super Contributor
timestamp: June 20, 2015, 10:13:29 pm
content: Quote from: flynwill on June 06, 2015, 11:44:00 pm1.2V is just the voltage drop across the sense resistor. The LM317 will drop between 1.5V to 3V, depending on the current draw and temperature, making the total as high as 4.2V.The LM317 is generally not suitable for this application, unless the supply voltage is very high.

author: TerminalJack505
author_rank: Super Contributor
timestamp: June 20, 2015, 10:31:31 pm
content: Quote from: LarsT on June 20, 2015, 09:22:20 pmFor 12V you might try this. It likely wouldn't work for 5V since it is using an N-channel MOSFET. You'd have to switch to a P-channel MOSFET and that would complicate things a bit.Note: I didn't have a high power LED for the simulation so I used a zener diode.