OK, now that we have control over the voice coil and hence the focus, we need also to be able to control the laser and its power.
We are going to achieve this pretty much in the same way as we did with the voice coil. After all the core principle is the same: supply a defined current (now to the laser diode), and to make things easier get it linearized.
However, there are also a few small differences we need/want to account for. First of all, we won't need quite as much current this time. The lasers work at around 20 - 40 mA, compared to the 100+ mA of the voice coil. More important still is the fact that the laser diodes are quite fragile. So in addition to the general current driver circuit we need to include a protection circuit that shorts out the laser if there's too much current or a reverse current. This can be easily achieved with a Zener diode plus a normal diode in parallel with the laser.
The rest of the circuit is as I said, pretty much the same as the voice coil one, except for the values of components. We are e.g. using a faster op-amp (LT1215) and higher capacitances for the set-point filtering.
There is another part of the circuit that is obviously different: the opto-coupler part. I am not going to implement it just yet, but it's purpose is simply to allow us to quickly switch the laser off if needs be by grounding the non-inverting pin of the op-amp.
And this is what the end result looks like.
The PCB also includes a port to measure the voltage across the 33Ohm resistor (between the BJT and ground), which gives us this plot of current vs setpoint voltage V_set:
Again, all nice and linear and we can easily reach the 20 - 40 mA we need for the lasers. We could even change the 33Ohm for say 100Ohm if we wanted to increase precision.