Photo diode / light sensor to detect backlight PWM frequency of LED displays?
Fortunately, 20kHz isn't high frequency. Just about any photodiode should be able to handle 20kHz with no problem, especially if you negative bias the anode to reduce the capacitance and thereby reduce the rise time.

Here's a fairly plain photodiode from Vishay, available for under a dollar from DigiKey: http://www.vishay.com/docs/83471/tefd4300.pdf

The datasheet indicates that under 10 volts of reverse bias, the rise and fall time of the photodiode is on the order of 100ns. That's sufficient to detect oscillations up to 5 MHz, so you should have no problem detecting 20 kHz.

The standard transimpedance amplifier setup probably makes the most sense for your application:







simulate this circuit &ndash; Schematic created using CircuitLab

In the above diagram, you might be able to just forego reverse bias altogether and replace V1 with ground (since your frequency is so low) if you don't want the hassle of generating a negative rail. Choice of Rf depends on how much gain you want, playing with this value will change your transimpedance gain (ie: how many volts you get on the output for current from the diode). Cf is optional and is used to prevent ringing - the value assigned here will give a cutoff around 200 kHz (calculated by 1/(2piRfCf)).

For further information on designing with photodiodes, this app note by Microchip is quite handy:
http://ww1.microchip.com/downloads/en/AppNotes/01494A.pdf

Finally, OSI has an excellent pamphlet on various photodiode circuits:
http://www.osioptoelectronics.com/application-notes/an-photodiode-parameters-characteristics.pdf