
LM317 fans will recognize Figure 1 as the traditional LM317 constant current source topology. It closely regulates Iout = Vadj/Rs by forcing the OUTPUT pin to be Vadj = 1.25 V positive relative to the ADJ pin. Thus, Iout = Vadj/Rs to a very good approximation. Master chip chef Bob Pease cooked it up to be so!
Figure 1 Classic LM317 constant current source,
Iout = Vadj/Rs + Iadj ≃ Vadj/Rs = 1.25/Rs.
Wow the engineering world with your unique design: Design Ideas Submission Guide
In usual practice, Iout >> Iadj, the latter being specified at 50 µA typical, 100 µA max. This simplifies the math by making the Iadj bias current safely ignorable without letting accuracy take a hit. It’s worked great for 50 years but it has an obvious downside. the way you program Iout is by changing Rs.
Figure 2 shows a new(er) topology with a different (more agile) method for making Iout programmable.
Figure 2 A novel LM317 topology enables control of amps of Iout with just milliamps of Ic,
Iout = (Vadj – (Ic – Iadj)Rc)/Rs – Ic + Iadj ≃ (Vadj – (Ic – Iadj)Rc)/Rs.
Typically, Rc > 100Rs, making Figure 2 able to control up to 1.5 A of Iout with just milliamps of Ic. Of course, now it may no longer be good enough to just ignore Iadj.
Figure 3 shows the idea fleshed out into a complete PWM controlled 15 V, 1 A, grounded-load current source that includes Iadj compensation. Here’s how it works.
Figure 3 The 1-A, 15-V, PWM-programmed grounded-load current source with a novel LM317 topology. The asterisked resistors are 1% or better and Rs = 1.25 Ω.
The 5-Vpp PWM input has a frequency (Fpwm) assumed to be 10 kHz or thereabouts. If it doesn’t, scale C1 appropriately with:
C1 = 22µF*10kHz/Fpwm
The resulting PWM switching of Q2 creates a variable resistance averaged by C1 to Rc(1 + 1/Df) where Df = the 0 to 1 PWM duty factor. Thus a (0 to 2.5v)/2Rc = 3.11 mA Ic current = 2.5v/Rc(1 + 1/Df) flows into Z1’s summing point.
Z1 servos the V1 gate drive of Q1 to hold its source at an accurate 2.5-V reference for the PWM conversion and to level shift Ic to track U1’s ADJ pin. Also summed with Ic is Iadj bias compensation (2.5v/51k = 50µA) provided by R1.
The unsightly stack of six 1N4001’s is needed to provide bias for Q1 to work into. I freely admit that it’s not very pretty. Hopefully the novelty of Figure 2 makes up for it!
Note that accuracy and linearity mostly depend only on the match of the Rc resistors and the precision of the Z1 and U1 internal references. It’s a happy coincidence that the 2:1 ratio of the TL431’s 2.5-V versus the LM317’s 1.25 V permits the convenient use of three identical Rc resistors.
If Rs = 1.25 Ω, then Iout(max) = 1 A and Iout versus Df is as plotted in Figure 4.
Figure 4 Iout versus Df where Df (x-axis) is the PWM duty factor and Iout (y-axis) is Vadj/1.25 = 1 A full-scale = 1 – 2/(1 + 1/Df).
Df versus Iout is plotted in Figure 5.
Figure 5 Df versus Iout where Iout (x-axis) is 1 A full-scale and Df (y-axis) = 1/(2/(1 – Iout) – 1).
Note that U1 might be called upon to dissipate as much as:
- 20 W if Rs = 1.25 Ω and Iout(max) = 1 A
- 30 W if Rs = 0.83 Ω and Iout(max) = 1.5A
Moral of the story: don’t be skimpy on the heatsink! Also note that Rs should be rated for a wattage of at least 1.252/Rs.
Then there’s the consideration of power up/down transients. When the system is first switched on and C1 is sitting discharged, and the controller will have about 4 to 8 milliseconds to initialize the PWM logic to 1.0 before C1 can charge enough to allow U1 to come on and start sourcing current. Don’t forget this detail during software development! On power-down, Q3 kicks in when +5 V drops below ~2 V. This saturates Q1 and forces Iout to zero to protect the load as well as discharging C1 in preparation for the next power-up.
In closing, thanks go (again) to savvy reader Ashutosh for his suggestion that the Figure 2 topology might deserve a focused DI of its own, and (likewise again) to editor Aalyia for the fertile DI environment she has created that makes this kind of teamwork, well, workable!
Stephen Woodward’s relationship with EDN’s DI column goes back quite a long way. Over 100 submissions have been accepted since his first contribution back in 1974.
Related Content
- 1 A, 20 V PWM DAC current source with tracking preregulator
- Classic 3-leg adjustable regulators have a shunt mode? Who knew?
- LM317 smooths but doesn’t regulate
- PWM power DAC incorporates an LM317
- Power Zener using the LM317
- Use an LM317 as 0 to 3V adjustable regulator
The post PWM-programmed LM317 constant current source appeared first on EDN.