Author Topic: What i am doing wrong? - lm317 driver  (Read 1561 times)

0 Members and 1 Guest are viewing this topic.

Offline lgzaqqTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
What i am doing wrong? - lm317 driver
« on: April 28, 2022, 09:38:31 pm »
Im trying to make simple driver for laser from this video
https://youtu.be/2Rjlf7gnXms
I do everything like on video but when i connect laser lm317 are not giving any voltage on output (tested 1-12v on power supply)
 

Online bdunham7

  • Super Contributor
  • ***
  • Posts: 7902
  • Country: us
Re: What i am doing wrong? - lm317 driver
« Reply #1 on: April 28, 2022, 09:45:10 pm »
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.
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline lgzaqqTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
Re: What i am doing wrong? - lm317 driver
« Reply #2 on: April 28, 2022, 09:47:12 pm »
Its The top side ,You can see text on it
 

Offline mc172

  • Frequent Contributor
  • **
  • Posts: 489
  • Country: gb
Re: What i am doing wrong? - lm317 driver
« Reply #3 on: April 28, 2022, 09:58:23 pm »
What you have built does not match the video.
 

Offline lgzaqqTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
Re: What i am doing wrong? - lm317 driver
« Reply #4 on: April 28, 2022, 10:00:49 pm »
What doesnt match? It should work anyway
 

Offline m3vuv

  • Super Contributor
  • ***
  • !
  • Posts: 1738
  • Country: gb
Re: What i am doing wrong? - lm317 driver
« Reply #5 on: April 28, 2022, 10:09:35 pm »
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!
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11632
  • Country: ch
Re: What i am doing wrong? - lm317 driver
« Reply #6 on: April 28, 2022, 10:31:04 pm »
What doesnt match? It should work anyway
No, it doesn’t match.  |O Look again!!
 

Online bdunham7

  • Super Contributor
  • ***
  • Posts: 7902
  • Country: us
Re: What i am doing wrong? - lm317 driver
« Reply #7 on: April 28, 2022, 10:41:17 pm »
Its The top side ,You can see text on it

OK, 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.
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline edpalmer42

  • Super Contributor
  • ***
  • Posts: 2276
  • Country: ca
Re: What i am doing wrong? - lm317 driver
« Reply #8 on: April 29, 2022, 01:59:00 am »
What doesnt match? It should work anyway

What are the colors for the plus and minus leads from your power supply?
 

Offline lgzaqqTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
Re: What i am doing wrong? - lm317 driver
« Reply #9 on: April 29, 2022, 04:47:39 am »
Black wire to plus red to load
I want to get 150-250 ma
 

Offline edpalmer42

  • Super Contributor
  • ***
  • Posts: 2276
  • Country: ca
Re: What i am doing wrong? - lm317 driver
« Reply #10 on: April 29, 2022, 05:00:38 am »
Black wire to plus red to load
I want to get 150-250 ma

In 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.
« Last Edit: April 29, 2022, 05:04:57 am by edpalmer42 »
 

Offline lgzaqqTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
Re: What i am doing wrong? - lm317 driver
« Reply #11 on: April 29, 2022, 05:11:50 am »
Im 100% sure that its connected properly
Diode also works when i skip lm317 and connect power directly to diode
 

Offline edpalmer42

  • Super Contributor
  • ***
  • Posts: 2276
  • Country: ca
Re: What i am doing wrong? - lm317 driver
« Reply #12 on: April 29, 2022, 06:08:49 am »
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?
 

Offline lgzaqqTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
Re: What i am doing wrong? - lm317 driver
« Reply #13 on: April 29, 2022, 07:13:35 am »
Yea so it looks like i bought wrong resistor
 

Offline edpalmer42

  • Super Contributor
  • ***
  • Posts: 2276
  • Country: ca
Re: What i am doing wrong? - lm317 driver
« Reply #14 on: April 29, 2022, 07:40:50 am »
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.
 

Offline lgzaqqTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
Re: What i am doing wrong? - lm317 driver
« Reply #15 on: April 29, 2022, 07:58:23 am »
So i have one more question
I see 0.25 watt and 1 watt resistors
Does it matter in this build?

Connecting two 2.2om 0.25w resistors give Me 4.4om 0.5w?
« Last Edit: April 29, 2022, 08:11:41 am by lgzaqq »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19568
  • Country: gb
  • 0999
Re: What i am doing wrong? - lm317 driver
« Reply #16 on: April 29, 2022, 09:50:41 am »
To calculated the power dissipation us Ohm's law.

P = VI
P = I2R
P = V2/R

In 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.
 

Online bdunham7

  • Super Contributor
  • ***
  • Posts: 7902
  • Country: us
Re: What i am doing wrong? - lm317 driver
« Reply #17 on: April 29, 2022, 04:15:42 pm »
So i have one more question
I see 0.25 watt and 1 watt resistors
Does it matter in this build?

Connecting two 2.2om 0.25w resistors give Me 4.4om 0.5w?

Yes, 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. 
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline edpalmer42

  • Super Contributor
  • ***
  • Posts: 2276
  • Country: ca
Re: What i am doing wrong? - lm317 driver
« Reply #18 on: April 29, 2022, 04:50:41 pm »
So i have one more question
I see 0.25 watt and 1 watt resistors
Does it matter in this build?

Connecting two 2.2om 0.25w resistors give Me 4.4om 0.5w?

Yes, 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.

You'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.
« Last Edit: April 29, 2022, 04:52:54 pm by edpalmer42 »
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7055
  • Country: ca
Re: What i am doing wrong? - lm317 driver
« Reply #19 on: April 29, 2022, 05:02:42 pm »
OP cross-posted asking the same questions to ensure wasting more people's time https://forum.allaboutcircuits.com/threads/lm317-driver-no-output-voltage.186588/
I've never seen a LM317 tolerate being connected or backwards, reverse polarity.
 

Online bdunham7

  • Super Contributor
  • ***
  • Posts: 7902
  • Country: us
Re: What i am doing wrong? - lm317 driver
« Reply #20 on: April 29, 2022, 05:04:49 pm »
You'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.

I 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.
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline edpalmer42

  • Super Contributor
  • ***
  • Posts: 2276
  • Country: ca
Re: What i am doing wrong? - lm317 driver
« Reply #21 on: April 29, 2022, 06:33:16 pm »
You'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.

I 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.

Yes, 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!   :palm:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf