I am very new to LTspice. I would like to ask "How can I add a photodiode in the Ltspice?" Is ideal photodiode (or any specific) model already included in the LTspice or do I need to create third party model for photodiode? If it is already included, under with categories it is included in library ? Or If it is not included, how can I make one? Do I need to create the spice model of photodiode which will consist (roughly) of a current source, capacitor and resistor then refer back to the photodiode? Or if there is another way around can you please share your knowledge?

• LTSpice doesn't model optical events, perhaps model it as a programmed current source? – Jasen Jun 20 '16 at 7:37
• ahhh.. I see. So I can use a current source (may be in parallel with capacitor) instead of photodiode? – Sui Jun 20 '16 at 7:49

Or use the 4N2x.sub/CNY17.sub as a model to build your own subcircuit.