# How to design an adjustable 5A current regulator with LM338?

I have recently taken interest in laser diodes, and I would like to drive one of them (NUBM08) without destroying it. Looking over the internet I learned there are many devices one can build to do this, one of which is called "linear regulator". Most times, the current regulator people use for these types of endeavors is one based on the LM317 voltage regulator. However, the datasheet of the NUBM08 states that its operating current is around 3A, with an operating voltage between 3.6 and 4.8V.

Now, the LM317 can't be used with more than 1.5A, so I thought I may simply substitute it with a higher rated LM338 which supports up to 5A.

With the LM317 swapped for the LM338. However I'm not sure of a few things:

1. If I want 3A on the diode, my "feedback resistor" (indicated as R1) should dissipate a power of 1.25V*3A=3.75W... do I really need such a high power rated resistor or is my logic incorrect? Also, the resistor should be 1.25V/3A≈0.4Ω... does that make sense? Could I use many resistors in series instead so that the voltage drop on each of them is smaller (and so smaller power dissipation)?
2. If I wanted to gradually adjust the current up to a max of 3A, my understanding is that I could add a potentiometer in series with R1 so that I can rotate the knob and gradually let the potentiometer's resistance go to zero, and then I can increase the current up to the max that R1 limits... But does this mean that also my potentiometer needs to be rated for at least 3.75W?
3. How do I make sure that the operating voltage of the diode stays within limits? I understand that I am fixing the current to be constant at 3A, but then I don't understand what will happen to the voltage, how do I make sure it doesn't exceed the 4.8V? I'm very confused about this point...

I apologize for the huge post but thank you do much to anyone who'll help me!

• If you have a 5 A load, you really, really shouldn't be using a linear regulator unless you have a very good reason to (e.g. noise considerations). Use a switching regulator. Commented May 7, 2022 at 14:11

I don't think you should be married to the LM338. From your first point you already know that this topology is guaranteed to be inefficient. Read e.g. AN-2157 Constant Current Constant Voltage Buck Converter With LM25085 for hints on a way to use a buck regulator in constant-current mode:

or more simply, pick out any high-current buck regulator with integrated current limit. This class of devices has an internal or external sense resistor and circuitry to control the buck waveform to limit the current accordingly. For an example see the AOZ2262NQI which has an external current limit setting resistor "ROCS":

For a current limit adjustable to 5A, you would have a resistor with a maximum of 4k.

• Thank you for your reply! I guess you have convinced me not to implement a linear regulator. However, the schematic you show seems quite complex for a beginner such as myself. Do you know if such a circuit can easily be implemented on a breadboard, for instance? I am not sure how I'd go about actually building what you showed... Commented May 7, 2022 at 16:16
• @RandomGuy Through-hole, highly-integrated buck-style LED drivers do exist Commented May 7, 2022 at 16:31

The LM338 will waste a lot of power. If you want an efficient constant current driver, why not use a LED driver chip?

This is the cheapest one on digikey. Voltage on the current sense resistor is 0.1V, so with a 33 mOhm resistor you will get 3A. The resistor will dissipate 0.3W, so a good choice would be three 1206 0R1 resistors in parallel, which is both cheaper and more flexible than one 0R033 resistor.

You'll need an inductor, about 3.3µH or 4.7µH with a saturation current above 4A, a >3A schottky diode for D1, a bunch of 10µF SMD X7R ceramic caps in parallel for C1, and a 5V logic level MOSFET with say <20mOhm RdsON, preferably in SMD for lower inductance and therefore smoother switching.

Power supply should be 5V 3A, and you'll need to pay good attention to the layout.

EDIT

The aliexpress module should work if it has a potentiometer to adjust output current. The capacitors on this are likely to be garbage though, so if they get too hot you can just solder some low-ESR caps on the input and output. Just scratch the soldermask on the back with an Xacto and stick a bunch of 10-22µF 1206 X7R ceramics in there:

...or if the extra thickness doesn't bother you, you can use some low-ESR aluminium caps. If you feel adventurous and don't want to pay \$8 postage for two 50c caps, electrolytic caps next to the CPU voltage regulator on an obsolete/dead PC motherboard are a good source.

• Comments are not for extended discussion; this conversation has been moved to chat. Commented May 9, 2022 at 17:57