A phototransistor is similar to a regular BJT except that the base current is produced and controlled by light instead of…