nirbec89:
Indeed currently there are no series resistors to the TIP120 bjt and the inputs of the opamp, I can try to add them .
Is there any thumb rule about their value?
There is no inductors on the circuit and my load is laser diode so no inductance there also..
The ringing is on the turn-off but actually the MOSFET (M2) is turning ON since its shorts the opamp input to gnd, so maybe its related to the mosfet powering on?
I think that Etemenanki did not follow the preceding discussion and does not understand the circuit. In this circuit no base resistor is required with the BJT.
Ringing should be attacked at the input circuitry (of the opamp), not at the output (power transistor) side.
Attached is a picture of the probe compensation.
I cant really adjust the screw but its already looks compensated so I guess its fine.
Diettrich,
Do you think this oscillations can be happen because of Switching MOSFET (M2) gate capacitance?
I'm switching it using industrial function generator,
Its configured to 50Ohms and I have in addition 220Ohm gate resistor , Could it interfere with fast switching and cause this oscillations? maybe MOSFET driver is needed? or smaller MOSFET with less gate capacitance?
Thank you.
For probe compensation show a single slope. I wonder about the thin and thick vertical line parts, what do they mean?
I think that most oscillations result from bad PCB design or wiring. Lines with output current should be kept apart from the signal conditioning part of the circuit. Remote help with this issue is hard till impossible. I already asked you for multi channel scope views, so that the distorted output signal can be seen together with other related signals.
Hi Diettrich,
Attached are two channel measurements for your reference
Blue channel is always on R2
And I change pink channel test positions.
I wrote on the image name each position.
- SCHEMATIC
- SINGLE SLOPE OF PROBE CALIBRATION
- DAC INPUT (BEFORE THE VOTAGE DIVIDER)
- OPAMP NEGATIVE INPUT
- MOSFER DRAIN/ OPAMP POSITIVE INPUT
- MOSFET GATE (PWM INPUT)
Also attached is a single slope image of probe calibration and the schematic.
As far as i understand the MOSFET switching is indeed problematic,
In case you don't see any reasonable reason i guess it could be the PCB design so i will shift to design a new PCB revision.
Thank you!
- SCHEMATIC
2. SINGLE SLOPE OF PROBE CALIBRATION
3. DAC INPUT (BEFORE THE VOTAGE DIVIDER)
4. OPAMP NEGATIVE INPUT
5. MOSFER DRAIN/ OPAMP POSITIVE INPUT
6. MOSFET GATE (PWM INPUT)
Try to locate and eliminate the noise on all your plots. Bad or no probe Gnd?
Use channel DC coupling if possible.
Probes deserve calibration.
Can you edit your post and insert the descriptions before each image? I think you confused some images.
There exists a considerable delay until the output is turned on. Slow opamp or Q1? Such delays can cause a feedback overshoot.
M2 gate deserves a current limiting resistor depending on the PWM output capabilities.
The huge positive output spike is incredible. Fix your scope Gnd to R2 Gnd. Twist the alligator cables to eliminate EM field.
DrDiettrich:
Try to locate and eliminate the noise on all your plots. Bad or no probe Gnd?
Use channel DC coupling if possible.
Probes deserve calibration.
Can you edit your post and insert the descriptions before each image? I think you confused some images.
There exists a considerable delay until the output is turned on. Slow opamp or Q1? Such delays can cause a feedback overshoot.
M2 gate deserves a current limiting resistor depending on the PWM output capabilities.
The huge positive output spike is incredible. Fix your scope Gnd to R2 Gnd. Twist the alligator cables to eliminate EM field.
Hi,
I edited the images as you requested, indeed there were a confusion , sorry for that.
In all images blue channel is the R2 voltage drop (POSITIVE probe to one side of the resistor while NEGATIVE on the other side)
and pink channel POSITIVE probe is the measured feature while NEGATIVE probe is connected to GND.
I will try to calibrate both probes and reduce noise.
So the huge positive output spike is already measured in the image while the gnd probe is connected to R2 negative side.
(positive probe to one side of the resistor and negative to the other)
The opamp could be quite slow i think, its LTC1151 with slew rate of 2.5V/us.
Q1 is TIP120 which is also quite slow i guess.
I will try to twist the aligators.
Hi,
The schematic and PCB images, did you screen grab those or export them from your CAD as jpg or png.
If a screen capture, that would explain the poor resolution when trying to read component values.
Can you post the images again, but with higher resolution please?
What CAD program are you using?
Is there a reason you need to be miniature, I believe half you problem is the small tracks and from what I can see circuitous routing of some tracks.
A separate image of your top and bottom layers will help too.
In my experience the usual PCB drawing colours are Yellow for the overlay, and Red and Blue for the top and bottom layers.
Red as in red not burgundy.
Blue as in blue not navy.
Your PCB uses two very dull dark colours that are hard to separate for the copper layers.
Thanks .. Tom... 
Hi Tom,
It indeed was screen captured.
Attached are exported files, although its the original schematic and it was modified according to the tips here, so I manually soldered components and jumpers.
Still most of the PCB tracks are used and I don't have any reason for this thin tracks, it was design like that since I didn't have that knowledge back then,
I guess that the next step is to re-design it according to the new schematic with wider tracks and all the great tips i got here.
The CAD is EasyEDA
Bottom.pdf (113 KB)
Top.pdf (84.9 KB)
schematic.pdf (61.6 KB)
Hi,
Thanks for the images.
Hi,
I just noticed on one of your scope pics that you have AC coupling selected.
Is that for all your traces?
If so please select DC coupling.
Also can you note what the V/div scale you have selected for each channel, all I can see is the CH2 V/div.
Thanks.. Tom.. 
I wonder about the strange M2 drain (opamp+) signal - can anybody explain it?
M2 really should be a (low power) logic level n channel MOSFET properly soldered with correct pinout.
Tom, I can confirm all the scope images were taken using DC coupling except the one that you saw AC 
sorry for that.
I will check again and update with V/div scale for both channels.
Diettrich,
Currently M2 is FQP30N06L which is logic level n mosfet.
I will try to replace him with smaller alternative.
I have
BSH105
IRF7402
2N7000
all of them should be OK i guess
Thank you
Diettrich,
Switched M2 from FQP30N06L to 2N7000,
It look much better,
Attached is a picture of R2 voltage drop in blue,
and M2 Drain in pink
We lost the delay, and also voltage spikes on R2 looks better.
V/dv of blue channel is 200mV/dv,
pink is 2V/dv.
Both DC Coupling
I guess that from some reason (gate charge?) M2 took long to turn on and it had problem to the feedback loop so we got voltage oscillations.
We still have a smaller voltage spike on the output when the mosfet switching.
Thank you
Added falling and rising 'zoom in' images, same parameters except from horizontal scaling ofcourse
It looks like the voltage spike at the output (R2 Blue channel)caused by the slow drain rising? at the falling edge since its fast, the feedback loop behaves good without spikes.
It could be that switching to smaller MOSFET helped to reduce raising falling timing but still rising is quite slow maybe due to the opamp and BJT, and replacing them with faster components will help
Could be??
For the output spike check the opamp output. Fine tuning has to wait until the next PCB version is ready and we can distinguish circuit properties from bad measuring equipment usage.
opamp output attached with pink channel, blue is still R2.
Can it help to identify that the BJT Q1 that is after the opamp is the slow component?
You are right that we can have progress until certain point that requires new PCB version, which is probably this point. 
I can try to replace BJT and/or opamp to faster components and examine the difference behavior
Does somebody have an idea how to prevent saturation that seems to result in a 300ns delay until the opamp output starts to change?
DrDiettrich:
Does somebody have an idea how to prevent saturation that seems to result in a 300ns delay until the opamp output starts to change?
Hi, could you please elaborate about which saturation and what causing it ?
Thanks and sorry if i requested to explain the obvious 
The output signal starts raising only after the input reaches 100mV, then follows the input signal immediately. That's why I think that there is some saturation that prevents the output following an input signal below 100mV.
Which opamp do you actually use? What is its input voltage range?
Understood..
Opamp is LTC1151
https://www.analog.com/media/en/technical-documentation/data-sheets/1151fa.pdf
I cant see any 'rail to rail' feature in the datasheet, maybe thats the case?