Hi
I used BC857 instead of FMMT593 and the rise and fall time was improved
then I used MMBT3906 instead of the FMMT593 and the rise and fall time was much improved.
the MMBT3906 is 250MHZ while the FMMT593 is 50MHZ, and the BC857 is 100MHz
Dose transition frequency is the reason for the improvement in the rise and fall time?
Regards
Hossam Alzomor
Now that I understand which resistor is the load resistor, I understand how your circuit is a constant current sink. And the problem you are having is being able to switch the current on and off very fast. The two graphs you showed at the very beginning show how the rise times are too slow in one case and overshoot greatly in another case. As I understand it, the only part you are changing is the switching device above R7 (Q4).
It is important to realize the role of the LM358N op-amp in this circuit. This op-amp adjusts the base drive to Q1b so that the sensed feedback from the top of Q4 is equal to the control voltage setpoint. When Q4 is off, current flowing out of pin 1 has nowhere to go. Therefore no current flows out of pin 1. Therefore there is no base current in Q1b. If the voltage at the "-" input of the op-amp gets lower than the "+" input, the op-amp output can forward-bias the base of Q1b to make the "-" input higher. But if the voltage at the "-" input is higher than the "+" input, the op-amp output will be unable to force it down because of the diode action of the base of Q1b. The output becomes effectively disconnected from the input, breaking the feedback loop. What we have then is a unidirectional feedback loop that is only able to correct in one direction. Such a feedback loop is inherently unstable, and the op-amp will go into negative saturation. This is the state of the op-amp when Q4 is off. Now you could take into account the leakage resistance to ground at the "-" input node. That would provide a way for the voltage to go down when the op-amp is unable to force it. Or even the reverse leakage of the base diode in R1b. But this is a very high-impedance sink to ground. When taken in combination with the stray capacitance in this circuit, I think you have a good case for phase-shifted feedback that will oscillate. So I predict that your op-amp is either saturated or oscillating while Q4 is off. Even putting a scope probe on the "-" input could affect the behavior of such a circuit, but it would be worthwhile seeing if the "-' input really can follow the "+" input when Q4 is off. In any case, the state of the op-amp when Q4 is off is bound to be very different from what it must be when Q4 is on. The output from the op-amp necessary to achieve the setpoint current must be very different from the output necessary to maintain constant current when current is really flowing.
With all that in mind, consider what happens when you suddenly switch on Q4. No matter how fast Q4 turns on, the main limitation in switching to a controlled current is the settling time of the feedback circuit, which includes the op-amp. If the op-amp is saturated, that settling time is going to be very large. If the op-amp is not saturated, but oscillating, it still has some significant settling to do before you can get to a controlled current.
When Q4 is slow, the op-amp has time to adjust to the slowly changing conditions, and there is no overshoot. When Q4 is too fast, the op-amp overshoots and makes a big spike. If Q4 is at just the right speed, it might be possible to get to a controlled current condition as fast as the op-amp is able without overshooting. But you will always be limited by the op-amp in this circuit. If you really want to switch on the current fast, you will need a feedback circuit that is just as fast.