picture: My homemade bench power supply, lighting a #1893 light bulb.

A benchtop adjustable current limited power supply is an indispensable tool for any tinkerer. This is just a homemade power supply I made with spare parts, including a dead ATX power supply for the case. It uses the venerable LM317 as the main regulator and a TIP42 PNP transistor as main pass. For bigger loads, I have to use my bigger PSU.

Schematic (PDF) drawn with gEDA

PCB Layout (tool) - Generated by xpcb

PCB Layout (png) - Generated by xpcb (OLD)

Sorry no gerber because this is not exactly the best PCB, hack up your own with the sample xpcb save file. It's drawn with just one metal layer, so possibly could fabricate the board yourself or use phenolic protoboard.

This is based on the National Semiconductor reference design on their LM117 datasheet, except hacked to use parts that I had on hand. And even then some there are different parts that I used doing experiments...
LED1 lights in constant current/Current limited mode. Use a red or green LED only, do not use blue/violet/white LEDs here. Substitute two regular diodes in series if you don't want to use an LED.

M1 is a 100µA 1KΩ analog meter I had on hand with 0-35 scale. Divide by 10 to get real amperes reading or use MeterBasic to print a new scale.
M2 is a 1mA 160Ω analog meter I had on hand with 0-200 scale. Divide by 10 to get real voltage reading. Or print a new scale.

T1 is a 2 ampere 24V center tapped (12 - 0 - 12) transformer. At lower currents you may get higher voltages. If you have a cheap way of getting a negative supply, then you don't need a centertapped transformer, was thinking about making a charge pump for the negative supply but decided against it.
Don't substitute a LM358 for U3 and get rid of the negative supply like I did at first, you'll lose current limiting control. You may try using a Schottky diode for D1 (for lower Vforward), removing the LED, R4, and going ahead with the LM358 if you're OK with some low end current limiting limitations. D1 is used for a sort of an "analog OR" function...
A side effect of this system to do current limiting is that you may see a considerable portion of the pot is "off". Try removing/shorting D2 to see if it helps any.

I substituted a 10K variable resistor for R10, 50K variable resistor for R6, 470R for R8, and a 68KΩ resistor at R7. These changes degrades linearity somewhat. But that's what I had on hand, and still works acceptably. There's some strange behavior at some extremes but OK for my use. Try to use the suggested values, avoid substitutions if possible. Try to keep R6 and R7 as they are, the input impedence of the op amp allows high resistances, and you don't want much current flowing through this leg as it will affect voltage regulation.

Other parts notes

U2 is any generic 3A or better bridge rectifier.
U4 is a 7905 -5V regulator. It is NOT a 7912 despite it saying so there.
Q1 (TIP42) is the only device that MUST be on a heatsink, as it may need to dissipate more than 20W (low voltage output (less than 8V or so) and high current output (more than 0.25A or so)). Q1's dissipation limit with the heatsink will determine the low voltage, high current limits of the supply. Also note there's no protection diode protecting U1 of back flow... or is it really not there? Actually the C-B junction of Q1 provides this service in case power is shut off when a large capacitor is connected to the outputs, protecting the LM317T from damage.
U1 and U4 may optionally be on a heatsink but they will not dissipate much, the metal tab on the TO-220 is sufficient in the circuit as drawn. R1 limits the dissipation of the U1. U4 can be a 79M05 or possibly a 79L05. I used a regular, readily available TO-220 LM317T for U1 though the reference design calls for a LM317K. The reference design probably chose the TO-3 version because it's the same TO-3 as the reference MJ4502D PNP power transistor, but almost no current flows through the LM317, so it does not heat up at all and doesn't really need a heatsink (though mounting it on the same heatsink near the pass transistor will allow its internal thermal shutdown to protect the pass transistor too!). The circuit needs to be changed somewhat to accomodate using the drive power of both devices for even more current flow. Anyway, the TIP42 in this design is TO-220, so...

C2 and C7 don't have to be exact (could use larger value if so desired) but must have a minimum working voltage 25V each. C7 can even be of lower capacitance if you're using a full bridge as shown, substituting a halfwave rectifier for U2 will need around the displayed value. The 1µF capacitors should be tantalum and there shouldn't be more than 4" of wire/traces to the LM317/7905 and TL082. C1 and C6 are there to smooth out adjustments of the variable resistors, they can be omitted for more 'noisy' operation of the controls.

R3 and R5 were custom selected for the two meters that were used. If you use whatever meters you have, you will need to adjust them accordingly. Remember that R2, a 0.2Ω resistor, will have V=0.2*3.5A = 0.7V across it. Make sure your meter will deflect with just 0.7V - the other meter I used (1mA 160Ω) would just barely be able to deal with this, needing just a 540Ω resistor to read 3.5A full scale.

The op amp should ideally should be one that works properly with inputs close to positive rail. The negative rail limitation of regular op amps is accounted for by using the negative supply (among other things; keep in mind there's an op amp inside the LM317 too, you need a -1.2V reference to totally shut off the LM317!). You can plug in many kinds of op amps, I just did not have a LM308 that the reference design calls for, so I also left out the balancing circuitry which isn't needed for newer op amps. A TL082, LF353, LF355, LF356 should all work, and likely even an LM1458/LM741. A LM358/LM324 is probably overkill (Short out D2 if replacing with one), and a real RRIO opamp is definitely overkill, with no benefits. Note that you need an opamp that has a high input voltage tolerance, so CMOS amplifiers like TS272AIN aren't usable, they'd fry with the voltage differential. A comparator like LM311 or LM393 may work too, I haven't tried it.

Correction to schematic: Drew diode D2 incorrectly, and corrected layout. Improved layout somewhat and made match schematic more.

Ideas for improvement: Change such that minimum voltage is 0 by using negative voltage reference for adjust as well (need to get a -1.2V reference).

Debug/Repair Update:
Well, I did it, I ran too much current through the PSU. Since I was lazy and didn't put the LM317 and the TIP42 next to each other on the same heatsink, the LM317 could not sense that the TIP42 was burning up when I was drawing 3A @ 3V... Though only 9W was being used, in excess of 30 watts needed to be dropped by the TIP42! It got HOT and fried the transistor... and the PSU could no longer supply current to the load as the only current that could flow is through the TIP42's base-emitter 47R resistor. Fortunately it was just the TIP42 that burned and replacing it restored operation.