I would like to create as an hobbistic project a power supply circuit allowing to switch between a Constant Voltage mode and a Costant Current one. When Voltage Mode is on, Current regulation should act as an upper limit as well as voltage regulator should act as a limit in costant current mode. I know how to create two separate circuit, but no idea on how to merge them in a smart way.
Produce a constant current circuit.
Feed its output into a constant voltage circuit. Can be done with 2 x LM317 or equivalent.
As long as the voltage taken by the load of the CV circuit is less than the CC setting the system will provide CV. When the load tries to draw more than the CC setting the system automatically transitions into CC mode.
To run purely as CV set CC control to max.
To run purely as CC set CV control to max.
@Felice - A single high power driver is about "how" not "what".
ie work out what you want to achieve and THEN see what circuit elements are required to do it. Olin has effectively answered your question in general terms.
Here is a simple way of doing it with linear components and a single "pass element".
Supply power via an N-Channel MoSFET - Vin to Drain, Vout from source.
Place a current sense resistor in series either twixt drain and supply or source and load.
Voltage sense Vout at the most negative point of this combination.
Convert sensed current and voltage to ground referenced voltages.
Compare these sense voltages to adjustable references and allow output voltage to rise (eg pullup on FET gate) until either of the sensed parameters is at its limit.
Limit voltage maximum using whatever senor comparator has reached its limit at any given moment.
If CV limit is reached first then the supply is a CV supply.
IOf CC limit is reached 1st supply is a CC supply.
If you turn up a reference that is the limiting one to the extent that the other non-varying sensor reaches its limit then the supply transitions smoothly CC-CV or CV-CC.
You can use the variable comparators to operate a SMPS instead of a linear supply with the same result. The SMPS can "think" that it is a Voltage controlled voltage source and it is of no "importance to it" that it is being voltage limited so that a CC condition is met.
Generally this is done with one regulator that has two feedback paths arranged such that it always puts out the lesser of what the feedback signals are requesting.
It's probably conceptually easier to think of this working with a voltage controller, although that's not necessarily how it's really done much of the time. The voltage controller is essentially a power amplifier that has the reference voltage on its positive input and the actual output voltage on its negative input. Now imagine a current sense circuit that compares the current to the setpoint and yanks down on the reference voltage line when the current gets too high. The tricky part is to make all the gains reasonable and the responses proportional accross the range so that the system has good response but is also stable. That's not as trivial as it might sound.
In reality, power supplies nowadays are switchers, and anything complicated will have a microcontroller in it. If I was doing this, I'd have something like a dsPIC measure the output voltage and output current with a PWM output controlling the switching element. Each cycle there would be computation performed to decide how long to turn on the switching element, given the immediate output voltage and current conditions and the input voltage.