I am trying to create a current source for laser direct imaging and I have a problem in the circuit I cannot solve.
The laser is a 120 mW 405nm diode and I use it in a laser module from a laser printer. The circuit for the BLDC motor with the hexagon mirror works fine but the circuit for the laser is designed for a 100mA infrared laser diode. This is too much for my UV diode, I have destroyed one diode already. Also the 405nm diode has a common cathode where the infrared types have a different connections.
I am going to modulate the laser with a STM32 microcontroller with the SPI MOSI signal at 18 MHz SPI clock. I have tested that already and this work fine too. This may be a much to high frequency but I have to start somewhere. Don't want to scale down the specs at the beginning of the project.
The problem I encounter is a spike at the beginning of the pulses. See the attached pictures. I have already tried to reduce this effect but I am an embedded software programmer, not an electronics engineer. I hope to find someone here who can tell me what I need to add to reduce the current spike during the start of a pulse.
The bias current is required to calibrate the optics for a sharp image. The images below show a LTSpice simulation with the minimum and maximum currents set.
With a resistor I try simulate the internal photo diode (PD) in 10 steps between 10k and 100k
I can provide the LTSpice simulation file when someone wants to give it a try in the simulator.
@Andy aka,
Is this what you meant with using a high side driver?
I cannot connect the cathode of the PD to ground completely as the base of Q2 will not receive enough voltage to start. Now I had to add a resistor (R1) to make Q2 work. I am pleased with the shape of the wave although it is not a square.