Photodiodes can be used to sense moving objects, such as optical switches and encoders. In the circuit shown in the figure, we use an operational amplifier to supply a voltage of 10 V for each current microampere in reverse direction in the diode used as a sensor. The integrated circuit used is an LM108 that uses two types of NPN transistors on the same chip. There are super transistors with gains of 5000 and a breaking voltage of 4 V and conventional transistors with gains of 200 times and a breaking voltage of 80 V. The configuration of these transistors allows to obtain a high degree of rejection in common mode with a high overall performance In this way it is possible to obtain even better performance with bipolar transistors than those obtained with operational amplifiers that use field effect transistors. The circuit accepts two forms of frequency compensation. In one, just connect a 30 pF capacitor between the output of the second amplifier stage and the ground and the second between the compensation terminals. The project indicated in the figure uses the first method of compensation e. The circuit gain can be changed by modifying the values ​​of R1 and R2. Note that precision resistors are used to maintain the circuit response at 10 V / uA. The power supply must be symmetrical. The operating voltage range of the integrated circuit ranges from 5 to 20 V and the maximum current that can be obtained at the output with a 15 V supply reaches 8 mA. The maximum response speed, of a few megahertz, depends on the operational amplifier.