Current regulation is much easier with the shunt at the ground side, just as in the standard current sink circuit.
I chose this current sense chip for my design:
https://datasheets.maximintegrated.com/en/ds/MAX4376-MAX4378.pdfIt is a high side current sense amplifier. I don't think I can use it at ground side. I presume this chip gives better performance than just using an opamp to sense the current.
I managed to trick Simetrix to let me simulate the circuit, by transforming the current sense into the topology suggested by you, and it seems to be working fine this way.
I attached the final schematic showing the current going through the diode string. Also my supply for them is messed since using an opamp it needs some voltage drop to pick up a sense of what's happening.
So anyway, I'll use a chip for sensing, just that I need to figure out if I'll do it on the high side or low side of the mosfet.
This is kinda great as I use the PWM line for blanking, and I can use the DAC lines to set the operating conditions.
For example, I might try to overdrive the diode in pulsed operation. This can be easily set up this way. Also I do care about overall efficiency.
I've used TI's Webench Power Designer for the TPS54531 chip for parts spec with 5mVpp output ripple at 5V/5A output. That device is current controlled I think. The 2x47uF caps on the output shouldn't be a problem for a 3.5A diode. I'll have a small resistor in series anyway.
Also the PWM frequency in the attached photo is at 10KHz.
Also not being able to adjust for the diode I use, makes for losses of power on the pcb, that I do not want. I'll need to switch between 450nm/405nm diodes, without much fuss. There's like 0.5V difference in operating points. As in 450nm has lower operating voltage, and that means that I have to dump the extra 0.5V at anywhere between 3-5A. Depending on the 445-455nm diode I use. That's extra 2.5W, that means another heatsink etc etc. It's an exercise in efficiency so to say.
And with 24V input, you could control, just the same, two laser diodes in series. There's extra losses on pcb in the dc/dc converter but theoretically it should be doable. Just set double the output voltage, current control is the same.