What i am doing wrong? - lm317 driver - Page 1
Forum section: electronics / beginners

author: lgzaqq
author_rank: Newbie
timestamp: April 28, 2022, 09:38:31 pm
content: Im trying to make simple driver for laser from this videohttps://youtu.be/2Rjlf7gnXmsI do everything like on video but when i connect laser lm317 are not giving any voltage on output (tested 1-12v on power supply)

author: bdunham7
author_rank: Super Contributor
timestamp: April 28, 2022, 09:45:10 pm
content: I think you have the outer pins reversed and you probably did that because you are looking at it from the bottom. Triple-check the datasheet for pinout.

author: lgzaqq
author_rank: Newbie
timestamp: April 28, 2022, 09:47:12 pm
content: Its The top side ,You can see text on it

author: mc172
author_rank: Frequent Contributor
timestamp: April 28, 2022, 09:58:23 pm
content: What you have built does not match the video.

author: lgzaqq
author_rank: Newbie
timestamp: April 28, 2022, 10:00:49 pm
content: What doesnt match? It should work anyway

author: m3vuv
author_rank: Super Contributor
timestamp: April 28, 2022, 10:09:35 pm
content: fwiw,i always get pins mixed up on lm 78 and 317 regs,saying that i brought a load of lm388 regs from ebay,the most i could prise out of them was about 300ma,they were all fakes,same with 2n3055 t03 jobs,1 amp max and pop!

author: tooki
author_rank: Super Contributor
timestamp: April 28, 2022, 10:31:04 pm
content: Quote from: lgzaqq on April 28, 2022, 10:00:49 pmNo, it doesn’t match.Look again!!

author: bdunham7
author_rank: Super Contributor
timestamp: April 28, 2022, 10:41:17 pm
content: Quote from: lgzaqq on April 28, 2022, 09:47:12 pmOK, a little angle on the photo would help--it looked like the tab was up off the table to me. What is the polarity of the power supply? The positive should be going to the black wire, the red wire to the load and then the other side of the load to the negative on the power supply. Also, is that a 330 ohm resistor? And you are only expecting 3-4 mA of current? I'm not sure the LM317 will work reliably at that low of a current in this configuration. Check the polarity first, though.

author: edpalmer42
author_rank: Super Contributor
timestamp: April 29, 2022, 01:59:00 am
content: Quote from: lgzaqq on April 28, 2022, 10:00:49 pmWhat are the colors for the plus and minus leads from your power supply?

author: lgzaqq
author_rank: Newbie
timestamp: April 29, 2022, 04:47:39 am
content: Black wire to plus red to loadI want to get 150-250 ma

author: edpalmer42
author_rank: Super Contributor
timestamp: April 29, 2022, 05:00:38 am
content: Quote from: lgzaqq on April 29, 2022, 04:47:39 amIn electronics, red is traditionally the plus lead and black is the minus lead. It looks like you may have connected everything backwards. I would test everything with a resistor replacing the laser diode in case the LM317 was damaged by the reverse polarity. Note that it's also possible that the laser diode was damaged. I don't know enough about that to suggest a testing method.Regardless of color, the input pin on the LM317 should be connected to the plus lead on your power supply. The ADJ lead should be connected to the positive lead of your laser diode. The negative lead on the power supply should be connected to the negative lead of your laser diode.

author: lgzaqq
author_rank: Newbie
timestamp: April 29, 2022, 05:11:50 am
content: Im 100% sure that its connected properlyDiode also works when i skip lm317 and connect power directly to diode

author: edpalmer42
author_rank: Super Contributor
timestamp: April 29, 2022, 06:08:49 am
content: As specified in the video, you take 1.25 and divide it by the desired current - in your case 0.2 A. The result is 6.25 ohms. It looks like you're using either a 330 or 3300 ohm resistor according to the color code in your photo. I can't quite make out whether that third band is brown or red. How did you select that resistor?

author: lgzaqq
author_rank: Newbie
timestamp: April 29, 2022, 07:13:35 am
content: Yea so it looks like i bought wrong resistor

author: edpalmer42
author_rank: Super Contributor
timestamp: April 29, 2022, 07:40:50 am
content: You should build up a stock of junk boards and parts so that when things like this happen - and they will always happen - you can continue on with your project and buy new parts later if necessary.

author: lgzaqq
author_rank: Newbie
timestamp: April 29, 2022, 07:58:23 am
content: So i have one more questionI see 0.25 watt and 1 watt resistorsDoes it matter in this build?Connecting two 2.2om 0.25w resistors give Me 4.4om 0.5w?

author: Zero999
author_rank: Super Contributor
timestamp: April 29, 2022, 09:50:41 am
content: To calculated the power dissipation us Ohm's law.P = VIP = I2RP = V2/RIn your case, all of the load current flows through the current sense resistor, which also has 1.25V across it, so use whichever formula is easiest for you.The circuit requires plenty of voltage headroom. Ideally the input voltage should be at least 4V above the load voltage, but as you're only using it for 200mA, you'll probably get away with 3V, going from the graphs on the data sheet.

author: bdunham7
author_rank: Super Contributor
timestamp: April 29, 2022, 04:15:42 pm
content: Quote from: lgzaqq on April 29, 2022, 07:58:23 amYes, the power ratings would add like that. But as a rule you don't want to run resistors anywhere near their maximum, especially the little ones. I would use a single 1W resistor in something like this and if I had a 3W or 5W on hand, I'd use that without feeling that it is being wasted.

author: edpalmer42
author_rank: Super Contributor
timestamp: April 29, 2022, 04:50:41 pm
content: Quote from: bdunham7 on April 29, 2022, 04:15:42 pmYou're not wrong, but 200 ma through a 2.2 ohm resistor is only 0.088 W so a 1/4 watt resistor would be operating at about 35% of its rating. More than enough safety factor there. A 1/2 W resistor would be fine too, but anything larger feels like overkill, particularly due to the size penalty of a 1W resistor compared to 1/4 or 1/2 W.

author: floobydust
author_rank: Super Contributor
timestamp: April 29, 2022, 05:02:42 pm
content: OP cross-posted asking the same questions to ensure wasting more people's timehttps://forum.allaboutcircuits.com/threads/lm317-driver-no-output-voltage.186588/I've never seen a LM317 tolerate being connected or backwards, reverse polarity.

author: bdunham7
author_rank: Super Contributor
timestamp: April 29, 2022, 05:04:49 pm
content: Quote from: edpalmer42 on April 29, 2022, 04:50:41 pmI was basing that on using a single 6-ish ohm resistor to get the current he wants. But as far as safety factors go with resistors, you can't just use the headline advertised power rating without considering how hot they'll get and how their lifetime might be affected, especially if this is something run continuously. Some of those tiny modern "1/4W" resistors are running internal temperature rises of 85C+. A few years go by and you have a brown spot on your PCB and an open resistor. Overkill may be just enough in many cases.

author: edpalmer42
author_rank: Super Contributor
timestamp: April 29, 2022, 06:33:16 pm
content: Quote from: bdunham7 on April 29, 2022, 05:04:49 pmYes, if the OP used a single 6-ish ohm resistor it would be dissipating ~1/4W so you'd have to use at least a 1/2W resistor. If he used two 2.2 ohm resistors in series, he'd have ~285 ma and each resistor would dissipate ~180 mW. I'd be comfortable with 1/2W resistors, but nothing smaller.I made the mistake of using the 200 ma value in my earlier message, but that would only be valid for the 6 ohm resistor, not for two 2.2 ohm resistors. I think I've got it right this time!