photodiode.m produces miscellaneous plots for photodiodes
by Chuck DiMarzio Northeastern University June 2009
Contents
Read in constants
constant; % Set values for this plot lambda=0.6328e-6; % HeNe laser red wavelength is=1e-9; % Saturation Current, Amperes T=300; % Temperature in Kelvin eta=0.9; % Quantum efficiency vt=k*T/electron; imax=1e-3; % Maximum current to plot pstart=0;pstep=1e-3;pstop=5e-3; % % % vmax=vt*log(imax/is); % Prevents calculation of very large forward % currents vax=[-5:0.01:vmax]; % Voltage axis pax=[pstart:pstep:pstop]; % Optical power axis % % [p,v]=meshgrid(pax,vax); idet=is*(-1+exp(v/vt))-eta*electron/h/c*lambda*p; fig1=figure;plot(v,idet*1000);grid on; moose=axis;hold on;plot(moose(1:2),[0,0],'k-',[0,0],moose(3:4),'k-'); text(0.9*moose(1)+0.1*moose(2),0.3*moose(4),... ['P_{optical} = ',sprintf('%0g',pstart*1000),... ' to ' sprintf('%0g',pstop*1000),... ' mW in steps of ',sprintf('%0g',pstep*1000) 'mW']); hold off; xlabel('v, Voltage, Volts'); ylabel('i, Current, mA');

Load line
vs=-5; % Supply Voltage, Volts r=2500; % Resistance, Ohms fig2=figure;plot(v,idet*1000);grid on; hold on;plot([vs,vmax],[0,(vs-vmax)/r*1e3],'k-'); moose=axis;plot(moose(1:2),[0,0],'k-',[0,0],moose(3:4),'k-'); hold off; xlabel('v, Voltage, Volts'); ylabel('i, Current, mA');

Photocell
vax=[-0.1:0.01:vmax]; % Voltage axis --- Expand positive part [p,v]=meshgrid(pax,vax); % Update variables idet=is*(-1+exp(v/vt))-eta*electron/h/c*lambda*p; vs=-0; % Supply Voltage, Volts r=150; % Resistance, Ohms fig3=figure;plot(v,idet*1000);grid on; hold on;plot([vs,vmax],[0,(vs-vmax)/r*1e3],'k-'); moose=axis;plot(moose(1:2),[0,0],'k-',[0,0],moose(3:4),'k-'); hold off; xlabel('v, Voltage, Volts'); ylabel('i, Current, mA');
