I wanted to get some feedback on this CC/CV circuit before I layout the board and send it to the fab (attached).
It's really two separate circuits hooked together -- a CC stage and a CV stage.
At the top there's a basic 12V linear regulator to power the op-amp. I'm pretty sure that's an overkill of caps around the 7812 to power a single op-amp, I just used my default 78XX circuit for that.
In the middle there's the CC stage, which is pretty much Dave's famous constant-current load circuit with a few passives added (from comments I read on this board). The "output" of this circuit becomes the ground for the CV stage. The CV circuit is a standard implementation of the an LM338.
As long as the constant-current threshold isn't reached, the CC stage lets current flow from GND_CV to ground. The LM338 then operates normally and regulates the output voltage. If the constant-current threshold is reached, the op-amp starts lowering the voltage at the MOSFET's gate, limiting the current passing from GND_CV to ground.
Additional stuff:
D2 is a large diode to prevent current flowing "upstream". I placed it after the CC stage so it won't effect the voltage regulation.
The maximum amperage for this circuit would be 3A, but I expect that I'll need massive heat-sinking if it reaches that high.
The LM7812 limits the output voltage of the op-amp to ~10V, in this case driving a non-logic-level MOSFET. This means that the input for the whole circuit would have to be at least 15V for it to function. I'm probably going to replace the LM7812 with an LM7805, and then replace the current MOSFET with a logic-level MOSFET, so that the circuit would be able to function from a 7V supply.
I expect the minimum voltage drop across the circuit will be 2.5V to 3V, when it's in CV mode.
The two potentiometers will be multi-turn, especially the CC one because it's very sensitive.
The sense resistor is labeled as 0.1 Ohm, but I'll probably up that to 0.33 ohm (possibly by paralleling three 1 ohm 1W resistors).
I've tested the two stages of this circuit separately, and they seem to work fine. I'm wondering if there are going to be any unexpected behaviors when I chain them together.
Any advice/suggestions would be appreciated.