Hi Hasham
You are not going to get much if you don’t do as asked and answer some questions.
You have NOT annotated the schematic components to make answering easier as I asked you do.
You have NOT said where EXACTLY those scope pics are measured.
Were those measurements taken before or after the TIA feedback (would be much easier if I could quote R?? instead of a description) resistor was increased from 1.1MΩ to 2.2MΩ.
Could you separate the scope traces so we can see exactly which one has this “nose” on it. Can’t tell when the traces are superimposed.
General: I am assuming the power supply is still +5V/ -5V you have referred to as “Bias Supply”
I think your 0.2% duty cycle could be a bit ambitious. At this figure the pulse width should be 5.56µSec. Looking at your pic it is taking about 7 or 8µSec to reach the comparator switching point. This pulse has a finite attack time and a relatively long decay time. Probably due to the Rf/Cf time constant.
I still think your "noise " looks like comparator switching instability due to not enough amplitude of the input signal and the fact it is trying to switch as the input signal reaches its peak. And the omission of the 10k resistor I suggested between the reference point and + comparator input. I don’t think any hysteresis will work properly without it.
You seem to have built up a complete system and then trying to trouble shoot. This is really not the way to go about it.
Suggestions
Disconnect the NI 6363. Do this at the op amps, don’t leave any little antennas floating around.
Disconnect the inverting amp (call this Q2)
Connect a temporary 10kΩ between Q1 output and ground.
Apply nearly 100% duty cycle to transmitting LED (call this D1).
Measure the current of photo diode (call this D2). You should be able to do this fairly accurately by measuring the voltage between Q1 output and ground and dividing by the feedback resistor. Volts divided by R in MΩ will be µA. Alternatively measure the V across Rf and do the same. In this case the 10MΩ resistance of the DMM will have to be considered. This will be in parallel with Rf. The result should be very near the same.
Is this what you expect. If not find out why. Looking at your scope pix I think this will be in the order of 0.68µA if Rf is 1.1MΩ and 0.34µA if Rf is 2.2MΩ. I am guessing here using the pulse peak at the inverter output of about 740mV as a basis. Should be close as the inverting amp is unity gain at this stage if one can believe the schematic.
Note “0.34µA” was 1.68µA. See edit below.
Apply your signal at say 20% duty and have a look at the waveform. Expand so you can see the attack and decay slope. Check at 0.2%. There are a few contributing factors here. D1 response time, D2 response tome and the R/C time constant in the feedback network. Try removing Cf. What slope remains will be the diode and possibly the OpAmp responses, there is not much you can do about that except maybe find a better TX diode. D2 is a dedicated photo diode bur should be OK. Worth checking data sheet though. You might need some experimenting with feedback components here.
When you are satisfied this stage is OK you can then go on with the next.
Disconnect the comparator and do the same, connect a temporary 10k from Inverter (call this Q2) to ground. Adjust the gain (by changing the feedback R value) for a suitable level at the output to operate the comparator reliably. If you get a decent level you won’t need much hysteresis but you should have some to get good switching without any “chatter”
You can reconnect the comparator. You will need the resistor from reference V to + input (suggest 10kΩ) for any hysteresis calculator to work (I pointed this out above and according to your updated schematic this has been ignored), as I said previously it is the ratio between this resistor and the positive feedback resistor (I think R4 in your schematic, out of focus so difficult to read properly).
Check the output for a good clean signal.
You could well be putting it there with your scope probe earth lead. This should be as short as practical and connected to a ground as close as possible to the measuring point.
Once you are satisfied and only then re connect the NI6363 and do whatever you do with it. If this spike mentioned above re appears only when this device is connected this will be something else again which I know nothing about. It may be possible to ignore it anyway.
One very important thing here. The above description has dismantled the system and got (hopefully) one stage at a time working. Finishing up with a whole that should work OK.
If you make changes do so one change at a time. And record results somewhere. You seem to have made several changes at once here, The photo diode input, the feedback resistor (Rf) value, The buffer from non inverting to inverting and apparently op amp type. This is an absolute no no. You will keep going in circles if you do this sort of thing. You also published scope screen shots ad did not specify at what stage these measurements were made It does help immensely if you can be more specific and please be as accurate as you can. Saves a lot of time and effort when helping.
Cheers Bob
EDITED: "1.68µA above changed to 0.34µA 1005AM 30/09/25