Constant current power supply and laser / LED driver tutorial
Ғылым және технология
An explanation of what constant current sources are, and how to use an LM317 to build a constant current power supply that can power strings of LEDs and laser diodes.
LM317: amzn.to/2jvp5Vi
Switch mode current sources: amzn.to/1BOQjUe
Check out my webpage for more videos about electronics! www.afrotechmods.com
Пікірлер: 232
Interested in learning about wireless power? Subscribers can get up to 80% off my course Wireless Power to the People - Wireless Charging 101 on udemy using the coupon code "KZread" www.udemy.com/wireless-power-to-the-people-wireless-charging-101/?couponCode=KZread
@PandorasBox2
Жыл бұрын
good one but its low amp what if want constant amp like 12v 30A most led power supplies are like that very high amps
Where were these videos back in the 80s when I needed them to pass electronics class?
@Afrotechmods
3 жыл бұрын
Same. That's why I made them.
I learned LM317 about 35 years ago, I forgot the 1.25v law, now it is a fresh look. thanks.
Your voice is perfect ! It's easy to understand for someone who doesn't speak very well english.
I really love your no-nonsense way of explaining electrical engineering concepts please keep up the good work
I am learner on SMD . when I get new knowledge I feel it flows into my heart quenching my desire of knowledge. Many thanks AM ! I wish all safe !
You do an excellent explanation and presentation on all the videos I have seen from you. I have been doing electronics since the late '50's with starting with tubes and then transistors. I watch your videos and learn, or refresh something new every time. Thank you so much for your efforts. I know where to send the young'ens when they want to learn more. 10/10 stars!
yesterday i was looking for information about constant current but I didnt understand it very wall, but today thanks to you its really clear to me!
Great video. I got into DIY lasers when I was in middle school, and I remember building my first LM317 Driver circuit to drive a 125mW Blu-Ray laser :D
@richardlighthouse5328
4 жыл бұрын
Were you careful handling class 4 laser?
wellcome back. Your tips and tricks are really useful.
Excellent tutorial, it will take me a couple of watches of this to completely understand it. Thank you as always for taking the time to make these videos and explain things.
subscribed. Love your content. It is always detailed and always includes things I didn't take into account
This can also be done with 5V, 9V and 12V regulators as well. The difference is that the "drop out" will be whatever the rated regulator is. When using the other regulators, substitute 5, 9 or 12 where 1.25 is in the formula. Of course your input voltage will have to be higher than the voltage regulator for this to work. In the case of a 12V regulator for example, you would have to have an input voltage above 14 or 15 volts. The good news it that if you don't have an LM317 available but do have a 7805, you can use it as well by selecting a different resistor, as long as your input voltage is high enough, like for a 9V battery. Ditto for the other regulators.
Hi, afro! You've made some interesting and educative vids on electronics! Keep up the good work, i've already subscribed :)
I love your videos! Keep up the good work!
Another great tutorial!!!
Your videos rock! I've actually gotten a better education in circuits watching your videos than what I got in college! xD
excellent!!!
@jeronimomurruni
9 жыл бұрын
Hi Gaston, nice to see you here too :D
Hey Afrotechmods, I have a video request. Could you possibly make a pulsed mode LED driver circuit with a 555? Its really useful for making LEDs brighter for infrared night vision systems or camping flashlights and It would be awesome if you could make a tutorial based on it. Ive seen this circuit around and your the best electronics tutorial youtuber ive seen.
This is the only lm317 video i understood
I had a bad dream once and woke up screaming, "LM317 ADJUSTABLE VOLTAGE REGULATOR!"
@Jonathanloov
9 жыл бұрын
Max Greyfeather wat?
@HobkinBoi
9 жыл бұрын
Max Greyfeather I wonder how that came to be.
@ozzie_goat
9 жыл бұрын
Don't ask. My dreams make no sense.
@Chino-ry8jy
9 жыл бұрын
Rfc BBM m
@jaredjones6570
9 жыл бұрын
Jonathan L Watt?
I like your videos very much
Amazing video
Good job!💡
your videos is amazing i learn alot from you,thank you so much,and make video about LC circuit and how we can make high frequency with it
very good explanation....
thank you thank you thank you thank you. thank you so much, especially for the search suggestion. thank you.
Well that was an important lesson. Thank you for pointing out what should be clearly obvious. couple questions for you on this topic. 1. Buck converters do they not do the same thing? 2. ATX power supply, is this not built in to the power supply? Thanks for the video, a timely reminder.
saved me. 💛 thanks
It's always a highlight if i got a notification that you uploaded a new video :-)
Do you plan to make some videos about Eagle CAD?
Great video
Great advice.
Finally, a clear explanation of current sources ! Thank you very much I heard about them all the time, but never understood its utility. I have a question, if you want to power a variable number of LED, is it a good idea to put them in series with a current source, and put 2 states switches in between them to choose where you want to put the ground ?
@Afrotechmods
9 жыл бұрын
Fontaine Simon That's an interesting idea! It should work.
Good video, to get the most performance out of the LM317 I've found its a good idea to add a heat-sink, as it gets extremely hot when driving it near its max. ratings and a few useful loads.
@alejandroalfonso3684
9 жыл бұрын
Sir you obviously dont know how to have fun the only way to truly enjoy an LM317 is to drive it without a heat sink and to the max PABLO!!!!
@PabloGonzalez-wi5gq
9 жыл бұрын
Hi Mr. Alfonso, Thank you for being my most loyal follower, fans like you are hard to find these days. I will a t-shirt to the address listed in your profile.
@alejandroalfonso3684
9 жыл бұрын
Sir, you flatter me with your response. i can say that maybe in another life we would have been good friends and maybe even maybe done a project together.
@PabloGonzalez-wi5gq
9 жыл бұрын
Alejandro Alfonso Dear Mr. Alfonso, It is with great pleasure that I inform you that I am currently working on an alcohol sensor project. You are free to join me at any time of your convenience, maybe in the distant future you can take some time out of your very busy schedule to lend a hand. Sincerely yours.
Please make a video on switch mode constant current supplies as well 🙏
Nice vid.
Question: is there any good and tiny solution for 700mAh? It's for a 3w LED and there won't be enough space. :/
Why did you choose 10uF as the capacitance value for the capacitors you've used in your circuit example?
Love the Terminator clips
Hi, I was wondering, how much current can you drive trough this component ?
Could you make a tutorial on zener diode? It seems complicated to me on how it operates as a voltage regulator and how it doesn't. I appreciate if you do
I built the same circuit minding everything (heat,input voltage,pinout) but I wasn’t able to get a constant current output.What might be the problem?
If you want more current search for LM338K, 5amp version make sure to get the TO-3 steel metal can package, and that case is output. Anyone knows better linear regulators please advise.
can i build this, for the use of about 2A, for heating a little kopper wire? i know i need to cool this but would the componets survive this or even higher currents?
Wow, Thank You !
I am looking to build a voltage doubler circuit to test the led strips in led/lcd tv's. I wanted to use 2 6 anp rectifier diodes and 2 470 uf 450 v caps run off from a veriacc. Can I use a lm317 to oput 35 ma constent current to the strips and can you help me design the circuit?
thnak you for your video. Though a bit late, but I am curious; with that much high voltage, why don't' the led's burn out?
It is a privilage to watch your video in the very first hour of its appearance. The response from the public is already 301 views plus mine.
Как всегда, просто и понятно, лайк.
@edgeeffect
5 жыл бұрын
Я не понимаю по русски ;)
Can I used this circuit to getting constant 0 to 2mA output or its totally independent of load?
Hy, I have a question. I've done this current source with 12V battery and i have a problem, when I measure the Vout near to outPIN before the resistance,I have 11,75 V and this is wrong because when I calculate the Vout formula it's equal with ~7V. I don't know why. In LTspice is 7,2V with R=50ohm. I've changed the LM317 for many times but the same results. But the current Iout is 30mA. Can you help me please with an advice? I don't know what can I do.
Hi. I need a very stable constant current source with max 2A to drive a Helmholtz-Coil. Any suggestions?
is it possible to get regulated current 10amp with lm317 with help of some power transistor?
I think you should make a video about charging nicd and nimh cells.
Great video! Just one question. Can you explain or make a video how i can use two LM317 to make BOTH a adjustable voltage source, and a current source with two different Pots? Thanks!
@edgeeffect
4 жыл бұрын
Make the adjustable voltage source AND the constant current source... connect the voltage source's output to the current source's input.... the current source is now current limiting your voltage source. Don't measure voltage at the output of the voltage source.... because the current source is going to "eat" some of that voltage. Do all your measurements at the output of the current source.
Hi! I bought a led driver which requires 5-32VDC as an input. Can I simply use an adapter which has an output of 5VDC/2.5A? Thanks in advance.
nice video
Hey I built this circuit but using a lm317 in a to92 package and it doesnt work ! the voltage of R is around 6 volts and it doesn't limit the current (goes over 1Amp) ! does to 92 lm317 don't work in the same manner as to 220 ? also it seemed the lm317lz didnt heat up which is strange because I used a 9v battery to power it.
If I connect 1k ohm resistor to a 1A source, do I technically produce 1kV? If I eventually build it up, will I get 1kV as expected?
Thank you for the video. Nice to know you can easely build a current source with a LM317. I wonder what happens if you short the Vout of the current source? Say the "load" gets shorted. Will the LM317 will get problems or get hot?
@Afrotechmods
4 жыл бұрын
Yeah it'll probably enter thermal shutdown and stay stuck at 125+C
I want to power three 5mm led's and my source is 120 v ac. Do you have a circuit diagram for this?
Can you link the related videos in the description for easier access for mobile users
thank you, the best explained tutorial for current source. simple, and super useful
Could you do a video about more efficient ways to get a constant current source? Using a LM317 is easy but it's about the most inefficient way to do anything. :)
@antoninoarrigo2331
6 жыл бұрын
Gooberslot @.
@alokt7119
5 жыл бұрын
There is only one way switching.
Afrotechmods Welcome Back! I was wondering if you have any plans on completing the Basic Electricity Series. You explained what amps where, but I am still having trouble understanding Volts, Watts, Ohms, etc. You would be a savior to me and to thousands of other students who need help on this subject :).
@Afrotechmods
9 жыл бұрын
Surfbuddy24 I do want to finish it some day. I don't know when I will have the time though. My Patrons have requested other more complex topics and I have to give them priority.
What's the purpose of the 10uF C_2 parallel to the LED?
Using a PNP transistor to get more current to the load. Is the output voltage going to the LEDs and stuff 1.25V or is it 5V?
@Afrotechmods
7 жыл бұрын
The difference between Vadj and Vout is always kept at 1.25V and the rest of the circuit will kinda follow from that
What if we have a load which requires more voltage than 1.25v and a constant current? May be many LEDs in series?
what will be the voltage of the capacitor wheather 12 V or 6 V, or any other?
can we build 1 mA constant current source using lm317
hello Afrotechmods ; could you please explain in a video how you could have feedback from the load and the use of the capacitor 1:45 , it really doesn't make sens to me. thanks for the tutorial
But if you used a 10-20 ohm resistor to get a bit more constant current the resistor would actually get very hot. Right?
I was hoping to add one of these (or an LM338) to the output of the 12v, 5v and 3.3v rails of an old computer PSU to use as a bench supply. There's several issues. 1) LM series don't work down to 3.3v input. 2) The output voltage will drop by 1.25v-2v to be useful, so the 12v will effectively be a 10v rail. 3) When regulating the current, it will change the output voltage.. So I'd need another LM to regulate voltage and thus drop another 1.25v.... So my 12v rail would be 8v.. my 5v rail would be 1v!
@JasonMasters
6 жыл бұрын
You wouldn't use a variable voltage regulator in that application anyway. If you weren't going to use a switch-mode supply (which would be more efficient), you'd use 78xx and 79xx regulators such as 7805 and 7812 for the positive 5V and 12V supplies respectively, and a 7912 if you needed a negative 12V supply. I gather that there's a 3.3V version of these regulators too, although I've not had occasion to use one of those yet.
What program did you use to create a schema that shown at 1:39? Seems like everybody use it, I want it too.
@camilomason4560
6 жыл бұрын
Stas Smith probably easyeda.com
Can you help me out? Im driving a coil with the lm338 in voltage regulation mode. When the transistor switches on (opens) the current flows thru the coil and make a spike on the leading edge. If I use the regulator in constant current mode do u think I can get rid of those spikes? Or both configurations have no difference in my case? Thanks !
@edgeeffect
5 жыл бұрын
When driving a coil, it's usual practice to put a diode in reverse across the coil to eliminate spikes.
How can you build a dimmable constant current driver for leds .?
Can you please do a video on increasing amps, I have a 2 amp limit on my supply and would like to increase this to higher amps, is there a way to do it?
@victorwainaina2584
3 жыл бұрын
Wow, 5yrs...but still, might help someone 5yrs from now. The formula he showed was basically how to calculate for the desired current. So that if you wanted a current of 2A then you would do 1.25/2 = 0.625ohm. However, you see that's not really feasible, and so he also said that he doesn't recommend running anything above 200mA, because this system isn't the most efficient out there.
How is the output voltage calculated?
what about a current mirror? too sensitive to hfe and temp?
Hey how are ya. i was wondering if you could give me some help on a project I'm working on that i may do a session on at my school i have a laser diode with the given data Forward current: 1A typ. operating voltage: 4.4v-4.6v optical output power: 1 W typ. walelength 445nm- blue what im trying to do is get the diode to burn through small things at its max potential. i though i knew what i was doing but then i started researching things and im staring to get confused i have a driver sketched out very similar (if not the same) to what you have. now from my understanding no mater what the voltage in is, as long as its 2 volts higher than the output, i will always get 1.25 volts out. plus a bunch of heat from the regulator. is their a way to make this work?
@rockman12345100
9 жыл бұрын
rockman12345100 also when calculating the resistance should i use the voltage that the diode consumes or the 1.25 volts from the regulator
hmm. I understand the current part. For the most part anyway. But what about the output voltage? What will that be if you have a constant current. Let's say you have an LED hooked up and you have the regulator set to push out 20mA. What voltage will there be at the output?
mine puts 10V on my LED with 100ohm resistor between OUT and ADJ pins.. i tried a new one but still the same thing...
Hey @Afrotechmods, the LM317 linked in the video description are "Currently unavailable"!
@Afrotechmods
7 жыл бұрын
Thanks! Fixed.
@edgeeffect
5 жыл бұрын
Yeah... but, y'know... it's an LM317... it's not like anyone actually NEEDS a link. ;)
If I were to add a potentiometer in series with the resistor, would this essentially make a suitable LED dimmer?
@miketan373
8 жыл бұрын
+Claus Bertels not really. Try PWM instead.
El mismo esquema con integrados de la serie 78XX.
What do you mean it pushed a set amount of amps through your load? Does it vary the voltage? I thought you needed 10volts to push 1 amp through 10ohms. Are you saying it will push 10 amps through a 10ohm with 5 volts?
@areg7182
5 жыл бұрын
It changes the voltage
Hi! can anyone help me how to build high power (3W 350-700mA) RGBW led driver??
0:57 aaaaahhhhhh, he popped it... :D
👍👍👍👍
My problem is im trying to come up with a constant current circuit that can output 1 Amp Max at 3.5 volts for a 3 watt LED that will be small enough to fit in a flashlight
Thanks for this vid. I finally have a constant 14volts 50mA current supply for my PA0RDT-Mini-Whip antenna (I still lack a long coax cable though :v) anyways for my safety I attached a heatsink to it and used a 2 watt 25 ohm resistor XD
@hellterminator
7 жыл бұрын
2W resistor is completely unnecessary. Voltage across the resistor is always 1.25V, current will always be 1.25V/25Ω=50mA. Therefore the power being dissipated will always be 1.25V*50mA=62.5mW. In other words any resistor (all the way down to 0402 SMT) will work. Heatsink is also unnecessary: Max input voltage for LM317 is 37V, meaning the difference between input and your 14V output can be at most 23V. At 50mA that gives you at most 1.15W of power being dissipated. Depending on manufacturer (and package, I'm assuming TO-220 as in the video) , the LM317 has junction to ambient thermal resistance of at most 80°C/W, giving you junction temperature of at most 92°C above ambient. Since the LM317 is (again, depending on manufacturer) rated for at least 125°C max junction temperature, you can safely operate it in this configuration without a heatsink up to 33°C ambient temperature (and that number will go up significantly if you're not using the crappiest LM317 out there or input voltage lower than 37V).
Does it necessary to use polarized capacitor (Electrolytic capacitor) ? Can I use a fixed capacitor (Ceramic capacitor) ? P.S. Your videos are very cool !
@edgeeffect
5 жыл бұрын
We usually use electrolytics because they can reach higher values of microFarads than ceramic(etc).
if you put yourself on a circuit connected to a constant current source would it still push the same current through you
@max13239
8 жыл бұрын
+Malin Robbins if the input voltage is high enough and the circuit is built to handle that voltage i suppose yes
I was trying to power a high power laser diode with my bench power supply and it wouldn't turn on. I forgot to run the bench power supply in Constant current mode
What happens with voltage??
nice work sir sir can u make a tutorial on to convert ac to dc
@edgeeffect
5 жыл бұрын
Electroboom has a great video on the subject of the "FUUUUUULL BRIIIIIIIIIIDGE RECTIIIIIIFIER!!!" that will probably answer your questions.
switching ones are so expensive :o but thanks for the awesome video! I'm building an rgb nightstand ( I hate non white lights but why not :D ) and the 10w led requires 10current sources D: at least I'm going the most route now! it's cheap and efficient as long as I stay near the rated voltage!
@hellterminator
7 жыл бұрын
Look into LED driver ICs. No need to build 10 constant current sources yourself when you can buy a
@kaelthassunstrider4559
7 жыл бұрын
I've looked. i can't find them in my country. ebay doesn't ship here too ;(
@hellterminator
7 жыл бұрын
Alright, let's go from the beginning. What kind of LEDs do you intend to use exactly? (You mention 10 inputs, that sounds rather odd for RGB LEDs.) How do you want to drive the individual color channels? Do you insist on current control, or is PWM OK? Do you want to drive it from a microcontroller, or just simply with potentiometers? Also, if you don't mind me asking, what country do you live in? I find it hard to believe that there's a country where no sellers will ship (except for maybe North Korea).
@kaelthassunstrider4559
7 жыл бұрын
That must have been a typu. I'm using a 10W RGB led. 150ma for each color. i need 3 inputs i use pwm from a nodemcu
@hellterminator
7 жыл бұрын
Well, in that case you don't need constant current sources, you can just use series resistors to limit the current. The current may vary slightly as the LEDs heat up, but if you're OK with that, it's the simplest (and cheapest) solution.
Are the LED's in series or parallel? I cant tell from the video
@Afrotechmods
3 жыл бұрын
Series
Hi. I am really confused between current and voltage control.