### Author Topic: Shunt Resistors  (Read 6747 times)

0 Members and 1 Guest are viewing this topic.

#### angelo

• Contributor
• Posts: 32
##### Shunt Resistors
« on: May 14, 2010, 07:03:19 pm »
Hello all,

I'm the poster who started the DIY power supply topic and I figured that this was different enough to warrant its own topic.

It was suggested that I use a current shunt to alleviate some of the power that would otherwise fry the pot connected to the LM317 in current mode.

I understand that if I put say a 1ohm resistor in parallel with the pot then the 1ohm will take most of the current, but how then, can I adjust the current between 1-5000 ohms? The total resistance would be 1/Rt = 1/R1+...+1/Rn  and will only ever approach the lowest valued resistor (hence the 1 ohm) and not the 5000 needed for the 317's range to be met.

how can I use a pot to control the 317's output current without running the full current through the pot ?

given that I'd run say 20v at max 1.5A.

#### Simon

• Global Moderator
• Posts: 16642
• Country:
• Did that just blow up? No? might work after all !!
##### Re: Shunt Resistors
« Reply #1 on: May 14, 2010, 07:07:37 pm »
I think you "shunt" is the LM317 isn't it ?

#### alm

• Guest
##### Re: Shunt Resistors
« Reply #2 on: May 14, 2010, 08:12:25 pm »
I believe I posted this in the other topic, but I'll repeat it here again. One of the sample application circuits in either the National or OnSemi LM317 datasheet does exactly what you want. I just double checked it, and they even have a complete lab supply example which regulates all the way to 0V. It doesn't get any easier than this.

#### angelo

• Contributor
• Posts: 32
##### Re: Shunt Resistors
« Reply #3 on: May 14, 2010, 10:21:34 pm »
I must have missed your earlier post alm, sorry, however this design will require an LM301 op-amp, a high power transistor, a few tantalum caps and means I'll have to supply a negative voltage to the op-amp.

I'm looking more-so a the "precision current limiter" but am worried about blowing something by drawing too much current.

what setup can I use to ensure that I'm not going to draw more than 1.5 A, but have it adjustable from a few mA to 1A or so

#### alm

• Guest
##### Re: Shunt Resistors
« Reply #4 on: May 15, 2010, 08:19:39 am »
What are you talking about? I think it contained an LM317, a low-resistance shunt resistor, a pot and a low-power MOSFET (plus the standard caps and resistors)? You need the negative voltage to get all the way to 0A, just like you need a negative voltage for the voltage regulator to regulate all the way to 0V, it could be skipped if you can live with 1.25V over the sense resistance as minimum current.

#### dengorius

• Regular Contributor
• Posts: 96
##### Re: Shunt Resistors
« Reply #5 on: May 15, 2010, 02:17:31 pm »
i think alm meant this one

#### angelo

• Contributor
• Posts: 32
##### Re: Shunt Resistors
« Reply #6 on: May 16, 2010, 05:39:17 am »
this shows the 317 in voltage mode, not current.

#### alm

• Guest
##### Re: Shunt Resistors
« Reply #7 on: May 16, 2010, 10:28:54 am »
Did you actually go out and check those datasheets? It's not like that's hard these days with internet. It appears like I'm trying to teach you how to fish, and you're sitting there waiting for the spoon with a piece of fish on it.

#### Polossatik

• Frequent Contributor
• Posts: 295
• Country:
##### Re: Shunt Resistors
« Reply #8 on: May 16, 2010, 10:36:21 pm »
"there is no spoon" - never seen the Matrix movies?
Real Circuit design time in minutes= (2 + Nscopes) Testim + (40 +120 Kbrewski) Nfriends

Testim = estimated time in minutes Nscopes= number of oscilloscopes present Kbrewski = linear approx of the nonlinear beer effect Nfriends = number of circuit design friends present

#### angelo

• Contributor
• Posts: 32
##### Re: Shunt Resistors
« Reply #9 on: May 17, 2010, 08:23:48 am »
sorry if I seem as if I'm not making an effort, but I have never really done a project like this before.

I researched shunt resistors and SMPS on wikipedia, and understand their workings to some degree but yeah, I have never designed even a simple one.

I did check the datasheet and I see the one labeled "current limited voltage regulator" which I did not see before because I was in a different manufacturers datasheet. It seems pretty perfect but it assumes that I input 1.25V, what if I put more 5V, 10V ? I assume that the input voltage goes to the + an - by the transformers rectifiers caps box.

I am somewhat looking for direct advice because I know a lot of people here have a lot of experience, but if you feel that I am asking too much, you don't have to offer anything. Those who have something to share, I really appreciate, and even those who have just a small suggestion or two are greatly appreciated as well and not taken for granted.

#### alm

• Guest
##### Re: Shunt Resistors
« Reply #10 on: May 17, 2010, 05:59:19 pm »
I don't mind not knowing, but I get somewhat annoyed that I point to the clearly labeled solution somewhere within two ~20 page datasheets, and you seem unable to find it and wait for someone to point it out to you.

A shunt resistor is just a (usually) low-value resistor to sense the current. The voltage over the shunt is I*R (Ohm's law). Since the dissipation is I^2*R, the R is usually quite low for high currents, and it's often a power resistor.

The way an LM317 works is that the reference voltage between the output and adjust terminal is held at about 1.25V, this voltage is specified as 'reference voltage' in the electrical characteristics table (I'll use the OnSemi and National datasheets, the datasheet for the actual device you use might be different, but will be similar). This how the adjustable voltage regulator works: the adjust terminal is connected to a voltage divider between output and ground, the voltage over the top resistor is 1.25V, so the voltage between the output terminal and the ground is 1.25V/(R1/(R1+R2)) = 1.25 * (1+R1/R2). You'll find this formula (plus an extra term for the voltage caused by the current from the adjust terminal, but this is usually quite low) in the application hints/information section of the datasheet. This is where the 1.25V comes from. Not sure where you read that the input voltage should be 1.25V, the only thing I found is that the output voltage is a function of 1.25V and the resistive divider.

The solution that I had in mind is in figure 23 of the OnSemi LM317 datasheet (I wasn't sure initially if it was in the OnSemi or National one, so I mentioned both). Figure 26 is the very basic example: A current shunt R1, as soon as more than 1.25V is dropped over R1, the LM317 will decrease the output current. Figure 23 extends this idea. The JFET (2N5640) is configured as a current sink, it sinks a (fairly) constant amount of current (IDSS, stated in the datasheet, at least 5mA for the 2N5640). Any JFET with a similar IDSS would work, as would any other constant current sink (eg. with a bipolar transistor). This causes a constant current through R2 (ignoring Iadj), and develops another voltage (IDSS * R2) at the wiper of R2. The total voltage that the adjust terminal sees is R1 * (Iout+IDSS) + R2 * (IDSS). You set R1 so it can output the required max. current (eg. 1A), 1.25 ohm would allow 1A - IDSS (almost 1A) with the R2 wiper all the way to the top. The value of R2 is chosen so that even with the wiper all the way down, there will be no more than 1.25V over it (no point in less than 0A), but it should be fairly close if you want it to be able to adjust it all the way to 0A (the provided value will probably be variable between .5A and 1A or so). The diodes are there to limit the voltage across the pot to ~1V (shouldn't happen unless the current through the FET gets above ~10mA).

The reason that the FET is tied to a negative voltage is that because it should even be able to limit the current if the output voltage is close to ground. The reference pin must be 1.25V below the output voltage, so if the output voltage is 0V, the adjust pin should be at -1.25V. There will be some voltage drop across the FET, so a little margin can't hurt.

Figure 22 has this combined with an LM317 in voltage regulator configuration, with a similar setup to bring the adjust terminal below ground so the output voltage can be adjusted below 1.25V. It has a FET with a lower IDSS (2mA min, 10mA max), and a 1k pot instead of 100 ohm (more range). This is basically exactly what you need. If you have trouble understanding the circuit, it might be a good idea to build it on a breadboard and do some tests, or even simulate it in LTspice.

#### fsleeman

• Regular Contributor
• Posts: 54
##### Re: Shunt Resistors
« Reply #11 on: May 20, 2010, 07:14:43 pm »
I don't mind not knowing, but I get somewhat annoyed that I point to the clearly labeled solution somewhere within two ~20 page datasheets, and you seem unable to find it and wait for someone to point it out to you.

I understand how you feel, but this is a very common problem. While it is trivial for seasoned vets to find this kind of information, it is often a problem for those new to engineering design. There is a ton of stuff on the internet that can help but a lot of it is either not labeled, mislabeled, misleading, wrong, or so poorly written that nobody can understand it. It does take some experience to sort out the crap. From my experience and understanding universities (in the US at least) do not mention how to find practical information about circuit designs. Most of what I have learned about data sheets and the like has been on my own, but learning how to learn on your own is very valuable on its own.