Thank you for the great ideas. I did not know that op-amps are push-pull.
They have to be - otherwise they can not produce any output voltage between Vcc and Vdd. Sink and source ability is needed.
What would something like that look like? Do you mean just wiring the integrator up to the output of the comparator and dropping the rc for good?
The RC circuit is part of the comparator... It seems to be an improvement as it's linear, while an RC circuit is not. So you can actually design it to use the full 5V range over 1 µs.
Wouldn't it be more "time-efficient" to go HIGH when the pulse happens and charging the capacitor then discharging it through a high resistor and just measuring the voltage just once? Then one would not need to rely on all the "slow" arduino code to charge the cap and change pin modes. Or did I miss something?
You miss at least the part where the comparator can only sink, not source. So you must bring the cap to +5V, and have the comparator drain it.
You miss the part where a 10 ns pulse is too short to even trigger an interrupt on an Arduino, so you can't know the pulse happened without sampling the ADC, and the pulse may happen during sampling so only the second is valid.
As the ADC takes 110µs to take a measurement, you need to keep the voltage effectively constant for 220µs. That implies an RC of 22ms (100x that time) for your resistor-recharge to not have significant effect during the measurement, and that in turn means over 100 ms for a full recharge between pulses. Still think the Arduino, which can do that recharge process in a few µs, slow? You can lower the value of R4 to all the way to 125Ω to speed it up even more, but then you're at the pin current limit...
I like the integrator. Good improvement. For OpAmp, an MCP6002 may do, an MCP6022 should do. There are no doubt many others. Then I get this circuit:
Note: I don't know how to calculate proper values of R3 and C1. It should be about 1 µs to go from one rail to the other. This again relies on the open drain of the comparator to not have a change to the voltage when there's no pulse; and needs a separate pin for recharge (OUTPUT, HIGH for charge; INPUT while detetcting).
The cap should be of film type for stability in timing operations. PET film works well, PP film is even better.